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 252 Lines • ▼ Show 20 Line(s) | 122 | RowLayout { | |||
299 | 300 | | |||
300 | Item { | 301 | Item { | ||
301 | Layout.preferredWidth: units.iconSizes.medium | 302 | Layout.preferredWidth: units.iconSizes.medium | ||
302 | Layout.fillHeight: true | 303 | Layout.fillHeight: true | ||
303 | 304 | | |||
304 | PlasmaComponents.ToolButton { | 305 | PlasmaComponents.ToolButton { | ||
305 | id: actionButton | 306 | id: actionButton | ||
306 | visible: !busyIndicator.visible && deviceItem.actionVisible | 307 | visible: !busyIndicator.visible && deviceItem.actionVisible | ||
308 | enabled: !isRoot | ||||
307 | onClicked: actionTriggered() | 309 | onClicked: actionTriggered() | ||
308 | y: mounted ? deviceLabel.height + (freeSpaceBar.height - height - units.smallSpacing) / 2 : (deviceLabel.height + actionMessage.height - height) / 2 | 310 | y: mounted ? deviceLabel.height + (freeSpaceBar.height - height - units.smallSpacing) / 2 : (deviceLabel.height + actionMessage.height - height) / 2 | ||
309 | } | 311 | } | ||
310 | 312 | | |||
311 | PlasmaComponents.BusyIndicator { | 313 | PlasmaComponents.BusyIndicator { | ||
312 | id: busyIndicator | 314 | id: busyIndicator | ||
313 | width: parent.width | 315 | width: parent.width | ||
314 | height: width | 316 | height: width | ||
315 | running: visible | 317 | running: visible | ||
316 | visible: deviceItem.state != 0 | 318 | visible: deviceItem.state != 0 | ||
317 | } | 319 | } | ||
318 | } | 320 | } | ||
319 | } | 321 | } | ||
320 | } | 322 | } |