sl@0: import QtQuick 2.2 sl@0: import QtQuick.Controls 1.2 sl@0: import QtPositioning 5.3 sl@0: import QtWinExtras 1.0 sl@0: import QtQuick.Dialogs 1.2 sl@0: import QtQuick.Window 2.1 sl@0: import Qt.labs.settings 1.0 sl@5: import MiniDisplay 1.0 sl@8: import QtQuick.Layouts 1.1 sl@0: sl@0: sl@0: ApplicationWindow { sl@0: id: appWindow sl@0: visible: true sl@0: width: 640 sl@0: height: 480 sl@17: minimumWidth: 400 sl@17: minimumHeight: 400 sl@0: title: qsTr("MiniDisplay Manager") sl@0: SystemPalette { id: palette } sl@7: //Component.onCompleted: progressBar.visible=tabViewMain.getTab(tabViewMain.currentIndex).status !== Loader.Ready sl@0: sl@8: statusBar: DisplayStatusBar {} sl@8: sl@8: sl@0: Settings { sl@0: property alias x: appWindow.x sl@0: property alias y: appWindow.y sl@0: property alias width: appWindow.width sl@0: property alias height: appWindow.height sl@0: } sl@0: sl@0: /* sl@0: menuBar: MenuBar { sl@0: Menu { sl@0: title: qsTr("File") sl@0: MenuItem { sl@0: text: qsTr("Exit") sl@0: onTriggered: Qt.quit(); sl@0: } sl@0: } sl@0: sl@0: }*/ sl@0: sl@7: function trackProgress() sl@7: { sl@7: progressBar.value = tabViewMain.getTab(tabViewMain.currentIndex).progress; sl@7: progressBar.visible = tabViewMain.getTab(tabViewMain.currentIndex).status !== Loader.Ready; sl@7: } sl@7: sl@8: /* sl@8: function updateDisplayStatus() sl@8: { sl@8: if (display.isOpen) sl@8: { sl@8: labelDisplayStatus.text=qsTr("Connected"); sl@8: } sl@8: else sl@8: { sl@8: labelDisplayStatus.text=qsTr("Disconnected"); sl@8: } sl@8: sl@8: labelDisplayVendor.text=display.vendor; sl@8: labelDisplayProduct.text=display.product; sl@8: labelDisplaySerialNumber.text=display.serialNumber; sl@8: }*/ sl@8: sl@8: sl@5: MiniDisplay { sl@5: id: display sl@8: //onOpened:updateDisplayStatus() sl@8: //onClosed:updateDisplayStatus() sl@8: //onOpenError:{ updateDisplayStatus(); labelDisplayStatus.text=qsTr("Connection error");} sl@5: } sl@5: sl@7: sl@0: TabView { sl@7: id:tabViewMain sl@0: anchors.fill: parent sl@0: anchors.margins: 8 sl@7: visible: true sl@7: sl@2: Tab { sl@7: //id:tabDisplay sl@2: title: qsTr("Display") sl@7: asynchronous: true sl@7: //onLoaded: progressBar.visible=false sl@7: onStatusChanged: trackProgress() sl@2: DisplayTab { anchors.fill: parent } sl@2: } sl@2: Tab { sl@7: //id:tabFont sl@0: title: qsTr("Fonts") sl@7: asynchronous: true sl@7: onStatusChanged: trackProgress() sl@0: FontsTab { anchors.fill: parent } sl@0: } sl@0: Tab { sl@0: title: qsTr("Tests") sl@7: asynchronous: true sl@7: onStatusChanged: trackProgress() sl@0: TestsTab { anchors.fill: parent } sl@0: } sl@7: } //TabView sl@0: sl@7: ProgressBar { sl@7: id: progressBar sl@7: anchors.centerIn: parent sl@0: } sl@7: sl@7: sl@0: }