Dekko
Loading...
Searching...
No Matches
ValidationState.qml
1/* Copyright (C) 2016 - 2017 Dan Chapman <dpniel@ubuntu.com>
2
3 This file is part of Dekko email client for Ubuntu devices
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of
8 the License or (at your option) version 3
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18import QtQuick 2.4
19import QtQml.StateMachine 1.0 as DSM
20import Lomiri.Components.Popups 1.3
21import QuickFlux 1.0
22import Dekko.Mail.API 1.0
23import Dekko.Mail.Stores.Accounts 1.0
25DSM.State {
26 id: validationState
27
28 property alias nextTargetState: next.targetState
29 property alias backTartgetState: back.targetState
30
31 onEntered: {
32 Log.logStatus("ValidationState::onEntered", "Loading validation overlay");
33 d.overlay = PopupUtils.open(Qt.resolvedUrl("../components/ProcessingOverlay.qml"),
34 wizard,
35 {
36 text: qsTr("Validating credentials.")
37 })
38 WizardActions.validateCredentials()
39 }
40
41 onExited: {
42 Log.logStatus("ValidationState::onExited", "Destroying overlay");
43 if (d.overlay !== undefined) {
44 PopupUtils.close(d.overlay)
45 }
46 }
47
48 DSM.SignalTransition {
49 id: back
50 signal: AccountSetup.goBack
51 }
52
53 DSM.SignalTransition {
54 id: next
55 signal: AccountSetup.goNext
56 }
57
58 QtObject {
59 id: d
60 property var overlay: undefined
61 }
62
63}