1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-22 02:32:29 +01:00

Add google analytics

Add missing stomt submodule
This commit is contained in:
kelteseth 2018-09-14 12:55:10 +02:00
parent 3a06b38b23
commit dabb814dd1
7 changed files with 38 additions and 2 deletions

6
.gitmodules vendored
View File

@ -1,3 +1,9 @@
[submodule "ScreenPlay/examples"]
path = ScreenPlay/examples
url = https://github.com/Aimber/ScreenPlay-examples.git
[submodule "ScreenPlay/ThirdParty/qt-google-analytics"]
path = ScreenPlay/ThirdParty/qt-google-analytics
url = https://github.com/HSAnet/qt-google-analytics.git
[submodule "ScreenPlay/ThirdParty/stomt-qt-sdk"]
path = ScreenPlay/ThirdParty/stomt-qt-sdk
url = https://github.com/Aimber/stomt-qt-sdk.git

View File

@ -3,7 +3,10 @@ SUBDIRS = \
ScreenPlay/ScreenPlay.pro \
ScreenPlaySDK/Screenplaysdk.pro \
ScreenPlayWindow/ScreenPlayWindow.pro \
ScreenPlay/ThirdParty/qt-google-analytics/qt-google-analytics.pro \
ScreenPlay/ThirdParty/stomt-qt-sdk/sdk/stomt-qt-sdk.pro \
ScreenPlayWidget/ScreenPlayWidget.pro
ScreenPlayWindow.depends = ScreenPlaySDK
ScreenPlayWidget.depends = ScreenPlaySDK
ScreenPlay.depends = qt-google-analytics

View File

@ -1,8 +1,9 @@
TEMPLATE = app
QT += qml quick widgets quickcontrols2 core
CONFIG += c++17
#CONFIG += qtquickcompiler
CONFIG += qtquickcompiler
#DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT
msvc: LIBS += -luser32
TARGETPATH = ScreenPlay
@ -55,12 +56,19 @@ INCLUDEPATH += \
$$PWD/ThirdParty/ \
$$PWD/src/
include(ThirdParty/qt-google-analytics/qt-google-analytics.pri)
LIBS += -lqt-google-analytics
CONFIG(debug, debug|release) {
install_it.path = $${OUT_PWD}/debug/
QMAKE_LIBDIR += $$OUT_PWD/ThirdParty/qt-google-analytics/debug
} else {
install_it.path = $${OUT_PWD}/release/
QMAKE_LIBDIR += $$OUT_PWD/ThirdParty/qt-google-analytics/release
}
installOut.path = $${OUT_PWD}/
install_it.files += assets/templates/config.json \
@ -107,3 +115,7 @@ unix {
LIBS += -L$$PWD/ThirdParty/steam/lib/linux64/ -lsdkencryptedappticket
}
DISTFILES += \
favicon.ico \
assets/shader/movingcolorramp.fsh

@ -0,0 +1 @@
Subproject commit fa90c92fec84bd7ec4a04f09ff50c47eee5e1104

1
ScreenPlay/ThirdParty/stomt-qt-sdk vendored Submodule

@ -0,0 +1 @@
Subproject commit f2d964e22f4e51d99bc8f96188175984b57548e5

View File

@ -26,6 +26,7 @@
#include <qt_windows.h>
#endif
#include "ThirdParty/qt-google-analytics/ganalytics.h"
#include "src/create.h"
#include "src/installedlistfilter.h"
#include "src/installedlistmodel.h"
@ -50,6 +51,7 @@ int main(int argc, char* argv[])
QGuiApplication app(argc, argv);
app.setQuitOnLastWindowClosed(false);
QTranslator trsl;
trsl.load(":/translations/ScreenPlay_de.qm");
app.installTranslator(&trsl);
@ -63,7 +65,7 @@ int main(int argc, char* argv[])
AppId_t steamID = 672870;
QCoreApplication::setOrganizationName("Aimber");
QCoreApplication::setOrganizationDomain("aimber.net");
QCoreApplication::setOrganizationDomain("screen-play.app");
QCoreApplication::setApplicationName("ScreenPlay");
QCoreApplication::setApplicationVersion("0.1.0");
@ -136,6 +138,7 @@ int main(int argc, char* argv[])
settings.loadActiveProfiles();
QQmlApplicationEngine mainWindowEngine;
qmlRegisterType<GAnalytics>("analytics", 0, 1, "Tracker");
mainWindowEngine.rootContext()->setContextProperty("screenPlay", &screenPlay);
mainWindowEngine.rootContext()->setContextProperty("screenPlayCreate", &create);
mainWindowEngine.rootContext()->setContextProperty("utility", &qmlUtil);

View File

@ -4,6 +4,7 @@ import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import Qt.labs.platform 1.0
import analytics 0.1
import "qml/"
import "qml/Installed"
@ -18,7 +19,16 @@ ApplicationWindow {
minimumHeight: 788
minimumWidth: 1050
Tracker {
id: tracker
Component.onCompleted: tracker.sendScreenView("Main Screen")
trackingID: "UA-43193236-3"
}
Component.onCompleted: {
if (!screenPlaySettings.autostart) {
show()
}