2 * Copyright (C) 2014 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 "SessionModel.h"
27class Session : public QObject
30 Q_PROPERTY(QString name READ name CONSTANT)
31 Q_PROPERTY(MirSurfaceItem* surface READ surface NOTIFY surfaceChanged)
32 Q_PROPERTY(ApplicationInfo* application READ application NOTIFY applicationChanged)
33 Q_PROPERTY(Session* parentSession READ parentSession NOTIFY parentSessionChanged DESIGNABLE false)
34 Q_PROPERTY(SessionModel* childSessions READ childSessions DESIGNABLE false CONSTANT)
35 Q_PROPERTY(bool live READ live NOTIFY liveChanged)
38 explicit Session(const QString &name,
39 const QUrl& screenshot,
43 Q_INVOKABLE void release();
46 QString name() const { return m_name; }
47 bool live() const { return m_live; }
48 ApplicationInfo* application() const { return m_application; }
49 MirSurfaceItem* surface() const { return m_surface; }
50 Session* parentSession() const { return m_parentSession; }
52 void setApplication(ApplicationInfo* item);
53 void setSurface(MirSurfaceItem* surface);
54 void setScreenshot(const QUrl& m_screenshot);
55 void setLive(bool live);
57 Q_INVOKABLE void addChildSession(Session* session);
58 void insertChildSession(uint index, Session* session);
59 Q_INVOKABLE void removeChildSession(Session* session);
62 void applicationChanged(ApplicationInfo*);
63 void surfaceChanged(MirSurfaceItem*);
64 void parentSessionChanged(Session*);
65 void liveChanged(bool live);
71 Q_INVOKABLE void createSurface();
74 SessionModel* childSessions() const;
75 void setParentSession(Session* session);
80 ApplicationInfo* m_application;
81 MirSurfaceItem* m_surface;
82 Session* m_parentSession;
83 SessionModel* m_children;
85 friend class ApplicationTestInterface;
88Q_DECLARE_METATYPE(Session*)
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