diff --git a/fannyapp.pro b/fannyapp.pro
index 6e1df68..13ae3a5 100644
--- a/fannyapp.pro
+++ b/fannyapp.pro
@@ -1,4 +1,4 @@
-QT += qml quick quickcontrols2 xml widgets #webview
+QT += qml quick quickcontrols2 xml #webview
CONFIG += c++11
# The following define makes your compiler emit warnings if you use
diff --git a/qml/Components/FancyButton.qml b/qml/Components/FancyButton.qml
new file mode 100644
index 0000000..e4badc1
--- /dev/null
+++ b/qml/Components/FancyButton.qml
@@ -0,0 +1,89 @@
+import QtQuick 2.9
+import QtQuick.Controls 2.4
+
+Button {
+ id: control
+
+ property string image
+ property real imageScale: 1
+
+ background: Rectangle {
+ id: smorgenBackground
+ height: control.height
+ width: height
+
+ scale: control.pressed ? 0.8:1
+
+ Behavior on scale {
+ PropertyAnimation {
+ duration: 100
+ }
+ }
+
+ Image {
+ id: smorgenImage
+ source: control.image
+
+ anchors.centerIn: parent
+ height: parent.height * 0.5
+ width: height
+
+ visible: false
+
+ mipmap: true
+
+ fillMode: Image.PreserveAspectFit
+
+ scale: control.imageScale
+
+ Behavior on scale {
+ PropertyAnimation {
+ duration: 100
+ }
+ }
+ }
+ }
+/*
+ background: Image {
+ id: smorgenBackground
+ source: "qrc:/circle.png"
+ height: control.height
+ width: height
+
+ scale: control.pressed ? 0.8:1
+
+ Behavior on scale {
+ PropertyAnimation {
+ duration: 100
+ }
+ }
+
+ mipmap: true
+ smooth: true
+
+ fillMode: Image.PreserveAspectFit
+
+ Image {
+ id: smorgenImage
+ source: control.image
+
+ anchors.centerIn: parent
+ height: parent.height * 0.5
+ width: height
+
+ mipmap: true
+ smooth: true
+
+ fillMode: Image.PreserveAspectFit
+
+ scale: control.imageScale
+
+ Behavior on scale {
+ PropertyAnimation {
+ duration: 100
+ }
+ }
+ }
+ }
+ */
+}
diff --git a/qml/Forms/FoodPlanForm.qml b/qml/Forms/FoodPlanForm.qml
index b18ed60..3af3d71 100644
--- a/qml/Forms/FoodPlanForm.qml
+++ b/qml/Forms/FoodPlanForm.qml
@@ -7,7 +7,7 @@ Page {
//anchors.fill: parent
property bool cookplanChanged
title: qsTr("Speiseplan")
- property string icon: "qrc:/graphics/TreffpunktFannyLogo.png"
+ property string icon: "qrc:/graphics/images/TreffpunktFannyLogo.png"
property string link: "http://www.treffpunkt-fanny.de"
// Image{
diff --git a/qml/Forms/HomeForm.qml b/qml/Forms/HomeForm.qml
index be5d101..49721a1 100644
--- a/qml/Forms/HomeForm.qml
+++ b/qml/Forms/HomeForm.qml
@@ -8,7 +8,7 @@ Page {
//anchors.fill: parent
title: qsTr("Vertretungsplan")
- property string icon: "qrc:/graphics/FannyLogo_small.png"
+ property string icon: "qrc:/graphics/images/FannyLogo_small.png"
property string link: "http://www.fanny-leicht.de/j34"
// Image{
diff --git a/qml/Forms/WebsiteForm.qml b/qml/Forms/WebsiteForm.qml
index 9564b4b..649d75b 100644
--- a/qml/Forms/WebsiteForm.qml
+++ b/qml/Forms/WebsiteForm.qml
@@ -11,7 +11,7 @@ Page {
objectName: "WebsitePage";
title: qsTr("Fanny Webseite")
- property string icon: "qrc:/graphics/FannyLogo_small.png"
+ //property string icon: "qrc:/graphics/FannyLogo_small.png"
property string link: "http://www.fanny-leicht.de/j34"
diff --git a/qml/Pages/StartPage.qml b/qml/Pages/StartPage.qml
new file mode 100644
index 0000000..36d3f9d
--- /dev/null
+++ b/qml/Pages/StartPage.qml
@@ -0,0 +1,119 @@
+import QtQuick 2.9
+import QtQuick.Controls 2.4
+
+import "../Components"
+
+Page {
+ id: root
+ objectName: "MainPage"
+
+ Shortcut {
+ sequences: ["Esc", "Back"]
+ enabled: stackView.depth > 1
+ onActivated: {
+ stackView.pop()
+ }
+ }
+
+ Item {
+ id: mainMenu
+
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ verticalCenter: parent.verticalCenter
+ }
+
+ width: childrenRect.width
+ height: childrenRect.height
+
+ property int buttonHeight: app.landscape() ? root.height * (0.3*0.8):buttonWidth
+ property int buttonWidth: app.landscape() ? buttonHeight:root.width * (0.5*0.8)
+
+
+ FancyButton {
+ id: todayButton
+
+ image: "qrc:/graphics/sheute.png"
+
+ anchors {
+ left: parent.left
+ top: parent.top
+ }
+
+ width: mainMenu.buttonWidth
+ height: mainMenu.buttonHeight
+ }
+
+ FancyButton {
+ id: tomorrowButton
+
+ image: "qrc:/graphics/smorgen.png"
+
+ anchors {
+ left: todayButton.right
+ verticalCenter: todayButton.verticalCenter
+ }
+
+ width: mainMenu.buttonWidth
+ height: mainMenu.buttonHeight
+ }
+
+ FancyButton {
+ id: foodplanButton
+
+ image: "qrc:/graphics/images/TreffpunktFannyLogoDark.png"
+
+ anchors {
+ top: todayButton.bottom
+ horizontalCenter: todayButton.horizontalCenter
+ }
+
+ width: mainMenu.buttonWidth
+ height: mainMenu.buttonHeight
+ }
+
+ FancyButton {
+ id: fannyButton
+
+ image: "qrc:/graphics/images/FannyLogoDark.jpg"
+
+ anchors {
+ top: tomorrowButton.bottom
+ horizontalCenter: tomorrowButton.horizontalCenter
+ }
+
+ width: mainMenu.buttonWidth
+ height: mainMenu.buttonHeight
+ }
+
+ FancyButton {
+ id: logoutButton
+
+ image: "qrc:/graphics/icons/logoutRed.png"
+ imageScale: 0.8
+
+ anchors {
+ top: foodplanButton.bottom
+ horizontalCenter: foodplanButton.horizontalCenter
+ }
+
+ width: mainMenu.buttonWidth
+ height: mainMenu.buttonHeight
+ }
+
+ FancyButton {
+ id: settingsButton
+
+ image: "qrc:/graphics/icons/settingsBlack.png"
+ imageScale: 0.8
+
+ anchors {
+ top: fannyButton.bottom
+ horizontalCenter: fannyButton.horizontalCenter
+ }
+
+ width: mainMenu.buttonWidth
+ height: mainMenu.buttonHeight
+ }
+ }
+}
diff --git a/qml/main.qml b/qml/main.qml
index 18317ba..d8d9228 100644
--- a/qml/main.qml
+++ b/qml/main.qml
@@ -40,7 +40,7 @@ ApplicationWindow {
name: "loggedIn"
PropertyChanges {
target: mainStack
- currPage: mainPage
+ currPage: startPage
}
}
]
@@ -131,8 +131,8 @@ ApplicationWindow {
}
Component {
- id: mainPage
- MainPage {}
+ id: startPage
+ StartPage {}
}
}
@@ -175,5 +175,8 @@ ApplicationWindow {
}
}
+ function landscape(){
+ return(app.width > app.height)
+ }
}
}
diff --git a/qml/qml.qrc b/qml/qml.qrc
index 5ef2fe6..1f994dc 100644
--- a/qml/qml.qrc
+++ b/qml/qml.qrc
@@ -10,5 +10,7 @@
Forms/FoodPlanForm.qml
Components/ProgressCircle.qml
Forms/EventForm.qml
+ Pages/StartPage.qml
+ Components/FancyButton.qml
diff --git a/shared/circle.png b/shared/circle.png
new file mode 100644
index 0000000..d423779
Binary files /dev/null and b/shared/circle.png differ
diff --git a/shared/favicon.xcf b/shared/favicon.xcf
index 2b5b15b..42a7c48 100644
Binary files a/shared/favicon.xcf and b/shared/favicon.xcf differ
diff --git a/shared/graphics/icons/logoutBlack.jpg b/shared/graphics/icons/logoutBlack.jpg
new file mode 100644
index 0000000..9dea551
Binary files /dev/null and b/shared/graphics/icons/logoutBlack.jpg differ
diff --git a/shared/graphics/icons/logoutBlack.png b/shared/graphics/icons/logoutBlack.png
new file mode 100644
index 0000000..831ba25
Binary files /dev/null and b/shared/graphics/icons/logoutBlack.png differ
diff --git a/shared/graphics/icons/logoutRed.png b/shared/graphics/icons/logoutRed.png
new file mode 100644
index 0000000..027a0fe
Binary files /dev/null and b/shared/graphics/icons/logoutRed.png differ
diff --git a/shared/graphics/icons/settingsBlack.png b/shared/graphics/icons/settingsBlack.png
new file mode 100644
index 0000000..c818eb3
Binary files /dev/null and b/shared/graphics/icons/settingsBlack.png differ
diff --git a/shared/graphics/images/FannyLogoDark.jpg b/shared/graphics/images/FannyLogoDark.jpg
new file mode 100644
index 0000000..bd56375
Binary files /dev/null and b/shared/graphics/images/FannyLogoDark.jpg differ
diff --git a/shared/graphics/FannyLogo.png b/shared/graphics/images/FannyLogoLight.png
similarity index 100%
rename from shared/graphics/FannyLogo.png
rename to shared/graphics/images/FannyLogoLight.png
diff --git a/shared/graphics/FannyLogo_small.png b/shared/graphics/images/FannyLogoLightSmall.png
similarity index 100%
rename from shared/graphics/FannyLogo_small.png
rename to shared/graphics/images/FannyLogoLightSmall.png
diff --git a/shared/graphics/images/TreffpunktFannyLogoDark.png b/shared/graphics/images/TreffpunktFannyLogoDark.png
new file mode 100644
index 0000000..f96bfaf
Binary files /dev/null and b/shared/graphics/images/TreffpunktFannyLogoDark.png differ
diff --git a/shared/graphics/TreffpunktFannyLogo.png b/shared/graphics/images/TreffpunktFannyLogoLight.png
similarity index 100%
rename from shared/graphics/TreffpunktFannyLogo.png
rename to shared/graphics/images/TreffpunktFannyLogoLight.png
diff --git a/shared/shared.qrc b/shared/shared.qrc
index 5f845e6..886d4cc 100644
--- a/shared/shared.qrc
+++ b/shared/shared.qrc
@@ -4,17 +4,23 @@
graphics/sheute.png
graphics/smorgen.png
graphics/chat_background.jpg
- graphics/FannyLogo.png
- graphics/TreffpunktFannyLogo.png
graphics/icons/back.png
graphics/icons/drawer.png
graphics/icons/menu.png
- graphics/FannyLogo_small.png
graphics/icons/hide.png
graphics/icons/view.png
samplehtml/Download File-html.html
samplehtml/Download File.html
samplehtml/Download File.pdf
samplehtml/Download File.xml
+ circle.png
+ graphics/images/FannyLogoDark.jpg
+ graphics/images/FannyLogoLight.png
+ graphics/images/FannyLogoLightSmall.png
+ graphics/images/TreffpunktFannyLogoDark.png
+ graphics/images/TreffpunktFannyLogoLight.png
+ graphics/icons/logoutBlack.png
+ graphics/icons/logoutRed.png
+ graphics/icons/settingsBlack.png
diff --git a/sources/main.cpp b/sources/main.cpp
index f040052..79058ad 100644
--- a/sources/main.cpp
+++ b/sources/main.cpp
@@ -1,5 +1,4 @@
//#include
-#include
#include
#include