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;
36class WINDOWMANAGERQML_EXPORT WorkspaceManager :
public QObject
39 Q_PROPERTY(Workspace* activeWorkspace READ activeWorkspace WRITE setActiveWorkspace2 NOTIFY activeWorkspaceChanged)
44 static WorkspaceManager* instance();
46 Workspace* activeWorkspace()
const;
47 void setActiveWorkspace(Workspace* workspace);
49 Workspace* createWorkspace();
50 Q_INVOKABLE
void destroyWorkspace(Workspace* workspace);
52 void destroyFloatingWorkspaces();
54 Q_INVOKABLE
void moveSurfaceToWorkspace(lomiri::shell::application::MirSurfaceInterface* surface,
55 Workspace* workspace);
57 Q_INVOKABLE
void moveWorkspaceContentToWorkspace(Workspace* to, Workspace* from);
60 void setSurfaceManager(lomiri::shell::application::SurfaceManagerInterface*);
63 void activeWorkspaceChanged(Workspace*);
66 void setActiveWorkspace2(Workspace* workspace);
68 QSet<Workspace*> m_allWorkspaces;
69 Workspace* m_activeWorkspace;
70 lomiri::shell::application::SurfaceManagerInterface* m_surfaceManager;