From 63b3c6001777ca074221bc184d6f2fd1b68a151c Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Thu, 16 Jan 2020 15:01:13 +1100 Subject: [PATCH] allow editing sequence properties in projectexplorer --- app/widget/projectexplorer/projectexplorer.cpp | 13 ++++++++++++- app/widget/projectexplorer/projectexplorer.h | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/widget/projectexplorer/projectexplorer.cpp b/app/widget/projectexplorer/projectexplorer.cpp index d639eb2de..6f65633aa 100644 --- a/app/widget/projectexplorer/projectexplorer.cpp +++ b/app/widget/projectexplorer/projectexplorer.cpp @@ -27,6 +27,7 @@ #include "common/define.h" #include "core.h" #include "dialog/footageproperties/footageproperties.h" +#include "dialog/sequence/sequence.h" ProjectExplorer::ProjectExplorer(QWidget *parent) : QWidget(parent), @@ -243,8 +244,11 @@ void ProjectExplorer::ShowContextMenu() } else { QAction* properties_action = menu.addAction(tr("P&roperties")); + // FIXME: Support for multiple items if (selected_items.first()->type() == Item::kFootage) { connect(properties_action, &QAction::triggered, this, &ProjectExplorer::ShowFootagePropertiesDialog); + } else if (selected_items.first()->type() == Item::kSequence) { + connect(properties_action, &QAction::triggered, this, &ProjectExplorer::ShowSequencePropertiesDialog); } } @@ -253,11 +257,18 @@ void ProjectExplorer::ShowContextMenu() void ProjectExplorer::ShowFootagePropertiesDialog() { - // FIXME: Support for multiple items and items other than Footage + // FIXME: Support for multiple items FootagePropertiesDialog fpd(this, static_cast(SelectedItems().first())); fpd.exec(); } +void ProjectExplorer::ShowSequencePropertiesDialog() +{ + // FIXME: Support for multiple items + SequenceDialog sd(static_cast(SelectedItems().first()), SequenceDialog::kExisting, this); + sd.exec(); +} + Project *ProjectExplorer::project() { return model_.project(); diff --git a/app/widget/projectexplorer/projectexplorer.h b/app/widget/projectexplorer/projectexplorer.h index de08d374e..6bf346605 100644 --- a/app/widget/projectexplorer/projectexplorer.h +++ b/app/widget/projectexplorer/projectexplorer.h @@ -148,6 +148,9 @@ private slots: void ShowContextMenu(); void ShowFootagePropertiesDialog(); + + void ShowSequencePropertiesDialog(); + }; #endif // PROJECTEXPLORER_H