~allanlesage/unity8/autopilot-indicator-page-title-matches-widget

« back to all changes in this revision

Viewing changes to tests/mocks/Unity/Application/ApplicationManager.h

  • Committer: Allan LeSage
  • Date: 2014-04-09 15:15:42 UTC
  • mfrom: (478.1.346 unity8)
  • Revision ID: allan.lesage@canonical.com-20140409151542-44jp9dpr9c6ly84o
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
    Q_PROPERTY(bool fake READ fake CONSTANT)
47
47
 
 
48
    // Only for testing
 
49
    // This can be used to place some controls to right, like make tryPhoneStage for example
 
50
    Q_PROPERTY(int rightMargin READ rightMargin WRITE setRightMargin)
 
51
 
48
52
 public:
49
53
    ApplicationManager(QObject *parent = NULL);
50
54
    virtual ~ApplicationManager();
87
91
    Q_INVOKABLE void move(int from, int to);
88
92
 
89
93
    // Application control methods
 
94
    Q_INVOKABLE bool requestFocusApplication(const QString &appId) override;
90
95
    Q_INVOKABLE bool focusApplication(const QString &appId) override;
91
96
    Q_INVOKABLE void unfocusCurrentApplication() override;
92
97
    Q_INVOKABLE ApplicationInfo *startApplication(const QString &appId, const QStringList &arguments = QStringList()) override;
93
98
    Q_INVOKABLE ApplicationInfo *startApplication(const QString &appId, ExecFlags flags, const QStringList &arguments = QStringList());
94
99
    Q_INVOKABLE bool stopApplication(const QString &appId) override;
 
100
    Q_INVOKABLE bool updateScreenshot(const QString &appId) override;
95
101
 
96
102
    QString focusedApplicationId() const override;
 
103
    bool suspended() const;
 
104
    void setSuspended(bool suspended);
 
105
 
 
106
    // Only for testing
 
107
    Q_INVOKABLE QStringList availableApplications();
 
108
    int rightMargin() const;
 
109
    void setRightMargin(int rightMargin);
97
110
 
98
111
 Q_SIGNALS:
99
112
    void keyboardHeightChanged();
113
126
    void createSideStage();
114
127
    int m_keyboardHeight;
115
128
    bool m_keyboardVisible;
 
129
    bool m_suspended;
116
130
    QList<ApplicationInfo*> m_runningApplications;
117
131
    QList<ApplicationInfo*> m_availableApplications;
118
132
    QQmlComponent *m_mainStageComponent;
119
133
    QQuickItem *m_mainStage;
120
134
    QQmlComponent *m_sideStageComponent;
121
135
    QQuickItem *m_sideStage;
 
136
 
 
137
    int m_rightMargin;
122
138
};
123
139
 
124
140
Q_DECLARE_OPERATORS_FOR_FLAGS(ApplicationManager::ExecFlags)