Lomiri
Loading...
Searching...
No Matches
WindowManagerObjects.h
1/*
2 * Copyright (C) 2017 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef WINDOWMANAGEROBJECTS_H
18#define WINDOWMANAGEROBJECTS_H
19
20#include <QObject>
21
22#include "WindowManagerGlobal.h"
23
24namespace lomiri {
25 namespace shell {
26 namespace application {
27 class SurfaceManagerInterface;
28 class ApplicationManagerInterface;
29 }
30 }
31}
32
33class WINDOWMANAGERQML_EXPORT WindowManagerObjects : public QObject
34{
35 Q_OBJECT
36
37 Q_PROPERTY(lomiri::shell::application::SurfaceManagerInterface* surfaceManager
38 READ surfaceManager
39 WRITE setSurfaceManager
40 NOTIFY surfaceManagerChanged)
41
42 Q_PROPERTY(lomiri::shell::application::ApplicationManagerInterface* applicationManager
43 READ applicationManager
44 WRITE setApplicationManager
45 NOTIFY applicationManagerChanged)
46public:
47 explicit WindowManagerObjects(QObject *parent = 0);
48
49 static WindowManagerObjects *instance();
50
51 lomiri::shell::application::SurfaceManagerInterface *surfaceManager() const { return m_surfaceManager; }
52 void setSurfaceManager(lomiri::shell::application::SurfaceManagerInterface*);
53
54 lomiri::shell::application::ApplicationManagerInterface *applicationManager() const { return m_applicationManager; }
55 void setApplicationManager(lomiri::shell::application::ApplicationManagerInterface*);
56
57Q_SIGNALS:
58 void surfaceManagerChanged(lomiri::shell::application::SurfaceManagerInterface*);
59 void applicationManagerChanged(lomiri::shell::application::ApplicationManagerInterface*);
60
61private:
62 lomiri::shell::application::SurfaceManagerInterface* m_surfaceManager;
63 lomiri::shell::application::ApplicationManagerInterface* m_applicationManager;
64};
65
66#endif // WINDOWMANAGEROBJECTS_H