diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-03-10 11:57:08 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-03-10 11:57:08 +0100 |
commit | 9bfadc71a4fb694ae3946711d04acdfe009264c0 (patch) | |
tree | 883c944c166e8b31862ba2a898ab6aed1944b0aa /accounts/maildir | |
parent | d0617d0ad6926c250e29d1a40db93733fa911e5d (diff) | |
download | kube-9bfadc71a4fb694ae3946711d04acdfe009264c0.tar.gz kube-9bfadc71a4fb694ae3946711d04acdfe009264c0.zip |
A factory to load account plugins.
Diffstat (limited to 'accounts/maildir')
-rw-r--r-- | accounts/maildir/CMakeLists.txt | 7 | ||||
-rw-r--r-- | accounts/maildir/maildiraccountplugin.cpp | 2 | ||||
-rw-r--r-- | accounts/maildir/package/contents/ui/MaildirAccountSettings.qml | 8 | ||||
-rw-r--r-- | accounts/maildir/package/metadata.desktop | 8 | ||||
-rw-r--r-- | accounts/maildir/qmldir | 4 |
5 files changed, 20 insertions, 9 deletions
diff --git a/accounts/maildir/CMakeLists.txt b/accounts/maildir/CMakeLists.txt index d83ae0be..5307c5b0 100644 --- a/accounts/maildir/CMakeLists.txt +++ b/accounts/maildir/CMakeLists.txt | |||
@@ -22,6 +22,7 @@ find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui) | |||
22 | set (QT_MIN_VERSION "5.4.0") | 22 | set (QT_MIN_VERSION "5.4.0") |
23 | find_package(Sink CONFIG REQUIRED) | 23 | find_package(Sink CONFIG REQUIRED) |
24 | find_package(KF5Async CONFIG REQUIRED) | 24 | find_package(KF5Async CONFIG REQUIRED) |
25 | find_package(KF5 REQUIRED COMPONENTS Package) | ||
25 | 26 | ||
26 | include_directories(SYSTEM ${KDE_INSTALL_FULL_INCLUDEDIR}/KF5/) | 27 | include_directories(SYSTEM ${KDE_INSTALL_FULL_INCLUDEDIR}/KF5/) |
27 | 28 | ||
@@ -34,7 +35,7 @@ add_library(maildiraccountplugin SHARED ${SRCS}) | |||
34 | qt5_use_modules(maildiraccountplugin Core Quick Qml) | 35 | qt5_use_modules(maildiraccountplugin Core Quick Qml) |
35 | target_link_libraries(maildiraccountplugin sink) | 36 | target_link_libraries(maildiraccountplugin sink) |
36 | 37 | ||
37 | install(TARGETS maildiraccountplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/kube/accounts/maildir) | 38 | kpackage_install_package(package org.kube.accounts.maildir "genericqml") |
38 | install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/kube/accounts/maildir) | ||
39 | install(FILES package/contents/ui/MaildirAccountSettings.qml DESTINATION ${QML_INSTALL_DIR}/org/kde/kube/accounts/maildir) | ||
40 | 39 | ||
40 | install(TARGETS maildiraccountplugin DESTINATION ${QML_INSTALL_DIR}/org/kube/accounts/maildir) | ||
41 | install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kube/accounts/maildir) | ||
diff --git a/accounts/maildir/maildiraccountplugin.cpp b/accounts/maildir/maildiraccountplugin.cpp index 0033613b..2c3c8c4d 100644 --- a/accounts/maildir/maildiraccountplugin.cpp +++ b/accounts/maildir/maildiraccountplugin.cpp | |||
@@ -6,6 +6,6 @@ | |||
6 | 6 | ||
7 | void MaildirAccountPlugin::registerTypes (const char *uri) | 7 | void MaildirAccountPlugin::registerTypes (const char *uri) |
8 | { | 8 | { |
9 | Q_ASSERT(uri == QLatin1String("org.kde.kube.accounts.maildir")); | 9 | Q_ASSERT(uri == QLatin1String("org.kube.accounts.maildir")); |
10 | qmlRegisterType<MaildirSettings>(uri, 1, 0, "MaildirSettings"); | 10 | qmlRegisterType<MaildirSettings>(uri, 1, 0, "MaildirSettings"); |
11 | } | 11 | } |
diff --git a/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml b/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml index 77cf739f..a2564500 100644 --- a/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml +++ b/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml | |||
@@ -19,14 +19,18 @@ import QtQuick 2.4 | |||
19 | import QtQuick.Controls 1.4 | 19 | import QtQuick.Controls 1.4 |
20 | import QtQuick.Layouts 1.1 | 20 | import QtQuick.Layouts 1.1 |
21 | 21 | ||
22 | import org.kde.kube.settings 1.0 as KubeSettings | 22 | import org.kube.framework.settings 1.0 as KubeSettings |
23 | import org.kde.kube.accounts.maildir 1.0 as MaildirAccount | 23 | import org.kde.kube.accounts.maildir 1.0 as MaildirAccount |
24 | import org.kube.components 1.0 as KubeComponents | ||
24 | 25 | ||
25 | Rectangle { | 26 | Rectangle { |
26 | id: root | 27 | id: root |
27 | property string accountId | 28 | property string accountId |
28 | property string accountName: "Maildir" | 29 | property string accountName: "Maildir" |
29 | 30 | ||
31 | KubeComponents.ColorPalette { | ||
32 | id: colorPalette | ||
33 | } | ||
30 | color: colorPalette.background | 34 | color: colorPalette.background |
31 | 35 | ||
32 | GridLayout { | 36 | GridLayout { |
@@ -82,7 +86,7 @@ Rectangle { | |||
82 | 86 | ||
83 | KubeSettings.Settings { | 87 | KubeSettings.Settings { |
84 | id: accountSettings | 88 | id: accountSettings |
85 | identifier: "account." + modelData | 89 | identifier: "account." + accountId |
86 | property string primaryIdentity: "current" | 90 | property string primaryIdentity: "current" |
87 | } | 91 | } |
88 | KubeSettings.Settings { | 92 | KubeSettings.Settings { |
diff --git a/accounts/maildir/package/metadata.desktop b/accounts/maildir/package/metadata.desktop new file mode 100644 index 00000000..12d444e9 --- /dev/null +++ b/accounts/maildir/package/metadata.desktop | |||
@@ -0,0 +1,8 @@ | |||
1 | [Desktop Entry] | ||
2 | Name=Kube Maildir Accounts Plugin | ||
3 | X-KDE-PluginInfo-Name=org.kube.accounts.maildir | ||
4 | Exec=kpackagelauncherqml -a org.kube.accounts.maildir | ||
5 | X-Plasma-MainScript=ui/MaildirAccountSettings.qml | ||
6 | X-KDE-ServiceTypes=KPackage/GenericQML | ||
7 | Icon=kmail2 | ||
8 | Type=Service | ||
diff --git a/accounts/maildir/qmldir b/accounts/maildir/qmldir index 70ecc786..5e4861c0 100644 --- a/accounts/maildir/qmldir +++ b/accounts/maildir/qmldir | |||
@@ -1,5 +1,3 @@ | |||
1 | module org.kde.kube.accounts.maildir | 1 | module org.kube.accounts.maildir |
2 | |||
3 | AccountSettings 1.0 MaildirAccountSettings.qml | ||
4 | 2 | ||
5 | plugin maildiraccountplugin | 3 | plugin maildiraccountplugin |