2
Copyright 2013 Jan Grulich <jgrulich@redhat.com>
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Lesser General Public
6
License as published by the Free Software Foundation; either
7
version 2.1 of the License, or (at your option) version 3, or any
8
later version accepted by the membership of KDE e.V. (or its
9
successor approved by the membership of KDE e.V.), which shall
10
act as a proxy defined in Section 6 of version 3 of the license.
12
This library is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
Lesser General Public License for more details.
17
You should have received a copy of the GNU Lesser General Public
18
License along with this library. If not, see <http://www.gnu.org/licenses/>.
22
import org.kde.qtextracomponents 0.1
23
import org.kde.plasma.graphicswidgets 0.1 as PlasmaWidgets
24
import org.kde.plasma.components 0.1 as PlasmaComponents
25
import org.kde.plasma.extras 0.1 as PlasmaExtras
26
import org.kde.plasma.core 0.1 as PlasmaCore
27
import org.kde.plasmanm 0.1 as PlasmaNM
32
property bool expanded: false;
34
height: theme.defaultFont.mSize.height * 2;
36
PlasmaNM.NetworkStatus {
40
statusLabel.text = status;
41
progressIndicator.running = inProgress;
43
statusIcon.source = "user-online";
44
statusIcon.enabled = true;
46
statusIcon.source = "user-offline";
47
statusIcon.enabled = false;
55
height: theme.defaultFont.mSize.height * 2;
59
bottom: parent.bottom;
65
height: theme.smallMediumIconSize;
69
verticalCenter: parent.verticalCenter;
70
leftMargin: padding.margins.left;
73
PlasmaComponents.BusyIndicator {
74
id: progressIndicator;
82
PlasmaComponents.Label {
85
height: theme.defaultFont.mSize.height * 2;
87
left: statusIcon.right;
88
right: toolButton.left;
89
verticalCenter: parent.verticalCenter;
90
leftMargin: padding.margins.left;
92
elide: Text.ElideRight;
98
height: theme.smallMediumIconSize;
102
verticalCenter: parent.verticalCenter;
103
rightMargin: padding.margins.right;
109
id: toolbarMouseArea;
111
anchors { fill: parent }
126
bottomMargin: padding.margins.bottom;
131
if (mainWindow.autoHideOptions) {
146
PropertyChanges { target: toolBar; height: options.childrenRect.height + theme.defaultFont.mSize.height * 2 + padding.margins.top }
147
PropertyChanges { target: options; visible: true }
151
transitions: Transition {
152
NumberAnimation { duration: 300; properties: "height, visible" }
155
function hideOrShowOptions() {
158
plasmoid.writeConfig("optionsExpanded", "expanded");
161
plasmoid.writeConfig("optionsExpanded", "hidden");
165
Component.onCompleted: {
166
networkStatus.init();
168
if (plasmoid.readConfig("optionsExpanded") == "expanded") {