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)
19 Q_PROPERTY(bool used READ used NOTIFY usedChanged)
20 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
21 Q_PROPERTY(qtmir::OutputTypes outputType READ outputType NOTIFY outputTypeChanged)
22 Q_PROPERTY(float scale READ scale NOTIFY scaleChanged)
23 Q_PROPERTY(qtmir::FormFactor formFactor READ formFactor NOTIFY formFactorChanged)
24 Q_PROPERTY(MirPowerMode powerMode READ powerMode NOTIFY powerModeChanged)
25 Q_PROPERTY(Qt::ScreenOrientation orientation READ orientation NOTIFY orientationChanged)
26 Q_PROPERTY(QPoint position READ position NOTIFY positionChanged)
27 Q_PROPERTY(uint currentModeIndex READ currentModeIndex NOTIFY currentModeIndexChanged)
28 Q_PROPERTY(QQmlListProperty<qtmir::ScreenMode> availableModes READ availableModes NOTIFY availableModesChanged)
29 Q_PROPERTY(QSizeF physicalSize READ physicalSize NOTIFY physicalSizeChanged)
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);
52 virtual WorkspaceModel* workspaces() const = 0;
53 virtual Workspace *currentWorkspace() const = 0;
54 virtual void setCurrentWorkspace(Workspace* workspace) = 0;
56 void sync(ScreenInterface* proxy);
58 qtmir::Screen* wrapped() const { return m_wrapped; }
66 void outputTypeChanged();
68 void formFactorChanged();
69 void powerModeChanged();
70 void orientationChanged();
71 void positionChanged();
72 void currentModeIndexChanged();
73 void physicalSizeChanged();
74 void availableModesChanged();
75 void activeChanged(bool active);
76 void currentWorkspaceChanged(Workspace*);
79 ScreenInterface(QObject* parent = 0);
81 void connectToScreen(qtmir::Screen* screen);
82 void connectToScreen(ScreenInterface* screen);
85 QPointer<qtmir::Screen> m_wrapped;
89class Screen : public ScreenInterface
93 explicit Screen(qtmir::Screen*const wrapped);
96 WorkspaceModel* workspaces() const override;
97 Workspace *currentWorkspace() const override;
98 void setCurrentWorkspace(Workspace* workspace) override;
100 static ScreenAttached *qmlAttachedProperties(QObject *owner);
103 void resetCurrentWorkspace();
105 const QScopedPointer<WorkspaceModel> m_workspaces;
106 QPointer<Workspace> m_currentWorspace;
109class ScreenProxy : public ScreenInterface
113 explicit ScreenProxy(ScreenInterface*const screen);
115 // From qtmir::Screen
116 WorkspaceModel* workspaces() const override;
117 Workspace *currentWorkspace() const override;
118 void setCurrentWorkspace(Workspace* workspace) override;
120 ScreenInterface* proxyObject() const { return m_original.data(); }
126 const QScopedPointer<WorkspaceModel> m_workspaces;
127 const QPointer<ScreenInterface> m_original;
128 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