-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathShellApplication.h
63 lines (51 loc) · 1.63 KB
/
ShellApplication.h
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
* Copyright (C) 2015 Canonical, Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SHELLAPPLICATION_H
#define SHELLAPPLICATION_H
#include <QGuiApplication>
#include <QQmlEngine>
#include <QQuickView>
#include <QScopedPointer>
#include "ApplicationArguments.h"
#ifdef UNITY8_ENABLE_TOUCH_EMULATION
#include "MouseTouchAdaptor.h"
#endif
#include "SecondaryWindow.h"
#include "ShellView.h"
class ShellApplication : public QGuiApplication
{
Q_OBJECT
public:
ShellApplication(int & argc, char ** argv, bool isMirServer);
virtual ~ShellApplication();
void destroyResources();
public Q_SLOTS:
// called by qtmir
void onScreenAboutToBeRemoved(QScreen *screen);
private Q_SLOTS:
void onScreenAdded(QScreen*);
private:
void setupQmlEngine(bool isMirServer);
QString m_deviceName;
ApplicationArguments m_qmlArgs;
ShellView *m_shellView{nullptr};
SecondaryWindow *m_secondaryWindow{nullptr};
#ifdef UNITY8_ENABLE_TOUCH_EMULATION
MouseTouchAdaptor *m_mouseTouchAdaptor{nullptr};
#endif
QQmlEngine *m_qmlEngine{nullptr};
};
#endif // SHELLAPPLICATION_H