From c5e7ce7a3f9a73d20ae6ee0670bf57fc9a504331 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Mon, 19 Oct 2015 16:13:34 +0200 Subject: install kmail-quick ui as package --- applications/kmail-quick/CMakeLists.txt | 28 ++++++++++ applications/kmail-quick/MailListView.qml | 64 ---------------------- applications/kmail-quick/main.qml | 31 ----------- .../package/contents/ui/MailListView.qml | 64 ++++++++++++++++++++++ .../kmail-quick/package/contents/ui/main.qml | 31 +++++++++++ applications/kmail-quick/package/metadata.desktop | 8 +++ 6 files changed, 131 insertions(+), 95 deletions(-) create mode 100644 applications/kmail-quick/CMakeLists.txt delete mode 100644 applications/kmail-quick/MailListView.qml delete mode 100644 applications/kmail-quick/main.qml create mode 100644 applications/kmail-quick/package/contents/ui/MailListView.qml create mode 100644 applications/kmail-quick/package/contents/ui/main.qml create mode 100644 applications/kmail-quick/package/metadata.desktop (limited to 'applications/kmail-quick') diff --git a/applications/kmail-quick/CMakeLists.txt b/applications/kmail-quick/CMakeLists.txt new file mode 100644 index 00000000..19199e18 --- /dev/null +++ b/applications/kmail-quick/CMakeLists.txt @@ -0,0 +1,28 @@ +project(kmail-quick) + +cmake_minimum_required(VERSION 2.8.10.1) + +include(CPack) +include(FeatureSummary) +find_package(PkgConfig) + +################# set KDE specific information ################# + +find_package(ECM 0.0.8 REQUIRED NO_MODULE) + +# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) + +include(KDEInstallDirs) +include(KDECMakeSettings) +include(KDECompilerSettings) + +find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui) + +set (QT_MIN_VERSION "5.4.0") +find_package(KF5 REQUIRED COMPONENTS + Package) + +kpackage_install_package(package org.kde.pim.kmail-quick genericqml) +install(FILES package/metadata.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} RENAME org.kde.pim.kmail-quick.desktop) + diff --git a/applications/kmail-quick/MailListView.qml b/applications/kmail-quick/MailListView.qml deleted file mode 100644 index a968bc72..00000000 --- a/applications/kmail-quick/MailListView.qml +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2015 Michael Bohlender - * - * 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 3 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, see . - */ - -import QtQuick 2.4 -import QtQuick.Controls 1.3 -import QtQuick.Layouts 1.1 - -import org.kde.akonadi2.mail 1.0 - -Item { - id: root - - MailList { - id: mailList - - query: "Some Query" - - } - - Button { - id: button - - anchors { - top: parent.top - right: parent.right - left: parent.left - } - - text: "add mail" - - onClicked: mailList.addMail("test test test"); - } - - ListView { - - anchors { - top: button.bottom - left: parent.left - right: parent.right - bottom: parent.bottom - } - - model: mailList.model - - delegate: Label { - - text: model.subject - } - } -} \ No newline at end of file diff --git a/applications/kmail-quick/main.qml b/applications/kmail-quick/main.qml deleted file mode 100644 index 69c2f094..00000000 --- a/applications/kmail-quick/main.qml +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2015 Michael Bohlender - * - * 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 3 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, see . - */ - -import QtQuick 2.4 -import QtQuick.Controls 1.3 -import QtQuick.Layouts 1.1 - -ApplicationWindow { - id: app - - //FIXME remove fixed pixel hight - //for now just convinience during testing - height: 1080 * 0.7 - width: 1920 * 0.7 - - visible: true -} \ No newline at end of file diff --git a/applications/kmail-quick/package/contents/ui/MailListView.qml b/applications/kmail-quick/package/contents/ui/MailListView.qml new file mode 100644 index 00000000..a968bc72 --- /dev/null +++ b/applications/kmail-quick/package/contents/ui/MailListView.qml @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2015 Michael Bohlender + * + * 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 3 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, see . + */ + +import QtQuick 2.4 +import QtQuick.Controls 1.3 +import QtQuick.Layouts 1.1 + +import org.kde.akonadi2.mail 1.0 + +Item { + id: root + + MailList { + id: mailList + + query: "Some Query" + + } + + Button { + id: button + + anchors { + top: parent.top + right: parent.right + left: parent.left + } + + text: "add mail" + + onClicked: mailList.addMail("test test test"); + } + + ListView { + + anchors { + top: button.bottom + left: parent.left + right: parent.right + bottom: parent.bottom + } + + model: mailList.model + + delegate: Label { + + text: model.subject + } + } +} \ No newline at end of file diff --git a/applications/kmail-quick/package/contents/ui/main.qml b/applications/kmail-quick/package/contents/ui/main.qml new file mode 100644 index 00000000..69c2f094 --- /dev/null +++ b/applications/kmail-quick/package/contents/ui/main.qml @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2015 Michael Bohlender + * + * 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 3 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, see . + */ + +import QtQuick 2.4 +import QtQuick.Controls 1.3 +import QtQuick.Layouts 1.1 + +ApplicationWindow { + id: app + + //FIXME remove fixed pixel hight + //for now just convinience during testing + height: 1080 * 0.7 + width: 1920 * 0.7 + + visible: true +} \ No newline at end of file diff --git a/applications/kmail-quick/package/metadata.desktop b/applications/kmail-quick/package/metadata.desktop new file mode 100644 index 00000000..d02fa46a --- /dev/null +++ b/applications/kmail-quick/package/metadata.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=KMail Quick +X-KDE-PluginInfo-Name=org.kde.pim.kmail-quick +Exec=kpackagelauncherqml -a org.kde.pim.kmail-quick +X-Plasma-MainScript=ui/main.qml +X-KDE-ServiceTypes=KPackage/GenericQML +Icon=kmail2 +Type=Service \ No newline at end of file -- cgit v1.2.3