1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00
This commit is contained in:
kelteseth 2018-10-17 20:40:20 +02:00
parent a6f15329d0
commit 2ba8aff42b
6 changed files with 30 additions and 13 deletions

View File

@ -14,7 +14,6 @@
#include <QQuickView> #include <QQuickView>
#include <QScreen> #include <QScreen>
#include <QStringList> #include <QStringList>
#include <QTimer>
#include <QTransform> #include <QTransform>
#include <QUrl> #include <QUrl>
#include <QVariant> #include <QVariant>
@ -138,6 +137,7 @@ int main(int argc, char* argv[])
settings.loadActiveProfiles(); settings.loadActiveProfiles();
QQmlApplicationEngine mainWindowEngine; QQmlApplicationEngine mainWindowEngine;
qmlRegisterType<GAnalytics>("analytics", 0, 1, "Tracker"); qmlRegisterType<GAnalytics>("analytics", 0, 1, "Tracker");
mainWindowEngine.rootContext()->setContextProperty("screenPlay", &screenPlay); mainWindowEngine.rootContext()->setContextProperty("screenPlay", &screenPlay);
mainWindowEngine.rootContext()->setContextProperty("screenPlayCreate", &create); mainWindowEngine.rootContext()->setContextProperty("screenPlayCreate", &create);

View File

@ -38,14 +38,14 @@ Rectangle {
} }
} }
Connections { // Connections {
target: screenPlayCreate // target: screenPlayCreate
onLocalWorkshopCreationStatusChanged: { // onLocalWorkshopCreationStatusChanged: {
if (status === Create.State.Started) { // if (status === Create.State.Started) {
loader.setSource("CreateImportStatus.qml") // loader.setSource("CreateImportStatus.qml")
} // }
} // }
} // }
Connections { Connections {
target: loader.item target: loader.item

View File

@ -23,7 +23,9 @@ Item {
onCreateWallpaperStateChanged: { onCreateWallpaperStateChanged: {
print(state) print(state)
if (state === Create.State.ConvertingPreviewGifError if (state === Create.State.ConvertingPreviewGifError
|| state === Create.State.ConvertingPreviewVideoError) { || state === Create.State.ConvertingPreviewVideoError
|| state === Create.State.AnalyseVideoError)
{
createNew.state = "error" createNew.state = "error"
} }
} }
@ -269,6 +271,7 @@ Item {
Flickable { Flickable {
anchors.fill: parent anchors.fill: parent
clip: true
contentHeight: txtFFMPEG.paintedHeight contentHeight: txtFFMPEG.paintedHeight
ScrollBar.vertical: ScrollBar { ScrollBar.vertical: ScrollBar {
snapMode: ScrollBar.SnapOnRelease snapMode: ScrollBar.SnapOnRelease
@ -277,7 +280,9 @@ Item {
Text { Text {
id: txtFFMPEG id: txtFFMPEG
anchors { anchors {
fill: parent top: parent.top
right: parent.right
left: parent.left
margins: 20 margins: 20
} }
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
@ -285,6 +290,12 @@ Item {
renderType: Text.NativeRendering renderType: Text.NativeRendering
height: txtFFMPEG.paintedHeight height: txtFFMPEG.paintedHeight
} }
Connections {
target: screenPlayCreate
onProcessOutput: {
txtFFMPEG.text = text
}
}
} }
} }

View File

@ -73,6 +73,7 @@ Rectangle {
onCreateWallpaperStateChanged: { onCreateWallpaperStateChanged: {
if (state === Create.State.ConvertingPreviewGif) { if (state === Create.State.ConvertingPreviewGif) {
txtConvert.text = qsTr("Generating preview gif...") txtConvert.text = qsTr("Generating preview gif...")
} }
if (state === Create.State.ConvertingPreviewGifFinished) { if (state === Create.State.ConvertingPreviewGifFinished) {

View File

@ -17,6 +17,7 @@ Item {
Flickable { Flickable {
anchors.fill: parent anchors.fill: parent
focus: true
contentHeight: txtFFMPEG.paintedHeight contentHeight: txtFFMPEG.paintedHeight
ScrollBar.vertical: ScrollBar { ScrollBar.vertical: ScrollBar {
snapMode: ScrollBar.SnapOnRelease snapMode: ScrollBar.SnapOnRelease
@ -25,13 +26,16 @@ Item {
Text { Text {
id: txtFFMPEG id: txtFFMPEG
anchors { anchors {
fill: parent top: parent.top
right: parent.right
left: parent.left
margins: 20 margins: 20
} }
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
color: "#626262" color: "#626262"
renderType: Text.NativeRendering renderType: Text.NativeRendering
height: txtFFMPEG.paintedHeight height: txtFFMPEG.paintedHeight
} }
} }
} }

View File

@ -51,7 +51,8 @@ void ScreenPlay::removeAllWallpaper()
void ScreenPlay::requestProjectSettingsListModelAt(int index) void ScreenPlay::requestProjectSettingsListModelAt(int index)
{ {
Q_ASSERT(index < m_screenPlayWallpaperList.size()); qDebug() << index << m_mlm->size();
//Q_ASSERT(index > m_mlm->size());
for (int i = 0; i < m_screenPlayWallpaperList.count(); ++i) { for (int i = 0; i < m_screenPlayWallpaperList.count(); ++i) {
if (m_screenPlayWallpaperList.at(i).data()->screenNumber().at(0) == index) { if (m_screenPlayWallpaperList.at(i).data()->screenNumber().at(0) == index) {
emit projectSettingsListModelFound(m_screenPlayWallpaperList.at(i).data()->projectSettingsListModel().data(), m_screenPlayWallpaperList.at(i).data()->type()); emit projectSettingsListModelFound(m_screenPlayWallpaperList.at(i).data()->projectSettingsListModel().data(), m_screenPlayWallpaperList.at(i).data()->type());