on f58f482 help sign in
unity8/Panel/Indicators/NetworkIndicatorPage.qml
82 lines 2.1 kB history raw
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors:
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
18 */
20import QtQuick 2.0
21import Unity.Indicators 0.1 as Indicators
22import Unity.Indicators.Network 0.1 as ICNetwork
23import Ubuntu.Components 0.1
25PageStack {
26 id: networkPage
27 // Stops the search for a parent tree node.
28 // We don't want it going up to the indicator tabs.
29 // FIXME: need a better way of doing this.
30 // https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1211704
31 __propagated: null
33 property alias title: _mainPage.title
34 property alias emptyText: pluginItem.emptyText
35 property alias busName: pluginItem.busName
36 property alias actionsObjectPath : pluginItem.actionsObjectPath
37 property alias menuObjectPaths : pluginItem.menuObjectPaths
39 anchors.fill: parent
41 Page {
42 id: _mainPage
44 Indicators.IndicatorPage {
45 id: pluginItem
46 anchors.fill: parent
47 }
48 }
50 Component {
51 id: passwordPageComponent
53 ICNetwork.PasswordPage {
54 agent: networkAgent
55 }
56 }
58 ICNetwork.NetworkAgent {
59 id: networkAgent
61 onSecretRequested: {
62 networkPage.push(passwordPageComponent, {"token": token});
63 }
64 }
66 function start()
67 {
68 push(_mainPage);
69 pluginItem.start();
70 }
72 function stop()
73 {
74 clear();
75 pluginItem.stop();
76 }
78 function reset()
79 {
80 pluginItem.reset();
81 }