2 * Copyright (C) 2017 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 WINDOWMANAGER_WORKSPACE_H
18#define WINDOWMANAGER_WORKSPACE_H
28class TopLevelWindowModel;
30namespace miral { class Workspace; }
34 namespace application {
35 class MirSurfaceInterface;
40class Workspace : public QObject
43 Q_PROPERTY(bool active READ isActive NOTIFY activeChanged)
44 Q_PROPERTY(TopLevelWindowModel* windowModel READ windowModel NOTIFY windowModelChanged)
48 virtual void assign(WorkspaceModel* model, const QVariant& index = QVariant());
49 virtual void unassign();
52 virtual bool isActive() const { return m_active; }
54 TopLevelWindowModel *windowModel() const { return m_windowModel; }
55 std::shared_ptr<miral::Workspace> workspace() const { return m_workspace; }
56 bool isAssigned() const;
59 virtual void activate();
65 void activeChanged(bool);
66 void windowModelChanged();
69 Workspace(QObject *parent = 0);
70 Workspace(Workspace const& other);
72 std::shared_ptr<miral::Workspace> m_workspace;
73 WorkspaceModel* m_model;
74 TopLevelWindowModel* m_windowModel;
77 friend class WorkspaceManager;
80class WorkspaceProxy : public Workspace
84 WorkspaceProxy(Workspace*const workspace);
86 Q_INVOKABLE void assign(WorkspaceModel* model, const QVariant& index = QVariant()) override;
88 bool isActive() const override;
89 void activate() override;
91 Workspace* proxyObject() const { return m_original.data(); }
94 void unassign() override;
97 const QPointer<Workspace> m_original;
100#endif // WINDOWMANAGER_WORKSPACE_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