diff options
author | Fabien Proriol <fabien.proriol@kazoe.org> | 2025-05-25 17:58:09 +0200 |
---|---|---|
committer | Fabien Proriol <fabien.proriol@kazoe.org> | 2025-05-26 18:01:49 +0200 |
commit | 49daa163530ceabc9eaa8911ab96b5f799cfb552 (patch) | |
tree | 080d0b31eafd138cd8d47d5c2a52b75d3cfa6f28 /src/applicationmanager.h |
Initial Commit
Diffstat (limited to 'src/applicationmanager.h')
-rw-r--r-- | src/applicationmanager.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/applicationmanager.h b/src/applicationmanager.h new file mode 100644 index 0000000..b4568f0 --- /dev/null +++ b/src/applicationmanager.h @@ -0,0 +1,43 @@ +#ifndef APPLICATIONMANAGER_H +#define APPLICATIONMANAGER_H + +#include <QObject> + +class ApplicationManager : public QObject +{ + Q_OBJECT + Q_PROPERTY(QObject *currentSurface READ currentSurface WRITE setCurrentSurface NOTIFY currentSurfaceChanged) + Q_PROPERTY(bool isHome READ isHome WRITE setIsHome NOTIFY isHomeChanged) + Q_PROPERTY(QString virtualkeyboard READ virtualkeyboard CONSTANT) + + QObject *m_currentSurface {nullptr}; + bool m_isHome; + +public: + explicit ApplicationManager(QObject *parent = nullptr); + + bool isHome() const; + +public slots: + QObject *currentSurface() const; + void setCurrentSurface(QObject *newCurrentSurface); + + int count(); + QString applicationName(int id); + int applicationPid(int id); + int applicationFocus(int id); + int currentApplicationPid(); + void hideApplicationPid(qint64 pid); + void raiseApplicationPid(qint64 pid); + void backHome(); + void setIsHome(bool isHome); + + QString virtualkeyboard(); + +signals: + void currentSurfaceChanged(); + void gotoHome(); + void isHomeChanged(bool isHome); +}; + +#endif // APPLICATIONMANAGER_H |