1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-05 02:22:28 +01:00
This commit is contained in:
Elias 2019-06-10 16:27:17 +02:00
parent 90990b827f
commit 54f597529a
35 changed files with 38 additions and 459 deletions

View File

@ -77,7 +77,6 @@
<file>main.qml</file>
<file>qml/Community/Community.qml</file>
<file>qml/Community/Feedback.qml</file>
<file>qml/Controls/Slider.qml</file>
<file>qml/Create/Create.qml</file>
<file>qml/Create/CreateNew.qml</file>
<file>qml/Create/CreateUpload.qml</file>
@ -85,21 +84,12 @@
<file>qml/Create/CreateWidget.qml</file>
<file>qml/Create/CreateWidgetButton.qml</file>
<file>qml/Create/Wizards/CreateWallpaper/CreateWallpaperWizard.qml</file>
<file>qml/FileDropper.qml</file>
<file>qml/FileDropperSingleFile.qml</file>
<file>qml/Installed/Installed.qml</file>
<file>qml/Installed/InstalledNavigation.qml</file>
<file>qml/Installed/InstalledUserHelper.qml</file>
<file>qml/Installed/ScreenPlayItem.qml</file>
<file>qml/Installed/ScreenPlayItemImage.qml</file>
<file>qml/Installed/Sidebar.qml</file>
<file>qml/MonitorSelection.qml</file>
<file>qml/MonitorSelectionItem.qml</file>
<file>qml/Monitors.qml</file>
<file>qml/MonitorsProjectSettingItem.qml</file>
<file>qml/Navigation.qml</file>
<file>qml/NavigationItem.qml</file>
<file>qml/NavigationWallpaperConfiguration.qml</file>
<file>qml/Settings/SettingBool.qml</file>
<file>qml/Settings/Settings.qml</file>
<file>qml/Settings/SettingsButton.qml</file>
@ -107,7 +97,6 @@
<file>qml/Settings/SettingsExpander.qml</file>
<file>qml/Settings/SettingsHeader.qml</file>
<file>qml/Settings/SettingsHorizontalSeperator.qml</file>
<file>qml/Widgets/Window.qml</file>
<file>qml/Workshop/Workshop.qml</file>
<file>qtquickcontrols2.conf</file>
<file>settings.json</file>
@ -115,7 +104,6 @@
<file>translations/ScreenPlay_en.qm</file>
<file>qml/Screen/Screen.qml</file>
<file>assets/icons/icon_screen.svg</file>
<file>qml/Background.qml</file>
<file>qml/Community/XMLNewsfeed.qml</file>
<file>qml/Workshop/WorkshopAvailableTest.qml</file>
<file>qml/Workshop/WorkshopLoader.qml</file>
@ -125,5 +113,14 @@
<file>qml/Common/Tag.qml</file>
<file>assets/icons/icon_close.svg</file>
<file>qml/Common/ImageSelector.qml</file>
<file>qml/Common/Slider.qml</file>
<file>qml/Monitors/Monitors.qml</file>
<file>qml/Monitors/MonitorSelection.qml</file>
<file>qml/Monitors/MonitorSelectionItem.qml</file>
<file>qml/Monitors/MonitorsProjectSettingItem.qml</file>
<file>qml/Common/Background.qml</file>
<file>qml/Navigation/Navigation.qml</file>
<file>qml/Navigation/NavigationItem.qml</file>
<file>qml/Navigation/NavigationWallpaperConfiguration.qml</file>
</qresource>
</RCC>

View File

@ -5,14 +5,16 @@ import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import Qt.labs.platform 1.0
import "qml/"
import "qml/Monitors"
import "qml/Common"
import "qml/Installed"
import "qml/Navigation"
ApplicationWindow {
id: window
color: "#eeeeee"
// Set visible if the -silent parameter was not set
// Set visible if the -silent parameter was not set (see main.cpp:87).
visible: false
width: 1400
title: "ScreenPlay 0.2"

View File

@ -224,7 +224,7 @@ Item {
icon.width: 16
icon.height: 16
onClicked: Qt.openUrlExternally(
"https://gitlab.com/aimber/ScreenPlay/")
"https://gitlab.com/kelteseth/ScreenPlay/")
}
Button {
text: qsTr("Workshop")

View File

@ -1,5 +0,0 @@
import QtQuick 2.0
Item {
}

View File

@ -1,5 +0,0 @@
import QtQuick 2.0
Item {
}

View File

@ -4,7 +4,7 @@ import QtQuick.Controls.Material 2.2
import QtQuick.Particles 2.0
import QtGraphicalEffects 1.0
import app.screenplay.create 1.0
import ScreenPlay.Create 1.0
import "Wizards/CreateWallpaper"
@ -237,7 +237,7 @@ Item {
icon.width: 16
icon.height: 16
onClicked: Qt.openUrlExternally(
"https://aimber.gitlab.io/ScreenPlayDocs/")
"https://kelteseth.gitlab.io/ScreenPlayDocs/")
}
Button {
text: qsTr("Forums")

View File

@ -4,7 +4,7 @@ import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.3
import Qt.labs.platform 1.0
import QtQuick.Layouts 1.3
import app.screenplay.create 1.0
import ScreenPlay.Create 1.0
Item {
id: wrapperError

View File

@ -5,7 +5,7 @@ import QtQuick.Controls.Material 2.3
import Qt.labs.platform 1.0
import QtQuick.Layouts 1.12
import app.screenplay.create 1.0
import ScreenPlay.Create 1.0
import "../../../Common"

View File

@ -5,7 +5,7 @@ import QtQuick.Controls.Material 2.3
import Qt.labs.platform 1.0
import QtQuick.Layouts 1.3
import app.screenplay.create 1.0
import ScreenPlay.Create 1.0
Item {
id: createNew

View File

@ -1,117 +0,0 @@
import QtQuick 2.12
import QtQuick.Extras 1.4
import PackageFileHandler 1.0
DropArea {
id:dropper
state:"invisible"
onEntered: {
dropper.state = "visible"
}
onExited: {
dropper.state = "invisible"
}
Connections {
target: packageFileHandler
onCurrentLoaderStatusChanged:{
}
}
onDropped: {
var a= packageFileHandler.loadPackageFromLocalZip(drop.urls,".")
if(a === -1) {
dropper.state = "badFile"
timer.start()
} else if(a === 0){
dropper.state = "invisible"
}
}
Timer {
id:timer
interval: 1000
onTriggered: {
dropper.state = "invisible"
timer.stop()
}
}
Rectangle {
id:fill
anchors.fill: parent
opacity: .8
Picture {
id: picture
x: 332
y: 208
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
source: "qrc://assets/icons/icon_settings.svg"
}
}
Text {
id: text1
text: qsTr("Bad File!!")
font.pointSize: 24
opacity: 1
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
states: [
State {
name: "visible"
},
State {
name: "invisible"
PropertyChanges {
target: fill
opacity: 0
}
PropertyChanges {
target: text1
opacity: 0
}
},
State {
name: "badFile"
}
]
transitions: [
Transition {
from: "*"
to: "invisible"
NumberAnimation {
target: fill
property: "opacity"
duration: 200
easing.type: Easing.OutQuart
}
},
Transition {
from: "invisible"
to: "visible"
NumberAnimation {
target: fill
property: "opacity"
duration: 200
easing.type: Easing.OutQuart
}
}
]
}

View File

@ -1,225 +0,0 @@
import QtQuick 2.12
import QtQuick.Dialogs 1.2
Rectangle {
id: fileDropperSingleFile
property color background: "white"
property string descriptionTitle: "value"
property url imagePath: "qrc:/assets/icons/icon_plus.svg"
//FIXME in 5.10 with an enum
property bool isVideo: false
property url externalFilePath
property string helpText: "help"
color: fileDropperSingleFile.background
border.color: "#C2C2C2"
border.width: 2
radius: 4
state: ""
function reset(){
fileDropperSingleFile.state = "empty"
previewImage.source = ""
videoPreviewLoader.source = ""
}
onStateChanged: {
if (fileDropperSingleFile.state === "error") {
stateChangedTimer.start()
}
}
Timer {
id: stateChangedTimer
onTriggered: {
fileDropperSingleFile.state = "empty"
}
}
Image {
id: previewImage
anchors.fill: parent
anchors.margins: 2
z: 98
fillMode: Image.PreserveAspectCrop
visible: false
}
Item {
id: column
height: imageIcon.height + txtSplashInput.contentHeight
anchors {
right: parent.right
left: parent.left
verticalCenter: parent.verticalCenter
}
Image {
id: imageIcon
width: 32
height: 32
sourceSize.height: 32
sourceSize.width: 32
source: fileDropperSingleFile.imagePath
anchors {
top: parent.top
horizontalCenter: parent.horizontalCenter
}
}
Text {
id: txtSplashInput
text: descriptionTitle
anchors {
top: imageIcon.bottom
topMargin: 10
horizontalCenter: parent.horizontalCenter
}
height: 40
font.pointSize: 12
color: "#626262"
horizontalAlignment: Text.AlignHCenter
font.family: "Libre Baskerville"
font.italic: true
}
}
Text {
id: helpTextWrapper
color: "#626262"
anchors.fill: parent
anchors.margins: 20
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.family: "Libre Baskerville"
font.italic: true
wrapMode: Text.WordWrap
font.pointSize: 12
opacity: 0
text: helpText
}
DropArea {
id: dropper
anchors.fill: parent
focus: true
onEntered: {
fileDropperSingleFile.state = "fileEntered"
}
onDropped: {
fileDropperSingleFile.state = "fileDropped"
if (drop.hasUrls) {
if (isVideo) {
if (validateVideoFileExtension(drop.urls[0])) {
externalFilePath = drop.urls[0]
videoPreviewLoader.setSource(
"CreateVideoPreviewSmall.qml", {
source: externalFilePath
})
}
} else {
if (validateImageFileExtension(drop.urls[0])) {
externalFilePath = drop.urls[0]
previewImage.source = drop.urls[0]
previewImage.visible = true
}
}
}
}
onExited: {
fileDropperSingleFile.state = "empty"
}
function validateImageFileExtension(filePath) {
var tmp = filePath.split('.').pop()
return tmp === "png" || tmp === "jpg"
}
function validateVideoFileExtension(filePath) {
var tmp = filePath.split('.').pop()
return tmp === "vp9" || tmp === "mp4"
}
MouseArea {
anchors.fill: parent
focus: true
z: 99
hoverEnabled: true
onHoveredChanged: {
if (containsMouse && videoPreviewLoader.source.toString() === "") {
fileDropperSingleFile.state = "hover"
} else {
fileDropperSingleFile.state = ""
}
}
}
}
Loader {
id: videoPreviewLoader
asynchronous: true
anchors.fill: parent
anchors.margins: 2
z: 300
}
states: [
State {
name: "fileEntered"
PropertyChanges {
target: fileDropperSingleFile
color: "#d9d9d9"
}
},
State {
name: "fileDropped"
PropertyChanges {
target: fileDropperSingleFile
color: "#ffbf49"
}
},
State {
name: "empty"
PropertyChanges {
target: fileDropperSingleFile
color: "white"
}
},
State {
name: "error"
PropertyChanges {
target: fileDropperSingleFile
color: "#ff4d4d"
}
},
State {
name: "hover"
PropertyChanges {
target: column
opacity: 0
}
PropertyChanges {
target: helpTextWrapper
opacity: 1
}
}
]
transitions: [
Transition {
from: "*"
to: "*"
ColorAnimation {
duration: 200
}
NumberAnimation {
property: "opacity"
duration: 200
}
}
]
}

View File

@ -4,7 +4,7 @@ import QtQuick.Controls 2.3
import QtQuick.Extras 1.4
import QtQuick.Controls.Material 2.2
import "../"
import "../Monitors"
Item {
id: sidebar

View File

@ -4,7 +4,7 @@ import QtGraphicalEffects 1.0
import QtQuick.Controls.Material 2.2
import QtQuick.Layouts 1.3
import "Controls/" as SP
import "../Common/" as SP
Item {
id: monitors

View File

@ -3,7 +3,7 @@ import QtQuick.Controls 2.3
import QtGraphicalEffects 1.0
import "Workshop"
import "../Workshop"
Rectangle {
id: navigation
@ -14,7 +14,7 @@ Rectangle {
signal changePage(string name)
property var navArray: [navCreate, navWorkshop, navInstalled, navSettings, navCommunity, navScreen]
property var navArray: [navCreate, navWorkshop, navInstalled, navSettings, navCommunity]
property bool navActive: true
Connections {
@ -86,13 +86,6 @@ Rectangle {
onPageClicked: navigation.onPageChanged(name)
}
NavigationItem {
id: navScreen
state: "inactive"
name: "Screen"
iconSource: "qrc:/assets/icons/icon_screen.svg"
onPageClicked: navigation.onPageChanged(name)
}
NavigationItem {
id: navCommunity

View File

@ -1,59 +0,0 @@
import QtQuick 2.12
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0
import QtQuick.Window 2.0
Window {
id: mainWindow
visible: true
width: 640
height: 480
//color: "transparent"
flags: Qt.SplashScreen | Qt.ToolTip | Qt.WindowStaysOnBottomHint
Rectangle {
id: rectangle
anchors.fill: parent;
color: "#b31f2934"
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
Text {
id: text1
color: "#ffffff"
text: "empty"
font.pointSize: 29
}
}
MouseArea {
property variant clickPos: "1,1"
anchors.fill: parent;
onPressed: {
clickPos = Qt.point(mouse.x,mouse.y)
}
onPositionChanged: {
var delta = Qt.point(mouse.x-clickPos.x, mouse.y-clickPos.y)
var new_x = mainWindow.x + delta.x
var new_y = mainWindow.y + delta.y
if (new_y <= 0)
mainWindow.visibility = Window.Maximized
else
{
if (mainWindow.visibility === Window.Maximized)
mainWindow.visibility = Window.Windowed
mainWindow.x = new_x
mainWindow.y = new_y
}
}
}
}

View File

@ -2,7 +2,7 @@ import QtQuick 2.12
import QtQuick.Controls 2.3
import QtQuick.Controls.Material 2.2
import QtGraphicalEffects 1.0
import app.screenplay.workshop 1.0
import ScreenPlay.Workshop 1.0
Item {
id: workshop

View File

@ -1,5 +1,5 @@
import QtQuick 2.12
import app.screenplay.workshop 1.0
import ScreenPlay.Workshop 1.0
Item {

View File

@ -16,8 +16,8 @@ Create::Create(const shared_ptr<Settings>& settings, QObject* parent)
{
qRegisterMetaType<CreateImportVideo::State>();
qmlRegisterType<Create>("app.screenplay.create", 1, 0, "Create");
qmlRegisterType<CreateImportVideo>("app.screenplay.create", 1, 0, "CreateImportVideo");
qmlRegisterType<Create>("ScreenPlay.Create", 1, 0, "Create");
qmlRegisterType<CreateImportVideo>("ScreenPlay.Create", 1, 0, "CreateImportVideo");
}
// Constructor for the QMLEngine
@ -26,8 +26,8 @@ Create::Create()
, m_settings(nullptr)
{
qRegisterMetaType<CreateImportVideo::State>();
qmlRegisterType<Create>("app.screenplay.create", 1, 0, "Create");
qmlRegisterType<CreateImportVideo>("app.screenplay.create", 1, 0, "CreateImportVideo");
qmlRegisterType<Create>("ScreenPlay.Create", 1, 0, "Create");
qmlRegisterType<CreateImportVideo>("ScreenPlay.Create", 1, 0, "CreateImportVideo");
}
void Create::createWallpaperStart(QString videoPath)

View File

@ -134,7 +134,6 @@ Settings::Settings(const shared_ptr<InstalledListModel>& ilm,
setupWidgetAndWindowPaths();
}
void Settings::loadActiveProfiles()
{
QJsonDocument configJsonDocument;
@ -237,7 +236,6 @@ void Settings::setupWidgetAndWindowPaths()
QDir SPBaseDir(QDir::currentPath());
#ifdef QT_DEBUG
qDebug() << "Starting in Debug mode!";
if (SPWorkingDir.cdUp()) {
#ifdef Q_OS_OSX

View File

@ -5,7 +5,7 @@ TARGET = $$qtLibraryTarget($$TARGET)
QT += qml quick
CONFIG += plugin c++11
uri = app.screenplay.screenplaysdk
uri = ScreenPlay.screenplaysdk
# Input
SOURCES += \

View File

@ -1,2 +1,2 @@
module app.screenplay.screenplaysdk
module ScreenPlay.screenplaysdk
plugin ScreenPlaySDK

View File

@ -5,7 +5,7 @@
void ScreenPlay_SDKPlugin::registerTypes(const char *uri)
{
// @uri app.screenplay.screenplaysdk
// @uri ScreenPlay.screenplaysdk
qmlRegisterType<ScreenPlaySDK>(uri, 1, 0, "ScreenPlaySDK");
}

View File

@ -4,7 +4,7 @@ QT += qml quick
CONFIG += plugin c++11
TARGET = $$qtLibraryTarget($$TARGET)
uri = app.screenplay.sysinfo
uri = ScreenPlay.Sysinfo
# Input
SOURCES += \

View File

@ -1,2 +1,2 @@
module app.screenplay.sysinfo
module ScreenPlay.Sysinfo
plugin ScreenPlaySysInfo

View File

@ -13,7 +13,7 @@ QObject* ScreenPlaySysInfoSingleton(QQmlEngine* engine, QJSEngine* scriptEngine)
void ScreenPlaySysInfoPlugin::registerTypes(const char* uri)
{
// @uri app.screenplay.sysinfo
// @uri ScreenPlay.Sysinfo
qmlRegisterSingletonType<SysInfo>(uri, 1, 0, "SysInfo", ScreenPlaySysInfoSingleton);
}

View File

@ -1,7 +1,7 @@
import QtQuick 2.12
import QtQuick.Controls 2.3
import app.screenplay.screenplaysdk 1.0
import ScreenPlay.screenplaysdk 1.0
Item {
id: mainWindow

View File

@ -1,6 +1,6 @@
import QtQuick 2.12
import QtWebEngine 1.8
import app.screenplay.wallpaper 1.0
import ScreenPlay.Wallpaper 1.0
Rectangle {
id: root

View File

@ -11,7 +11,7 @@ BaseWindow::BaseWindow(QString projectFilePath, QObject* parent)
{
QApplication::instance()->installEventFilter(this);
qRegisterMetaType<BaseWindow::WallpaperType>();
qmlRegisterType<BaseWindow>("app.screenplay.wallpaper", 1, 0, "Wallpaper");
qmlRegisterType<BaseWindow>("ScreenPlay.Wallpaper", 1, 0, "Wallpaper");
if (projectFilePath == "test") {
setType(BaseWindow::WallpaperType::Qml);