on fe1a102 help sign in
unity8/Panel/Indicators/NetworkIndicatorPage.qml
83 lines 2.2 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.IndicatorsLegacy 0.1 as Indicators
22import Unity.IndicatorsLegacy.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 busType: pluginItem.busType
36 property alias busName: pluginItem.busName
37 property alias actionsObjectPath : pluginItem.actionsObjectPath
38 property alias menuObjectPaths : pluginItem.menuObjectPaths
40 anchors.fill: parent
42 Page {
43 id: _mainPage
45 Indicators.IndicatorPage {
46 id: pluginItem
47 anchors.fill: parent
48 }
49 }
51 Component {
52 id: passwordPageComponent
54 ICNetwork.PasswordPage {
55 agent: networkAgent
56 }
57 }
59 ICNetwork.NetworkAgent {
60 id: networkAgent
62 onSecretRequested: {
63 networkPage.push(passwordPageComponent, {"token": token});
64 }
65 }
67 function start()
68 {
69 push(_mainPage);
70 pluginItem.start();
71 }
73 function stop()
74 {
75 clear();
76 pluginItem.stop();
77 }
79 function reset()
80 {
81 pluginItem.reset();
82 }