From 9c54548b2bca96a2fda4da3d15429756774abb26 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 21 Jul 2017 23:44:55 +0200 Subject: Housekeeping: Avatar.qml and FocusComposer.qml are no longer used --- framework/qml/Avatar.qml | 57 --------- framework/qml/FocusComposer.qml | 252 ---------------------------------------- framework/qmldir | 2 - 3 files changed, 311 deletions(-) delete mode 100644 framework/qml/Avatar.qml delete mode 100644 framework/qml/FocusComposer.qml (limited to 'framework') diff --git a/framework/qml/Avatar.qml b/framework/qml/Avatar.qml deleted file mode 100644 index 0a7c4c18..00000000 --- a/framework/qml/Avatar.qml +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2016 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 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.7 -import QtQuick.Layouts 1.1 - - -Rectangle { - - property string name; - - //colors taken from https://techbase.kde.org/Projects/Usability/HIG/Color - function calcColor(x) - { - switch (x % 5) { - case 0: - return "#16a085" - case 1: - return "#27ae60" - case 2: - return "#2980b9" - case 3: - return "#8e44ad" - case 4: - return "#c0392b" - } - } - - radius: 100 - - color: calcColor(name.length) - - Text { - anchors.centerIn: parent - - text: name.charAt(0) - - color: "#ecf0f1" - - font.capitalization: Font.AllUppercase - } -} diff --git a/framework/qml/FocusComposer.qml b/framework/qml/FocusComposer.qml deleted file mode 100644 index d328b1dd..00000000 --- a/framework/qml/FocusComposer.qml +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Copyright (C) 2016 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 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.4 -import QtQuick.Layouts 1.1 -import QtQuick.Controls 2.0 as Controls2 - -import org.kube.framework 1.0 as Kube - - -Item { - id: root - - signal done - property bool loadAsDraft: false - property variant message: {} - - //actions - property variant sendAction: composerController.sendAction - property variant saveAsDraftAction: composerController.saveAsDraftAction - - //Controller - Kube.ComposerController { - id: composerController - onDone: root.done() - } - - - Component.onCompleted: { - if (root.message) { - composerController.loadMessage(root.message, root.loadAsDraft) - } - } - - Item { - - anchors.centerIn: parent - - width: parent.width - Kube.Units.largeSpacing * 2 - height: parent.height - Kube.Units.largeSpacing * 2 - - ColumnLayout { - - anchors { - fill: parent - } - - ColumnLayout { - - anchors.fill: parent - - GridLayout { - - columns: 2 - - Kube.Label { - Layout.alignment: Qt.AlignVCenter | Qt.AlignRight - text: text: qsTr("To") - } - - AutocompleteLineEdit { - id: to - - Layout.fillWidth: true - - text: composerController.to - onTextChanged: { - composerController.to = text; - } - - model: composerController.recipientCompleter.model - onSearchTermChanged: { - composerController.recipientCompleter.searchString = searchTerm - } - } - - - Kube.Label { - Layout.alignment: Qt.AlignVCenter | Qt.AlignRight - text: qsTr("Cc") - visible: cc.visible - } - - AutocompleteLineEdit { - id: cc - - Layout.fillWidth: true - - visible: false - - text: composerController.cc - - onTextChanged: { - composerController.cc = text; - } - - model: composerController.recipientCompleter.model - onSearchTermChanged: { - composerController.recipientCompleter.searchString = searchTerm - } - } - - Kube.Label { - Layout.alignment: Qt.AlignVCenter | Qt.AlignRight - text: qsTr("Bcc") - visible: bcc.visible - } - - AutocompleteLineEdit { - id: bcc - - Layout.fillWidth: true - - visible : false - - text: composerController.bcc - - onTextChanged: { - composerController.bcc = text; - } - - model: composerController.recipientCompleter.model - onSearchTermChanged: { - composerController.recipientCompleter.searchString = searchTerm - } - } - - Kube.Label { - text: qsTr("From") - } - - RowLayout { - - Kube.ComboBox { - id: identityCombo - model: composerController.identitySelector.model - textRole: "displayName" - - Layout.fillWidth: true - - onCurrentIndexChanged: { - composerController.identitySelector.currentIndex = currentIndex - } - } - - Kube.Button { - id: ccButton - - text: qsTr("Cc") - onClicked: { - cc.visible = true - ccButton.visible = false - } - } - - Kube.Button { - id: bccButton - - text: qsTr("Bcc") - - onClicked: { - bcc.visible = true - bccButton.visible = false - } - } - } - } - - Kube.TextField { - id: subject - - Layout.fillWidth: true - - placeholderText: "Enter Subject..." - - text: composerController.subject - - onTextChanged: { - composerController.subject = text; - } - } - - Controls2.TextArea { - id: content - - text: composerController.body - - onTextChanged: { - composerController.body = text; - } - - Layout.fillWidth: true - Layout.fillHeight: true - } - - RowLayout { - id: bottomBar - - width: parent.width - - Kube.Button { - text: qsTr("Discard") - - onClicked: { - root.done() - } - } - - Item { - Layout.fillWidth: true - } - - - Kube.Button { - id: saveDraftButton - - text: qsTr("Save as Draft") - //TODO enabled: saveAsDraftAction.enabled - onClicked: { - saveAsDraftAction.execute() - } - } - - Kube.PositiveButton { - width: saveDraftButton.width - - text: qsTr("Send") - enabled: sendAction.enabled - onClicked: { - sendAction.execute() - } - } - } - } - } - } -} diff --git a/framework/qmldir b/framework/qmldir index 748547fb..b7e455b3 100644 --- a/framework/qmldir +++ b/framework/qmldir @@ -1,7 +1,5 @@ module org.kube.framework -Avatar 1.0 Avatar.qml -FocusComposer 1.0 FocusComposer.qml ConversationView 1.0 ConversationView.qml FolderListView 1.0 FolderListView.qml MailListView 1.0 MailListView.qml -- cgit v1.2.3