Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/package/contents/ui/items/AbstractItem.qml
Show All 22 Lines | |||||
23 | import org.kde.plasma.components 2.0 as PlasmaComponents | 23 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
24 | 24 | | |||
25 | PlasmaCore.ToolTipArea { | 25 | PlasmaCore.ToolTipArea { | ||
26 | id: abstractItem | 26 | id: abstractItem | ||
27 | 27 | | |||
28 | height: inVisibleLayout ? visibleLayout.cellHeight : hiddenLayout.iconItemHeight | 28 | height: inVisibleLayout ? visibleLayout.cellHeight : hiddenLayout.iconItemHeight | ||
29 | width: inVisibleLayout ? visibleLayout.cellWidth : hiddenLayout.width | 29 | width: inVisibleLayout ? visibleLayout.cellWidth : hiddenLayout.width | ||
30 | 30 | | |||
31 | property var model: itemModel | ||||
32 | | ||||
31 | property string itemId | 33 | property string itemId | ||
32 | property alias text: label.text | 34 | property alias text: label.text | ||
33 | property Item iconItem | 35 | property Item iconItem | ||
34 | property int /*PlasmaCore.Types.ItemStatus*/ status | 36 | property int /*PlasmaCore.Types.ItemStatus*/ status: model.status || PlasmaCore.Types.UnknownStatus | ||
35 | property int /*PlasmaCore.Types.ItemStatus*/ effectiveStatus | 37 | property int /*PlasmaCore.Types.ItemStatus*/ effectiveStatus: model.effectiveStatus || PlasmaCore.Types.UnknownStatus | ||
broulik: You can simplify this to
```
model.status || PlasmaCore.Types.UnknownStatus
``` | |||||
kmaterka: Done | |||||
36 | readonly property bool inHiddenLayout: effectiveStatus === PlasmaCore.Types.PassiveStatus | 38 | readonly property bool inHiddenLayout: effectiveStatus === PlasmaCore.Types.PassiveStatus | ||
37 | readonly property bool inVisibleLayout: effectiveStatus === PlasmaCore.Types.ActiveStatus | 39 | readonly property bool inVisibleLayout: effectiveStatus === PlasmaCore.Types.ActiveStatus | ||
38 | 40 | | |||
39 | signal clicked(var mouse) | 41 | signal clicked(var mouse) | ||
40 | signal pressed(var mouse) | 42 | signal pressed(var mouse) | ||
41 | signal wheel(var wheel) | 43 | signal wheel(var wheel) | ||
42 | signal contextMenu(var mouse) | 44 | signal contextMenu(var mouse) | ||
43 | 45 | | |||
▲ Show 20 Lines • Show All 99 Lines • Show Last 20 Lines |
You can simplify this to