From 6fe925388058a83dcfad964bd73dc0b29250d330 Mon Sep 17 00:00:00 2001 From: Anatasof Wirapraja Date: Sat, 5 Dec 2020 23:27:11 +0700 Subject: tidying up directories --- GetStarted.qml | 6 -- GetStartedForm.ui.qml | 26 --------- HomeForm.ui.qml | 12 ---- Onboarding.qml | 10 ---- OnboardingForm.ui.qml | 138 -------------------------------------------- main.qml | 3 +- pages/GetStarted.qml | 6 ++ pages/GetStartedForm.ui.qml | 26 +++++++++ pages/HomeForm.ui.qml | 12 ++++ pages/Onboarding.qml | 10 ++++ pages/OnboardingForm.ui.qml | 138 ++++++++++++++++++++++++++++++++++++++++++++ qml.qrc | 10 ++-- 12 files changed, 199 insertions(+), 198 deletions(-) delete mode 100644 GetStarted.qml delete mode 100644 GetStartedForm.ui.qml delete mode 100644 HomeForm.ui.qml delete mode 100644 Onboarding.qml delete mode 100644 OnboardingForm.ui.qml create mode 100644 pages/GetStarted.qml create mode 100644 pages/GetStartedForm.ui.qml create mode 100644 pages/HomeForm.ui.qml create mode 100644 pages/Onboarding.qml create mode 100644 pages/OnboardingForm.ui.qml diff --git a/GetStarted.qml b/GetStarted.qml deleted file mode 100644 index b4744dd..0000000 --- a/GetStarted.qml +++ /dev/null @@ -1,6 +0,0 @@ -import QtQuick 2.15 - -GetStartedForm { - objectName: "getstarted" - backButton.onClicked: pageView.pop() -} diff --git a/GetStartedForm.ui.qml b/GetStartedForm.ui.qml deleted file mode 100644 index 7cff151..0000000 --- a/GetStartedForm.ui.qml +++ /dev/null @@ -1,26 +0,0 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.12 - -Page { - id: pageView - property alias backButton: backButton - header: ToolBar { - background: Rectangle { - color: "#FAFFFFFF" - } - RowLayout { - ToolButton { - id: backButton - highlighted: true - } - } - } -} - -/*##^## -Designer { - D{i:0;autoSize:true;height:480;width:640} -} -##^##*/ - diff --git a/HomeForm.ui.qml b/HomeForm.ui.qml deleted file mode 100644 index 2df9430..0000000 --- a/HomeForm.ui.qml +++ /dev/null @@ -1,12 +0,0 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 - -Page { - - title: qsTr("Home") - - Label { - text: qsTr("You are on the home page.") - anchors.centerIn: parent - } -} diff --git a/Onboarding.qml b/Onboarding.qml deleted file mode 100644 index 4bcf381..0000000 --- a/Onboarding.qml +++ /dev/null @@ -1,10 +0,0 @@ -import QtQuick 2.15 - -OnboardingForm { - objectName: "onboarding" -} -/*##^## -Designer { - D{i:0;autoSize:true;height:480;width:640} -} -##^##*/ diff --git a/OnboardingForm.ui.qml b/OnboardingForm.ui.qml deleted file mode 100644 index 536424c..0000000 --- a/OnboardingForm.ui.qml +++ /dev/null @@ -1,138 +0,0 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.12 -import QtQuick.Controls.Material 2.3 - -StackView { - property alias logoImage: logoImage - property alias onboardingImage: onboardingImage - property alias onboardingText1: onboardingText1 - property alias onboardingText2: onboardingText2 - property alias disclaimerText: disclaimerText - property alias startButton: startButton - - Page { - id: page - anchors.fill: parent - title: qsTr("Onboarding") - - ToolBar { - id: toolBar - - height: 56 - anchors.top: parent.top - anchors.topMargin: 0 - anchors.right: parent.right - anchors.rightMargin: 0 - anchors.left: parent.left - anchors.leftMargin: 0 - - background: Rectangle { - color: "transparent" - } - RowLayout { - anchors.fill: parent - - Image { - id: logoImage - Layout.preferredHeight: 24 - Layout.preferredWidth: 100 - fillMode: Image.PreserveAspectFit - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - Layout.fillWidth: false - Layout.fillHeight: false - source: "https://via.placeholder.com/100x24.png" - } - } - } - - StackView { - id: contentView - anchors.fill: parent - z: -1 - - Image { - id: onboardingImage - anchors.bottom: onboardingText1.top - anchors.bottomMargin: 32 - anchors.topMargin: 32 + toolBar.height - anchors.right: parent.right - anchors.rightMargin: 64 - anchors.left: parent.left - anchors.leftMargin: 64 - source: "https://via.placeholder.com/600x600.png" - fillMode: Image.PreserveAspectFit - } - Text { - id: onboardingText1 - text: qsTr("Onboarding text") - anchors.bottom: onboardingText2.top - anchors.bottomMargin: 4 - wrapMode: Text.WordWrap - anchors.right: parent.right - anchors.rightMargin: 72 - anchors.left: parent.left - anchors.leftMargin: 16 - font.pointSize: 24 - font.family: "Roboto Mono" - font.weight: Font.Black - } - - Text { - id: onboardingText2 - color: "#99000000" - text: qsTr("Onboarding text 2") - anchors.bottom: startButton.top - anchors.bottomMargin: 16 - wrapMode: Text.WordWrap - anchors.right: parent.right - anchors.rightMargin: 72 - anchors.left: parent.left - anchors.leftMargin: 16 - font.pointSize: 16 - font.family: "Roboto" - font.weight: Font.Normal - } - - RoundButton { - id: startButton - highlighted: true - Material.foreground: Material.primary - text: qsTr("Get Started") - anchors.right: parent.right - anchors.rightMargin: 8 - anchors.left: parent.left - anchors.leftMargin: 8 - anchors.bottom: disclaimerText.top - font.weight: Font.Medium - anchors.bottomMargin: 16 - font.capitalization: Font.MixedCase - font.family: "Roboto Mono" - } - Text { - id: disclaimerText - color: "#99000000" - text: qsTr("disclaimer text") - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - wrapMode: Text.WordWrap - font.weight: Font.Normal - font.pointSize: 10 - font.family: "Roboto Mono" - anchors.rightMargin: 24 - anchors.leftMargin: 24 - anchors.bottomMargin: 16 - } - } - } -} - -/*##^## -Designer { - D{i:0;autoSize:true;height:480;width:640} -} -##^##*/ - diff --git a/main.qml b/main.qml index f39521e..9969f41 100644 --- a/main.qml +++ b/main.qml @@ -1,6 +1,7 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.12 +import "pages" ApplicationWindow { id: window @@ -18,5 +19,5 @@ ApplicationWindow { onboardingText1.text: qsTr("Everything you need to sell online.") onboardingText2.text: qsTr("Set up your store in minutes and bring your brand to life") disclaimerText.text: qsTr("By tapping 'Get started' and using this app, you're agreeing to our terms of service and privacy policy") - } + } } diff --git a/pages/GetStarted.qml b/pages/GetStarted.qml new file mode 100644 index 0000000..b4744dd --- /dev/null +++ b/pages/GetStarted.qml @@ -0,0 +1,6 @@ +import QtQuick 2.15 + +GetStartedForm { + objectName: "getstarted" + backButton.onClicked: pageView.pop() +} diff --git a/pages/GetStartedForm.ui.qml b/pages/GetStartedForm.ui.qml new file mode 100644 index 0000000..7cff151 --- /dev/null +++ b/pages/GetStartedForm.ui.qml @@ -0,0 +1,26 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.12 + +Page { + id: pageView + property alias backButton: backButton + header: ToolBar { + background: Rectangle { + color: "#FAFFFFFF" + } + RowLayout { + ToolButton { + id: backButton + highlighted: true + } + } + } +} + +/*##^## +Designer { + D{i:0;autoSize:true;height:480;width:640} +} +##^##*/ + diff --git a/pages/HomeForm.ui.qml b/pages/HomeForm.ui.qml new file mode 100644 index 0000000..2df9430 --- /dev/null +++ b/pages/HomeForm.ui.qml @@ -0,0 +1,12 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +Page { + + title: qsTr("Home") + + Label { + text: qsTr("You are on the home page.") + anchors.centerIn: parent + } +} diff --git a/pages/Onboarding.qml b/pages/Onboarding.qml new file mode 100644 index 0000000..4bcf381 --- /dev/null +++ b/pages/Onboarding.qml @@ -0,0 +1,10 @@ +import QtQuick 2.15 + +OnboardingForm { + objectName: "onboarding" +} +/*##^## +Designer { + D{i:0;autoSize:true;height:480;width:640} +} +##^##*/ diff --git a/pages/OnboardingForm.ui.qml b/pages/OnboardingForm.ui.qml new file mode 100644 index 0000000..536424c --- /dev/null +++ b/pages/OnboardingForm.ui.qml @@ -0,0 +1,138 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.12 +import QtQuick.Controls.Material 2.3 + +StackView { + property alias logoImage: logoImage + property alias onboardingImage: onboardingImage + property alias onboardingText1: onboardingText1 + property alias onboardingText2: onboardingText2 + property alias disclaimerText: disclaimerText + property alias startButton: startButton + + Page { + id: page + anchors.fill: parent + title: qsTr("Onboarding") + + ToolBar { + id: toolBar + + height: 56 + anchors.top: parent.top + anchors.topMargin: 0 + anchors.right: parent.right + anchors.rightMargin: 0 + anchors.left: parent.left + anchors.leftMargin: 0 + + background: Rectangle { + color: "transparent" + } + RowLayout { + anchors.fill: parent + + Image { + id: logoImage + Layout.preferredHeight: 24 + Layout.preferredWidth: 100 + fillMode: Image.PreserveAspectFit + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + Layout.fillWidth: false + Layout.fillHeight: false + source: "https://via.placeholder.com/100x24.png" + } + } + } + + StackView { + id: contentView + anchors.fill: parent + z: -1 + + Image { + id: onboardingImage + anchors.bottom: onboardingText1.top + anchors.bottomMargin: 32 + anchors.topMargin: 32 + toolBar.height + anchors.right: parent.right + anchors.rightMargin: 64 + anchors.left: parent.left + anchors.leftMargin: 64 + source: "https://via.placeholder.com/600x600.png" + fillMode: Image.PreserveAspectFit + } + Text { + id: onboardingText1 + text: qsTr("Onboarding text") + anchors.bottom: onboardingText2.top + anchors.bottomMargin: 4 + wrapMode: Text.WordWrap + anchors.right: parent.right + anchors.rightMargin: 72 + anchors.left: parent.left + anchors.leftMargin: 16 + font.pointSize: 24 + font.family: "Roboto Mono" + font.weight: Font.Black + } + + Text { + id: onboardingText2 + color: "#99000000" + text: qsTr("Onboarding text 2") + anchors.bottom: startButton.top + anchors.bottomMargin: 16 + wrapMode: Text.WordWrap + anchors.right: parent.right + anchors.rightMargin: 72 + anchors.left: parent.left + anchors.leftMargin: 16 + font.pointSize: 16 + font.family: "Roboto" + font.weight: Font.Normal + } + + RoundButton { + id: startButton + highlighted: true + Material.foreground: Material.primary + text: qsTr("Get Started") + anchors.right: parent.right + anchors.rightMargin: 8 + anchors.left: parent.left + anchors.leftMargin: 8 + anchors.bottom: disclaimerText.top + font.weight: Font.Medium + anchors.bottomMargin: 16 + font.capitalization: Font.MixedCase + font.family: "Roboto Mono" + } + Text { + id: disclaimerText + color: "#99000000" + text: qsTr("disclaimer text") + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + wrapMode: Text.WordWrap + font.weight: Font.Normal + font.pointSize: 10 + font.family: "Roboto Mono" + anchors.rightMargin: 24 + anchors.leftMargin: 24 + anchors.bottomMargin: 16 + } + } + } +} + +/*##^## +Designer { + D{i:0;autoSize:true;height:480;width:640} +} +##^##*/ + diff --git a/qml.qrc b/qml.qrc index bfee58b..8f295f5 100644 --- a/qml.qrc +++ b/qml.qrc @@ -1,13 +1,13 @@ main.qml - HomeForm.ui.qml qtquickcontrols2.conf - Onboarding.qml - OnboardingForm.ui.qml fonts/Roboto[wdth,wght].ttf fonts/RobotoMono[wght].ttf - GetStarted.qml - GetStartedForm.ui.qml + pages/GetStarted.qml + pages/GetStartedForm.ui.qml + pages/Onboarding.qml + pages/OnboardingForm.ui.qml + pages/HomeForm.ui.qml -- cgit v1.2.3