main.qml 1.12 KB
Newer Older
1
/*
2
3
4
 *  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>
5
 *
6
 *  SPDX-License-Identifier: LGPL-2.0-or-later
7
8
9
 */

import QtQuick 2.2
10
11
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.5
12

13
14
import org.kde.kirigami 2.5 as Kirigami
import org.kde.kaccounts.owncloud 1.0
15

16
17
Kirigami.ApplicationWindow {
    id: ocAccountRoot
18

19
20
    // Minimum size at which the UI looks okay
    minimumWidth: Kirigami.Units.gridUnit * 20 // matches the width of the PinePhone
21
    minimumHeight: Kirigami.Units.gridUnit * 35
22
    width: Kirigami.Units.gridUnit * 24 // making it a bit larger if available to make it more pleasant
23
    height: minimumHeight
24

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

27
28
29
30
    onClosing: {
        helper.cancel()
    }

31
32
    Connections {
        target: helper
33

34
35
36
        function onStateChanged() {
            if (helper.state === OwncloudController.Services) {
                ocAccountRoot.pageStack.replace(Qt.resolvedUrl("Services.qml"))
37
38
39
40
            }
        }
    }
}