diff options
-rw-r--r-- | CreateProfile.qml | 2 | ||||
-rw-r--r-- | LoginPassword.qml | 2 | ||||
-rw-r--r-- | Onboarding.qml | 16 | ||||
-rw-r--r-- | controller.cxx | 7 | ||||
-rw-r--r-- | kelakon.qrc | 1 | ||||
m--------- | larva | 0 | ||||
-rw-r--r-- | main.qml | 24 | ||||
m--------- | qrtclient | 0 |
8 files changed, 18 insertions, 34 deletions
diff --git a/CreateProfile.qml b/CreateProfile.qml index 2a22a4b..ac5b4b3 100644 --- a/CreateProfile.qml +++ b/CreateProfile.qml @@ -9,7 +9,7 @@ CreateProfileForm { startUsingKelakon.onClicked: { User.name = userNameLabel.text User.realName = enterFullName.text - onboarding.ticketNew("Kelakon", User.realName + " <" + window.ticketNew("Kelakon", User.realName + " <" + User.emailAddress + ">") } } diff --git a/LoginPassword.qml b/LoginPassword.qml index 2d8bbba..d306914 100644 --- a/LoginPassword.qml +++ b/LoginPassword.qml @@ -10,6 +10,6 @@ LoginPasswordForm { continueButton.onClicked: { User.password = passwordTextField.text - onboarding.logIn(User.name, User.password) + window.logIn(User.name, User.password) } } diff --git a/Onboarding.qml b/Onboarding.qml deleted file mode 100644 index 6b9bcf7..0000000 --- a/Onboarding.qml +++ /dev/null @@ -1,16 +0,0 @@ -import QtQuick 2.12 -import "larva/features" - -OnboardingForm { - signal logIn(string name, string password) - signal ticketNew(string queue, string requestor) - function pushHome() { - pageView.push("Home.qml") - } - - objectName: "onboarding" - logoImage.source: "kelakon-logo.png" - onboardingImage.source: "onboarding-1.png" - registerButton.onClicked: pageView.push("Email.qml") - loginButton.onClicked: pageView.push("Login.qml") -} diff --git a/controller.cxx b/controller.cxx index 8447242..9908fb8 100644 --- a/controller.cxx +++ b/controller.cxx @@ -26,7 +26,6 @@ Controller::Controller(QObject* parent) : QObject{parent} auto engine = static_cast<QQmlApplicationEngine*>(parent); auto rootObjects = engine->rootObjects(); auto appWindow = rootObjects[0]; - auto onboardingView = appWindow->findChild<QObject*>("onboarding"); using RTClient::User; auto typeId = qmlRegisterSingletonType<User>("KelakonUser", 0, 1, "User" , [](QQmlEngine *engine @@ -39,7 +38,7 @@ Controller::Controller(QObject* parent) : QObject{parent} taskList = new RTClient::TicketList; engine->rootContext()->setContextProperty("taskList", taskList); - connect(onboardingView, SIGNAL(logIn(QString, QString)) + connect(appWindow, SIGNAL(logIn(QString, QString)) , client, SLOT(logIn(QString, QString))); connect(client, SIGNAL(loggedIn(QString)) @@ -56,9 +55,9 @@ Controller::Controller(QObject* parent) : QObject{parent} connect(client, SIGNAL(ticketSearched(rtclient_ticketlist*)) , taskList, SLOT(update(rtclient_ticketlist*))); - connect(taskList, SIGNAL(updated()), onboardingView, SLOT(pushHome())); + connect(taskList, SIGNAL(updated()), appWindow, SLOT(pushHome())); - connect(onboardingView, SIGNAL(ticketNew(QString, QString)) + connect(appWindow, SIGNAL(ticketNew(QString, QString)) , client, SLOT(ticketNew(QString, QString))); thread.start(); diff --git a/kelakon.qrc b/kelakon.qrc index 2ff8636..0d641ee 100644 --- a/kelakon.qrc +++ b/kelakon.qrc @@ -1,7 +1,6 @@ <RCC> <qresource prefix="/"> <file>main.qml</file> - <file>Onboarding.qml</file> <file>Login.qml</file> <file>LoginEmail.qml</file> <file>LoginPassword.qml</file> diff --git a/larva b/larva -Subproject e5d1cb6db260c71e2205c4f65d383628bb518f5 +Subproject 15aa7f7118ee297f3492586a591303323c05682 @@ -1,24 +1,26 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 -import QtQuick.Controls.Material 2.12 - +import "larva/features" ApplicationWindow { + signal logIn(string name, string password) + signal ticketNew(string queue, string requestor) + function pushHome() { + pageView.push("Home.qml") + } + id: window visible: true width: 360 height: 640 - title: { - text: qsTr("kelakon") - } - StackView { - property alias onboarding: onboarding + OnboardingForm { id: pageView anchors.fill: parent - initialItem: Onboarding { - id: onboarding - onboardingText1.text: qsTr("Get things done today, chill tomorrow.") - } + logoImage.source: "kelakon-logo.png" + onboardingImage.source: "onboarding-1.png" + onboardingText1.text: qsTr("Get things done today, chill tomorrow.") + registerButton.onClicked: pageView.push("Email.qml") + loginButton.onClicked: pageView.push("Login.qml") } } diff --git a/qrtclient b/qrtclient -Subproject ddeb4c5f70dba8644d75a084335b787b642f449 +Subproject c1d0defeb364527218d1187b9be87872282428a |