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(Session* parentSession READ parentSession NOTIFY parentSessionChanged DESIGNABLE false)
33 Q_PROPERTY(SessionModel* childSessions READ childSessions DESIGNABLE false CONSTANT)
34 Q_PROPERTY(bool live READ live NOTIFY liveChanged)
37 explicit Session(const QString &name,
38 const QUrl& screenshot,
42 Q_INVOKABLE void release();
45 QString name() const { return m_name; }
46 bool live() const { return m_live; }
47 ApplicationInfo* application() const { return m_application; }
48 MirSurfaceItem* surface() const { return m_surface; }
49 Session* parentSession() const { return m_parentSession; }
51 void setApplication(ApplicationInfo* item);
52 void setSurface(MirSurfaceItem* surface);
53 void setScreenshot(const QUrl& m_screenshot);
54 void setLive(bool live);
56 Q_INVOKABLE void addChildSession(Session* session);
57 void insertChildSession(uint index, Session* session);
58 void removeChildSession(Session* session);
61 void surfaceChanged(MirSurfaceItem*);
62 void parentSessionChanged(Session*);
63 void liveChanged(bool isLive);
69 Q_INVOKABLE void createSurface();
72 SessionModel* childSessions() const;
73 void setParentSession(Session* session);
78 ApplicationInfo* m_application;
79 MirSurfaceItem* m_surface;
80 Session* m_parentSession;
81 SessionModel* m_children;
83 friend class ApplicationTestInterface;
86Q_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