2 * Copyright (C) 2013 Canonical, Ltd.
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.
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.
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/>.
17#ifndef APPLICATION_MANAGER_H
18#define APPLICATION_MANAGER_H
23#include "ApplicationListModel.h"
24#include "ApplicationInfo.h"
28class ApplicationManager : public QObject {
32 Q_ENUMS(FormFactorHint)
33 Q_ENUMS(FavoriteApplication)
36 Q_PROPERTY(int keyboardHeight READ keyboardHeight NOTIFY keyboardHeightChanged)
37 Q_PROPERTY(bool keyboardVisible READ keyboardVisible NOTIFY keyboardVisibleChanged)
39 Q_PROPERTY(int sideStageWidth READ sideStageWidth)
40 Q_PROPERTY(StageHint stageHint READ stageHint)
41 Q_PROPERTY(FormFactorHint formFactorHint READ formFactorHint)
42 Q_PROPERTY(ApplicationListModel* mainStageApplications READ mainStageApplications)
43 Q_PROPERTY(ApplicationListModel* sideStageApplications READ sideStageApplications)
44 Q_PROPERTY(ApplicationInfo* mainStageFocusedApplication READ mainStageFocusedApplication
45 NOTIFY mainStageFocusedApplicationChanged)
46 Q_PROPERTY(ApplicationInfo* sideStageFocusedApplication READ sideStageFocusedApplication
47 NOTIFY sideStageFocusedApplicationChanged)
50 ApplicationManager(QObject *parent = NULL);
51 virtual ~ApplicationManager();
54 Dash, Default, Indicators, Notifications, Greeter, Launcher, OnScreenKeyboard,
58 MainStage, IntegrationStage, ShareStage, ContentPickingStage,
59 SideStage, ConfigurationStage
62 DesktopFormFactor, PhoneFormFactor, TabletFormFactor
64 enum FavoriteApplication {
65 CameraApplication, GalleryApplication, BrowserApplication, ShareApplication
71 Q_DECLARE_FLAGS(ExecFlags, Flag)
73 int keyboardHeight() const;
74 bool keyboardVisible() const;
75 int sideStageWidth() const;
76 StageHint stageHint() const;
77 FormFactorHint formFactorHint() const;
78 ApplicationListModel* mainStageApplications() const;
79 ApplicationListModel* sideStageApplications() const;
80 ApplicationInfo* mainStageFocusedApplication() const;
81 ApplicationInfo* sideStageFocusedApplication() const;
83 Q_INVOKABLE void focusApplication(int handle);
84 Q_INVOKABLE void unfocusCurrentApplication(StageHint stageHint);
85 Q_INVOKABLE ApplicationInfo* startProcess(QString desktopFile,
87 QStringList arguments = QStringList());
88 Q_INVOKABLE void stopProcess(ApplicationInfo* application);
89 Q_INVOKABLE void startWatcher() {}
92 void keyboardHeightChanged();
93 void keyboardVisibleChanged();
94 void mainStageFocusedApplicationChanged();
95 void sideStageFocusedApplicationChanged();
96 void focusRequested(FavoriteApplication favoriteApplication);
99 void showApplicationWindow(ApplicationInfo *application);
100 void buildListOfAvailableApplications();
101 void generateQmlStrings(ApplicationInfo *application);
102 void createMainStageComponent();
103 void createMainStage();
104 void createSideStageComponent();
105 void createSideStage();
106 int m_keyboardHeight;
107 bool m_keyboardVisible;
108 ApplicationListModel* m_mainStageApplications;
109 ApplicationListModel* m_sideStageApplications;
110 ApplicationInfo* m_mainStageFocusedApplication;
111 ApplicationInfo* m_sideStageFocusedApplication;
112 QList<ApplicationInfo*> m_availableApplications;
113 QQmlComponent *m_mainStageComponent;
114 QQuickItem *m_mainStage;
115 QQmlComponent *m_sideStageComponent;
116 QQuickItem *m_sideStage;
119Q_DECLARE_OPERATORS_FOR_FLAGS(ApplicationManager::ExecFlags)
121Q_DECLARE_METATYPE(ApplicationManager*)
123#endif // APPLICATION_MANAGER_H
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list