From bc12f4fe563e69a5f5e6caa3c11a95dabf4dbe52 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 22 Feb 2013 15:43:01 +0100 Subject: [PATCH] actually load config ui files --- .../testapplet/contents/ui/ConfigGeneral.qml | 40 +++++++++++++++++++ .../desktop/contents/ui/Configuration.qml | 10 +++-- 2 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 applets/testapplet/contents/ui/ConfigGeneral.qml diff --git a/applets/testapplet/contents/ui/ConfigGeneral.qml b/applets/testapplet/contents/ui/ConfigGeneral.qml new file mode 100644 index 000000000..f73963ccf --- /dev/null +++ b/applets/testapplet/contents/ui/ConfigGeneral.qml @@ -0,0 +1,40 @@ +/* + * Copyright 2013 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import QtQuick 2.0 + +import org.kde.plasma.core 0.1 as PlasmaCore +import org.kde.plasma.components 0.1 as PlasmaComponents + +Item { + id: iconsPage + height: childrenRect.height + + Column { + anchors.fill: parent + spacing: 4 + Row { + PlasmaComponents.Label { + text: "Text Config value" + } + PlasmaComponents.TextField { + id: testConfigField + } + } + } +} diff --git a/qmlpackages/desktop/contents/ui/Configuration.qml b/qmlpackages/desktop/contents/ui/Configuration.qml index a9eb0c95a..0463a43c1 100644 --- a/qmlpackages/desktop/contents/ui/Configuration.qml +++ b/qmlpackages/desktop/contents/ui/Configuration.qml @@ -28,6 +28,11 @@ Rectangle { width: 640 height: 480 + function addConfigPage(url) { + print("Loading config page: " + url) + main.source = url + } + Column { anchors.fill: parent Row { @@ -78,13 +83,10 @@ Rectangle { Flickable { contentWidth: width contentHeight: main.height - Item { + Loader { id: main width: parent.width height: childrenRect.height - Text { - text: "Configuration goes here" - } } } }