summaryrefslogtreecommitdiff
path: root/src/applicationmanager.h
blob: b4568f0a50e6c029cdccacb87c40235a3e1e5f1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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