allow editing sequence properties in projectexplorer

This commit is contained in:
itsmattkc
2020-01-16 15:01:13 +11:00
parent c6710b1359
commit 63b3c60017
2 changed files with 15 additions and 1 deletions
+12 -1
View File
@@ -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<Footage*>(SelectedItems().first()));
fpd.exec();
}
void ProjectExplorer::ShowSequencePropertiesDialog()
{
// FIXME: Support for multiple items
SequenceDialog sd(static_cast<Sequence*>(SelectedItems().first()), SequenceDialog::kExisting, this);
sd.exec();
}
Project *ProjectExplorer::project()
{
return model_.project();
@@ -148,6 +148,9 @@ private slots:
void ShowContextMenu();
void ShowFootagePropertiesDialog();
void ShowSequencePropertiesDialog();
};
#endif // PROJECTEXPLORER_H