diff --git a/android-sources/AndroidManifest.xml b/android-sources/AndroidManifest.xml index 36c041e..09d522e 100644 --- a/android-sources/AndroidManifest.xml +++ b/android-sources/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/fannyapp.pro.user b/fannyapp.pro.user index 374053c..747c1ec 100644 --- a/fannyapp.pro.user +++ b/fannyapp.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -8,7 +8,7 @@ ProjectExplorer.Project.ActiveTarget - 0 + 1 ProjectExplorer.Project.EditorSettings @@ -62,7 +62,7 @@ Android for armeabi-v7a (GCC 4.9, Qt 5.10.1 for Android armv7) Android for armeabi-v7a (GCC 4.9, Qt 5.10.1 for Android armv7) {c2d2fa4a-1656-4ab9-a542-92c96158a688} - 1 + 0 0 0 @@ -629,7 +629,7 @@ fannyapp.pro false - /home/dorian/Documents/builds/Qt/fanny-app/build-fannyapp-Android_for_armeabi_v7a_GCC_4_9_Qt_5_10_1_for_Android_armv7-Release + /home/dorian/Documents/builds/Qt/fanny-app 3768 false true diff --git a/graphics/chat_background.jpg b/graphics/chat_background.jpg new file mode 100644 index 0000000..fe815e1 Binary files /dev/null and b/graphics/chat_background.jpg differ diff --git a/graphics/sheute.png b/graphics/sheute.png index 0b8f2aa..7b7eec8 100644 Binary files a/graphics/sheute.png and b/graphics/sheute.png differ diff --git a/qml/FoodPlanForm.qml b/qml/FoodPlanForm.qml index f653e46..fb7ce95 100644 --- a/qml/FoodPlanForm.qml +++ b/qml/FoodPlanForm.qml @@ -1,5 +1,6 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 +import QtGraphicalEffects 1.0 Page { id:root @@ -7,6 +8,23 @@ Page { property bool cookplanChanged title: qsTr("Speiseplanplan") +// Image{ +// source: "qrc:/graphics/chat_background.jpg"; +// height: parent.height +// width: parent.width +// fillMode: Image.Tile +// horizontalAlignment: Image.AlignLeft +// verticalAlignment: Image.AlignTop +// } + LinearGradient { + anchors.fill: parent + start: Qt.point(0, 0) + end: Qt.point(0, parent.height) + gradient: Gradient { + GradientStop { position: 0.0; color: "#4db2b3" } + GradientStop { position: 1.0; color: "#8f4dae" } + } + } Timer { id: firstLoadTimer @@ -27,7 +45,7 @@ Page { id: listView width: parent.width model: 8 - spacing: 5 + spacing: 0 property var today: new Date anchors { right: parent.right @@ -36,17 +54,16 @@ Page { bottom: parent.bottom leftMargin: 5 rightMargin: 5 + topMargin: 3 } delegate: Button { //text: getText(index, "cookteam") width: parent.width id: delegate - height: listView.isDayVisible(index) ? childrenRect.height + 10:0 + height: listView.isDayVisible(index) ? childrenRect.height:0 visible: listView.isDayVisible(index) - //height: 150 - Label { anchors.left: parent.left anchors.leftMargin: 10 @@ -102,27 +119,13 @@ Page { id: dessert text: _cppServerConn.getFoodPlanData(index).dessert } - -// Timer { -// id: reloadTimer -// interval: 10; -// running: cookplanChanged -// repeat: true -// onTriggered: { -// //var today = new Date - -// cookteam.text = _cppServerConn.getFoodPlanData(index).cookteam -// date.text = listView.getDateString(index) -// //_cppServerConn.getFoodPlanData(index).date -// main_dish.text = _cppServerConn.getFoodPlanData(index).main_dish -// main_dish_veg.text = _cppServerConn.getFoodPlanData(index).main_dish_veg -// garnish.text = _cppServerConn.getFoodPlanData(index).garnish -// dessert.text = _cppServerConn.getFoodPlanData(index).dessert -// if(index === 7) { -// cookplanChanged = false -// } -// } -// } + Label { + anchors.left: parent.left + anchors.leftMargin: 10 + anchors.top: dessert.bottom + id: spacer + text: "" + } } function getDateString(index){ diff --git a/qml/HomeForm.qml b/qml/HomeForm.qml index c43f3c1..5f59bdb 100644 --- a/qml/HomeForm.qml +++ b/qml/HomeForm.qml @@ -1,18 +1,39 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 +import QtGraphicalEffects 1.0 Page { anchors.fill: parent title: qsTr("Vertretungsplan") +// Image{ +// source: "qrc:/graphics/chat_background.jpg"; +// height: parent.height +// width: parent.width +// fillMode: Image.Tile +// horizontalAlignment: Image.AlignLeft +// verticalAlignment: Image.AlignTop +// } + + + LinearGradient { + anchors.fill: parent + start: Qt.point(0, 0) + end: Qt.point(0, parent.height) + gradient: Gradient { + GradientStop { position: 0.0; color: "#4db2b3" } + GradientStop { position: 1.0; color: "#8f4dae" } + } + } + Label { id: laWelcome text: "Hier kannst du dir den Vertretungsplan des Fannys anschauen" font.pixelSize: 20 wrapMode: Label.Wrap width: window.width / 1.2 - + color: "#424753" anchors { top: parent.top topMargin: window.height / 8 - laWelcome.height / 2 @@ -23,6 +44,8 @@ Page { Button { id:buttToday enabled: window.is_error === false + height: 200 + width: 200 anchors { left: parent.left leftMargin: (window.width / 4) - (buttToday.width / 2) diff --git a/qml/MainPage.qml b/qml/MainPage.qml index 36e860f..4e0346c 100644 --- a/qml/MainPage.qml +++ b/qml/MainPage.qml @@ -5,16 +5,25 @@ Page { id: root objectName: "MainPage" anchors.fill: parent + header: AppToolBar { contentHeight: toolButton.implicitHeight ToolButton { id: toolButton - text: stackView.depth > 1 ? "\u25C0" : "\u4E09" - font.pixelSize: Qt.application.font.pixelSize * 1.6 + anchors { + left: parent.left + verticalCenter: parent.verticalCenter + leftMargin: 5 + } + + background: Label { + text: stackView.depth > 1 ? "\u25C0" : "\u4E09" + font.pixelSize: Qt.application.font.pixelSize * 2 + color: "white" + } onClicked: { - console.log(toolButton.font.styleName) if (stackView.depth > 1) { stackView.pop() } else { @@ -26,6 +35,7 @@ Page { Label { text: stackView.currentItem.title anchors.centerIn: parent + color: "white" } } @@ -51,7 +61,6 @@ Page { onClicked: { busyDialog.open() var ret = _cppServerConn.getFoodPlan(); - console.log(ret, _cppServerConn.getFoodPlanData(1).cookteam, isNaN(_cppServerConn.getFoodPlanData(0).date.toString)) drawer.close() busyDialog.close() if(ret === 200 || _cppServerConn.getFoodPlanData(1).cookteam !== ""){ diff --git a/qml/main.qml b/qml/main.qml index 9e052ae..97820de 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -36,7 +36,7 @@ ApplicationWindow { var init = _cppAppSettings.loadSetting("init") var perm = _cppAppSettings.loadSetting("permanent") - console.log("checkoldlogin", perm); + console.log("checkoldlogin:", perm); if(perm === "1"){ console.log("Perm") var ret = _cppServerConn.login(_cppAppSettings.loadSetting("username"), _cppAppSettings.loadSetting("password"), true); diff --git a/qml/qtquickcontrols2.conf b/qml/qtquickcontrols2.conf index 75b2cb8..b64a7ee 100644 --- a/qml/qtquickcontrols2.conf +++ b/qml/qtquickcontrols2.conf @@ -4,3 +4,6 @@ [Controls] Style=Default + +[Material] +Primary="#312f38" diff --git a/shared.qrc b/shared.qrc index e6c696a..f87ef6e 100644 --- a/shared.qrc +++ b/shared.qrc @@ -3,5 +3,6 @@ favicon.png graphics/sheute.png graphics/smorgen.png + graphics/chat_background.jpg diff --git a/source/serverconn.cpp b/source/serverconn.cpp index cdbc074..f774278 100644 --- a/source/serverconn.cpp +++ b/source/serverconn.cpp @@ -250,9 +250,7 @@ int ServerConn::getFoodPlan() QStringList weeklist = table1list + table2list; //put both weeks into one big list - qDebug() << weeklist; - //qDebug() << table1list; - qDebug() << " "; + for (int i = 0; i <=7; i ++){ QString temp = weeklist[i]; //store item temporarly to edit it weeklist[i] = temp.left(temp.length()-5); //remove "" at the and of the Item @@ -285,8 +283,8 @@ int ServerConn::getFoodPlan() } - qDebug() << temp_weekplan; - this->m_weekplan = temp_weekplan; + //qDebug() << temp_weekplan; + this->m_weekplan = temp_weekplan; //write changes to global foodplan return(200);