17 #ifndef WORKSPACEMANAGER_H 18 #define WORKSPACEMANAGER_H 20 #include <QQmlListProperty> 22 #include "WindowManagerGlobal.h" 23 #include "WorkspaceModel.h" 29 namespace application {
30 class MirSurfaceInterface;
31 class SurfaceManagerInterface;
36 class WINDOWMANAGERQML_EXPORT WorkspaceManager :
public QObject
39 Q_PROPERTY(Workspace* activeWorkspace READ activeWorkspace WRITE setActiveWorkspace2 NOTIFY activeWorkspaceChanged)
43 static WorkspaceManager* instance();
45 Workspace* activeWorkspace()
const;
46 void setActiveWorkspace(Workspace* workspace);
48 Workspace* createWorkspace();
49 void destroyWorkspace(Workspace* workspace);
51 void destroyFloatingWorkspaces();
53 Q_INVOKABLE
void moveSurfaceToWorkspace(unity::shell::application::MirSurfaceInterface* surface,
54 Workspace* workspace);
56 Q_INVOKABLE
void moveWorkspaceContentToWorkspace(Workspace* to, Workspace* from);
59 void setSurfaceManager(unity::shell::application::SurfaceManagerInterface*);
62 void activeWorkspaceChanged(Workspace*);
65 void setActiveWorkspace2(Workspace* workspace);
67 QSet<Workspace*> m_allWorkspaces;
68 Workspace* m_activeWorkspace;
69 unity::shell::application::SurfaceManagerInterface* m_surfaceManager;
72 #endif // WORKSPACEMANAGER_H