@@ -75,21 +75,6 @@ class TopLevelWindowModel : public QAbstractListModel
76 Q_PROPERTY(Window* focusedWindow READ focusedWindow NOTIFY focusedWindowChanged)
76 Q_PROPERTY(Window* focusedWindow READ focusedWindow NOTIFY focusedWindowChanged)
78− Q_PROPERTY(Workspace* workspace
81− NOTIFY workspaceChanged)
83− Q_PROPERTY(unity::shell::application::SurfaceManagerInterface* surfaceManager
85− WRITE setSurfaceManager
86− NOTIFY surfaceManagerChanged)
88− Q_PROPERTY(unity::shell::application::ApplicationManagerInterface* applicationManager
89− READ applicationManager
90− WRITE setApplicationManager
91− NOTIFY applicationManagerChanged)
94 The id to be used on the next entry created
79 The id to be used on the next entry created
95 Useful for tests
80 Useful for tests
@@ -108,7 +93,7 @@ public:
108 ApplicationRole = Qt::UserRole + 1,
93 ApplicationRole = Qt::UserRole + 1,
111− TopLevelWindowModel();
96+ TopLevelWindowModel(Workspace* workspace);
113 // From QAbstractItemModel
98 // From QAbstractItemModel
114 int rowCount(const QModelIndex &parent = QModelIndex()) const override;
99 int rowCount(const QModelIndex &parent = QModelIndex()) const override;
@@ -119,20 +104,11 @@ public:
119 return roleNames;
104 return roleNames;
122− // Own API
107+ // Own API;
124− Workspace* workspace() const { return m_workspace; }
125− void setWorkspace(Workspace* workspace);
127 unity::shell::application::MirSurfaceInterface* inputMethodSurface() const;
109 unity::shell::application::MirSurfaceInterface* inputMethodSurface() const;
128 Window* focusedWindow() const;
110 Window* focusedWindow() const;
130− unity::shell::application::ApplicationManagerInterface *applicationManager() const { return m_applicationManager; }
131− void setApplicationManager(unity::shell::application::ApplicationManagerInterface*);
133− unity::shell::application::SurfaceManagerInterface *surfaceManager() const { return m_surfaceManager; }
134− void setSurfaceManager(unity::shell::application::SurfaceManagerInterface*);
136 int nextId() const { return m_nextId; }
112 int nextId() const { return m_nextId; }
@@ -179,8 +155,6 @@ Q_SIGNALS:
179 void countChanged();
155 void countChanged();
180 void inputMethodSurfaceChanged(unity::shell::application::MirSurfaceInterface* inputMethodSurface);
156 void inputMethodSurfaceChanged(unity::shell::application::MirSurfaceInterface* inputMethodSurface);
181 void focusedWindowChanged(Window *focusedWindow);
157 void focusedWindowChanged(Window *focusedWindow);
182− void applicationManagerChanged(unity::shell::application::ApplicationManagerInterface*);
183− void surfaceManagerChanged(unity::shell::application::SurfaceManagerInterface*);
186 * @brief Emitted when the list changes
160 * @brief Emitted when the list changes
@@ -191,9 +165,10 @@ Q_SIGNALS:
192 void nextIdChanged();
166 void nextIdChanged();
194− void workspaceChanged(Workspace*);
196private Q_SLOTS:
168private Q_SLOTS:
169+ void setApplicationManager(unity::shell::application::ApplicationManagerInterface*);
170+ void setSurfaceManager(unity::shell::application::SurfaceManagerInterface*);
197 void onSurfaceCreated(unity::shell::application::MirSurfaceInterface *surface);
172 void onSurfaceCreated(unity::shell::application::MirSurfaceInterface *surface);
198 void onSurfacesAddedToWorkspace(const std::shared_ptr<miral::Workspace>& workspace,
173 void onSurfacesAddedToWorkspace(const std::shared_ptr<miral::Workspace>& workspace,
199 const QVector<unity::shell::application::MirSurfaceInterface*> surfaces);
174 const QVector<unity::shell::application::MirSurfaceInterface*> surfaces);