File: main.qml

package info (click to toggle)
kaccounts-providers 4%3A25.04.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,028 kB
  • sloc: cpp: 672; sh: 9; makefile: 3
file content (40 lines) | stat: -rw-r--r-- 1,149 bytes parent folder | download | duplicates (2)
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 UI looks okay
    minimumWidth: Kirigami.Units.gridUnit * 20 // matches the width of the PinePhone
    minimumHeight: Kirigami.Units.gridUnit * 35
    width: Kirigami.Units.gridUnit * 24 // making it a bit larger if available to make it more pleasant
    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"))
            }
        }
    }
}