diff --git a/source/qml/components/globaldrawer/Globaldrawer.qml b/source/qml/addr/Addressbook.qml similarity index 71% rename from source/qml/components/globaldrawer/Globaldrawer.qml rename to source/qml/addr/Addressbook.qml index f12ebdf..8c062df 100644 --- a/source/qml/components/globaldrawer/Globaldrawer.qml +++ b/source/qml/addr/Addressbook.qml @@ -1,112 +1,135 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami -import "../../models/" as Models -import "../../addr/" as Addr -import "../../lib/annotate.js" as A -import QtGraphicalEffects 1.0 +import "../models/" as Models Kirigami.ApplicationItem { width: parent.width height: parent.height id: root property alias gDrawer: global + property alias cDrawer: context + property alias detailPage: detail + property alias listPage: list + property int index: -1 property var mydata : Models.Contacts { Component.onCompleted: { - detail.model = mydata.get(2) - detail.visible = true + if (root.index >= 0) { + detail.model = mydata.get(root.index) + detail.visible = true + } } } - pageStack.initialPage: Addr.ListPage { + pageStack.initialPage: ListPage { id: list + onCurrentIndexChanged: { + detail.model = mydata.get(list.currentIndex) + root.pageStack.push(detail) + detail.visible = true + + if (root.width > 900) { + history.model = mydata.get(list.currentIndex) + root.pageStack.push(history) + } + } } pageStack.defaultColumnWidth: root.width < 320 ? root.width : 320 pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.Auto - Addr.DetailPage { + DetailPage { id: detail visible: false + showHistory: root.width <= 900 } - Component.onCompleted: { - root.pageStack.push(detail) + HistoryPage { + id: history + visible: false } globalDrawer: Kirigami.GlobalDrawer { id: global title: "Joanne Doe" - titleIcon: "../../../img/BernaFace.jpg" + titleIcon: "../../img/BernaFace.jpg" - //Kirigami.Theme.inherit: false - //Kirigami.Theme.colorSet: Kirigami.Theme.Complementary + /*modal: root.width <= 1000; + collapsible: root.width > 1000; + collapsed: root.width > 1000; + + Kirigami.Theme.inherit: root.width <= 1000 + Kirigami.Theme.colorSet: Kirigami.Theme.Complementary*/ topContent: [ Row { - anchors.right: parent.right + Layout.alignment: Qt.AlignRight | Qt.AlignBottom + //anchors.right: parent.right anchors.rightMargin: Kirigami.Settings.tabletMode ? Kirigami.Units.largeSpacing : Kirigami.Units.smallSpacing - anchors.bottom: parent.bottom spacing: Kirigami.Settings.tabletMode ? 2 * Kirigami.Units.largeSpacing : 2 * Kirigami.Units.smallSpacing //anchors.bottomMargin: 4 * Kirigami.Units.largeSpacing Kirigami.Icon { source: "document-share" width: Kirigami.Units.iconSizes.smallMedium height: width anchors.verticalCenter: parent.verticalCenter } Kirigami.Icon { source: "document-edit" width: Kirigami.Units.iconSizes.smallMedium height: width anchors.verticalCenter: parent.verticalCenter } } ] actions: [ Kirigami.Action { iconName: "document-import" text: i18n("&Import contacts") }, Kirigami.Action { iconName: "document-export" text: i18n("&Export contacts") }, Kirigami.Action { iconName: "user-group-delete" text: i18n("&Merge contacts") }, Kirigami.Action { iconName: "user-group-new" text: i18n("&Search duplicate contacts") }, Kirigami.Action { iconName: "configure" text: i18n("&Settings") } ] } + + contextDrawer: Kirigami.ContextDrawer { + id: context + } } diff --git a/source/qml/addr/Detail.qml b/source/qml/addr/Detail.qml index 5d023e0..3778597 100644 --- a/source/qml/addr/Detail.qml +++ b/source/qml/addr/Detail.qml @@ -1,191 +1,182 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.2 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami import QtGraphicalEffects 1.0 import "../lib/" as HIG Flickable { id: root property var model; + property alias history: history signal editClicked() HIG.Header { id: header content.anchors.leftMargin: root.width > 400 ? 100 : Kirigami.Units.largeSpacing content.anchors.topMargin: Kirigami.Units.largeSpacing content.anchors.bottomMargin: Kirigami.Units.largeSpacing //status: root.contentY == 0 ? 1 : Math.min(1, Math.max(2 / 11, 1 - root.contentY / Kirigami.Units.gridUnit)) source: "../../img/" + model.image + /*Kirigami.ActionToolBar { + anchors.fill: parent + //spacing: (header.width - 3 * Kirigami.Units.iconSizes.medium) / 4 + //anchors.leftMargin: spacing + actions: [ + Kirigami.Action { + iconName: "favorite" + text: "Save as favorite" + }, + Kirigami.Action { + iconName: "favorite" + text: "Save as favorite" + }, + Kirigami.Action { + iconName: "favorite" + text: "Save as favorite" + } + ]}*/ + stripContent: Row { anchors.fill: parent spacing: (header.width - 3 * Kirigami.Units.iconSizes.medium) / 4 anchors.leftMargin: spacing Kirigami.Icon { source: "favorite" width: Kirigami.Units.iconSizes.smallMedium height: width anchors.verticalCenter: parent.verticalCenter } Kirigami.Icon { source: "document-share" width: Kirigami.Units.iconSizes.smallMedium height: width anchors.verticalCenter: parent.verticalCenter } Kirigami.Icon { source: "document-edit" width: Kirigami.Units.iconSizes.smallMedium height: width anchors.verticalCenter: parent.verticalCenter MouseArea { onClicked: root.editClicked() anchors.fill: parent } } } Kirigami.Heading { text: model.firstname + " " + model.lastname //color: Kirigami.Theme.textColor color: "#fcfcfc" // Hard coded because of the ColorOverlay level: 1 width: parent.width wrapMode: Text.WordWrap } } Column { id: comm anchors.top: header.bottom anchors.topMargin: 2 * Kirigami.Units.largeSpacing width: parent.width Repeater { model: root.model.communication delegate: Kirigami.BasicListItem { //height: Kirigami.Units.gridUnit * 2 id: delegate contentItem: RowLayout { spacing: delegate.leftPadding anchors.verticalCenter: parent.verticalCenter Kirigami.Icon { id: icon width: Kirigami.Units.iconSizes.smallMedium height: width source: model.icon color: Kirigami.Theme.textColor Layout.alignment: Qt.AlignVCenter } Column { Layout.alignment: Qt.AlignVCenter Label { text: model.text color: model.default ? Kirigami.Theme.linkColor : Kirigami.Theme.textColor //"#2980b9" : "#232627" } Label { text: model.description font.pointSize: 8 color: Kirigami.Theme.textColor //"#7f8c8d" } } Rectangle { Layout.fillWidth: true Layout.alignment: Qt.AlignVCenter Kirigami.Icon { visible: typeof model.actions !== "undefined" source: "kmouth-phrase-new" width: Kirigami.Units.iconSizes.smallMedium height: width anchors.right: parent.right anchors.rightMargin: Kirigami.Units.largeSpacing anchors.verticalCenter: parent.verticalCenter id: call } } } Component.onCompleted: { if (typeof model.actions !== "undefined") { delegate.actions = model.actions } } } } } Kirigami.Heading { level: 4 - visible: typeof root.model.history !== "undefined" && root.model.history.count + visible: typeof root.model.history !== "undefined" && root.model.history.count && history.visible text: "History" - id: history + id: hTitle anchors.top: comm.bottom anchors.left: parent.left anchors.topMargin: 2 * Kirigami.Units.largeSpacing anchors.leftMargin: Kirigami.Units.largeSpacing } - Column { - anchors.top: history.bottom + History { + id: history + anchors.top: hTitle.bottom anchors.topMargin: Kirigami.Units.largeSpacing width: root.width - Repeater { - model: root.model.history - - delegate: Kirigami.SwipeListItem { - id: listItem - Row { - spacing: listItem.leftPadding - anchors.verticalCenter: parent.verticalCenter - - Kirigami.Icon { - width: Kirigami.Units.iconSizes.smallMedium - height: width - source: model.icon - color: Kirigami.Theme.disabledTextColor //"#232627" - anchors.verticalCenter: parent.verticalCenter - } - Column { - anchors.verticalCenter: parent.verticalCenter - Label { - text: model.text - color: Kirigami.Theme.textColor //"#232627" - } - Label { - text: model.date - font.pointSize: 8 - color: Kirigami.Theme.disabledTextColor // "#7f8c8d" - } - } - } - } - } + model: root.model } } diff --git a/source/qml/addr/DetailPage.qml b/source/qml/addr/DetailPage.qml index aef922f..e0be3dd 100644 --- a/source/qml/addr/DetailPage.qml +++ b/source/qml/addr/DetailPage.qml @@ -1,93 +1,95 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami Kirigami.ScrollablePage { property var model; visible: false id: page title: Kirigami.Settings.tabletMode ? model.firstname : "" Kirigami.Theme.colorSet: Kirigami.Theme.View property alias form: formOverlay + property bool showHistory; background: Rectangle { color: Kirigami.Theme.backgroundColor } Detail { model: page.model - onEditClicked: form.open(); + onEditClicked: form.open() + history.visible: showHistory } FormPage { id: formOverlay model: page.model } actions { left: Kirigami.Action { iconName: "mail-message" text: "Write mail" } main: Kirigami.Action { iconName: "call-start" text: "Make call" onTriggered: sheet.open() } right: Kirigami.Action { iconName: "kmouth-phrase-new" text: "Write SMS" } } contextualActions: [ Kirigami.Action { iconName: "favorite" text: "Select as favorite" }, Kirigami.Action { iconName: "document-share" text: "Share" }, Kirigami.Action { iconName: "document-edit" text: "Edit" }, Kirigami.Action { iconName: "edit-image-face-add" text: "Choose photo" }, Kirigami.Action { iconName: "im-kick-user" text: "Block number" }, Kirigami.Action { iconName: "delete" text: "Delete contact" }, Kirigami.Action { iconName: "edit-clear-history" text: "Delete history" } ] } diff --git a/source/qml/addr/History.qml b/source/qml/addr/History.qml new file mode 100644 index 0000000..7c1bed0 --- /dev/null +++ b/source/qml/addr/History.qml @@ -0,0 +1,59 @@ +/* + * Copyright 2018 Fabian Riethmayer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details + * + * You should have received a copy of the GNU Library 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.2 +import QtQuick.Controls 2.2 +import QtQuick.Layouts 1.2 +import org.kde.kirigami 2.4 as Kirigami + +Column { + id: root + property var model; + + Repeater { + model: root.model.history + + delegate: Kirigami.SwipeListItem { + id: listItem + Row { + spacing: listItem.leftPadding + anchors.verticalCenter: parent.verticalCenter + + Kirigami.Icon { + width: Kirigami.Units.iconSizes.smallMedium + height: width + source: model.icon + color: Kirigami.Theme.disabledTextColor //"#232627" + anchors.verticalCenter: parent.verticalCenter + } + Column { + anchors.verticalCenter: parent.verticalCenter + Label { + text: model.text + color: Kirigami.Theme.textColor //"#232627" + } + Label { + text: model.date + font.pointSize: 8 + color: Kirigami.Theme.disabledTextColor // "#7f8c8d" + } + } + } + } + } +} diff --git a/source/qml/components/contextdrawer/Contextdrawer1.qml b/source/qml/addr/HistoryPage.qml similarity index 70% copy from source/qml/components/contextdrawer/Contextdrawer1.qml copy to source/qml/addr/HistoryPage.qml index feab973..81ac04b 100644 --- a/source/qml/components/contextdrawer/Contextdrawer1.qml +++ b/source/qml/addr/HistoryPage.qml @@ -1,36 +1,45 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami -import "../../models/" as Models -import "../../addr/" as Addr -import "../../lib/annotate.js" as A -Rectangle { - width: 320 - height: 600 - id: root +Kirigami.ScrollablePage { + property var model; + visible: false + id: page + title: "History" + Kirigami.Theme.colorSet: Kirigami.Theme.View + width: 300 - ContextdrawerMobile { + background: Rectangle { + color: Kirigami.Theme.backgroundColor + } + Flickable { + History { + anchors.fill: parent; + width: page.width + model: page.model + } } + } diff --git a/source/qml/addr/Test3.qml b/source/qml/addr/Test3.qml index 00836e9..bf8e5d7 100644 --- a/source/qml/addr/Test3.qml +++ b/source/qml/addr/Test3.qml @@ -1,95 +1,36 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 import QtQuick.Controls 2.3 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.5 as Kirigami import "../models/" as Models import "../lib/annotate.js" as A -Kirigami.ApplicationWindow { - width: 800 + +Rectangle { + width: 1200 height: 600 id: root - property var mydata : Models.Contacts { - Component.onCompleted: { - detail.model = mydata.get(3) - detail.visible = true - } - } - - pageStack.initialPage: ListPage { - id: list - } - pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.Auto - pageStack.defaultColumnWidth: root.width < 320 ? root.width : 320 - - /*menuBar: MenuBar { - Menu { - title: qsTr("&File") - Action { text: qsTr("&New...") } - Action { text: qsTr("&Import") } - Action { text: qsTr("&Export") } - } - Menu { - title: qsTr("&Edit") - Action { text: qsTr("&Merge contacts") } - Action { text: qsTr("&Search dupplicate contacts") } - Action { text: qsTr("&Export") } - } - Menu { - title: qsTr("&Settings") - Action { text: qsTr("&About") } - } - Menu { - title: qsTr("&Help") - Action { text: qsTr("&About") } - } - }*/ - - DetailPage { - id: detail - visible: false - } - - globalDrawer: Kirigami.GlobalDrawer { - actions: [Kirigami.Action { - text: "Import" - }, - Kirigami.Action { - text: "Export" - }, - Kirigami.Action { - text: "Merge contacts" - }, - Kirigami.Action { - text: "Search dupplicate contacts" - }, - Kirigami.Action { - text: "Settings" - } - ] - } - - Component.onCompleted: { - root.pageStack.push(detail) + Addressbook { + index: 3 } } diff --git a/source/qml/components/actionbutton/Actionbutton1.qml b/source/qml/components/actionbutton/Actionbutton1.qml index 74df730..e5f0202 100644 --- a/source/qml/components/actionbutton/Actionbutton1.qml +++ b/source/qml/components/actionbutton/Actionbutton1.qml @@ -1,43 +1,37 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami import "../../models/" as Models import "../../addr/" as Addr import "../../lib/annotate.js" as A -Kirigami.ApplicationItem { +Rectangle { width: 320 height: 600 id: root - property var mydata : Models.Contacts { + Addr.Addressbook { + id: addrbook } - pageStack.initialPage: Addr.ListPage { - id: list - } - - pageStack.defaultColumnWidth: root.width - pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.Breadcrumb - } diff --git a/source/qml/components/actionbutton/Actionbutton2.qml b/source/qml/components/actionbutton/Actionbutton2.qml index 3870433..6f010f7 100644 --- a/source/qml/components/actionbutton/Actionbutton2.qml +++ b/source/qml/components/actionbutton/Actionbutton2.qml @@ -1,80 +1,50 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami import "../../models/" as Models import "../../addr/" as Addr import "../../lib/annotate.js" as A -Kirigami.ApplicationItem { +Rectangle { width: 320 height: 600 id: root - property var mydata : Models.Contacts { + Addr.Addressbook { + id: addrbook + index: 3 Component.onCompleted: { - detail.model = mydata.get(3) - root.pageStack.push(detail) - detail.visible = true + addrbook.pageStack.push(addrbook.detailPage) } } - pageStack.initialPage: Addr.ListPage { - id: list - onCurrentIndexChanged: { - - } - } - - pageStack.defaultColumnWidth: root.width < 320 ? root.width : 320 - pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.Breadcrumb - - contextDrawer: Kirigami.ContextDrawer { - id: contextDrawer - } - - Addr.DetailPage { - id: detail - visible: false - } - // HACK Timer { interval: 1000 repeat: false running: true onTriggered: { qmlControler.start(); } } - /*Timer { - interval: 3000 - repeat: false - running: true - onTriggered: { - var a = new A.An(root); - //a.tree(); - a.find("actionbutton").last().find("qquickrectangle").eq(1).touch({x: -28, y: -12}); - - } - }*/ } diff --git a/source/qml/components/actionbutton/Actionbutton3.qml b/source/qml/components/actionbutton/Actionbutton3.qml index c377693..8e09528 100644 --- a/source/qml/components/actionbutton/Actionbutton3.qml +++ b/source/qml/components/actionbutton/Actionbutton3.qml @@ -1,55 +1,41 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.5 as Kirigami import "../../models/" as Models import "../../addr/" as Addr import "../../lib/annotate.js" as A -Kirigami.ApplicationItem { +Rectangle { width: 800 height: 600 id: root - property var mydata : Models.Contacts { + Addr.Addressbook { + id: addrbook + index: 3 Component.onCompleted: { - detail.model = mydata.get(3) - detail.visible = true + addrbook.pageStack.push(addrbook.detailPage) + qmlControler.start(); } } - - pageStack.initialPage: Addr.ListPage { - id: list - } - pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.Auto - pageStack.defaultColumnWidth: root.width < 320 ? root.width : 320 - - Addr.DetailPage { - id: detail - visible: false - } - - Component.onCompleted: { - root.pageStack.push(detail) - qmlControler.start(); - } } diff --git a/source/qml/components/actionbutton/config.json b/source/qml/components/actionbutton/config.json new file mode 100644 index 0000000..4fc6c14 --- /dev/null +++ b/source/qml/components/actionbutton/config.json @@ -0,0 +1,15 @@ +{ + "Actionbutton1.qml": { + "type": "png", + "controls": "mobile" + }, + "Actionbutton2.qml": { + "type": "png", + "controls": "mobile", + "autostart": 0 + }, + "Actionbutton3.qml": { + "type": "png", + "autostart": 0 + } +} diff --git a/source/qml/components/contextdrawer/Contextdrawer1.qml b/source/qml/components/contextdrawer/Contextdrawer1.qml index feab973..2eca3bc 100644 --- a/source/qml/components/contextdrawer/Contextdrawer1.qml +++ b/source/qml/components/contextdrawer/Contextdrawer1.qml @@ -1,36 +1,59 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami import "../../models/" as Models import "../../addr/" as Addr import "../../lib/annotate.js" as A Rectangle { width: 320 height: 600 id: root - ContextdrawerMobile { + Addr.Addressbook { + id: addrbook + index: 3 + Component.onCompleted: { + addrbook.pageStack.push(addrbook.detailPage) + } + } + + // HACK + Timer { + interval: 1000 + repeat: false + running: true + onTriggered: { + addrbook.cDrawer.open(); + } + } + Timer { + interval: 1500 + repeat: false + running: true + onTriggered: { + qmlControler.start(); + } } } diff --git a/source/qml/components/contextdrawer/Contextdrawer2.qml b/source/qml/components/contextdrawer/Contextdrawer2.qml index 783a3f1..371b236 100644 --- a/source/qml/components/contextdrawer/Contextdrawer2.qml +++ b/source/qml/components/contextdrawer/Contextdrawer2.qml @@ -1,35 +1,58 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami import "../../models/" as Models import "../../addr/" as Addr import "../../lib/annotate.js" as A Rectangle { width: 800 height: 600 - ContextdrawerDesktop { + Addr.Addressbook { + id: addrbook + index: 3 + Component.onCompleted: { + addrbook.pageStack.push(addrbook.detailPage) + } + } + + // HACK + Timer { + interval: 1000 + repeat: false + running: true + onTriggered: { + addrbook.cDrawer.open(); + } + } + Timer { + interval: 1500 + repeat: false + running: true + onTriggered: { + qmlControler.start(); + } } } diff --git a/source/qml/components/contextdrawer/ContextdrawerDesktop.qml b/source/qml/components/contextdrawer/ContextdrawerDesktop.qml deleted file mode 100644 index d89f2ec..0000000 --- a/source/qml/components/contextdrawer/ContextdrawerDesktop.qml +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2018 Fabian Riethmayer - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details - * - * You should have received a copy of the GNU Library 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.6 -import QtQuick.Controls 2.2 -import QtQuick.Layouts 1.2 -import org.kde.kirigami 2.4 as Kirigami -import "../../models/" as Models -import "../../addr/" as Addr -import "../../lib/annotate.js" as A - -Kirigami.ApplicationItem { - width: 800 - height: 600 - id: root - - property var mydata : Models.Contacts { - Component.onCompleted: { - detail.model = mydata.get(3) - detail.visible = true - } - } - - pageStack.initialPage: Addr.ListPage { - id: list - } - - pageStack.defaultColumnWidth: root.width < 320 ? root.width : 320 - pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.Auto - - Addr.DetailPage { - id: detail - visible: false - } - - contextDrawer: Kirigami.ContextDrawer { - id: contextDrawer - } - - Component.onCompleted: { - root.pageStack.push(detail) - root.pageStack.push(form) - } - - - - // HACK - Timer { - interval: 1000 - repeat: false - running: true - onTriggered: { - contextDrawer.open() - qmlControler.start(); - } - } -} diff --git a/source/qml/components/contextdrawer/ContextdrawerMobile.qml b/source/qml/components/contextdrawer/ContextdrawerMobile.qml deleted file mode 100644 index 652b2b1..0000000 --- a/source/qml/components/contextdrawer/ContextdrawerMobile.qml +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2018 Fabian Riethmayer - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details - * - * You should have received a copy of the GNU Library 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.6 -import QtQuick.Controls 2.2 -import QtQuick.Layouts 1.2 -import org.kde.kirigami 2.4 as Kirigami -import "../../models/" as Models -import "../../addr/" as Addr -import "../../lib/annotate.js" as A - -Kirigami.ApplicationItem { - width: 320 - height: 600 - id: app - - property var mydata : Models.Contacts { - Component.onCompleted: { - detail.model = mydata.get(3) - detail.visible = true - } - } - - pageStack.initialPage: Addr.ListPage { - id: list - } - - pageStack.defaultColumnWidth: app.width < 320 ? app.width : 320 - pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.Breadcrumb - - Addr.DetailPage { - id: detail - visible: false - } - - contextDrawer: Kirigami.ContextDrawer { - id: contextDrawer - } - - Component.onCompleted: { - app.pageStack.push(detail) - //app.pageStack.push(form) - } - - - - // HACK - Timer { - interval: 1000 - repeat: false - running: true - onTriggered: { - contextDrawer.open(); - } - } - Timer { - interval: 1500 - repeat: false - running: true - onTriggered: { - qmlControler.start(); - } - } -} diff --git a/source/qml/components/globaldrawer/Globaldrawer1.qml b/source/qml/components/globaldrawer/Globaldrawer1.qml index 4d3fb41..af85a3a 100644 --- a/source/qml/components/globaldrawer/Globaldrawer1.qml +++ b/source/qml/components/globaldrawer/Globaldrawer1.qml @@ -1,54 +1,54 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami import "../../models/" as Models import "../../addr/" as Addr import "../../lib/annotate.js" as A Rectangle { width: 320 height: 600 id: root - Globaldrawer { - id: drawer + Addr.Addressbook { + id: addrbook } // HACK Timer { interval: 1000 repeat: false running: true onTriggered: { - drawer.gDrawer.open(); + addrbook.gDrawer.open(); } } Timer { interval: 1500 repeat: false running: true onTriggered: { qmlControler.start(); } } } diff --git a/source/qml/components/globaldrawer/Globaldrawer2.qml b/source/qml/components/globaldrawer/Globaldrawer2.qml index 98f7f6b..62b654f 100644 --- a/source/qml/components/globaldrawer/Globaldrawer2.qml +++ b/source/qml/components/globaldrawer/Globaldrawer2.qml @@ -1,58 +1,66 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami import "../../models/" as Models import "../../addr/" as Addr import "../../lib/annotate.js" as A Rectangle { width: 800 height: 600 id: root - Globaldrawer { - id: drawer + Addr.Addressbook { + id: addrbook + index: 2 + Component.onCompleted: { + addrbook.pageStack.push(addrbook.detailPage) + } } Timer { interval: 1000 repeat: false running: true onTriggered: { var b = new A.An(root); + b.find("pagerowglobaltoolbarui").tree(); + b.find("pagerowglobaltoolbarui").find("desktopicon").draw({ + outline: {label: false} + }); b.find("pagerowglobaltoolbarui").find("qquicktoolbutton").draw({ outline: {label: false} }); } } // HACK Timer { interval: 1500 repeat: false running: true onTriggered: { qmlControler.start(); } } } diff --git a/source/qml/components/globaldrawer/Globaldrawer3.qml b/source/qml/components/globaldrawer/Globaldrawer3.qml index a3e5dd1..11a6313 100644 --- a/source/qml/components/globaldrawer/Globaldrawer3.qml +++ b/source/qml/components/globaldrawer/Globaldrawer3.qml @@ -1,54 +1,58 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami import "../../models/" as Models import "../../addr/" as Addr import "../../lib/annotate.js" as A Rectangle { width: 800 height: 600 id: root - Globaldrawer { - id: drawer + Addr.Addressbook { + id: addrbook + index: 2 + Component.onCompleted: { + addrbook.pageStack.push(addrbook.detailPage) + } } // HACK Timer { interval: 1000 repeat: false running: true onTriggered: { - //drawer.gDrawer.open(); + addrbook.gDrawer.open(); } } Timer { interval: 1500 repeat: false running: true onTriggered: { qmlControler.start(); } } } diff --git a/source/qml/components/globaldrawer/Globaldrawer4.qml b/source/qml/components/globaldrawer/Globaldrawer4.qml index ccd3134..7e4370a 100644 --- a/source/qml/components/globaldrawer/Globaldrawer4.qml +++ b/source/qml/components/globaldrawer/Globaldrawer4.qml @@ -1,68 +1,72 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami import "../../models/" as Models import "../../addr/" as Addr import "../../lib/annotate.js" as A Rectangle { width: 800 height: 600 id: root - Globaldrawer { - id: drawer - + Addr.Addressbook { + id: addrbook + index: 2 gDrawer { modal: false; collapsible: true; collapsed: true; } + + Component.onCompleted: { + addrbook.pageStack.push(addrbook.detailPage) + } } // HACK Timer { interval: 3000 repeat: false running: true onTriggered: { - drawer.gDrawer.collapsed = false; + addrbook.gDrawer.collapsed = false; } } Timer { interval: 7000 repeat: false running: true onTriggered: { - drawer.gDrawer.collapsed = true; + addrbook.gDrawer.collapsed = true; } } Timer { interval: 500 repeat: false running: true onTriggered: { qmlControler.start(); } } } diff --git a/source/qml/components/swipelistitem/Swipelistitem1.qml b/source/qml/components/swipelistitem/Swipelistitem1.qml index c2feb8c..8ba2740 100644 --- a/source/qml/components/swipelistitem/Swipelistitem1.qml +++ b/source/qml/components/swipelistitem/Swipelistitem1.qml @@ -1,68 +1,62 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 import QtTest 1.2 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami import "../../models/" as Models import "../../addr/" as Addr import "../../lib/annotate.js" as A -Kirigami.ApplicationItem { +Rectangle { width: 320 height: 600 id: root - property var mydata : Models.Contacts { + Addr.Addressbook { + id: addrbook } - pageStack.initialPage: Addr.ListPage { - id: list - } - - pageStack.defaultColumnWidth: root.width - pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.Breadcrumb - // HACK TestEvent { id: event } Timer { interval: 2000 repeat: false running: true onTriggered: { - var a = new A.An(list); + var a = new A.An(addrbook); a.find("swipelistitem").eq(3).swipe({fromX: +140, fromY: 9, toX: -80, toY: 0}); } } Timer { interval: 4000 repeat: false running: true onTriggered: { - var a = new A.An(list); + var a = new A.An(addrbook); a.find("swipelistitem").eq(3).touch({}); } } } diff --git a/source/qml/patterns/command/content/Content1.qml b/source/qml/patterns/command/content/Content1.qml index 4989c30..7aa6593 100644 --- a/source/qml/patterns/command/content/Content1.qml +++ b/source/qml/patterns/command/content/Content1.qml @@ -1,82 +1,74 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami import "../../../models/" as Models import "../../../addr/" as Addr import "../../../lib/annotate.js" as A Rectangle { width: 320 - height: 380 + height: 600 id: root - property var mydata : Models.Contacts { + Addr.Addressbook { + id: addrbook + index: 2 Component.onCompleted: { - detail.model = mydata.get(2) - detail.visible = true + addrbook.pageStack.push(addrbook.detailPage) } } - Kirigami.ApplicationItem { - x: 0 - y: 0 - width: 320 - height: 600 - id: app - - - - pageStack.initialPage: Addr.DetailPage { - id: detail - visible: false + // HACK + Timer { + interval: 1000 + repeat: false + running: true + onTriggered: { + qmlControler.start(); } - pageStack.defaultColumnWidth: app.width - pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.Breadcrumb - - + } - // HACK - Timer { - interval: 1000 - repeat: false - running: true - onTriggered: { - var a = new A.An(detail); - a.find("header").find("qquickrow").find("desktopicon").first().draw({ - "outline": {label: false} - }); - a.find("qquickcolumn").first().find("basiclistitem").first().find("qquickrectangle").find("desktopicon").draw({ - "outline": {label: false} - }); - } + // HACK + Timer { + interval: 1000 + repeat: false + running: true + onTriggered: { + var a = new A.An(addrbook.detailPage); + a.find("header").find("qquickrow").find("desktopicon").first().draw({ + "outline": {label: false} + }); + a.find("qquickcolumn").first().find("basiclistitem").first().find("qquickrectangle").find("desktopicon").draw({ + "outline": {label: false} + }); } - Timer { - interval: 1500 - repeat: false - running: true - onTriggered: { - qmlControler.start(); - } + } + Timer { + interval: 1500 + repeat: false + running: true + onTriggered: { + qmlControler.start(); } } } diff --git a/source/qml/patterns/command/toolbar/Toolbar1.qml b/source/qml/patterns/command/toolbar/Toolbar1.qml index 8e0edea..3e93343 100644 --- a/source/qml/patterns/command/toolbar/Toolbar1.qml +++ b/source/qml/patterns/command/toolbar/Toolbar1.qml @@ -1,84 +1,59 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami import "../../../models/" as Models import "../../../addr/" as Addr import "../../../lib/annotate.js" as A -Kirigami.ApplicationItem { +Rectangle { width: 800 height: 600 id: root - property var mydata : Models.Contacts { + Addr.Addressbook { + id: addrbook + index: 0 Component.onCompleted: { - detail.model = mydata.get(0) - detail.visible = true + addrbook.pageStack.push(addrbook.detailPage) } } - pageStack.initialPage: Addr.ListPage { - id: list - onCurrentIndexChanged: { - detail.model = mydata.get(list.currentIndex) - root.pageStack.push(detail) - detail.visible = true - } - } - - pageStack.defaultColumnWidth: root.width < 320 ? root.width : 320 - pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.Auto - - Addr.DetailPage { - id: detail - visible: false - } - - contextDrawer: Kirigami.ContextDrawer { - id: contextDrawer - } - - Component.onCompleted: { - root.pageStack.push(detail) - } - - // HACK Timer { interval: 1000 repeat: false running: true onTriggered: { - var a = new A.An(detail); + var a = new A.An(addrbook.detailPage); a.find("abstractpageheader").find("privateactiontoolbutton").last().click(); } } Timer { interval: 5000 repeat: false running: true onTriggered: { qmlControler.start(); } } } diff --git a/source/qml/components/globaldrawer/Globaldrawer3.qml b/source/qml/patterns/content/form/Form1.qml similarity index 79% copy from source/qml/components/globaldrawer/Globaldrawer3.qml copy to source/qml/patterns/content/form/Form1.qml index a3e5dd1..09c21e6 100644 --- a/source/qml/components/globaldrawer/Globaldrawer3.qml +++ b/source/qml/patterns/content/form/Form1.qml @@ -1,54 +1,54 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 -import QtQuick.Controls 2.2 -import QtQuick.Layouts 1.2 -import org.kde.kirigami 2.4 as Kirigami -import "../../models/" as Models -import "../../addr/" as Addr -import "../../lib/annotate.js" as A +import "../../../addr/" as Addr Rectangle { width: 800 height: 600 id: root - Globaldrawer { - id: drawer + Addr.Addressbook { + id: addrbook + index: 0 + Component.onCompleted: { + addrbook.pageStack.push(addrbook.detailPage) + } } // HACK Timer { interval: 1000 repeat: false running: true onTriggered: { - //drawer.gDrawer.open(); + addrbook.detailPage.form.open(); + //contextDrawer.open(); } } Timer { - interval: 1500 + interval: 2500 repeat: false running: true onTriggered: { qmlControler.start(); } } } diff --git a/source/qml/components/globaldrawer/Globaldrawer1.qml b/source/qml/patterns/content/form/Form2.qml similarity index 79% copy from source/qml/components/globaldrawer/Globaldrawer1.qml copy to source/qml/patterns/content/form/Form2.qml index 4d3fb41..5fe5323 100644 --- a/source/qml/components/globaldrawer/Globaldrawer1.qml +++ b/source/qml/patterns/content/form/Form2.qml @@ -1,54 +1,54 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 -import QtQuick.Controls 2.2 -import QtQuick.Layouts 1.2 -import org.kde.kirigami 2.4 as Kirigami -import "../../models/" as Models -import "../../addr/" as Addr -import "../../lib/annotate.js" as A +import "../../../addr/" as Addr Rectangle { width: 320 height: 600 id: root - Globaldrawer { - id: drawer + Addr.Addressbook { + id: addrbook + index: 0 + Component.onCompleted: { + addrbook.pageStack.push(addrbook.detailPage) + } } // HACK Timer { interval: 1000 repeat: false running: true onTriggered: { - drawer.gDrawer.open(); + addrbook.detailPage.form.open(); + //contextDrawer.open(); } } Timer { - interval: 1500 + interval: 2500 repeat: false running: true onTriggered: { qmlControler.start(); } } } diff --git a/source/qml/patterns/content/form/config.json b/source/qml/patterns/content/form/config.json new file mode 100644 index 0000000..728c022 --- /dev/null +++ b/source/qml/patterns/content/form/config.json @@ -0,0 +1,11 @@ +{ + "Form1.qml": { + "type": "png", + "autostart": "false" + }, + "Form2.qml": { + "type": "png", + "autostart": "false", + "controls": "mobile" + } +} diff --git a/source/qml/patterns/navigation/breadcrumbs/Breadcrumb1.qml b/source/qml/patterns/navigation/breadcrumbs/Breadcrumb1.qml index df4baf6..a632a5b 100644 --- a/source/qml/patterns/navigation/breadcrumbs/Breadcrumb1.qml +++ b/source/qml/patterns/navigation/breadcrumbs/Breadcrumb1.qml @@ -1,78 +1,57 @@ /* * Copyright 2018 Fabian Riethmayer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, 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 Library General Public License for more details * * You should have received a copy of the GNU Library 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.6 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami import "../../../models/" as Models import "../../../addr/" as Addr import "../../../lib/annotate.js" as A -Kirigami.ApplicationItem { +Rectangle { width: 320 height: 600 id: root - property var mydata : Models.Contacts { + Addr.Addressbook { + id: addrbook } - pageStack.initialPage: Addr.ListPage { - id: list - onCurrentIndexChanged: { - detail.model = mydata.get(list.currentIndex) - root.pageStack.push(detail) - detail.visible = true - } - } - - pageStack.defaultColumnWidth: root.width - pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.Breadcrumb - - Addr.DetailPage { - id: detail - visible: false - } - - contextDrawer: Kirigami.ContextDrawer { - id: contextDrawer - } - - // HACK Timer { interval: 4000 repeat: false running: true onTriggered: { - var a = new A.An(list); + var a = new A.An(addrbook); a.find("swipelistitem").eq(3).find("qquickimage").touch(); } } Timer { interval: 8000 repeat: false running: true onTriggered: { - var b = new A.An(root); + var b = new A.An(addrbook); b.find("pagerowglobaltoolbarui").find("heading").first().touch(); } } }