diff --git a/source/qml/addr/DetailPage.qml b/source/qml/addr/DetailPage.qml index b7258d5..4b084bd 100644 --- a/source/qml/addr/DetailPage.qml +++ b/source/qml/addr/DetailPage.qml @@ -1,84 +1,87 @@ /* * 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: model.firstname Kirigami.Theme.colorSet: Kirigami.Theme.View background: Rectangle { color: Kirigami.Theme.backgroundColor } Detail { 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/ListPage.qml b/source/qml/addr/ListPage.qml index b61334e..37a073f 100644 --- a/source/qml/addr/ListPage.qml +++ b/source/qml/addr/ListPage.qml @@ -1,69 +1,70 @@ /* * 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 alias currentIndex: list.currentIndex; Kirigami.Theme.colorSet: Kirigami.Theme.View title: "Address book" id: page background: Rectangle { color: Kirigami.Theme.backgroundColor } header: Rectangle { clip: true id: header color: "#3daee9" height: searchField.implicitHeight + 2 * Kirigami.Units.largeSpacing width: root.width //border.width: 1 //border.color: "#bdc3c7" TextField { id: searchField placeholderText: "Search" anchors.centerIn: parent anchors.margins: Kirigami.Units.largeSpacing width: parent.width - 2 * Kirigami.Units.largeSpacing } } List { id: list width: page.width height: page.height model: root.mydata } actions { main: Kirigami.Action { iconName: "contact-new" + text: "Create contact" } /*right: Kirigami.Action { iconName: "system-search" }*/ } } diff --git a/source/qml/components/actionbutton/Actionbutton1.qml b/source/qml/components/actionbutton/Actionbutton1.qml new file mode 100644 index 0000000..74df730 --- /dev/null +++ b/source/qml/components/actionbutton/Actionbutton1.qml @@ -0,0 +1,43 @@ +/* + * 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: root + + property var mydata : Models.Contacts { + } + + 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 new file mode 100644 index 0000000..3870433 --- /dev/null +++ b/source/qml/components/actionbutton/Actionbutton2.qml @@ -0,0 +1,80 @@ +/* + * 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: root + + property var mydata : Models.Contacts { + Component.onCompleted: { + detail.model = mydata.get(3) + root.pageStack.push(detail) + detail.visible = true + } + } + + 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 new file mode 100644 index 0000000..c377693 --- /dev/null +++ b/source/qml/components/actionbutton/Actionbutton3.qml @@ -0,0 +1,55 @@ +/* + * 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 { + 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.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/contextdrawer/Contextdrawer1.qml b/source/qml/components/contextdrawer/Contextdrawer1.qml new file mode 100644 index 0000000..7174fe3 --- /dev/null +++ b/source/qml/components/contextdrawer/Contextdrawer1.qml @@ -0,0 +1,73 @@ +/* + * 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: 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.Breadcrumb + + 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/Contextdrawer2.qml b/source/qml/components/contextdrawer/Contextdrawer2.qml new file mode 100644 index 0000000..d89f2ec --- /dev/null +++ b/source/qml/components/contextdrawer/Contextdrawer2.qml @@ -0,0 +1,73 @@ +/* + * 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/config.json b/source/qml/components/contextdrawer/config.json new file mode 100644 index 0000000..1e40a24 --- /dev/null +++ b/source/qml/components/contextdrawer/config.json @@ -0,0 +1,11 @@ +{ + "Contextdrawer1.qml": { + "type": "png", + "controls": "mobile", + "autostart": 0 + }, + "Contextdrawer2.qml": { + "type": "png", + "autostart": 0 + } +} diff --git a/source/qml/components/swipelistitem/Swipelistitem1.qml b/source/qml/components/swipelistitem/Swipelistitem1.qml new file mode 100644 index 0000000..e4bf556 --- /dev/null +++ b/source/qml/components/swipelistitem/Swipelistitem1.qml @@ -0,0 +1,65 @@ +/* + * 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 { + width: 320 + height: 600 + id: root + + property var mydata : Models.Contacts { + } + + pageStack.initialPage: Addr.ListPage { + id: list + } + + pageStack.defaultColumnWidth: root.width + pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.Breadcrumb + + + // HACK + TestEvent { + id: event + } + Timer { + interval: 1000 + repeat: false + running: true + onTriggered: { + var a = new A.An(list); + a.find("swipelistitem").eq(3).swipe({fromX: +140, fromY: 0, toX: -80, toY: 0}); + /*var node = a.find("swipelistitem").eq(3).nodes[0]; + var x = node.mapToItem(root, 0, 0).x + Math.floor(node.width / 2) + 142; + var y = node.mapToItem(root, 0, 0).y + Math.floor(node.height / 2); + console.log(x + " " + y) + event.mouseClick(root, x, y, Qt.LeftButton, Qt.NoModifier, 0) + event.mouseRelease(root, x, y, Qt.LeftButton, Qt.NoModifier, 0) + */ + } + } +} diff --git a/source/qml/patterns/navigation/breadcrumbs/Breadcrumb1.qml b/source/qml/patterns/navigation/breadcrumbs/Breadcrumb1.qml new file mode 100644 index 0000000..df4baf6 --- /dev/null +++ b/source/qml/patterns/navigation/breadcrumbs/Breadcrumb1.qml @@ -0,0 +1,78 @@ +/* + * 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: root + + property var mydata : Models.Contacts { + } + + 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); + a.find("swipelistitem").eq(3).find("qquickimage").touch(); + } + } + + Timer { + interval: 8000 + repeat: false + running: true + onTriggered: { + var b = new A.An(root); + b.find("pagerowglobaltoolbarui").find("heading").first().touch(); + } + } +} diff --git a/source/qml/patterns/navigation/breadcrumbs/config.json b/source/qml/patterns/navigation/breadcrumbs/config.json new file mode 100644 index 0000000..8d0d583 --- /dev/null +++ b/source/qml/patterns/navigation/breadcrumbs/config.json @@ -0,0 +1,7 @@ +{ + "Breadcrumb1.qml": { + "type": "webm", + "duration": 10, + "controls": "mobile" + } +}