1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00

Add new ScreenPlayWidget subproject

This commit is contained in:
kelteseth 2018-03-08 22:03:05 +01:00
parent a174fa80f7
commit 0662101626
6 changed files with 79 additions and 1 deletions

View File

@ -2,6 +2,7 @@ TEMPLATE = subdirs
SUBDIRS = \
ScreenPlay/ScreenPlay.pro \
ScreenPlaySDK/Screenplaysdk.pro \
ScreenPlayWindow/ScreenPlayWindow.pro
ScreenPlayWindow/ScreenPlayWindow.pro \
ScreenPlayWidget
ScreenPlayWindow.depends = ScreenPlaySDK

View File

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

View File

@ -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();
}

View File

@ -0,0 +1,30 @@
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 += \
SPWidgetmain.cpp
RESOURCES += \
SPWidgetResources.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

20
ScreenPlayWidget/main.qml Normal file
View File

@ -0,0 +1,20 @@
import QtQuick 2.9
import QtQuick.Window 2.2
import net.aimber.screenplaysdk 1.0
Window {
id: mainWindow
visible: true
width: 250
height: 100
color: "transparent"
flags: Qt.SplashScreen | Qt.ToolTip | Qt.WindowStaysOnBottomHint
Loader {
id:loader
anchors.fill: parent
asynchronous: true
}
}

View File

@ -68,6 +68,12 @@ cd 'ScreenPlayWindow'
cd 'release'
cp -r ./* $DeployPath'ScreenPlay'
cd ..
cd ..
cd 'ScreenPlayWidget'
cd 'release'
cp -r ./* $DeployPath'ScreenPlay'
echo ''
echo 'Deploying Steam SDK'