diff --git a/QcookieClicker.pro b/QcookieClicker.pro new file mode 100644 index 0000000..b2ebf38 --- /dev/null +++ b/QcookieClicker.pro @@ -0,0 +1,30 @@ +QT += quick +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Refer to the documentation for the +# deprecated API to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + main.cpp + +RESOURCES += qml.qrc \ + shared/shared.qrc + +# Additional import path used to resolve QML modules in Qt Creator's code model +QML_IMPORT_PATH = + +# Additional import path used to resolve QML modules just for Qt Quick Designer +QML_DESIGNER_IMPORT_PATH = + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target diff --git a/QcookieClicker.pro.user b/QcookieClicker.pro.user new file mode 100644 index 0000000..1a1ab49 --- /dev/null +++ b/QcookieClicker.pro.user @@ -0,0 +1,941 @@ + + + + + + EnvironmentId + {73fd4d96-a4f7-426d-9695-506509aacee9} + + + ProjectExplorer.Project.ActiveTarget + 2 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + true + + + + ProjectExplorer.Project.Target.0 + + Android for armeabi-v7a (Clang Qt 5.11.3 for Android ARMv7) + Android for armeabi-v7a (Clang Qt 5.11.3 for Android ARMv7) + {c302a521-7501-4c1e-8f69-ba0d733405cf} + 0 + 0 + 0 + + /home/dorian/build-QcookieClicker-Android_for_armeabi_v7a_Clang_Qt_5_11_3_for_Android_ARMv7-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + false + + + true + Copy application data + + Qt4ProjectManager.AndroidPackageInstallationStep + + + android-28 + + true + Build Android APK + + QmakeProjectManager.AndroidBuildApkStep + false + false + + 4 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + /home/dorian/build-QcookieClicker-Android_for_armeabi_v7a_Clang_Qt_5_11_3_for_Android_ARMv7-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + false + + + true + Copy application data + + Qt4ProjectManager.AndroidPackageInstallationStep + + + android-28 + + true + Build Android APK + + QmakeProjectManager.AndroidBuildApkStep + false + false + + 4 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + /home/dorian/build-QcookieClicker-Android_for_armeabi_v7a_Clang_Qt_5_11_3_for_Android_ARMv7-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + false + + + true + Copy application data + + Qt4ProjectManager.AndroidPackageInstallationStep + + + android-28 + + true + Build Android APK + + QmakeProjectManager.AndroidBuildApkStep + false + false + + 4 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 + + + + true + Deploy to Android device + + Qt4ProjectManager.AndroidDeployQtStep + false + + 1 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy to Android device + + Qt4ProjectManager.AndroidDeployConfiguration2 + + 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 + + + + + 0 + + QcookieClicker + + Qt4ProjectManager.AndroidRunConfiguration:/home/dorian/QcookieClicker/QcookieClicker.pro + + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.Target.1 + + Android for x86 (Clang Qt 5.11.3 for Android x86) + Android for x86 (Clang Qt 5.11.3 for Android x86) + {b935ec60-9609-4a07-b4f8-79edfaca68ae} + 0 + 0 + 0 + + /home/dorian/build-QcookieClicker-Android_for_x86_Clang_Qt_5_11_3_for_Android_x86-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + false + + + true + Copy application data + + Qt4ProjectManager.AndroidPackageInstallationStep + + + android-28 + + true + Build Android APK + + QmakeProjectManager.AndroidBuildApkStep + false + false + + 4 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + /home/dorian/build-QcookieClicker-Android_for_x86_Clang_Qt_5_11_3_for_Android_x86-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + false + + + true + Copy application data + + Qt4ProjectManager.AndroidPackageInstallationStep + + + android-28 + + true + Build Android APK + + QmakeProjectManager.AndroidBuildApkStep + false + false + + 4 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + /home/dorian/build-QcookieClicker-Android_for_x86_Clang_Qt_5_11_3_for_Android_x86-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + false + + + true + Copy application data + + Qt4ProjectManager.AndroidPackageInstallationStep + + + android-28 + + true + Build Android APK + + QmakeProjectManager.AndroidBuildApkStep + false + false + + 4 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 + + + + true + Deploy to Android device + + Qt4ProjectManager.AndroidDeployQtStep + false + + 1 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy to Android device + + Qt4ProjectManager.AndroidDeployConfiguration2 + + 1 + + emulator-5554 + 28 + + + 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 + + + + + 0 + + QcookieClicker + + Qt4ProjectManager.AndroidRunConfiguration:/home/dorian/QcookieClicker/QcookieClicker.pro + + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.Target.2 + + Desktop Qt 5.11.3 GCC 64bit + Desktop Qt 5.11.3 GCC 64bit + qt.qt5.5113.gcc_64_kit + 0 + 0 + 0 + + /home/dorian/build-QcookieClicker-Desktop_Qt_5_11_3_GCC_64bit-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + /home/dorian/build-QcookieClicker-Desktop_Qt_5_11_3_GCC_64bit-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + /home/dorian/build-QcookieClicker-Desktop_Qt_5_11_3_GCC_64bit-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + false + + 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 + + QcookieClicker + + Qt4ProjectManager.Qt4RunConfiguration:/home/dorian/QcookieClicker/QcookieClicker.pro + QcookieClicker.pro + + 3768 + false + true + true + false + false + true + + /home/dorian/build-QcookieClicker-Desktop_Qt_5_11_3_GCC_64bit-Debug + + 1 + + + + ProjectExplorer.Project.TargetCount + 3 + + + ProjectExplorer.Project.Updater.FileVersion + 20 + + + Version + 20 + + diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..6333b85 --- /dev/null +++ b/main.cpp @@ -0,0 +1,16 @@ +#include +#include + +int main(int argc, char *argv[]) +{ + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + + QGuiApplication app(argc, argv); + + QQmlApplicationEngine engine; + engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); + if (engine.rootObjects().isEmpty()) + return -1; + + return app.exec(); +} diff --git a/main.qml b/main.qml new file mode 100644 index 0000000..13bf0ed --- /dev/null +++ b/main.qml @@ -0,0 +1,57 @@ +import QtQuick 2.9 +import QtQuick.Window 2.2 +import QtQuick.Controls 2.4 + +Window { + visible: true + width: 640 + height: 480 + title: "QcookieClicker" + + Page { + id: app + + property int level: 0 + + anchors.fill: parent + + Label { + id: levelLa + + anchors { + top: parent.top + horizontalCenter: parent.horizontalCenter + topMargin: 20 + } + + font.pixelSize: 30 + + text: app.level + } + + Button { + id: cookieBt + + anchors.centerIn: parent + + height: parent.height * 0.3 + width: height + + scale: pressed ? 0.8:1 + + background: Image { + source: "qrc:/icons/cookie.png" + } + + onClicked: { + app.level = app.level + 1 + } + + Behavior on scale { + NumberAnimation { + duration: 100 + } + } + } + } +} diff --git a/qml.qrc b/qml.qrc new file mode 100644 index 0000000..5f6483a --- /dev/null +++ b/qml.qrc @@ -0,0 +1,5 @@ + + + main.qml + + diff --git a/shared/icons/cookie.png b/shared/icons/cookie.png new file mode 100644 index 0000000..e01a9ae Binary files /dev/null and b/shared/icons/cookie.png differ diff --git a/shared/shared.qrc b/shared/shared.qrc new file mode 100644 index 0000000..300ac4b --- /dev/null +++ b/shared/shared.qrc @@ -0,0 +1,5 @@ + + + icons/cookie.png + +