Changeset View
Changeset View
Standalone View
Standalone View
plasmoid/package/contents/ui/DeviceDelegate.qml
Show First 20 Lines • Show All 247 Lines • ▼ Show 20 Line(s) | 86 | Column { | |||
---|---|---|---|---|---|
248 | } | 248 | } | ||
249 | 249 | | |||
250 | RemoteCommands { | 250 | RemoteCommands { | ||
251 | id: rc | 251 | id: rc | ||
252 | device: root.device | 252 | device: root.device | ||
253 | } | 253 | } | ||
254 | 254 | | |||
255 | // Commands | 255 | // Commands | ||
256 | PlasmaComponents.ListItem { | ||||
257 | visible: rc.available | ||||
256 | PlasmaComponents.Label { | 258 | PlasmaComponents.Label { | ||
257 | visible: rc.available && commandsModel.rowCount() > 0 | 259 | text: i18n("Run command:") | ||
258 | text: i18n("Run command") | 260 | } | ||
261 | PlasmaComponents.Button | ||||
262 | { | ||||
263 | id: addCommandButton | ||||
264 | iconSource: "list-add" | ||||
265 | anchors.right: parent.right | ||||
266 | tooltip: i18n("Add command") | ||||
267 | onClicked: rc.plugin.editCommands() | ||||
268 | } | ||||
259 | } | 269 | } | ||
260 | | ||||
261 | Repeater { | 270 | Repeater { | ||
262 | id: commandsView | 271 | id: commandsView | ||
263 | visible: rc.available | 272 | visible: rc.available | ||
264 | model: RemoteCommandsModel { | 273 | model: RemoteCommandsModel { | ||
265 | id: commandsModel | 274 | id: commandsModel | ||
266 | deviceId: rc.device.id() | 275 | deviceId: rc.device.id() | ||
267 | } | 276 | } | ||
268 | delegate: PlasmaComponents.ListItem { | 277 | delegate: PlasmaComponents.ListItem { | ||
Show All 11 Lines |