diff --git a/HIG/source/img/Actionbutton1.png b/HIG/source/img/Actionbutton1.png index e26311e..5a8eabe 100644 Binary files a/HIG/source/img/Actionbutton1.png and b/HIG/source/img/Actionbutton1.png differ diff --git a/HIG/source/img/Actionbutton2.png b/HIG/source/img/Actionbutton2.png index 1a1b88b..fd25650 100644 Binary files a/HIG/source/img/Actionbutton2.png and b/HIG/source/img/Actionbutton2.png differ diff --git a/HIG/source/img/Actionbutton3.png b/HIG/source/img/Actionbutton3.png index 1266981..6a219ef 100644 Binary files a/HIG/source/img/Actionbutton3.png and b/HIG/source/img/Actionbutton3.png differ diff --git a/HIG/source/img/Combobox1.png b/HIG/source/img/Combobox1.png index 40a91f3..9bb5fd0 100644 Binary files a/HIG/source/img/Combobox1.png and b/HIG/source/img/Combobox1.png differ diff --git a/HIG/source/img/Contextdrawer1.png b/HIG/source/img/Contextdrawer1.png index b298bbe..d5f32df 100644 Binary files a/HIG/source/img/Contextdrawer1.png and b/HIG/source/img/Contextdrawer1.png differ diff --git a/HIG/source/img/Contextdrawer2.png b/HIG/source/img/Contextdrawer2.png index 6be1cbe..e1b3150 100644 Binary files a/HIG/source/img/Contextdrawer2.png and b/HIG/source/img/Contextdrawer2.png differ diff --git a/HIG/source/qml/components/actionbutton/Actionbutton2.qml b/HIG/source/qml/components/actionbutton/Actionbutton2.qml index 6f010f7..34b4022 100644 --- a/HIG/source/qml/components/actionbutton/Actionbutton2.qml +++ b/HIG/source/qml/components/actionbutton/Actionbutton2.qml @@ -1,50 +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.4 as Kirigami import "../../models/" as Models import "../../addr/" as Addr +import "../../lib/" as HIG import "../../lib/annotate.js" as A Rectangle { width: 320 height: 600 id: root Addr.Addressbook { id: addrbook index: 3 Component.onCompleted: { addrbook.pageStack.push(addrbook.detailPage) } } - - // HACK - Timer { - interval: 1000 - repeat: false - running: true - onTriggered: { - qmlControler.start(); - } - } } diff --git a/HIG/source/qml/components/actionbutton/Actionbutton3.qml b/HIG/source/qml/components/actionbutton/Actionbutton3.qml index 8dfe14d..eb246eb 100644 --- a/HIG/source/qml/components/actionbutton/Actionbutton3.qml +++ b/HIG/source/qml/components/actionbutton/Actionbutton3.qml @@ -1,40 +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.5 as Kirigami import "../../models/" as Models import "../../addr/" as Addr import "../../lib/annotate.js" as A Rectangle { width: 800 height: 600 id: root Addr.Addressbook { id: addrbook index: 3 - Component.onCompleted: { - qmlControler.start(); - } } } diff --git a/HIG/source/qml/components/actionbutton/config.json b/HIG/source/qml/components/actionbutton/config.json index 4fc6c14..48713f7 100644 --- a/HIG/source/qml/components/actionbutton/config.json +++ b/HIG/source/qml/components/actionbutton/config.json @@ -1,15 +1,16 @@ { "Actionbutton1.qml": { "type": "png", - "controls": "mobile" + "controls": "mobile", + "delay": 1 }, "Actionbutton2.qml": { "type": "png", "controls": "mobile", - "autostart": 0 + "delay": 1 }, "Actionbutton3.qml": { "type": "png", - "autostart": 0 + "delay": 1 } } diff --git a/HIG/source/qml/components/card/Card1.qml b/HIG/source/qml/components/card/Card1.qml index 4544438..eeb2180 100644 --- a/HIG/source/qml/components/card/Card1.qml +++ b/HIG/source/qml/components/card/Card1.qml @@ -1,69 +1,69 @@ import QtQuick 2.6 import QtQuick.Controls 2.0 as Controls import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami import "../../lib" as HIG import "../../lib/annotate.js" as A +import "../../lib/" as HIG Rectangle { id: root width: 600 height: 300 Kirigami.CardsLayout { x: Kirigami.Units.gridUnit * 2 y: x width: 500 //height: Layout.preferredHeight id: layout Kirigami.Card { headerOrientation: Qt.Horizontal actions: [ Kirigami.Action { text: "Action1" icon.name: "add-placemark" }, Kirigami.Action { text: "Action2" icon.name: "address-book-new-symbolic" } ] banner { fillMode: Image.Pad imageSource: "../../../img/coastal-fog/coastal-fog-400x300.png" title: "Title" } contentItem: Controls.Label { wrapMode: Text.WordWrap text: "A card can optionally have horizontal orientation.\n In this case will be wider than tall, so is fit to be used also in a ColumnLayout.\nIf you need to put it in a CardsLayout, it will have by default a columnSpan of 2 (which can be overridden)." } } } HIG.Raster { z: 1 } - // HACK coordinates are only final after a small delay - Timer { - interval: 1000 - repeat: false + // HACK coordinates are only final after a small delay + HIG.FTimer { running: true - onTriggered: { - var a = new A.An(root); - a.find("privateactiontoolbutton").draw({ - "outline": {}, - }).first().draw({ - "ruler": {}, - }); - a.find("bannerimage").draw({ - "outline": { - "aspectratio": true - } - }); - qmlControler.start(); + onTick: function(frameCounter) { + if (frameCounter == 1) { + var a = new A.An(root); + a.find("privateactiontoolbutton").draw({ + "outline": {}, + }).first().draw({ + "ruler": {}, + }); + a.find("bannerimage").draw({ + "outline": { + "aspectratio": true + } + }); + } } } } diff --git a/HIG/source/qml/components/card/Card2.qml b/HIG/source/qml/components/card/Card2.qml index f53b6e6..69a48f5 100644 --- a/HIG/source/qml/components/card/Card2.qml +++ b/HIG/source/qml/components/card/Card2.qml @@ -1,67 +1,57 @@ import QtQuick 2.6 import QtQuick.Controls 2.0 as Controls import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami import "../../lib" as HIG import "../../lib/annotate.js" as A Rectangle { id: root width: 400 height: 420 Kirigami.CardsLayout { x: Kirigami.Units.gridUnit * 2 y: x width: 320 //height: Layout.preferredHeight id: layout Kirigami.Card { actions: [ Kirigami.Action { text: "Action1" icon.name: "add-placemark" }, Kirigami.Action { text: "Action2" icon.name: "address-book-new-symbolic" } ] banner { imageSource: "../../../img/coastal-fog/coastal-fog-160x90.png" title: "This is a title" } contentItem: Controls.Label { wrapMode: Text.WordWrap text: "This is an instance of the Card type: it can optionally have an image, a title and an icon assigned to its banner group property, one or all of the properties together. A Card can also have Actions that will appear in the footer." } } } - /*HIG.Grid { - z: 1 - }*/ - // HACK coordinates are only final after a small delay - Timer { - interval: 1000 - repeat: false - running: true - onTriggered: { - var a = new A.An(root); - a.find("privateactiontoolbutton").draw({ - "outline": {}, - }); - a.find("bannerimage").draw({ - "outline": { -// "aspectratio": true - } - }); - a.find("card").draw({ - "padding": {} - }); - qmlControler.start(); - } + Component.onCompleted: { + var a = new A.An(root); + a.find("actiontoolbar").find("qquickrowlayout").first().find("privateactiontoolbutton").draw({ + "outline": {}, + }); + a.find("bannerimage").draw({ + "outline": { +// "aspectratio": true + } + }); + a.find("card").draw({ + "padding": {} + }); } } diff --git a/HIG/source/qml/components/card/Card5.qml b/HIG/source/qml/components/card/Card5.qml index 067cc4d..934cf36 100644 --- a/HIG/source/qml/components/card/Card5.qml +++ b/HIG/source/qml/components/card/Card5.qml @@ -1,96 +1,90 @@ import QtQuick 2.6 import QtQuick.Controls 2.0 as Controls import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami import "../../lib" as HIG import "../../lib/annotate.js" as A Rectangle { id: root width: 900 height: 400 Kirigami.CardsLayout { x: Kirigami.Units.gridUnit * 2 y: x width: 800 columns: 3 id: layout Kirigami.Card { actions: [ Kirigami.Action { text: "Action1" icon.name: "add-placemark" }, Kirigami.Action { text: "Action2" icon.name: "address-book-new-symbolic" } ] banner { imageSource: "../../../img/coastal-fog/coastal-fog-160x90.png" } contentItem: Controls.Label { wrapMode: Text.WordWrap text: "This is an instance of the Card type." } } Kirigami.Card { actions: [ Kirigami.Action { text: "Action1" icon.name: "add-placemark" }, Kirigami.Action { text: "Action2" icon.name: "address-book-new-symbolic" } ] banner { imageSource: "../../../img/coastal-fog/coastal-fog-40x30.png" } contentItem: Controls.Label { wrapMode: Text.WordWrap text: "This is an instance of the Card type." } } Kirigami.Card { actions: [ Kirigami.Action { text: "Action1" icon.name: "add-placemark" }, Kirigami.Action { text: "Action2" icon.name: "address-book-new-symbolic" } ] banner { imageSource: "../../../img/coastal-fog/coastal-fog.png" } contentItem: Controls.Label { wrapMode: Text.WordWrap text: "This is an instance of the Card type." } } } // HACK coordinates are only final after a small delay - Timer { - interval: 1000 - repeat: false - running: true - onTriggered: { - var a = new A.An(root); - //a.tree(); - a.find("bannerimage").draw({ - "outline": { - "aspectratio": true - } - }); - qmlControler.start(); - } + Component.onCompleted: { + var a = new A.An(root); + //a.tree(); + a.find("bannerimage").draw({ + "outline": { + "aspectratio": true + } + }); } } diff --git a/HIG/source/qml/components/card/Card6.qml b/HIG/source/qml/components/card/Card6.qml index 3101b16..4f304ca 100644 --- a/HIG/source/qml/components/card/Card6.qml +++ b/HIG/source/qml/components/card/Card6.qml @@ -1,54 +1,47 @@ import QtQuick 2.6 import QtQuick.Controls 2.0 as Controls import QtQuick.Layouts 1.2 import org.kde.kirigami 2.4 as Kirigami import "../../lib" as HIG import "../../lib/annotate.js" as A Rectangle { id: root width: 400 height: 340 Kirigami.CardsLayout { x: Kirigami.Units.gridUnit * 2 y: x width: 320 id: layout Kirigami.Card { actions: [ Kirigami.Action { text: "Actions" } ] banner { imageSource: "../../../img/coastal-fog/coastal-fog-160x90.png" title: "Header" } contentItem: Controls.Label { wrapMode: Text.WordWrap text: "Content" } } } - // HACK coordinates are only final after a small delay - Timer { - interval: 1000 - repeat: false - running: true - onTriggered: { - var a = new A.An(root); - //a.tree(); - a.find("qquickgridlayout").children("qquickitem").draw({ - "outline": {"label": false} - }); - a.find("card").draw({ - "padding": {} - }); - qmlControler.start(); - } + Component.onCompleted: { + var a = new A.An(root); + //a.tree(); + a.find("qquickgridlayout").children("qquickitem").draw({ + "outline": {"label": false} + }); + a.find("card").draw({ + "padding": {} + }); } } diff --git a/HIG/source/qml/components/card/CardLayout1.qml b/HIG/source/qml/components/card/CardLayout1.qml index 03bb1c7..f642b46 100644 --- a/HIG/source/qml/components/card/CardLayout1.qml +++ b/HIG/source/qml/components/card/CardLayout1.qml @@ -1,76 +1,71 @@ import QtQuick 2.6 import QtQuick.Controls 2.0 as Controls import org.kde.kirigami 2.4 as Kirigami Rectangle { id: root width: 600 + Kirigami.Units.gridUnit * 2 height: 300 + Kirigami.Units.gridUnit * 2 color: "white" Rectangle { color: "#444" x: Kirigami.Units.gridUnit * 1 y: Kirigami.Units.gridUnit * 1 width: 600 height: 300 Kirigami.CardsLayout { x: Kirigami.Units.gridUnit * 1 y: Kirigami.Units.gridUnit * 1 width: parent.width - 2 * Kirigami.Units.gridUnit columns: 3 id: layout Kirigami.Card { actions: [ Kirigami.Action { text: "Action1" icon.name: "add-placemark" }, Kirigami.Action { text: "Action2" icon.name: "address-book-new-symbolic" } ] banner { imageSource: "../../../img/coastal-fog/coastal-fog-160x90.png" } contentItem: Controls.Label { wrapMode: Text.WordWrap text: "This is an instance of the Card type." } } Kirigami.Card { actions: [ Kirigami.Action { text: "Action1" icon.name: "add-placemark" }, Kirigami.Action { text: "Action2" icon.name: "address-book-new-symbolic" } ] banner { imageSource: "../../../img/coastal-fog/coastal-fog-160x90.png" } contentItem: Controls.Label { wrapMode: Text.WordWrap text: "This is an instance of the Card type." } } } SequentialAnimation on width { id: anim PropertyAnimation { to: 400; duration: 3000 } PropertyAnimation { to: 600; duration: 3000 } - running: false; - } - Component.onCompleted: function() { - anim.start(); - qmlControler.start(); } } } diff --git a/HIG/source/qml/components/card/config.json b/HIG/source/qml/components/card/config.json index c06e665..f360ff0 100644 --- a/HIG/source/qml/components/card/config.json +++ b/HIG/source/qml/components/card/config.json @@ -1,36 +1,24 @@ { - "Card1.qml": { - "type": "png", - "autostart": 0 - }, "Card2.qml": { "type": "png", - "autostart": 0 - }, - "Card3.qml": { - "type": "png", - "autostart": 0 - }, - "Card4.qml": { - "type": "png", - "autostart": 0 + "delay": 1 }, "Card5.qml": { "type": "png", - "autostart": 0 + "delay": 1 }, "Card6.qml": { "type": "png", - "autostart": 0 + "delay": 1 }, "CardLayout1.qml": { "type": "webm", - "autostart": 0, + "delay": 1, "duration": 6 }, "CardLayout2.qml": { "type": "webm", - "autostart": 0, + "delay": 1, "duration": 7 } } diff --git a/HIG/source/qml/components/combobox/Combobox1.qml b/HIG/source/qml/components/combobox/Combobox1.qml index 97ee549..f57b227 100644 --- a/HIG/source/qml/components/combobox/Combobox1.qml +++ b/HIG/source/qml/components/combobox/Combobox1.qml @@ -1,54 +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 org.kde.kirigami 2.4 as Kirigami +import "../../lib/" as HIG Rectangle { - width: 320 + width: 580 height: 180 Row { x: Kirigami.Units.gridUnit y: Kirigami.Units.gridUnit spacing: 4 * Kirigami.Units.largeSpacing ComboBox { editable: true model: [ "", "Item2", "Item3" ] focus: true } ComboBox { id: cbx editable: true model: [ "Item1", "Item2", "Item3" ] } } // HACK __popup is internal and might change in future versions - Timer { - interval: 1000 - repeat: false - running: true - onTriggered: { - cbx.popup.open() - } + Component.onCompleted: { + cbx.popup.open() } } diff --git a/HIG/source/qml/components/combobox/config.json b/HIG/source/qml/components/combobox/config.json new file mode 100644 index 0000000..fbde9ce --- /dev/null +++ b/HIG/source/qml/components/combobox/config.json @@ -0,0 +1,6 @@ +{ + "Combobox1.qml": { + "type": "png", + "delay": 1 + } +} diff --git a/HIG/source/qml/components/contextdrawer/Contextdrawer1.qml b/HIG/source/qml/components/contextdrawer/Contextdrawer1.qml index 2eca3bc..a8b46f6 100644 --- a/HIG/source/qml/components/contextdrawer/Contextdrawer1.qml +++ b/HIG/source/qml/components/contextdrawer/Contextdrawer1.qml @@ -1,59 +1,51 @@ /* * 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/" as HIG import "../../lib/annotate.js" as A Rectangle { width: 320 height: 600 id: root Addr.Addressbook { id: addrbook index: 3 Component.onCompleted: { addrbook.pageStack.push(addrbook.detailPage) } } - // HACK - Timer { - interval: 1000 - repeat: false + HIG.FTimer { running: true - onTriggered: { - addrbook.cDrawer.open(); - } - } - Timer { - interval: 1500 - repeat: false - running: true - onTriggered: { - qmlControler.start(); + onTick: function(frameCounter) { + if (frameCounter == 60) { + addrbook.cDrawer.open(); + } } } } diff --git a/HIG/source/qml/components/contextdrawer/Contextdrawer2.qml b/HIG/source/qml/components/contextdrawer/Contextdrawer2.qml index 371b236..7c3435e 100644 --- a/HIG/source/qml/components/contextdrawer/Contextdrawer2.qml +++ b/HIG/source/qml/components/contextdrawer/Contextdrawer2.qml @@ -1,58 +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/" as HIG import "../../lib/annotate.js" as A Rectangle { width: 800 height: 600 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 + + HIG.FTimer { running: true - onTriggered: { - qmlControler.start(); + onTick: function(frameCounter) { + if (frameCounter == 60) { + addrbook.cDrawer.open(); + } } } } diff --git a/HIG/source/qml/components/contextdrawer/config.json b/HIG/source/qml/components/contextdrawer/config.json index 1e40a24..2feda63 100644 --- a/HIG/source/qml/components/contextdrawer/config.json +++ b/HIG/source/qml/components/contextdrawer/config.json @@ -1,11 +1,11 @@ { "Contextdrawer1.qml": { "type": "png", "controls": "mobile", - "autostart": 0 + "delay": 2 }, "Contextdrawer2.qml": { "type": "png", - "autostart": 0 + "delay": 2 } } diff --git a/HIG/source/qml/layout/gestures/config.json b/HIG/source/qml/layout/gestures/config.json index ae40141..4a425fd 100644 --- a/HIG/source/qml/layout/gestures/config.json +++ b/HIG/source/qml/layout/gestures/config.json @@ -1,44 +1,44 @@ { "Pinch.qml": { "type": "webm", "controls": "mobile", "delay": 1, - "duration": 4 + "duration": 3 }, "Rotate.qml": { "type": "webm", "controls": "mobile", "delay": 1, - "duration": 4 + "duration": 3 }, "ShowGlobalDrawer.qml": { "type": "webm", "controls": "mobile", "delay": 1, - "duration": 6 + "duration": 5 }, "Swipe.qml": { "type": "webm", "controls": "mobile", "delay": 1, "duration": 8 }, "Touch.qml": { "type": "webm", "controls": "mobile", "delay": 1, - "duration": 6 + "duration": 5 }, "SwipeNavigate.qml": { "type": "webm", "controls": "mobile", "delay": 1, - "duration": 7 + "duration": 6 }, "ShowContentDrawer.qml": { "type": "webm", "controls": "mobile", "delay": 2, - "duration": 5 + "duration": 3 } }