123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- import QtQuick 2.5
- import QtWebEngine 1.2
- import QtQuick.Window 2.1
- import QtQuick.Controls 1.4
- //import Qt.labs.controls 1.0
- import QtQuick.Controls 2.0
- import ApplicationLauncher 1.0
- import "qrc:/Globals"
- Window {
- id: mainWIN
- visible: true
- property QtObject glob: Globals // zum Zugriff auf das Globals Objekt
- // Startfenster
- Rectangle {
- id: splashRECT
- anchors.centerIn: parent
- width: parent.width * 0.9
- height: parent.height * 0.9
- Image {
- anchors.centerIn: parent
- source: Globals.logoSplash
- fillMode: Image.PreserveAspectFit
- sourceSize.width: parent.width
- sourceSize.height: parent.height
- height: sourceSize.height
- width:sourceSize.width
- visible: Globals.logoSplashVisible
- Component.onCompleted: {
- splashTIMER.running = true;
- }
- }
- }
- Timer {
- id: splashTIMER
- interval: 1500
- running: false
- repeat: false
- onTriggered: {
- // StackView Start
- stackView.push("qrc:/Start_Container.qml");
- }
- }
- //===================================
- StackView {
- id: stackView
- anchors.fill: parent
- pushEnter: Transition {
- PropertyAnimation {
- property: "opacity"
- from: 0
- to: 1
- duration: 50
- }
- }
- pushExit: Transition {
- PropertyAnimation {
- property: "opacity"
- from: 1
- to:0
- duration: 50
- }
- }
- popEnter: Transition {
- PropertyAnimation {
- property: "opacity"
- from: 0
- to:1
- duration: 50
- }
- }
- popExit: Transition {
- PropertyAnimation {
- property: "opacity"
- from: 1
- to:0
- duration: 50
- }
- }
- onBusyChanged: enabled = !busy
- }
- onWidthChanged: {
- console.debug(">>>WIDTH : ", width);
- }
- onHeightChanged: {
- console.debug(">>>HEIGHT : ", height);
- }
- Component.onCompleted: {
- var defrouter = sysinfo.defaultRouter();
- //-- Systembeeper off
- sysinfo.beepOn(false);
- console.log("==========");
- //console.log(JSON.stringify(sysinfo.dnsServer()));
- console.log("==========");
- settings.setValue("MAINQML/start", new Date().toLocaleString("DE-de"));
- console.log(">>> LangLoad Start");
- transLoad.selectLanguage(settings.value("HMI/Language", "en"));
- console.log("<<< LangLoad End");
- // if(settings.value("CAM1SETTINGS/IpAddress", "0.0.0.0") !== "0.0.0.0") {
- if(0) {
- Globals.jsonGetSystem("http://" + settings.value("CAM1SETTINGS/IpAddress", "0.0.0.0") + "/api/v1/command", 1);
- }
- else {
- Globals.cam1Name = "--";
- Globals.cam1Model = "--";
- Globals.cam1Ver = "--";
- }
- // if(settings.value("CAM2SETTINGS/IpAddress", "0.0.0.0") !== "0.0.0.0") {
- if(0) {
- Globals.jsonGetSystem("http://" + settings.value("CAM2SETTINGS/IpAddress", "0.0.0.0") + "/api/v1/command", 2);
- }
- else {
- Globals.cam2Name = "--";
- Globals.cam2Model = "--";
- Globals.cam2Ver = "--";
- }
- //splashTIMER.running = true;
- }
- }
|