2 * Copyright (C) 2014,2015 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/>.
20#include "ObjectListModel.h"
21#include "SessionModel.h"
28class Session : public QObject
31 Q_PROPERTY(QString name READ name CONSTANT)
32 Q_PROPERTY(MirSurface* lastSurface READ lastSurface NOTIFY lastSurfaceChanged)
33 Q_PROPERTY(ObjectListModel<MirSurface>* surfaces READ surfaces CONSTANT)
34 Q_PROPERTY(ApplicationInfo* application READ application NOTIFY applicationChanged)
35 Q_PROPERTY(Session* parentSession READ parentSession NOTIFY parentSessionChanged DESIGNABLE false)
36 Q_PROPERTY(SessionModel* childSessions READ childSessions DESIGNABLE false CONSTANT)
37 Q_PROPERTY(bool live READ live NOTIFY liveChanged)
40 explicit Session(const QString &name,
41 const QUrl& screenshot,
45 Q_INVOKABLE void release();
48 QString name() const { return m_name; }
49 bool live() const { return m_live; }
50 bool fullscreen() const { return m_fullscreen; }
51 ApplicationInfo* application() const { return m_application; }
52 MirSurface *lastSurface() const;
53 ObjectListModel<MirSurface>* surfaces() const;
54 Session* parentSession() const { return m_parentSession; }
56 void setApplication(ApplicationInfo* item);
57 void appendSurface(MirSurface* surface);
58 void removeSurface(MirSurface* surface);
59 void setScreenshot(const QUrl& m_screenshot);
60 void setLive(bool live);
61 void setFullscreen(bool fullscreen);
63 Q_INVOKABLE void addChildSession(Session* session);
64 void insertChildSession(uint index, Session* session);
65 Q_INVOKABLE void removeChildSession(Session* session);
68 void applicationChanged(ApplicationInfo*);
69 void parentSessionChanged(Session*);
70 void liveChanged(bool live);
71 void surfaceAdded(MirSurface *surface);
72 void lastSurfaceChanged(MirSurface *surface);
73 void fullscreenChanged(bool fullscreen);
79 Q_INVOKABLE void createSurface();
82 void updateFullscreenProperty();
85 SessionModel* childSessions() const;
86 void setParentSession(Session* session);
91 ApplicationInfo* m_application;
92 MirSurface* m_surface;
93 Session* m_parentSession;
94 SessionModel* m_children;
95 ObjectListModel<MirSurface> m_surfaces;
98 friend class ApplicationTestInterface;
101Q_DECLARE_METATYPE(Session*)
102Q_DECLARE_METATYPE(ObjectListModel<MirSurface>*)
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