summaryrefslogtreecommitdiffstats
path: root/components/package/contents/ui/Settings.qml
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2016-03-10 15:30:00 +0100
committerMichael Bohlender <michael.bohlender@kdemail.net>2016-03-10 15:30:00 +0100
commit4990a02240077f2bd1ceb7a3cfcd76f651955684 (patch)
treea49c7cb63100c99ca17abe769702711360623aac /components/package/contents/ui/Settings.qml
parentced0c73f7e5b8da83a0b5f51bf6220fb04c33cbf (diff)
downloadkube-4990a02240077f2bd1ceb7a3cfcd76f651955684.tar.gz
kube-4990a02240077f2bd1ceb7a3cfcd76f651955684.zip
improved settings ui
Diffstat (limited to 'components/package/contents/ui/Settings.qml')
-rw-r--r--components/package/contents/ui/Settings.qml64
1 files changed, 50 insertions, 14 deletions
diff --git a/components/package/contents/ui/Settings.qml b/components/package/contents/ui/Settings.qml
index 8da372e7..164512ea 100644
--- a/components/package/contents/ui/Settings.qml
+++ b/components/package/contents/ui/Settings.qml
@@ -20,6 +20,7 @@ import QtQuick.Controls 1.4
20import QtQuick.Layouts 1.1 20import QtQuick.Layouts 1.1
21 21
22import org.kde.plasma.core 2.0 as PlasmaCore 22import org.kde.plasma.core 2.0 as PlasmaCore
23import org.kde.plasma.components 2.0 as PlasmaComponents
23 24
24import org.kube.framework.settings 1.0 as KubeSettings 25import org.kube.framework.settings 1.0 as KubeSettings
25import org.kube.framework.domain 1.0 as KubeFramework 26import org.kube.framework.domain 1.0 as KubeFramework
@@ -64,33 +65,65 @@ Rectangle {
64 id: accountsController 65 id: accountsController
65 } 66 }
66 67
67 ColumnLayout { 68 SplitView {
68 spacing: 5 69 anchors.fill: parent
69 Repeater { 70
71 ListView {
72 id: accountsList
73
74 width: Unit.size * 55
75 Layout.maximumWidth: Unit.size * 150
76 Layout.minimumWidth: Unit.size * 30
77
70 model: accountsController.accounts 78 model: accountsController.accounts
71 delegate: ColumnLayout { 79
72 height: 100 80 delegate: PlasmaComponents.ListItem {
73 width: 100 81 width: accountsList.width
82
83 height: Unit.size * 10
84
85 enabled: true
86 checked: accountsList.currentIndex == index
87
74 KubeFramework.AccountFactory { 88 KubeFramework.AccountFactory {
75 id: accountFactory 89 id: accountFactory
76 accountId: modelData 90 accountId: modelData
77 } 91 }
78 PlasmaCore.IconItem { 92
93 MouseArea {
79 anchors { 94 anchors {
80 verticalCenter: parent.verticalCenter 95 fill: parent
81 left: parent.left 96 }
82 // leftMargin: Unit.size * 3 97
98 onClicked: {
99 accountDetails.source = accountFactory.uiPath
100
101 accountsList.currentIndex = model.index
83 } 102 }
84 source: accountFactory.icon
85 } 103 }
86 Label { 104
87 text: accountFactory.name 105 RowLayout {
106 anchors.fill: parent
107
108 PlasmaCore.IconItem {
109 source: accountFactory.icon
110 }
111
112 Label {
113 text: accountFactory.name
114 }
88 } 115 }
89 // Loader { source: accountFactory.uiPath }
90 } 116 }
91 } 117 }
118
119 Loader {
120 id: accountDetails
121
122 Layout.fillWidth: true
123 }
92 } 124 }
93 125
126 /*
94 Button { 127 Button {
95 id: button 128 id: button
96 text: "Create New" 129 text: "Create New"
@@ -100,5 +133,8 @@ Rectangle {
100 } 133 }
101 134
102 //TODO: Add possibility to add more accounts 135 //TODO: Add possibility to add more accounts
136
137 */
103 } 138 }
139
104} 140}