From c25195e13b8808b05299d6003ce5b4faf62d529d Mon Sep 17 00:00:00 2001 From: dorian Date: Thu, 5 Jul 2018 15:14:17 +0200 Subject: [PATCH] fix WebView und Speiseplan --- fannyapp.pro | 2 +- fannyapp.pro.user | 519 +++++++++++++++++++++++++++++++++---------- qml/FoodPlanForm.qml | 8 +- source/main.cpp | 13 ++ 4 files changed, 417 insertions(+), 125 deletions(-) diff --git a/fannyapp.pro b/fannyapp.pro index 3740478..43c9af7 100644 --- a/fannyapp.pro +++ b/fannyapp.pro @@ -1,4 +1,4 @@ -QT += qml quick quickcontrols2 xml widgets +QT += qml quick quickcontrols2 xml widgets webview CONFIG += c++11 # The following define makes your compiler emit warnings if you use diff --git a/fannyapp.pro.user b/fannyapp.pro.user index 325d2fc..dbdd3b6 100644 --- a/fannyapp.pro.user +++ b/fannyapp.pro.user @@ -1,14 +1,14 @@ - + EnvironmentId - {a7af30b9-cb0f-45fd-9894-328c8b8b2887} + {21eb7c7e-fe37-4955-bdba-642d7341ba98} ProjectExplorer.Project.ActiveTarget - 1 + 0 ProjectExplorer.Project.EditorSettings @@ -59,14 +59,279 @@ ProjectExplorer.Project.Target.0 - Android für armeabi-v7a (GCC 4.9, Qt 5.10.1 for Android armv7) - Android für armeabi-v7a (GCC 4.9, Qt 5.10.1 for Android armv7) - {944fd98d-a247-470d-994b-ce639c60daa2} - 1 + Desktop Qt 5.10.1 GCC 64bit2 + Desktop Qt 5.10.1 GCC 64bit2 + qt.qt5.5101.gcc_64_kit + 0 0 0 - D:/Documents/Git/build-fannyapp-Android_f_r_armeabi_v7a_GCC_4_9_Qt_5_10_1_for_Android_armv7-Debug + /home/dorian/Documents/gitlab/build-fannyapp-Desktop_Qt_5_10_1_GCC_64bit2-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + /home/dorian/Documents/gitlab/build-fannyapp-Desktop_Qt_5_10_1_GCC_64bit2-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + /home/dorian/Documents/gitlab/build-fannyapp-Desktop_Qt_5_10_1_GCC_64bit2-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy Configuration + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + fannyapp + + Qt4ProjectManager.Qt4RunConfiguration:/home/dorian/Documents/gitlab/fanny-app/fannyapp.pro + true + + fannyapp.pro + false + + /home/dorian/Documents/gitlab/build-fannyapp-Desktop_Qt_5_10_1_GCC_64bit2-Debug + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.Target.1 + + Android for armeabi-v7a (GCC 4.9, Qt 5.10.1 for Android armv72) + Android for armeabi-v7a (GCC 4.9, Qt 5.10.1 for Android armv72) + {0560b570-8c4b-4d85-a4a2-e3653c24ac2c} + 0 + 0 + 0 + + /home/dorian/Documents/gitlab/build-fannyapp-Android_for_armeabi_v7a_GCC_4_9_Qt_5_10_1_for_Android_armv72-Debug true @@ -94,7 +359,7 @@ true - Anwendungsdaten kopieren + Copy application data Qt4ProjectManager.AndroidPackageInstallationStep @@ -102,14 +367,14 @@ android-27 true - Android-APK erstellen + Build Android APK QmakeProjectManager.AndroidBuildApkStep false false 4 - Erstellen + Build ProjectExplorer.BuildSteps.Build @@ -128,7 +393,7 @@ 1 - Bereinigen + Clean ProjectExplorer.BuildSteps.Clean @@ -142,7 +407,7 @@ true - D:/Documents/Git/build-fannyapp-Android_f_r_armeabi_v7a_GCC_4_9_Qt_5_10_1_for_Android_armv7-Release + /home/dorian/Documents/gitlab/build-fannyapp-Android_for_armeabi_v7a_GCC_4_9_Qt_5_10_1_for_Android_armv72-Release true @@ -170,7 +435,7 @@ true - Anwendungsdaten kopieren + Copy application data Qt4ProjectManager.AndroidPackageInstallationStep @@ -178,14 +443,14 @@ android-27 true - Android-APK erstellen + Build Android APK QmakeProjectManager.AndroidBuildApkStep false false 4 - Erstellen + Build ProjectExplorer.BuildSteps.Build @@ -204,7 +469,7 @@ 1 - Bereinigen + Clean ProjectExplorer.BuildSteps.Clean @@ -218,7 +483,7 @@ true - D:/Documents/Git/build-fannyapp-Android_f_r_armeabi_v7a_GCC_4_9_Qt_5_10_1_for_Android_armv7-Profile + /home/dorian/Documents/gitlab/build-fannyapp-Android_for_armeabi_v7a_GCC_4_9_Qt_5_10_1_for_Android_armv72-Profile true @@ -246,7 +511,7 @@ true - Anwendungsdaten kopieren + Copy application data Qt4ProjectManager.AndroidPackageInstallationStep @@ -254,14 +519,14 @@ android-27 true - Android-APK erstellen + Build Android APK QmakeProjectManager.AndroidBuildApkStep false false 4 - Erstellen + Build ProjectExplorer.BuildSteps.Build @@ -280,7 +545,7 @@ 1 - Bereinigen + Clean ProjectExplorer.BuildSteps.Clean @@ -298,18 +563,18 @@ true - Deployment auf Android-Gerät + Deploy to Android device Qt4ProjectManager.AndroidDeployQtStep false 1 - Deployment + Deploy ProjectExplorer.BuildSteps.Deploy 1 - Deployment auf Android-Gerät + Deploy to Android device Qt4ProjectManager.AndroidDeployConfiguration2 @@ -360,7 +625,7 @@ fannyapp fannyapp - Qt4ProjectManager.AndroidRunConfiguration:D:/Documents/Git/fanny-app/fannyapp.pro + Qt4ProjectManager.AndroidRunConfiguration:/home/dorian/Documents/gitlab/fanny-app/fannyapp.pro fannyapp.pro 3768 false @@ -373,16 +638,16 @@ - ProjectExplorer.Project.Target.1 + ProjectExplorer.Project.Target.2 - Desktop Qt 5.10.1 MinGW 32bit - Desktop Qt 5.10.1 MinGW 32bit - qt.qt5.5101.win32_mingw53_kit + Android for x86 (GCC 4.9, Qt 5.10.1 for Android x862) + Android for x86 (GCC 4.9, Qt 5.10.1 for Android x862) + {8bce16c3-932e-4fe6-8857-8d07e3b2180e} 0 0 - 1 + 0 - D:/Documents/Git/fannyapp windows deploy/build-fannyapp-Desktop_Qt_5_10_1_MinGW_32bit-Debug + /home/dorian/Documents/gitlab/build-fannyapp-Android_for_x86_GCC_4_9_Qt_5_10_1_for_Android_x862-Debug true @@ -400,13 +665,32 @@ Make Qt4ProjectManager.MakeStep - + + -w + -r + false - 2 - Erstellen + + true + Copy application data + + Qt4ProjectManager.AndroidPackageInstallationStep + + + android-27 + + true + Build Android APK + + QmakeProjectManager.AndroidBuildApkStep + false + false + + 4 + Build ProjectExplorer.BuildSteps.Build @@ -416,13 +700,16 @@ Make Qt4ProjectManager.MakeStep - + + -w + -r + true clean 1 - Bereinigen + Clean ProjectExplorer.BuildSteps.Clean @@ -436,7 +723,7 @@ true - D:/Documents/Git/fannyapp windows deploy/build-fannyapp-Desktop_Qt_5_10_1_MinGW_32bit-Release + /home/dorian/Documents/gitlab/build-fannyapp-Android_for_x86_GCC_4_9_Qt_5_10_1_for_Android_x862-Release true @@ -454,13 +741,32 @@ Make Qt4ProjectManager.MakeStep - + + -w + -r + false - 2 - Erstellen + + true + Copy application data + + Qt4ProjectManager.AndroidPackageInstallationStep + + + android-27 + + true + Build Android APK + + QmakeProjectManager.AndroidBuildApkStep + false + false + + 4 + Build ProjectExplorer.BuildSteps.Build @@ -470,13 +776,16 @@ Make Qt4ProjectManager.MakeStep - + + -w + -r + true clean 1 - Bereinigen + Clean ProjectExplorer.BuildSteps.Clean @@ -490,7 +799,7 @@ true - D:/Documents/Git/fannyapp windows deploy/build-fannyapp-Desktop_Qt_5_10_1_MinGW_32bit-Profile + /home/dorian/Documents/gitlab/build-fannyapp-Android_for_x86_GCC_4_9_Qt_5_10_1_for_Android_x862-Profile true @@ -508,13 +817,32 @@ Make Qt4ProjectManager.MakeStep - + + -w + -r + false - 2 - Erstellen + + true + Copy application data + + Qt4ProjectManager.AndroidPackageInstallationStep + + + android-27 + + true + Build Android APK + + QmakeProjectManager.AndroidBuildApkStep + false + false + + 4 + Build ProjectExplorer.BuildSteps.Build @@ -524,13 +852,16 @@ Make Qt4ProjectManager.MakeStep - + + -w + -r + true clean 1 - Bereinigen + Clean ProjectExplorer.BuildSteps.Clean @@ -546,15 +877,22 @@ 3 - 0 - Deployment + + true + Deploy to Android device + + Qt4ProjectManager.AndroidDeployQtStep + false + + 1 + Deploy ProjectExplorer.BuildSteps.Deploy 1 - Deployment-Konfiguration + Deploy to Android device - ProjectExplorer.DefaultDeployConfiguration + Qt4ProjectManager.AndroidDeployConfiguration2 1 @@ -598,72 +936,13 @@ 13 14 - 2 - - - D:/Documents/Git/build-fannyapp-Desktop_Qt_5_10_1_MinGW_32bit-Release/release/fannyapp.exe - - D:\Documents\Git\build-fannyapp-Desktop_Qt_5_10_1_MinGW_32bit-Release\release\fannyapp.exe ausführen - - ProjectExplorer.CustomExecutableRunConfiguration - 3768 - false - true - false - false - true - - - false - false - 1000 - - true - - false - false - false - false - true - 0.01 - 10 - true - 1 - 25 - - 1 - true - false - true - valgrind - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - - 2 - + + + fannyapp - - Qt4ProjectManager.Qt4RunConfiguration:D:/Documents/Git/fanny-app/fannyapp.pro - true - - fannyapp.pro - false - - D:/Documents/Git/fannyapp windows deploy/build-fannyapp-Desktop_Qt_5_10_1_MinGW_32bit-Debug + fannyapp + Qt4ProjectManager.AndroidRunConfiguration:/home/dorian/Documents/gitlab/fanny-app/fannyapp.pro + fannyapp.pro 3768 false true @@ -671,12 +950,12 @@ false true - 2 + 1 ProjectExplorer.Project.TargetCount - 2 + 3 ProjectExplorer.Project.Updater.FileVersion diff --git a/qml/FoodPlanForm.qml b/qml/FoodPlanForm.qml index 0e9e660..2d1b2cb 100644 --- a/qml/FoodPlanForm.qml +++ b/qml/FoodPlanForm.qml @@ -39,11 +39,11 @@ Page { } ScrollView { + id:scroll anchors.fill: parent - ListView { id: listView - width: parent.width + //width: 514 model: 8 spacing: 0 property var today: new Date @@ -59,10 +59,10 @@ Page { delegate: Button { //text: getText(index, "cookteam") - width: parent.width + width: listView.width 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 - visible: listView.isDayVisible(index) + visible: index>6//listView.isDayVisible(index) property int cust_spacing: 5 diff --git a/source/main.cpp b/source/main.cpp index 8e575a5..445d69e 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -1,3 +1,4 @@ +#include #include #include @@ -12,6 +13,16 @@ #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include "headers/serverconn.h" #include "headers/appsettings.h" @@ -24,7 +35,9 @@ int main(int argc, char *argv[]) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + QGuiApplication app(argc, argv); + QtWebView::initialize(); QQuickStyle::setStyle("Material"); QQmlApplicationEngine engine;