Design changes

This commit is contained in:
dorian 2018-06-25 10:04:11 +02:00
parent cbad14d9c9
commit 99d0f644f6
11 changed files with 78 additions and 41 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<manifest package="com.itsblue.flgvertretung" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.03.1" android:versionCode="4" android:installLocation="auto"> <manifest package="com.itsblue.flgvertretungtest" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.03.1" android:versionCode="4" android:installLocation="auto">
<paths xmlns:android="http://schemas.android.com/apk/res/android"> <paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="external_files" path="."/> <external-path name="external_files" path="."/>
</paths> </paths>

View file

@ -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-06-25T08:02:51. --> <!-- Written by QtCreator 4.6.2, 2018-06-25T10:03:46. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>
@ -8,7 +8,7 @@
</data> </data>
<data> <data>
<variable>ProjectExplorer.Project.ActiveTarget</variable> <variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value> <value type="int">1</value>
</data> </data>
<data> <data>
<variable>ProjectExplorer.Project.EditorSettings</variable> <variable>ProjectExplorer.Project.EditorSettings</variable>
@ -62,7 +62,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Android for armeabi-v7a (GCC 4.9, Qt 5.10.1 for Android armv7)</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Android for armeabi-v7a (GCC 4.9, Qt 5.10.1 for Android armv7)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Android for armeabi-v7a (GCC 4.9, Qt 5.10.1 for Android armv7)</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Android for armeabi-v7a (GCC 4.9, Qt 5.10.1 for Android armv7)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{c2d2fa4a-1656-4ab9-a542-92c96158a688}</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{c2d2fa4a-1656-4ab9-a542-92c96158a688}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value> <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
@ -629,7 +629,7 @@
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fannyapp.pro</value> <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fannyapp.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">/home/dorian/Documents/builds/Qt/fanny-app/build-fannyapp-Android_for_armeabi_v7a_GCC_4_9_Qt_5_10_1_for_Android_armv7-Release</value> <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">/home/dorian/Documents/builds/Qt/fanny-app</value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value> <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View file

@ -1,5 +1,6 @@
import QtQuick 2.9 import QtQuick 2.9
import QtQuick.Controls 2.2 import QtQuick.Controls 2.2
import QtGraphicalEffects 1.0
Page { Page {
id:root id:root
@ -7,6 +8,23 @@ Page {
property bool cookplanChanged property bool cookplanChanged
title: qsTr("Speiseplanplan") 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 { Timer {
id: firstLoadTimer id: firstLoadTimer
@ -27,7 +45,7 @@ Page {
id: listView id: listView
width: parent.width width: parent.width
model: 8 model: 8
spacing: 5 spacing: 0
property var today: new Date property var today: new Date
anchors { anchors {
right: parent.right right: parent.right
@ -36,17 +54,16 @@ Page {
bottom: parent.bottom bottom: parent.bottom
leftMargin: 5 leftMargin: 5
rightMargin: 5 rightMargin: 5
topMargin: 3
} }
delegate: Button { delegate: Button {
//text: getText(index, "cookteam") //text: getText(index, "cookteam")
width: parent.width width: parent.width
id: delegate id: delegate
height: listView.isDayVisible(index) ? childrenRect.height + 10:0 height: listView.isDayVisible(index) ? childrenRect.height:0
visible: listView.isDayVisible(index) visible: listView.isDayVisible(index)
//height: 150
Label { Label {
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 10 anchors.leftMargin: 10
@ -102,27 +119,13 @@ Page {
id: dessert id: dessert
text: _cppServerConn.getFoodPlanData(index).dessert text: _cppServerConn.getFoodPlanData(index).dessert
} }
Label {
// Timer { anchors.left: parent.left
// id: reloadTimer anchors.leftMargin: 10
// interval: 10; anchors.top: dessert.bottom
// running: cookplanChanged id: spacer
// repeat: true text: ""
// 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
// }
// }
// }
} }
function getDateString(index){ function getDateString(index){

View file

@ -1,18 +1,39 @@
import QtQuick 2.9 import QtQuick 2.9
import QtQuick.Controls 2.2 import QtQuick.Controls 2.2
import QtGraphicalEffects 1.0
Page { Page {
anchors.fill: parent anchors.fill: parent
title: qsTr("Vertretungsplan") 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 { Label {
id: laWelcome id: laWelcome
text: "Hier kannst du dir den Vertretungsplan des Fannys anschauen" text: "Hier kannst du dir den Vertretungsplan des Fannys anschauen"
font.pixelSize: 20 font.pixelSize: 20
wrapMode: Label.Wrap wrapMode: Label.Wrap
width: window.width / 1.2 width: window.width / 1.2
color: "#424753"
anchors { anchors {
top: parent.top top: parent.top
topMargin: window.height / 8 - laWelcome.height / 2 topMargin: window.height / 8 - laWelcome.height / 2
@ -23,6 +44,8 @@ Page {
Button { Button {
id:buttToday id:buttToday
enabled: window.is_error === false enabled: window.is_error === false
height: 200
width: 200
anchors { anchors {
left: parent.left left: parent.left
leftMargin: (window.width / 4) - (buttToday.width / 2) leftMargin: (window.width / 4) - (buttToday.width / 2)

View file

@ -5,16 +5,25 @@ Page {
id: root id: root
objectName: "MainPage" objectName: "MainPage"
anchors.fill: parent anchors.fill: parent
header: AppToolBar { header: AppToolBar {
contentHeight: toolButton.implicitHeight contentHeight: toolButton.implicitHeight
ToolButton { ToolButton {
id: toolButton id: toolButton
anchors {
left: parent.left
verticalCenter: parent.verticalCenter
leftMargin: 5
}
background: Label {
text: stackView.depth > 1 ? "\u25C0" : "\u4E09" text: stackView.depth > 1 ? "\u25C0" : "\u4E09"
font.pixelSize: Qt.application.font.pixelSize * 1.6 font.pixelSize: Qt.application.font.pixelSize * 2
color: "white"
}
onClicked: { onClicked: {
console.log(toolButton.font.styleName)
if (stackView.depth > 1) { if (stackView.depth > 1) {
stackView.pop() stackView.pop()
} else { } else {
@ -26,6 +35,7 @@ Page {
Label { Label {
text: stackView.currentItem.title text: stackView.currentItem.title
anchors.centerIn: parent anchors.centerIn: parent
color: "white"
} }
} }
@ -51,7 +61,6 @@ Page {
onClicked: { onClicked: {
busyDialog.open() busyDialog.open()
var ret = _cppServerConn.getFoodPlan(); var ret = _cppServerConn.getFoodPlan();
console.log(ret, _cppServerConn.getFoodPlanData(1).cookteam, isNaN(_cppServerConn.getFoodPlanData(0).date.toString))
drawer.close() drawer.close()
busyDialog.close() busyDialog.close()
if(ret === 200 || _cppServerConn.getFoodPlanData(1).cookteam !== ""){ if(ret === 200 || _cppServerConn.getFoodPlanData(1).cookteam !== ""){

View file

@ -36,7 +36,7 @@ ApplicationWindow {
var init = _cppAppSettings.loadSetting("init") var init = _cppAppSettings.loadSetting("init")
var perm = _cppAppSettings.loadSetting("permanent") var perm = _cppAppSettings.loadSetting("permanent")
console.log("checkoldlogin", perm); console.log("checkoldlogin:", perm);
if(perm === "1"){ if(perm === "1"){
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);

View file

@ -4,3 +4,6 @@
[Controls] [Controls]
Style=Default Style=Default
[Material]
Primary="#312f38"

View file

@ -3,5 +3,6 @@
<file>favicon.png</file> <file>favicon.png</file>
<file>graphics/sheute.png</file> <file>graphics/sheute.png</file>
<file>graphics/smorgen.png</file> <file>graphics/smorgen.png</file>
<file>graphics/chat_background.jpg</file>
</qresource> </qresource>
</RCC> </RCC>

View file

@ -250,9 +250,7 @@ int ServerConn::getFoodPlan()
QStringList weeklist = table1list + table2list; //put both weeks into one big list QStringList weeklist = table1list + table2list; //put both weeks into one big list
qDebug() << weeklist;
//qDebug() << table1list;
qDebug() << " ";
for (int i = 0; i <=7; i ++){ for (int i = 0; i <=7; i ++){
QString temp = weeklist[i]; //store item temporarly to edit it QString temp = weeklist[i]; //store item temporarly to edit it
weeklist[i] = temp.left(temp.length()-5); //remove "</td>" at the and of the Item weeklist[i] = temp.left(temp.length()-5); //remove "</td>" at the and of the Item
@ -285,8 +283,8 @@ int ServerConn::getFoodPlan()
} }
qDebug() << temp_weekplan; //qDebug() << temp_weekplan;
this->m_weekplan = temp_weekplan; this->m_weekplan = temp_weekplan; //write changes to global foodplan
return(200); return(200);