Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.28 FATAL_ERROR)
cmake_policy(VERSION 3.28)

set(XSTUDIO_GLOBAL_VERSION "1.1.0" CACHE STRING "Version string")
set(XSTUDIO_GLOBAL_VERSION "1.1.1" CACHE STRING "Version string")
set(XSTUDIO_GLOBAL_NAME xStudio)

# set(CMAKE_OSX_DEPLOYMENT_TARGET "14.5" CACHE STRING "Minimum OS X deployment version" FORCE)
Expand Down
13 changes: 13 additions & 0 deletions src/launch/xstudio/src/xstudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ CAF_PUSH_WARNINGS
#include <QGuiApplication>
#include <QIcon>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QSurfaceFormat>
#include <QPalette>
#include <QString>
Expand Down Expand Up @@ -195,6 +196,7 @@ void execute_xstudio_ui(
const bool disble_vsync,
const float ui_scale_factor,
const bool silence_qt_warnings,
const bool review_mode,
int argc,
char **argv) {

Expand Down Expand Up @@ -238,6 +240,8 @@ void execute_xstudio_ui(
ui::qml::setup_xstudio_qml_emgine(
static_cast<QQmlEngine *>(&engine), CafActorSystem::system());

engine.rootContext()->setContextProperty("reviewModeEnabled", review_mode);

const QUrl url(QStringLiteral("qrc:/main.qml"));

QObject::connect(
Expand Down Expand Up @@ -557,6 +561,12 @@ struct CLIArguments {
"Open a quick-view for each supplied media item",
{'l', "quick-view"}};

args::Flag review_mode = {
parser,
"review",
"Launch in review mode (viewport only, no playlists or timeline)",
{'v', "review"}};

args::Flag silence_qt_warnings = {
parser,
"silence-qt-warnings",
Expand Down Expand Up @@ -655,6 +665,7 @@ struct Launcher {
actions["debug"] = cli_args.debug.Matched();
actions["user_prefs_off"] = cli_args.user_prefs_off.Matched();
actions["quick_view"] = cli_args.quick_view.Matched();
actions["review_mode"] = cli_args.review_mode.Matched();
actions["disable_vsync"] = cli_args.disable_vsync.Matched();
actions["compare"] = static_cast<std::string>(args::get(cli_args.compare));
actions["silence_qt_warnings"] = cli_args.silence_qt_warnings.Matched();
Expand Down Expand Up @@ -895,6 +906,7 @@ struct Launcher {
"headless": false,
"new_instance": false,
"quick_view": false,
"review_mode": false,
"session_name": "",
"open_session": false,
"debug": false,
Expand Down Expand Up @@ -1080,6 +1092,7 @@ int main(int argc, char **argv) {
l.actions["disable_vsync"],
l.prefs.get("/ui/qml/global_ui_scale_factor").value("value", 1.0f),
l.actions["silence_qt_warnings"],
l.actions["review_mode"],
argc,
argv);

Expand Down
34 changes: 33 additions & 1 deletion ui/qml/xstudio/views/viewport/XsViewportPanel.qml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import QtQuick
import QtQuick.Layouts
import QuickFuture 1.0

import xStudio 1.0
import xstudio.qml.viewport 1.0
import xstudio.qml.models 1.0
import xstudio.qml.helpers 1.0
import xstudio.qml.session 1.0

import "./widgets"

Expand Down Expand Up @@ -147,6 +149,36 @@ Rectangle{

}

XsDragDropHandler {

id: viewportDragDropHandler
targetWidget: viewportWidget
dragSourceName: "Viewport"

onDropped: (mousePosition, source, data) => {

if (source !== "External URIS" && source !== "External JSON")
return

var dropData = (source === "External URIS")
? {"text/uri-list": data}
: data

// Use the current playlist if one exists, otherwise create one
var idx = theSessionData.currentMediaContainerIndex
if (!idx || !idx.valid) {
idx = theSessionData.createPlaylist(theSessionData.getNextName("Playlist {}"))
}

Future.promise(
theSessionData.handleDropFuture(
Qt.CopyAction,
dropData,
idx)
).then(function(quuids){})
}
}

XsLabel {
text: "Media Not Found"
color: XsStyleSheet.hintColor
Expand Down Expand Up @@ -182,7 +214,7 @@ Rectangle{
placement: "top"
}

XsViewport {
XsViewport {
id: viewport
Layout.fillWidth: true
Layout.fillHeight: true
Expand Down
5 changes: 5 additions & 0 deletions ui/qml/xstudio/windows/XsSessionWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ ApplicationWindow {
appWindow.height = ui_layouts_model.get(ui_layouts_model.root_index, "height")
numLayouts = ui_layouts_model.rowCount(root_index)
visible = true

// --review / -v flag: force Present layout on startup
if (typeof reviewModeEnabled !== "undefined" && reviewModeEnabled) {
setLayoutName("Present")
}
}
property var numLayouts: 0

Expand Down