summaryrefslogtreecommitdiff
path: root/tests/auto/qml/windowmapping/apps/test.winmap.rectangle/rectangle.qml
blob: 9af1e7ee26299ce697d48eaaf7510eeb8f9c5c41 (plain)
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
// Copyright (C) 2021 The Qt Company Ltd.
// Copyright (C) 2019 Luxoft Sweden AB
// Copyright (C) 2018 Pelagicore AG
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import QtQuick 2.4
import QtApplicationManager.Application 2.0

Rectangle {
    id: root

    ApplicationManagerWindow {
        id: sub
        visible: false
        Component.onCompleted: setWindowProperty("type", "sub");
    }

    Connections {
        target: ApplicationInterface
        function onOpenDocument(documentUrl) {
            switch (documentUrl) {
            case "show-main": root.visible = true; break;
            case "hide-main": root.visible = false; break;
            case "show-sub": sub.visible = true; break;
            case "hide-sub": sub.visible = false; break;
            }
        }
    }
}