Browse Source

Added launcher subproject template

Ivan Arkhipov 5 years ago
parent
commit
f5b848b3b1

+ 32 - 0
src/Launcher/Launcher.pro

@@ -0,0 +1,32 @@
+include( ../../common.pri )
+include( ../../app.pri )
+
+QT += quick
+CONFIG += c++11
+
+# The following define makes your compiler emit warnings if you use
+# any feature of Qt which as been marked deprecated (the exact warnings
+# depend on your compiler). Please consult the documentation of the
+# deprecated API in order to know how to port your code away from it.
+DEFINES += QT_DEPRECATED_WARNINGS
+
+# You can also make your code fail to compile if you use 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
+
+# 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

+ 23 - 0
src/Launcher/launcher_plugin_import.cpp

@@ -0,0 +1,23 @@
+// This file is autogenerated by qmake. It imports static plugin classes for
+// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS.<plugin> variables.
+#include <QtPlugin>
+Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
+Q_IMPORT_PLUGIN(QGifPlugin)
+Q_IMPORT_PLUGIN(QICNSPlugin)
+Q_IMPORT_PLUGIN(QICOPlugin)
+Q_IMPORT_PLUGIN(QJpegPlugin)
+Q_IMPORT_PLUGIN(QTgaPlugin)
+Q_IMPORT_PLUGIN(QTiffPlugin)
+Q_IMPORT_PLUGIN(QWbmpPlugin)
+Q_IMPORT_PLUGIN(QWebpPlugin)
+Q_IMPORT_PLUGIN(QQmlDebuggerServiceFactory)
+Q_IMPORT_PLUGIN(QQmlInspectorServiceFactory)
+Q_IMPORT_PLUGIN(QLocalClientConnectionFactory)
+Q_IMPORT_PLUGIN(QDebugMessageServiceFactory)
+Q_IMPORT_PLUGIN(QQmlNativeDebugConnectorFactory)
+Q_IMPORT_PLUGIN(QQmlNativeDebugServiceFactory)
+Q_IMPORT_PLUGIN(QQmlProfilerServiceFactory)
+Q_IMPORT_PLUGIN(QQuickProfilerAdapterFactory)
+Q_IMPORT_PLUGIN(QQmlDebugServerFactory)
+Q_IMPORT_PLUGIN(QTcpServerConnectionFactory)
+Q_IMPORT_PLUGIN(QGenericEnginePlugin)

+ 5 - 0
src/Launcher/launcher_qml_plugin_import.cpp

@@ -0,0 +1,5 @@
+// This file is autogenerated by qmake. It imports static plugin classes for
+// static plugins used by QML imports.
+#include <QtPlugin>
+Q_IMPORT_PLUGIN(QtQuick2Plugin)
+Q_IMPORT_PLUGIN(QtQuick2WindowPlugin)

+ 16 - 0
src/Launcher/main.cpp

@@ -0,0 +1,16 @@
+#include <QGuiApplication>
+#include <QQmlApplicationEngine>
+
+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();
+}

+ 31 - 0
src/Launcher/main.qml

@@ -0,0 +1,31 @@
+import QtQuick 2.10
+import QtQuick.Window 2.10
+import QtQuick.Controls 1.6
+import QtQuick.Extras 1.4
+import QtGraphicalEffects 1.0
+import QtQuick.Layouts 1.3
+
+Window {
+    width: 640
+    height: 480
+    flags: Qt.FramelessWindowHint
+    color: "transparent"
+
+    Timer {
+        interval: 500; running: true; repeat: true
+        onTriggered: background.change()
+    }
+
+    Image {
+        id: background
+        source: "qrc:/backgrounds/bg1.png"
+        anchors.fill: parent
+    }
+
+    DelayButton {
+        id: delayButton
+        x: 256
+        y: 176
+        text: qsTr("Button")
+    }
+}

+ 5 - 0
src/Launcher/qml.qrc

@@ -0,0 +1,5 @@
+<RCC>
+    <qresource prefix="/">
+        <file>main.qml</file>
+    </qresource>
+</RCC>