Changeset View
Changeset View
Standalone View
Standalone View
kcm/package/contents/ui/Output.qml
Show All 32 Lines | 28 | onIsSelectedChanged: { | |||
---|---|---|---|---|---|
33 | } | 33 | } | ||
34 | } | 34 | } | ||
35 | 35 | | |||
36 | function getAbsolutePosition(pos) { | 36 | function getAbsolutePosition(pos) { | ||
37 | return Qt.point((pos.x - screen.xOffset) * screen.relativeFactor, | 37 | return Qt.point((pos.x - screen.xOffset) * screen.relativeFactor, | ||
38 | (pos.y - screen.yOffset) * screen.relativeFactor) ; | 38 | (pos.y - screen.yOffset) * screen.relativeFactor) ; | ||
39 | } | 39 | } | ||
40 | 40 | | |||
41 | visible: model.enabled | 41 | visible: model.enabled && model.replicationSourceIndex === 0 | ||
42 | onVisibleChanged: screen.resetTotalSize() | 42 | onVisibleChanged: screen.resetTotalSize() | ||
43 | 43 | | |||
44 | x: model.position.x / screen.relativeFactor + screen.xOffset | 44 | x: model.position.x / screen.relativeFactor + screen.xOffset | ||
45 | y: model.position.y / screen.relativeFactor + screen.yOffset | 45 | y: model.position.y / screen.relativeFactor + screen.yOffset | ||
46 | 46 | | |||
47 | width: model.size.width / screen.relativeFactor | 47 | width: model.size.width / screen.relativeFactor | ||
48 | height: model.size.height / screen.relativeFactor | 48 | height: model.size.height / screen.relativeFactor | ||
49 | 49 | | |||
▲ Show 20 Lines • Show All 75 Lines • ▼ Show 20 Line(s) | 101 | Rectangle { | |||
125 | 125 | | |||
126 | Behavior on opacity { | 126 | Behavior on opacity { | ||
127 | PropertyAnimation { | 127 | PropertyAnimation { | ||
128 | duration: 100; | 128 | duration: 100; | ||
129 | } | 129 | } | ||
130 | } | 130 | } | ||
131 | } | 131 | } | ||
132 | 132 | | |||
133 | Controls.ToolButton { | ||||
134 | id: replicas | ||||
135 | | ||||
136 | property int selectedReplica: -1 | ||||
137 | | ||||
138 | height: output.height / 4 | ||||
139 | width: output.width / 5 | ||||
140 | anchors.top: output.top | ||||
141 | anchors.right: output.right | ||||
142 | anchors.margins: 5 | ||||
143 | | ||||
144 | visible: model.replicasModel.length > 0 | ||||
145 | icon.name: "osd-duplicate" | ||||
146 | | ||||
147 | Controls.ToolTip { | ||||
148 | text: i18n("Replicas") | ||||
149 | } | ||||
150 | | ||||
151 | onClicked: { | ||||
152 | var index = selectedReplica + 1; | ||||
153 | if (index >= model.replicasModel.length) { | ||||
154 | index = 0; | ||||
155 | } | ||||
156 | if (root.selectedOutput !== model.replicasModel[index]) { | ||||
157 | root.selectedOutput = model.replicasModel[index]; | ||||
158 | } | ||||
159 | } | ||||
160 | | ||||
161 | } | ||||
162 | | ||||
133 | Item { | 163 | Item { | ||
134 | id: orientationPanelContainer | 164 | id: orientationPanelContainer | ||
135 | 165 | | |||
136 | anchors.fill: output | 166 | anchors.fill: output | ||
137 | visible: false | 167 | visible: false | ||
138 | 168 | | |||
139 | Rectangle { | 169 | Rectangle { | ||
140 | id: orientationPanel | 170 | id: orientationPanel | ||
▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines |