Fehlerbehebungen
This commit is contained in:
parent
b38c3fb0a1
commit
a98b100ffd
7 changed files with 26 additions and 23 deletions
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 4.6.2, 2018-07-05T15:13:53. -->
|
<!-- Written by QtCreator 4.6.2, 2018-07-06T09:04:54. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import QtGraphicalEffects 1.0
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
id:root
|
id:root
|
||||||
anchors.fill: parent
|
//anchors.fill: parent
|
||||||
property bool cookplanChanged
|
property bool cookplanChanged
|
||||||
title: qsTr("Speiseplanplan")
|
title: qsTr("Speiseplanplan")
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ Page {
|
||||||
width: listView.width
|
width: listView.width
|
||||||
id: delegate
|
id: delegate
|
||||||
height: visible ? cookteam.height + date.height + main_dish.height + main_dish_veg.height + garnish.height + dessert.height + spacer.height + cust_spacing*9 + 5:0
|
height: visible ? cookteam.height + date.height + main_dish.height + main_dish_veg.height + garnish.height + dessert.height + spacer.height + cust_spacing*9 + 5:0
|
||||||
visible: index>6//listView.isDayVisible(index)
|
visible: listView.isDayVisible(index)
|
||||||
|
|
||||||
property int cust_spacing: 5
|
property int cust_spacing: 5
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import QtQuick.Controls 2.2
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
anchors.fill: parent
|
//anchors.fill: parent
|
||||||
|
|
||||||
title: qsTr("Vertretungsplan")
|
title: qsTr("Vertretungsplan")
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import QtQuick.Controls 2.2
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
id: root
|
id: root
|
||||||
anchors.fill: parent
|
//anchors.fill: parent
|
||||||
objectName: "LoginPage";
|
objectName: "LoginPage";
|
||||||
|
|
||||||
header: AppToolBar {
|
header: AppToolBar {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import QtQuick.Controls 2.2
|
||||||
Page {
|
Page {
|
||||||
id: root
|
id: root
|
||||||
objectName: "MainPage"
|
objectName: "MainPage"
|
||||||
anchors.fill: parent
|
//anchors.fill: parent
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequences: ["Esc", "Back"]
|
sequences: ["Esc", "Back"]
|
||||||
|
|
|
@ -8,7 +8,7 @@ import QtQuick.Controls.Styles 1.2
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
id:root
|
id:root
|
||||||
anchors.fill: parent
|
//anchors.fill: parent
|
||||||
|
|
||||||
objectName: "WebsitePage";
|
objectName: "WebsitePage";
|
||||||
|
|
||||||
|
@ -22,13 +22,11 @@ Page {
|
||||||
}
|
}
|
||||||
//z: Qt.platform.os === "android" ? -1 : 1
|
//z: Qt.platform.os === "android" ? -1 : 1
|
||||||
visible: webView.loadProgress < 100
|
visible: webView.loadProgress < 100
|
||||||
|
value: webView.loadProgress === 100 ? 0 : webView.loadProgress / 100
|
||||||
value: webView.loadProgress == 100 ? 0 : webView.loadProgress / 100
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WebView {
|
WebView {
|
||||||
id: webView
|
id: webView
|
||||||
onLoadProgressChanged: console.log(loadProgress)
|
|
||||||
anchors {
|
anchors {
|
||||||
top: webView.loadProgress < 100 ? progress.bottom:parent.top
|
top: webView.loadProgress < 100 ? progress.bottom:parent.top
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
|
|
29
qml/main.qml
29
qml/main.qml
|
@ -16,23 +16,23 @@ ApplicationWindow {
|
||||||
property string background_color: "white"
|
property string background_color: "white"
|
||||||
property string toolbar_color: "#312f38"
|
property string toolbar_color: "#312f38"
|
||||||
|
|
||||||
onBeforeRendering: {
|
// onBeforeRendering: {
|
||||||
if(!firstinitdone){
|
// if(!firstinitdone){
|
||||||
var isinit = _cppAppSettings.loadSetting("init")
|
// var isinit = _cppAppSettings.loadSetting("init")
|
||||||
console.log("getinit");
|
// console.log("getinit");
|
||||||
console.log(isinit);
|
// console.log(isinit);
|
||||||
if(isinit === "0"){
|
// if(isinit === "0"){
|
||||||
stackView.push("qrc:/LoginPage.qml", {});
|
// stackView.push("qrc:/LoginPage.qml", {});
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
firstinitdone = true
|
// firstinitdone = true
|
||||||
}
|
// }
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
//runs only one time at applictaion lauch
|
//runs only one time at applictaion lauch
|
||||||
property bool finished: true
|
property bool finished: true
|
||||||
id: initTimer
|
id: initTimer
|
||||||
interval: 10;
|
interval: 1;
|
||||||
running: initdone === false
|
running: initdone === false
|
||||||
repeat: finished
|
repeat: finished
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
@ -45,6 +45,7 @@ ApplicationWindow {
|
||||||
console.log("Perm")
|
console.log("Perm")
|
||||||
var ret = _cppServerConn.login(_cppAppSettings.loadSetting("username"), _cppAppSettings.loadSetting("password"), true);
|
var ret = _cppServerConn.login(_cppAppSettings.loadSetting("username"), _cppAppSettings.loadSetting("password"), true);
|
||||||
if(ret === "OK"){
|
if(ret === "OK"){
|
||||||
|
initdone = true
|
||||||
_cppAppSettings.writeSetting("init", 1);
|
_cppAppSettings.writeSetting("init", 1);
|
||||||
if(stackView.currentItem.objectName !== "MainPage"){
|
if(stackView.currentItem.objectName !== "MainPage"){
|
||||||
stackView.push("qrc:/MainPage.qml", {});
|
stackView.push("qrc:/MainPage.qml", {});
|
||||||
|
@ -64,8 +65,11 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
initdone = false
|
||||||
|
if(stackView.currentItem.objectName !== "LoginPage"){
|
||||||
stackView.push("qrc:/LoginPage.qml")
|
stackView.push("qrc:/LoginPage.qml")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finished = true
|
finished = true
|
||||||
initdone = true
|
initdone = true
|
||||||
}
|
}
|
||||||
|
@ -77,6 +81,7 @@ ApplicationWindow {
|
||||||
running: initdone
|
running: initdone
|
||||||
repeat: true
|
repeat: true
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
console.log("refresh")
|
||||||
var ret = _cppServerConn.checkConn()
|
var ret = _cppServerConn.checkConn()
|
||||||
handleError(ret)
|
handleError(ret)
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue