2019-07-08 13:52:41 +10:00
|
|
|
// Copyright 2019 miruka
|
|
|
|
// This file is part of harmonyqml, licensed under LGPLv3.
|
|
|
|
|
2019-07-13 19:39:01 +10:00
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Controls 2.12
|
2019-06-29 08:12:45 +10:00
|
|
|
import "Base"
|
2019-07-05 06:01:44 +10:00
|
|
|
import "Models"
|
2019-06-27 16:31:03 +10:00
|
|
|
|
|
|
|
ApplicationWindow {
|
|
|
|
id: window
|
2019-07-16 07:43:53 +10:00
|
|
|
minimumWidth: theme.minimumSupportedWidth
|
|
|
|
minimumHeight: theme.minimumSupportedHeight
|
2019-06-27 16:31:03 +10:00
|
|
|
width: 640
|
|
|
|
height: 480
|
|
|
|
visible: true
|
2019-06-29 08:12:45 +10:00
|
|
|
title: "Harmony QML"
|
2019-07-16 07:43:53 +10:00
|
|
|
color: "black"
|
2019-06-27 16:31:03 +10:00
|
|
|
|
|
|
|
Component.onCompleted: {
|
2019-07-16 06:14:08 +10:00
|
|
|
Qt.application.organization = "harmonyqml"
|
|
|
|
Qt.application.name = "harmonyqml"
|
|
|
|
Qt.application.displayName = "Harmony QML"
|
|
|
|
Qt.application.version = "0.1.0"
|
|
|
|
window.ready = true
|
2019-06-27 16:31:03 +10:00
|
|
|
}
|
|
|
|
|
2019-07-19 11:58:21 +10:00
|
|
|
property bool debug: false
|
|
|
|
property bool ready: false
|
|
|
|
|
|
|
|
// Note: window.settingsChanged() must be called manually
|
|
|
|
property var settings: ({})
|
|
|
|
onSettingsChanged: py.saveSettings()
|
|
|
|
|
2019-07-21 08:08:58 +10:00
|
|
|
Theme { id: theme }
|
|
|
|
Shortcuts { id: shortcuts}
|
|
|
|
Python { id: py }
|
2019-06-27 16:31:03 +10:00
|
|
|
|
2019-07-13 07:06:37 +10:00
|
|
|
// Models
|
2019-07-05 06:01:44 +10:00
|
|
|
Accounts { id: accounts }
|
|
|
|
Devices { id: devices }
|
|
|
|
RoomCategories { id: roomCategories }
|
|
|
|
Rooms { id: rooms }
|
|
|
|
Timelines { id: timelines }
|
|
|
|
Users { id: users }
|
2019-06-29 08:12:45 +10:00
|
|
|
|
2019-06-27 16:31:03 +10:00
|
|
|
LoadingScreen {
|
|
|
|
id: loadingScreen
|
|
|
|
anchors.fill: parent
|
|
|
|
visible: uiLoader.scale < 1
|
|
|
|
}
|
|
|
|
|
|
|
|
Loader {
|
|
|
|
id: uiLoader
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
property bool ready: window.ready && py.ready
|
|
|
|
scale: uiLoader.ready ? 1 : 0.5
|
|
|
|
source: uiLoader.ready ? "UI.qml" : ""
|
|
|
|
|
2019-07-07 07:42:04 +10:00
|
|
|
Behavior on scale { HNumberAnimation {} }
|
2019-06-27 16:31:03 +10:00
|
|
|
}
|
|
|
|
}
|