1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-10-06 09:17:07 +02:00

Add stomt

This commit is contained in:
kelteseth 2017-11-02 18:54:24 +01:00
parent 4e1e0bb936
commit 1e5c84eb86
5 changed files with 30 additions and 4 deletions

4
.gitmodules vendored
View File

@ -1,3 +1,7 @@
[submodule "ThirdParty/QtAV"]
path = ThirdParty/QtAV
url = https://github.com/wang-bin/QtAV.git
[submodule "ThirdParty/stomt-qt-sdk"]
path = ThirdParty/stomt-qt-sdk
url = https://github.com/Aimber/stomt-qt-sdk.git

View File

@ -1,9 +1,10 @@
TEMPLATE = app
QT += qml quick av widgets quickcontrols2
QT += qml quick av quickcontrols2 sql widgets
CONFIG += c++17
CONFIG += qtquickcompiler
SOURCES += main.cpp \
src/steamworkshop.cpp \
src/installedlistmodel.cpp \

1
ThirdParty/stomtqtsdk vendored Submodule

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

View File

@ -46,6 +46,7 @@ int main(int argc, char* argv[])
bool steamErrorRestart = false;
bool steamErrorAPIInit = false;
if (SteamAPI_RestartAppIfNecessary(steamID)) {
qWarning() << "SteamAPI_RestartAppIfNecessary";
steamErrorRestart = true;
@ -69,7 +70,6 @@ int main(int argc, char* argv[])
// to know where to look for the files
installedListModel.loadScreens();
profileListModel.loadProfiles();
// The settings depend on the list of available profiles
settings.loadActiveProfiles();
QQmlApplicationEngine mainWindowEngine;
@ -80,7 +80,6 @@ int main(int argc, char* argv[])
mainWindowEngine.rootContext()->setContextProperty("packageFileHandler", &packageFileHandler);
mainWindowEngine.rootContext()->setContextProperty("profileListModel", &profileListModel);
mainWindowEngine.rootContext()->setContextProperty("steamWorkshop", &steamWorkshop);
mainWindowEngine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));
//mainWindowEngine.rootContext()->setContextProperty("stomtPlugin", &stomt);
QQmlApplicationEngine errorWindowEngine;
@ -97,7 +96,7 @@ int main(int argc, char* argv[])
// Timer for steam polls. WTF?
QTimer timer;
QObject::connect(&timer, &QTimer::timeout, [&]() { SteamAPI_RunCallbacks(); });
timer.setInterval(500);
timer.setInterval(200);
timer.start();
int status = app.exec();

View File

@ -0,0 +1,21 @@
import QtQuick 2.7
import com.stomt.qmlSDK 1.0
Rectangle {
color:"#d1d1d1"
StomtWidget {
id:stomtWidget
anchors {
top:parent.top
topMargin: 30
horizontalCenter: parent.horizontalCenter
}
targetID: "screenplay"
appKey: "C1IfJAruqWFdkM8e7BMPK3dx1"
targetDisplayName: "ScreenPlay"
targetImageUrl: "qrc:/assets/icons/favicon.ico"
}
}