summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-03-09 15:47:00 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-03-09 15:47:00 +0100
commit1aeac7aa7519cc667d4937cc9eb0df3f7c083028 (patch)
treee51667dc43aba8db641e713ccd9242637cb1af1a
parentf5185c4799fe0e9c31a218dfc8310515ac921c2b (diff)
downloadkube-1aeac7aa7519cc667d4937cc9eb0df3f7c083028.tar.gz
kube-1aeac7aa7519cc667d4937cc9eb0df3f7c083028.zip
Install org.kube.components.mail package and install the rest of
components as qml package
-rw-r--r--applications/mail/main.cpp2
-rw-r--r--components/CMakeLists.txt5
-rw-r--r--components/mail/contents/ui/main.qml (renamed from components/package/contents/ui/main.qml)13
-rw-r--r--components/mail/metadata.desktop (renamed from components/package/metadata.desktop)0
-rw-r--r--components/qmldir8
5 files changed, 20 insertions, 8 deletions
diff --git a/applications/mail/main.cpp b/applications/mail/main.cpp
index 1ff4effb..26353aa4 100644
--- a/applications/mail/main.cpp
+++ b/applications/mail/main.cpp
@@ -34,7 +34,7 @@ public:
34int main(int argc, char *argv[]) 34int main(int argc, char *argv[])
35{ 35{
36 QApplication app(argc, argv); 36 QApplication app(argc, argv);
37 auto package = KPackage::PackageLoader::self()->loadPackage("KPackage/GenericQML", "org.kde.kube.mail"); 37 auto package = KPackage::PackageLoader::self()->loadPackage("KPackage/GenericQML", "org.kube.components.mail");
38 Q_ASSERT(package.isValid()); 38 Q_ASSERT(package.isValid());
39 QQmlApplicationEngine engine; 39 QQmlApplicationEngine engine;
40 engine.addImageProvider(QLatin1String("kube"), new KubeImageProvider); 40 engine.addImageProvider(QLatin1String("kube"), new KubeImageProvider);
diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt
index 2227e170..bd9c100a 100644
--- a/components/CMakeLists.txt
+++ b/components/CMakeLists.txt
@@ -22,5 +22,8 @@ find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui Widgets)
22set (QT_MIN_VERSION "5.4.0") 22set (QT_MIN_VERSION "5.4.0")
23find_package(KF5 REQUIRED COMPONENTS Package) 23find_package(KF5 REQUIRED COMPONENTS Package)
24 24
25install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kube/components)
26install(DIRECTORY package/contents/ui/ DESTINATION ${QML_INSTALL_DIR}/org/kube/components)
27
25# install UI package 28# install UI package
26kpackage_install_package(package org.kde.kube.mail "genericqml") 29kpackage_install_package(mail org.kube.components.mail "genericqml")
diff --git a/components/package/contents/ui/main.qml b/components/mail/contents/ui/main.qml
index cf983dee..95729954 100644
--- a/components/package/contents/ui/main.qml
+++ b/components/mail/contents/ui/main.qml
@@ -22,6 +22,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
22 22
23import org.kde.kube.actions 1.0 as KubeAction 23import org.kde.kube.actions 1.0 as KubeAction
24import org.kde.kube.settings 1.0 as KubeSettings 24import org.kde.kube.settings 1.0 as KubeSettings
25import org.kube.components 1.0 as KubeComponents
25 26
26ApplicationWindow { 27ApplicationWindow {
27 id: app 28 id: app
@@ -151,14 +152,14 @@ ApplicationWindow {
151 SplitView { 152 SplitView {
152 anchors.fill: parent 153 anchors.fill: parent
153 154
154 FolderListView { 155 KubeComponents.FolderListView {
155 id: folderListView 156 id: folderListView
156 width: unit.size * 55 157 width: unit.size * 55
157 Layout.maximumWidth: unit.size * 150 158 Layout.maximumWidth: unit.size * 150
158 Layout.minimumWidth: unit.size * 30 159 Layout.minimumWidth: unit.size * 30
159 } 160 }
160 161
161 MailListView { 162 KubeComponents.MailListView {
162 id: mailListView 163 id: mailListView
163 parentFolder: folderListView.currentFolder 164 parentFolder: folderListView.currentFolder
164 width: unit.size * 80 165 width: unit.size * 80
@@ -167,7 +168,7 @@ ApplicationWindow {
167 focus: true 168 focus: true
168 } 169 }
169 170
170 SingleMailView { 171 KubeComponents.SingleMailView {
171 id: mailView 172 id: mailView
172 mail: mailListView.currentMail 173 mail: mailListView.currentMail
173 Layout.fillWidth: true 174 Layout.fillWidth: true
@@ -175,13 +176,13 @@ ApplicationWindow {
175 176
176 } 177 }
177 178
178 Settings { 179 KubeComponents.Settings {
179 id: settings 180 id: settings
180 181
181 anchors.fill: parent 182 anchors.fill: parent
182 } 183 }
183 184
184 FocusComposer { 185 KubeComponents.FocusComposer {
185 id: composer 186 id: composer
186 187
187 anchors.fill: parent 188 anchors.fill: parent
@@ -193,7 +194,7 @@ ApplicationWindow {
193 property int size: 5 194 property int size: 5
194 } 195 }
195 196
196 ColorPalette { 197 KubeComponents.ColorPalette {
197 id: colorPalette 198 id: colorPalette
198 } 199 }
199} 200}
diff --git a/components/package/metadata.desktop b/components/mail/metadata.desktop
index 630cc133..630cc133 100644
--- a/components/package/metadata.desktop
+++ b/components/mail/metadata.desktop
diff --git a/components/qmldir b/components/qmldir
new file mode 100644
index 00000000..204beff8
--- /dev/null
+++ b/components/qmldir
@@ -0,0 +1,8 @@
1module org.kube.components
2
3ColorPalette 1.0 ColorPalette.qml
4FocusComposer 1.0 FocusComposer.qml
5SingleMailView 1.0 SingleMailView.qml
6FolderListView 1.0 FolderListView.qml
7MailListView 1.0 MailListView.qml
8Settings 1.0 Settings.qml