Changeset View
Changeset View
Standalone View
Standalone View
applets/devicenotifier/package/contents/ui/DeviceItem.qml
Show All 30 Lines | 29 | MouseArea { | |||
---|---|---|---|---|---|
31 | 31 | | |||
32 | property string udi | 32 | property string udi | ||
33 | property alias icon: deviceIcon.source | 33 | property alias icon: deviceIcon.source | ||
34 | property alias deviceName: deviceLabel.text | 34 | property alias deviceName: deviceLabel.text | ||
35 | property string emblemIcon | 35 | property string emblemIcon | ||
36 | property int state | 36 | property int state | ||
37 | 37 | | |||
38 | property bool mounted | 38 | property bool mounted | ||
39 | property bool isRoot | ||||
39 | property bool expanded: devicenotifier.expandedDevice == udi | 40 | property bool expanded: devicenotifier.expandedDevice == udi | ||
40 | property alias percentUsage: freeSpaceBar.value | 41 | property alias percentUsage: freeSpaceBar.value | ||
41 | property string freeSpaceText | 42 | property string freeSpaceText | ||
42 | 43 | | |||
43 | signal actionTriggered | 44 | signal actionTriggered | ||
44 | 45 | | |||
45 | property alias actionIcon: actionButton.iconName | 46 | property alias actionIcon: actionButton.iconName | ||
46 | property alias actionToolTip: actionButton.tooltip | 47 | property alias actionToolTip: actionButton.tooltip | ||
▲ Show 20 Lines • Show All 251 Lines • ▼ Show 20 Line(s) | 122 | RowLayout { | |||
298 | 299 | | |||
299 | Item { | 300 | Item { | ||
300 | Layout.preferredWidth: units.iconSizes.medium | 301 | Layout.preferredWidth: units.iconSizes.medium | ||
301 | Layout.fillHeight: true | 302 | Layout.fillHeight: true | ||
302 | 303 | | |||
303 | PlasmaComponents.ToolButton { | 304 | PlasmaComponents.ToolButton { | ||
304 | id: actionButton | 305 | id: actionButton | ||
305 | visible: !busyIndicator.visible && deviceItem.actionVisible | 306 | visible: !busyIndicator.visible && deviceItem.actionVisible | ||
307 | enabled: !isRoot | ||||
306 | onClicked: actionTriggered() | 308 | onClicked: actionTriggered() | ||
307 | } | 309 | } | ||
308 | 310 | | |||
309 | PlasmaComponents.BusyIndicator { | 311 | PlasmaComponents.BusyIndicator { | ||
310 | id: busyIndicator | 312 | id: busyIndicator | ||
311 | width: parent.width | 313 | width: parent.width | ||
312 | height: width | 314 | height: width | ||
313 | running: visible | 315 | running: visible | ||
314 | visible: deviceItem.state != 0 | 316 | visible: deviceItem.state != 0 | ||
315 | } | 317 | } | ||
316 | } | 318 | } | ||
317 | } | 319 | } | ||
318 | } | 320 | } |