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, | ||||
41 | AutoRotateOnlyInTabletModeRole, | ||||
39 | RotationRole, | 42 | RotationRole, | ||
40 | ScaleRole, | 43 | ScaleRole, | ||
41 | ResolutionIndexRole, | 44 | ResolutionIndexRole, | ||
42 | ResolutionsRole, | 45 | ResolutionsRole, | ||
43 | RefreshRateIndexRole, | 46 | RefreshRateIndexRole, | ||
44 | RefreshRatesRole, | 47 | RefreshRatesRole, | ||
45 | ReplicationSourceModelRole, | 48 | ReplicationSourceModelRole, | ||
46 | ReplicationSourceIndexRole, | 49 | ReplicationSourceIndexRole, | ||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | 83 | private: | |||
108 | */ | 111 | */ | ||
109 | void snap(const Output &output, QPoint &dest); | 112 | void snap(const Output &output, QPoint &dest); | ||
110 | 113 | | |||
111 | bool setEnabled(int outputIndex, bool enable); | 114 | bool setEnabled(int outputIndex, bool enable); | ||
112 | 115 | | |||
113 | bool setResolution(int outputIndex, int resIndex); | 116 | bool setResolution(int outputIndex, int resIndex); | ||
114 | bool setRefreshRate(int outputIndex, int refIndex); | 117 | bool setRefreshRate(int outputIndex, int refIndex); | ||
115 | bool setRotation(int outputIndex, KScreen::Output::Rotation rotation); | 118 | bool setRotation(int outputIndex, KScreen::Output::Rotation rotation); | ||
119 | bool setAutoRotate(int outputIndex, bool value); | ||||
120 | bool setAutoRotateOnlyInTabletMode(int outputIndex, bool value); | ||||
116 | 121 | | |||
117 | int resolutionIndex(const KScreen::OutputPtr &output) const; | 122 | int resolutionIndex(const KScreen::OutputPtr &output) const; | ||
118 | int refreshRateIndex(const KScreen::OutputPtr &output) const; | 123 | int refreshRateIndex(const KScreen::OutputPtr &output) const; | ||
119 | QVariantList resolutionsStrings(const KScreen::OutputPtr &output) const; | 124 | QVariantList resolutionsStrings(const KScreen::OutputPtr &output) const; | ||
120 | QVector<QSize> resolutions(const KScreen::OutputPtr &output) const; | 125 | QVector<QSize> resolutions(const KScreen::OutputPtr &output) const; | ||
121 | QVector<float> refreshRates(const KScreen::OutputPtr &output) const; | 126 | QVector<float> refreshRates(const KScreen::OutputPtr &output) const; | ||
122 | 127 | | |||
123 | bool positionable(const Output &output) const; | 128 | bool positionable(const Output &output) const; | ||
Show All 12 Lines |