4#include <qtmir/screen.h>
5#include <QScopedPointer>
8#include "WorkspaceModel.h"
13class ScreenInterface: public QObject
17 Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged)
18 Q_PROPERTY(bool used READ used NOTIFY usedChanged)
19 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
20 Q_PROPERTY(qtmir::OutputTypes outputType READ outputType NOTIFY outputTypeChanged)
21 Q_PROPERTY(float scale READ scale NOTIFY scaleChanged)
22 Q_PROPERTY(qtmir::FormFactor formFactor READ formFactor NOTIFY formFactorChanged)
23 Q_PROPERTY(MirPowerMode powerMode READ powerMode NOTIFY powerModeChanged)
24 Q_PROPERTY(Qt::ScreenOrientation orientation READ orientation NOTIFY orientationChanged)
25 Q_PROPERTY(QPoint position READ position NOTIFY positionChanged)
26 Q_PROPERTY(uint currentModeIndex READ currentModeIndex NOTIFY currentModeIndexChanged)
27 Q_PROPERTY(QQmlListProperty<qtmir::ScreenMode> availableModes READ availableModes NOTIFY availableModesChanged)
28 Q_PROPERTY(QSizeF physicalSize READ physicalSize NOTIFY physicalSizeChanged)
29 Q_PROPERTY(QString outputTypeName READ outputTypeName NOTIFY outputTypeChanged)
30 Q_PROPERTY(WorkspaceModel* workspaces READ workspaces CONSTANT)
31 Q_PROPERTY(Workspace* currentWorkspace READ currentWorkspace WRITE setCurrentWorkspace NOTIFY currentWorkspaceChanged)
34 qtmir::OutputId outputId() const;
38 QSizeF physicalSize() const;
39 qtmir::FormFactor formFactor() const;
40 qtmir::OutputTypes outputType() const;
41 MirPowerMode powerMode() const;
42 Qt::ScreenOrientation orientation() const;
43 QPoint position() const;
44 QQmlListProperty<qtmir::ScreenMode> availableModes();
45 uint currentModeIndex() const;
46 bool isActive() const;
47 void setActive(bool active);
48 QScreen* qscreen() const;
49 qtmir::ScreenConfiguration *beginConfiguration() const;
50 bool applyConfiguration(qtmir::ScreenConfiguration *configuration);
51 QString outputTypeName() const;
53 virtual WorkspaceModel* workspaces() const = 0;
54 virtual Workspace *currentWorkspace() const = 0;
55 virtual void setCurrentWorkspace(Workspace* workspace) = 0;
57 void sync(ScreenInterface* proxy);
59 qtmir::Screen* wrapped() const { return m_wrapped; }
67 void outputTypeChanged();
69 void formFactorChanged();
70 void powerModeChanged();
71 void orientationChanged();
72 void positionChanged();
73 void currentModeIndexChanged();
74 void physicalSizeChanged();
75 void availableModesChanged();
76 void activeChanged(bool active);
77 void currentWorkspaceChanged(Workspace*);
80 ScreenInterface(QObject* parent = 0);
82 void connectToScreen(qtmir::Screen* screen);
83 void connectToScreen(ScreenInterface* screen);
86 QPointer<qtmir::Screen> m_wrapped;
90class Screen : public ScreenInterface
94 explicit Screen(qtmir::Screen*const wrapped);
97 WorkspaceModel* workspaces() const override;
98 Workspace *currentWorkspace() const override;
99 void setCurrentWorkspace(Workspace* workspace) override;
101 static ScreenAttached *qmlAttachedProperties(QObject *owner);
104 void resetCurrentWorkspace();
106 const QScopedPointer<WorkspaceModel> m_workspaces;
107 QPointer<Workspace> m_currentWorspace;
110class ScreenProxy : public ScreenInterface
114 explicit ScreenProxy(ScreenInterface*const screen);
116 // From qtmir::Screen
117 WorkspaceModel* workspaces() const override;
118 Workspace *currentWorkspace() const override;
119 void setCurrentWorkspace(Workspace* workspace) override;
121 ScreenInterface* proxyObject() const { return m_original.data(); }
127 const QScopedPointer<WorkspaceModel> m_workspaces;
128 const QPointer<ScreenInterface> m_original;
129 QPointer<Workspace> m_currentWorspace;
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