Changeset View
Changeset View
Standalone View
Standalone View
kcm/output_model.h
Show All 24 Lines | |||||
25 | class ConfigHandler; | 25 | class ConfigHandler; | ||
26 | 26 | | |||
27 | class OutputModel : public QAbstractListModel | 27 | class OutputModel : public QAbstractListModel | ||
28 | { | 28 | { | ||
29 | Q_OBJECT | 29 | Q_OBJECT | ||
30 | public: | 30 | public: | ||
31 | enum OutputRoles { | 31 | enum OutputRoles { | ||
32 | EnabledRole = Qt::UserRole + 1, | 32 | EnabledRole = Qt::UserRole + 1, | ||
33 | InternalRole, | ||||
33 | PrimaryRole, | 34 | PrimaryRole, | ||
34 | SizeRole, | 35 | SizeRole, | ||
35 | /** Position in the graphical view relative to some arbitrary but fixed origin. */ | 36 | /** Position in the graphical view relative to some arbitrary but fixed origin. */ | ||
36 | PositionRole, | 37 | PositionRole, | ||
37 | /** Position for backend relative to most northwest display corner. */ | 38 | /** Position for backend relative to most northwest display corner. */ | ||
38 | NormalizedPositionRole, | 39 | NormalizedPositionRole, | ||
40 | AutoRotateRole, | ||||
39 | RotationRole, | 41 | RotationRole, | ||
40 | ScaleRole, | 42 | ScaleRole, | ||
41 | ResolutionIndexRole, | 43 | ResolutionIndexRole, | ||
42 | ResolutionsRole, | 44 | ResolutionsRole, | ||
43 | RefreshRateIndexRole, | 45 | RefreshRateIndexRole, | ||
44 | RefreshRatesRole, | 46 | RefreshRatesRole, | ||
45 | ReplicationSourceModelRole, | 47 | ReplicationSourceModelRole, | ||
46 | ReplicationSourceIndexRole, | 48 | ReplicationSourceIndexRole, | ||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | 82 | private: | |||
108 | */ | 110 | */ | ||
109 | void snap(const Output &output, QPoint &dest); | 111 | void snap(const Output &output, QPoint &dest); | ||
110 | 112 | | |||
111 | bool setEnabled(int outputIndex, bool enable); | 113 | bool setEnabled(int outputIndex, bool enable); | ||
112 | 114 | | |||
113 | bool setResolution(int outputIndex, int resIndex); | 115 | bool setResolution(int outputIndex, int resIndex); | ||
114 | bool setRefreshRate(int outputIndex, int refIndex); | 116 | bool setRefreshRate(int outputIndex, int refIndex); | ||
115 | bool setRotation(int outputIndex, KScreen::Output::Rotation rotation); | 117 | bool setRotation(int outputIndex, KScreen::Output::Rotation rotation); | ||
118 | bool setAutoRotate(int outputIndex, bool value); | ||||
116 | 119 | | |||
117 | int resolutionIndex(const KScreen::OutputPtr &output) const; | 120 | int resolutionIndex(const KScreen::OutputPtr &output) const; | ||
118 | int refreshRateIndex(const KScreen::OutputPtr &output) const; | 121 | int refreshRateIndex(const KScreen::OutputPtr &output) const; | ||
119 | QVariantList resolutionsStrings(const KScreen::OutputPtr &output) const; | 122 | QVariantList resolutionsStrings(const KScreen::OutputPtr &output) const; | ||
120 | QVector<QSize> resolutions(const KScreen::OutputPtr &output) const; | 123 | QVector<QSize> resolutions(const KScreen::OutputPtr &output) const; | ||
121 | QVector<float> refreshRates(const KScreen::OutputPtr &output) const; | 124 | QVector<float> refreshRates(const KScreen::OutputPtr &output) const; | ||
122 | 125 | | |||
123 | bool positionable(const Output &output) const; | 126 | bool positionable(const Output &output) const; | ||
Show All 11 Lines |