Changeset View
Changeset View
Standalone View
Standalone View
kcm/output_model.h
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Line(s) | 83 | Output(const Output &output) | |||
---|---|---|---|---|---|
85 | , pos(output.pos) | 85 | , pos(output.pos) | ||
86 | {} | 86 | {} | ||
87 | Output(KScreen::OutputPtr _ptr, const QPoint &_pos) | 87 | Output(KScreen::OutputPtr _ptr, const QPoint &_pos) | ||
88 | : ptr(_ptr) | 88 | : ptr(_ptr) | ||
89 | , pos(_pos) | 89 | , pos(_pos) | ||
90 | {} | 90 | {} | ||
91 | KScreen::OutputPtr ptr; | 91 | KScreen::OutputPtr ptr; | ||
92 | QPoint pos; | 92 | QPoint pos; | ||
93 | QPoint replicaReset; | 93 | QPoint posReset = QPoint(-1, -1); | ||
94 | }; | 94 | }; | ||
95 | 95 | | |||
96 | void roleChanged(int outputId, OutputRoles role); | 96 | void roleChanged(int outputId, OutputRoles role); | ||
97 | | ||||
98 | void resetPosition(const Output &output); | ||||
97 | void reposition(); | 99 | void reposition(); | ||
98 | void updatePositions(); | 100 | void updatePositions(); | ||
99 | void updateOrder(); | 101 | void updateOrder(); | ||
100 | QPoint originDelta() const; | 102 | QPoint originDelta() const; | ||
101 | 103 | | |||
102 | /** | 104 | /** | ||
103 | * @brief Snaps moved output to others | 105 | * @brief Snaps moved output to others | ||
104 | * @param output the moved output | 106 | * @param output the moved output | ||
105 | * @param dest the desired destination to be adjusted by snapping | 107 | * @param dest the desired destination to be adjusted by snapping | ||
106 | */ | 108 | */ | ||
107 | void snap(const Output &output, QPoint &dest); | 109 | void snap(const Output &output, QPoint &dest); | ||
108 | 110 | | |||
111 | bool setEnabled(int outputIndex, bool enable); | ||||
112 | | ||||
109 | bool setResolution(int outputIndex, int resIndex); | 113 | bool setResolution(int outputIndex, int resIndex); | ||
110 | bool setRefreshRate(int outputIndex, int refIndex); | 114 | bool setRefreshRate(int outputIndex, int refIndex); | ||
111 | bool setRotation(int outputIndex, KScreen::Output::Rotation rotation); | 115 | bool setRotation(int outputIndex, KScreen::Output::Rotation rotation); | ||
116 | | ||||
112 | int resolutionIndex(const KScreen::OutputPtr &output) const; | 117 | int resolutionIndex(const KScreen::OutputPtr &output) const; | ||
113 | int refreshRateIndex(const KScreen::OutputPtr &output) const; | 118 | int refreshRateIndex(const KScreen::OutputPtr &output) const; | ||
114 | QVariantList resolutionsStrings(const KScreen::OutputPtr &output) const; | 119 | QVariantList resolutionsStrings(const KScreen::OutputPtr &output) const; | ||
115 | QVector<QSize> resolutions(const KScreen::OutputPtr &output) const; | 120 | QVector<QSize> resolutions(const KScreen::OutputPtr &output) const; | ||
116 | QVector<float> refreshRates(const KScreen::OutputPtr &output) const; | 121 | QVector<float> refreshRates(const KScreen::OutputPtr &output) const; | ||
117 | 122 | | |||
118 | bool positionable(const Output &output) const; | 123 | bool positionable(const Output &output) const; | ||
119 | 124 | | |||
Show All 10 Lines |