From 49daa163530ceabc9eaa8911ab96b5f799cfb552 Mon Sep 17 00:00:00 2001 From: Fabien Proriol Date: Sun, 25 May 2025 17:58:09 +0200 Subject: Initial Commit --- src/applicationmanager.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/applicationmanager.h (limited to 'src/applicationmanager.h') 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 + +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 -- cgit v1.2.3