File: main.qml

package info (click to toggle)
kaccounts-providers 4%3A20.12.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 868 kB
  • sloc: cpp: 676; makefile: 3; sh: 3
file content (40 lines) | stat: -rw-r--r-- 1,041 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 *  SPDX-FileCopyrightText: 2020 Nicolas Fella <nicolas.fella@gmx.de>
 *  SPDX-FileCopyrightText: 2019 Rituka Patwal <ritukapatwal21@gmail.com>
 *  SPDX-FileCopyrightText: 2015 Martin Klapetek <mklapetek@kde.org>
 *
 *  SPDX-License-Identifier: LGPL-2.0-or-later
 */

import QtQuick 2.2
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.5

import org.kde.kirigami 2.5 as Kirigami
import org.kde.kaccounts.owncloud 1.0

Kirigami.ApplicationWindow {
    id: ocAccountRoot

    // Minimum size at which the web login UI looks good
    minimumWidth: Kirigami.Units.gridUnit * 24
    minimumHeight: Kirigami.Units.gridUnit * 35
    width: minimumWidth
    height: minimumHeight

    pageStack.initialPage: Qt.resolvedUrl("Server.qml");

    onClosing: {
        helper.cancel()
    }

    Connections {
        target: helper

        function onStateChanged() {
            if (helper.state === OwncloudController.Services) {
                ocAccountRoot.pageStack.replace(Qt.resolvedUrl("Services.qml"))
            }
        }
    }
}