started to implement the new design
|
@ -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
|
||||
|
|
89
qml/Components/FancyButton.qml
Normal file
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
|
@ -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{
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
119
qml/Pages/StartPage.qml
Normal file
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,5 +10,7 @@
|
|||
<file>Forms/FoodPlanForm.qml</file>
|
||||
<file>Components/ProgressCircle.qml</file>
|
||||
<file>Forms/EventForm.qml</file>
|
||||
<file>Pages/StartPage.qml</file>
|
||||
<file>Components/FancyButton.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
BIN
shared/circle.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
shared/graphics/icons/logoutBlack.jpg
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
shared/graphics/icons/logoutBlack.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
shared/graphics/icons/logoutRed.png
Normal file
After Width: | Height: | Size: 7.4 KiB |
BIN
shared/graphics/icons/settingsBlack.png
Normal file
After Width: | Height: | Size: 324 KiB |
BIN
shared/graphics/images/FannyLogoDark.jpg
Normal file
After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
BIN
shared/graphics/images/TreffpunktFannyLogoDark.png
Normal file
After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
@ -4,17 +4,23 @@
|
|||
<file>graphics/sheute.png</file>
|
||||
<file>graphics/smorgen.png</file>
|
||||
<file>graphics/chat_background.jpg</file>
|
||||
<file>graphics/FannyLogo.png</file>
|
||||
<file>graphics/TreffpunktFannyLogo.png</file>
|
||||
<file>graphics/icons/back.png</file>
|
||||
<file>graphics/icons/drawer.png</file>
|
||||
<file>graphics/icons/menu.png</file>
|
||||
<file>graphics/FannyLogo_small.png</file>
|
||||
<file>graphics/icons/hide.png</file>
|
||||
<file>graphics/icons/view.png</file>
|
||||
<file>samplehtml/Download File-html.html</file>
|
||||
<file>samplehtml/Download File.html</file>
|
||||
<file>samplehtml/Download File.pdf</file>
|
||||
<file>samplehtml/Download File.xml</file>
|
||||
<file>circle.png</file>
|
||||
<file>graphics/images/FannyLogoDark.jpg</file>
|
||||
<file>graphics/images/FannyLogoLight.png</file>
|
||||
<file>graphics/images/FannyLogoLightSmall.png</file>
|
||||
<file>graphics/images/TreffpunktFannyLogoDark.png</file>
|
||||
<file>graphics/images/TreffpunktFannyLogoLight.png</file>
|
||||
<file>graphics/icons/logoutBlack.png</file>
|
||||
<file>graphics/icons/logoutRed.png</file>
|
||||
<file>graphics/icons/settingsBlack.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
//#include <QtWebView/QtWebView>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <QGuiApplication>
|
||||
#include <QQmlApplicationEngine>
|
||||
|
|