mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-18 16:32:33 +02:00
Add
This commit is contained in:
parent
baa162d862
commit
855c70273b
@ -119,9 +119,7 @@
|
|||||||
<file>settings.json</file>
|
<file>settings.json</file>
|
||||||
<file>translations/ScreenPlay_de.qm</file>
|
<file>translations/ScreenPlay_de.qm</file>
|
||||||
<file>translations/ScreenPlay_en.qm</file>
|
<file>translations/ScreenPlay_en.qm</file>
|
||||||
<file>qml/Create/Wizards/CreateWallpaper/Page_0.qml</file>
|
|
||||||
<file>qml/Create/Wizards/CreateWallpaper/Page_1.qml</file>
|
|
||||||
<file>qml/Create/Wizards/CreateWallpaper/Page_2.qml</file>
|
|
||||||
<file>qml/Create/Wizards/CreateWallpaper/NextButton.qml</file>
|
<file>qml/Create/Wizards/CreateWallpaper/NextButton.qml</file>
|
||||||
|
<file>qml/Screen/Screen.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#include <QThread>
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFontDatabase>
|
#include <QFontDatabase>
|
||||||
@ -10,6 +9,7 @@
|
|||||||
#include <QQmlApplicationEngine>
|
#include <QQmlApplicationEngine>
|
||||||
#include <QQmlContext>
|
#include <QQmlContext>
|
||||||
#include <QQmlEngine>
|
#include <QQmlEngine>
|
||||||
|
#include <QThread>
|
||||||
|
|
||||||
#include <QQuickView>
|
#include <QQuickView>
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
@ -26,6 +26,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "ThirdParty/qt-google-analytics/ganalytics.h"
|
#include "ThirdParty/qt-google-analytics/ganalytics.h"
|
||||||
|
#include "ThirdParty/steam/steam_api.h"
|
||||||
#include "src/create.h"
|
#include "src/create.h"
|
||||||
#include "src/installedlistfilter.h"
|
#include "src/installedlistfilter.h"
|
||||||
#include "src/installedlistmodel.h"
|
#include "src/installedlistmodel.h"
|
||||||
@ -36,11 +37,9 @@
|
|||||||
#include "src/sdkconnector.h"
|
#include "src/sdkconnector.h"
|
||||||
#include "src/settings.h"
|
#include "src/settings.h"
|
||||||
#include "src/startuperror.h"
|
#include "src/startuperror.h"
|
||||||
#include "ThirdParty/steam/steam_api.h"
|
|
||||||
#include "src/steamworkshop.h"
|
#include "src/steamworkshop.h"
|
||||||
#include "src/steamworkshoplistmodel.h"
|
#include "src/steamworkshoplistmodel.h"
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -50,7 +49,6 @@ int main(int argc, char* argv[])
|
|||||||
app.setQuitOnLastWindowClosed(false);
|
app.setQuitOnLastWindowClosed(false);
|
||||||
qSetMessagePattern("%{if-category}%{category}: %{endif}%{message}\n Loc: [%{file}:%{line}]");
|
qSetMessagePattern("%{if-category}%{category}: %{endif}%{message}\n Loc: [%{file}:%{line}]");
|
||||||
|
|
||||||
|
|
||||||
QTranslator trsl;
|
QTranslator trsl;
|
||||||
trsl.load(":/translations/ScreenPlay_de.qm");
|
trsl.load(":/translations/ScreenPlay_de.qm");
|
||||||
app.installTranslator(&trsl);
|
app.installTranslator(&trsl);
|
||||||
|
@ -85,7 +85,7 @@ Item {
|
|||||||
|
|
||||||
FileDialog {
|
FileDialog {
|
||||||
id: fileDialogOpenFile
|
id: fileDialogOpenFile
|
||||||
nameFilters: ["Video files (*.mp4)"]
|
// nameFilters: ["Video files (*.mp4)"]
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
videoFileSelected(fileDialogOpenFile.currentFile)
|
videoFileSelected(fileDialogOpenFile.currentFile)
|
||||||
}
|
}
|
||||||
|
@ -127,6 +127,25 @@ Item {
|
|||||||
running: true
|
running: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AnimatedImage {
|
||||||
|
id: imgPreview
|
||||||
|
asynchronous: true
|
||||||
|
playing: true
|
||||||
|
visible: false
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
id: txtConvertNumber
|
||||||
|
color: "white"
|
||||||
|
text: qsTr("")
|
||||||
|
font.pixelSize: 21
|
||||||
|
anchors {
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
bottom: parent.bottom
|
||||||
|
bottomMargin: 40
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: txtConvert
|
id: txtConvert
|
||||||
color: "white"
|
color: "white"
|
||||||
@ -135,7 +154,7 @@ Item {
|
|||||||
anchors {
|
anchors {
|
||||||
horizontalCenter: parent.horizontalCenter
|
horizontalCenter: parent.horizontalCenter
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
bottomMargin: 30
|
bottomMargin: 20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,20 +171,17 @@ Item {
|
|||||||
imgPreview.source = "file:///"
|
imgPreview.source = "file:///"
|
||||||
+ screenPlayCreate.workingDir + "/preview.gif"
|
+ screenPlayCreate.workingDir + "/preview.gif"
|
||||||
imgPreview.visible = true
|
imgPreview.visible = true
|
||||||
|
txtConvert.text = qsTr("Converting Video")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
onProgressChanged: {
|
||||||
|
var percentage = Math.floor(progress * 100)
|
||||||
AnimatedImage {
|
if (percentage > 100)
|
||||||
id: imgPreview
|
percentage = 100
|
||||||
asynchronous: true
|
txtConvertNumber.text = percentage + "%"
|
||||||
playing: true
|
}
|
||||||
visible: false
|
|
||||||
anchors.fill: parent
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@ -191,9 +207,8 @@ Item {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
if (textField.text.length >= 3 ) {
|
if (textField.text.length >= 3) {
|
||||||
canNext = true
|
canNext = true
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
canNext = false
|
canNext = false
|
||||||
}
|
}
|
||||||
|
@ -225,8 +225,8 @@ Item {
|
|||||||
height: 100
|
height: 100
|
||||||
width: 400
|
width: 400
|
||||||
anchors {
|
anchors {
|
||||||
top: monitorSelectionWrapper.bottom
|
bottom: btnSetWallpaper.top
|
||||||
topMargin: 30
|
bottomMargin: 20
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: 30
|
rightMargin: 30
|
||||||
leftMargin: 30
|
leftMargin: 30
|
||||||
|
@ -93,9 +93,7 @@ Rectangle {
|
|||||||
rp.itemAt(i).x = rp.itemAt(i).x * monitorWidthRationDelta
|
rp.itemAt(i).x = rp.itemAt(i).x * monitorWidthRationDelta
|
||||||
rp.itemAt(i).y = rp.itemAt(i).y * monitorHeightRationDelta
|
rp.itemAt(i).y = rp.itemAt(i).y * monitorHeightRationDelta
|
||||||
}
|
}
|
||||||
for(var i = 0; i < rp.count; i++){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
@ -46,6 +46,7 @@ Rectangle {
|
|||||||
navInstalled.state = "inactive"
|
navInstalled.state = "inactive"
|
||||||
navSettings.state = "inactive"
|
navSettings.state = "inactive"
|
||||||
navCommunity.state = "inactive"
|
navCommunity.state = "inactive"
|
||||||
|
navScreen.state = "inactive"
|
||||||
navCreate.state = "inactive"
|
navCreate.state = "inactive"
|
||||||
} else if (name === "Installed") {
|
} else if (name === "Installed") {
|
||||||
navWorkshop.state = "inactive"
|
navWorkshop.state = "inactive"
|
||||||
@ -53,24 +54,35 @@ Rectangle {
|
|||||||
navSettings.state = "inactive"
|
navSettings.state = "inactive"
|
||||||
navCommunity.state = "inactive"
|
navCommunity.state = "inactive"
|
||||||
navCreate.state = "inactive"
|
navCreate.state = "inactive"
|
||||||
|
navScreen.state = "inactive"
|
||||||
} else if (name === "Settings") {
|
} else if (name === "Settings") {
|
||||||
navWorkshop.state = "inactive"
|
navWorkshop.state = "inactive"
|
||||||
navInstalled.state = "inactive"
|
navInstalled.state = "inactive"
|
||||||
navSettings.state = "active"
|
navSettings.state = "active"
|
||||||
navCommunity.state = "inactive"
|
navCommunity.state = "inactive"
|
||||||
navCreate.state = "inactive"
|
navCreate.state = "inactive"
|
||||||
|
navScreen.state = "inactive"
|
||||||
} else if (name === "Create") {
|
} else if (name === "Create") {
|
||||||
navWorkshop.state = "inactive"
|
navWorkshop.state = "inactive"
|
||||||
navInstalled.state = "inactive"
|
navInstalled.state = "inactive"
|
||||||
navSettings.state = "inactive"
|
navSettings.state = "inactive"
|
||||||
navCreate.state = "active"
|
navCreate.state = "active"
|
||||||
navCommunity.state = "inactive"
|
navCommunity.state = "inactive"
|
||||||
|
navScreen.state = "inactive"
|
||||||
} else if (name === "Community") {
|
} else if (name === "Community") {
|
||||||
navWorkshop.state = "inactive"
|
navWorkshop.state = "inactive"
|
||||||
navInstalled.state = "inactive"
|
navInstalled.state = "inactive"
|
||||||
navSettings.state = "inactive"
|
navSettings.state = "inactive"
|
||||||
navCommunity.state = "active"
|
navCommunity.state = "active"
|
||||||
navCreate.state = "inactive"
|
navCreate.state = "inactive"
|
||||||
|
navScreen.state = "inactive"
|
||||||
|
}else if (name === "Screen") {
|
||||||
|
navWorkshop.state = "inactive"
|
||||||
|
navInstalled.state = "inactive"
|
||||||
|
navSettings.state = "inactive"
|
||||||
|
navCommunity.state = "inactive"
|
||||||
|
navCreate.state = "inactive"
|
||||||
|
navScreen.state = "active"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,6 +116,14 @@ Rectangle {
|
|||||||
onPageClicked: navigation.onPageChanged(name)
|
onPageClicked: navigation.onPageChanged(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NavigationItem {
|
||||||
|
id: navScreen
|
||||||
|
state: "inactive"
|
||||||
|
name: "Screen"
|
||||||
|
iconSource: "qrc:/assets/icons/icon_monitor.svg"
|
||||||
|
onPageClicked: navigation.onPageChanged(name)
|
||||||
|
}
|
||||||
|
|
||||||
NavigationItem {
|
NavigationItem {
|
||||||
id: navCommunity
|
id: navCommunity
|
||||||
state: "inactive"
|
state: "inactive"
|
||||||
|
@ -67,6 +67,7 @@ Item {
|
|||||||
text: settingsHeader.text
|
text: settingsHeader.text
|
||||||
font.pixelSize: 18
|
font.pixelSize: 18
|
||||||
color: "white"
|
color: "white"
|
||||||
|
verticalAlignment: Text.AlignTop
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
font.family: "Roboto"
|
font.family: "Roboto"
|
||||||
anchors{
|
anchors{
|
||||||
|
@ -330,11 +330,21 @@ bool Create::createWallpaperVideo()
|
|||||||
|
|
||||||
// Somehow readyRead gets seldom called in the end with an
|
// Somehow readyRead gets seldom called in the end with an
|
||||||
// not valid QProcess pointer....
|
// not valid QProcess pointer....
|
||||||
if(proConvertVideo.isNull()) {
|
if (proConvertVideo.isNull()) {
|
||||||
qDebug() << "EROR NULL";
|
qDebug() << "EROR NULL";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!proConvertVideo.data()->isOpen()) {
|
||||||
|
qDebug() << "ERROR NOT OPEN";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!proConvertVideo.data()->isReadable()) {
|
||||||
|
qDebug() << "ERROR CANNOT READ LINE";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QString tmpOut = proConvertVideo.data()->readAll();
|
QString tmpOut = proConvertVideo.data()->readAll();
|
||||||
qDebug() << tmpOut << m_createWallpaperData.length;
|
qDebug() << tmpOut << m_createWallpaperData.length;
|
||||||
auto tmpList = tmpOut.split(QRegExp("\\s+"), QString::SkipEmptyParts);
|
auto tmpList = tmpOut.split(QRegExp("\\s+"), QString::SkipEmptyParts);
|
||||||
@ -344,9 +354,10 @@ bool Create::createWallpaperVideo()
|
|||||||
|
|
||||||
if (!ok)
|
if (!ok)
|
||||||
return;
|
return;
|
||||||
|
qDebug() << currentFrame << m_createWallpaperData.length << m_createWallpaperData.framerate;
|
||||||
|
|
||||||
float progress = currentFrame / (m_createWallpaperData.length * m_createWallpaperData.framerate);
|
float progress = currentFrame / (m_createWallpaperData.length * m_createWallpaperData.framerate);
|
||||||
|
qDebug() << progress ;
|
||||||
this->setProgress(progress);
|
this->setProgress(progress);
|
||||||
}
|
}
|
||||||
this->processOutput(tmpOut);
|
this->processOutput(tmpOut);
|
||||||
|
@ -129,7 +129,7 @@ void InstalledListModel::loadScreens()
|
|||||||
if (fileEnding.endsWith(".webm") || (obj.value("type").toString() == "qmlScene") || fileEnding.endsWith(".html"))
|
if (fileEnding.endsWith(".webm") || (obj.value("type").toString() == "qmlScene") || fileEnding.endsWith(".html"))
|
||||||
emit addInstalledItem(obj, item.baseName());
|
emit addInstalledItem(obj, item.baseName());
|
||||||
|
|
||||||
if(obj.value("type") == "qmlWidget")
|
if(obj.value("type") == "qmlWidget" || obj.value("type") == "standalonewidget")
|
||||||
emit addInstalledItem(obj, item.baseName());
|
emit addInstalledItem(obj, item.baseName());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
QT += quick qml quickcontrols2 core charts widgets gui
|
QT += quick qml quickcontrols2 core widgets gui
|
||||||
CONFIG += c++17
|
CONFIG += c++17
|
||||||
CONFIG += qtquickcompiler
|
CONFIG += qtquickcompiler
|
||||||
# The following define makes your compiler emit warnings if you use
|
# The following define makes your compiler emit warnings if you use
|
||||||
|
@ -29,7 +29,7 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
// Args: which monitor, (2) path to project, (3)wallpaper secret to identify the connected socket, (4) decoder, (5) volume, (6) fillmode
|
// Args: which monitor, (2) path to project, (3)wallpaper secret to identify the connected socket, (4) decoder, (5) volume, (6) fillmode
|
||||||
// See screenplay.h @ScreenPlayWallpaper constructor how the args get created
|
// See screenplay.h @ScreenPlayWallpaper constructor how the args get created
|
||||||
// MainWindow w(0,"D:/672870/827148653","","","","");
|
//MainWindow w(0,"D:/672870/_tmp_135011","","","","");
|
||||||
sdk.setAppID(argumentList.at(3));
|
sdk.setAppID(argumentList.at(3));
|
||||||
qDebug() << "Starting MainWindow: " << argumentList.at(2) << argumentList.at(3) << argumentList.at(4) << argumentList.at(5) << argumentList.at(6);
|
qDebug() << "Starting MainWindow: " << argumentList.at(2) << argumentList.at(3) << argumentList.at(4) << argumentList.at(5) << argumentList.at(6);
|
||||||
MainWindow w(monitor, argumentList.at(2), argumentList.at(3), argumentList.at(4), argumentList.at(5), argumentList.at(6));
|
MainWindow w(monitor, argumentList.at(2), argumentList.at(3), argumentList.at(4), argumentList.at(5), argumentList.at(6));
|
||||||
|
Loading…
Reference in New Issue
Block a user