Changeset View
Changeset View
Standalone View
Standalone View
applet/contents/ui/PopupDialog.qml
Context not available. | |||||
28 | FocusScope { | 28 | FocusScope { | ||
---|---|---|---|---|---|
29 | id: full | 29 | id: full | ||
30 | 30 | | |||
31 | property alias toolbarValues: toolbar | ||||
32 | | ||||
31 | PlasmaNM.AvailableDevices { | 33 | PlasmaNM.AvailableDevices { | ||
32 | id: availableDevices | 34 | id: availableDevices | ||
33 | } | 35 | } | ||
Context not available. | |||||
48 | ColumnLayout { | 50 | ColumnLayout { | ||
49 | anchors.fill: parent | 51 | anchors.fill: parent | ||
50 | 52 | | |||
51 | Toolbar { | | |||
52 | id: toolbar | | |||
53 | Layout.fillWidth: true | | |||
54 | } | | |||
55 | | ||||
56 | PlasmaExtras.ScrollArea { | 53 | PlasmaExtras.ScrollArea { | ||
57 | id: scrollView | 54 | id: scrollView | ||
58 | Layout.fillWidth: true | 55 | Layout.fillWidth: true | ||
59 | Layout.fillHeight: true | 56 | Layout.fillHeight: true | ||
60 | frameVisible: false | 57 | frameVisible: false | ||
61 | 58 | | |||
59 | PlasmaExtras.Heading { | ||||
60 | id: disabledMessage | ||||
61 | anchors.fill: parent | ||||
62 | horizontalAlignment: Text.AlignHCenter | ||||
63 | verticalAlignment: Text.AlignVCenter | ||||
64 | level: 3 | ||||
65 | visible: connectionView.count === 0 && text != "" | ||||
66 | text: { | ||||
67 | if (toolbarValues.displayplaneModeMessage) { | ||||
68 | return i18n("Airplane mode is enabled") | ||||
69 | } | ||||
70 | if (toolbarValues.displayWifiMessage) { | ||||
71 | if (toolbarValues.displayWwanMessage) { | ||||
72 | return i18n("Wireless and mobile networks are deactivated") | ||||
73 | } | ||||
74 | return i18n("Wireless is deactivated") | ||||
75 | } | ||||
76 | if (toolbarValues.displayWwanMessage) { | ||||
77 | return i18n("Mobile network is deactivated") | ||||
78 | } | ||||
79 | return "" | ||||
80 | } | ||||
81 | } | ||||
82 | | ||||
83 | PlasmaExtras.Heading { | ||||
84 | id: message | ||||
85 | anchors.fill: parent | ||||
86 | horizontalAlignment: Text.AlignHCenter | ||||
87 | verticalAlignment: Text.AlignVCenter | ||||
88 | level: 3 | ||||
89 | opacity: connectionView.count === 0 && !disabledMessage.visible | ||||
90 | // Check connectionView.count again, to avoid a small delay. | ||||
91 | visible: opacity === 1 && connectionView.count === 0 | ||||
92 | Behavior on opacity { NumberAnimation { duration: 5000 } } | ||||
93 | text: i18n("No available connections") | ||||
94 | } | ||||
95 | | ||||
62 | ListView { | 96 | ListView { | ||
63 | id: connectionView | 97 | id: connectionView | ||
64 | 98 | | |||
Context not available. | |||||
76 | delegate: ConnectionItem { } | 110 | delegate: ConnectionItem { } | ||
77 | } | 111 | } | ||
78 | } | 112 | } | ||
113 | | ||||
114 | Toolbar { | ||||
115 | id: toolbar | ||||
116 | Layout.fillWidth: true | ||||
117 | } | ||||
79 | } | 118 | } | ||
80 | 119 | | |||
81 | Connections { | 120 | Connections { | ||
Context not available. |