@@ -0,0 +1,115 @@
2+ * Copyright 2013 Canonical Ltd.
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.
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.
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/>.
17+ * Nick Dedekind <nick.dedekind@canonical.com>
21+import Ubuntu.Components 0.1
27+ property QtObject menuModel: null
28+ property QtObject menuData: null
29+ property int menuIndex
30+ property var notification
33+ "com.canonical.snapdecision.textfield": textfield,
34+ "com.canonical.snapdecision.selectionlist": selectionlist,
35+ "com.canonical.snapdecision.pinlock" : pinLock,
39+ if (menuData.type !== undefined) {
40+ var component = _map[menuData.type];
41+ if (component !== undefined) {
45+ if (menuData.isSeparator) {
56+ spacing: units.gu(.5)
58+ Component.onCompleted: {
59+ menuModel.loadExtendedAttributes(menuIndex, {"x-echo-mode-password": "bool"});
60+ textfield.echoMode = menuData.ext.xEchoModePassword ? TextInput.Password : TextInput.Normal
64+ anchors.left: parent.left
73+ menuModel.changeState(menuIndex, text);
83+ spacing: units.gu(.5)
90+ anchors.horizontalCenter: parent.horizontalCenter
93+ text: "Selection List"
107+ menuModel.changeState(menuIndex, passphrase);
111+ menuModel.activate(menuIndex, false);