From 8d7b94658b9b767c186a8f13410338a95250c377 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Tue, 25 Feb 2020 14:58:15 +1100 Subject: [PATCH] footagepropertiesdialog: show colorspace and alpha association properties on image streams --- app/dialog/footageproperties/footageproperties.cpp | 3 ++- .../streamproperties/videostreamproperties.cpp | 4 ++-- .../streamproperties/videostreamproperties.h | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/dialog/footageproperties/footageproperties.cpp b/app/dialog/footageproperties/footageproperties.cpp index 9f9c00573..8d03875eb 100644 --- a/app/dialog/footageproperties/footageproperties.cpp +++ b/app/dialog/footageproperties/footageproperties.cpp @@ -72,7 +72,8 @@ FootagePropertiesDialog::FootagePropertiesDialog(QWidget *parent, Footage *foota switch (stream->type()) { case Stream::kVideo: - stacked_widget_->addWidget(new VideoStreamProperties(std::static_pointer_cast(stream))); + case Stream::kImage: + stacked_widget_->addWidget(new VideoStreamProperties(std::static_pointer_cast(stream))); break; case Stream::kAudio: stacked_widget_->addWidget(new AudioStreamProperties(std::static_pointer_cast(stream))); diff --git a/app/dialog/footageproperties/streamproperties/videostreamproperties.cpp b/app/dialog/footageproperties/streamproperties/videostreamproperties.cpp index 22158a518..3ec6d6d39 100644 --- a/app/dialog/footageproperties/streamproperties/videostreamproperties.cpp +++ b/app/dialog/footageproperties/streamproperties/videostreamproperties.cpp @@ -29,7 +29,7 @@ namespace OCIO = OCIO_NAMESPACE::v1; #include "project/project.h" #include "undo/undostack.h" -VideoStreamProperties::VideoStreamProperties(VideoStreamPtr stream) : +VideoStreamProperties::VideoStreamProperties(ImageStreamPtr stream) : stream_(stream) { QGridLayout* video_layout = new QGridLayout(this); @@ -67,7 +67,7 @@ void VideoStreamProperties::Accept(QUndoCommand *parent) } } -VideoStreamProperties::VideoStreamChangeCommand::VideoStreamChangeCommand(VideoStreamPtr stream, +VideoStreamProperties::VideoStreamChangeCommand::VideoStreamChangeCommand(ImageStreamPtr stream, bool premultiplied, QString colorspace, QUndoCommand *parent) : diff --git a/app/dialog/footageproperties/streamproperties/videostreamproperties.h b/app/dialog/footageproperties/streamproperties/videostreamproperties.h index 4536f907b..080e83f5b 100644 --- a/app/dialog/footageproperties/streamproperties/videostreamproperties.h +++ b/app/dialog/footageproperties/streamproperties/videostreamproperties.h @@ -31,7 +31,7 @@ class VideoStreamProperties : public StreamProperties { public: - VideoStreamProperties(VideoStreamPtr stream); + VideoStreamProperties(ImageStreamPtr stream); virtual void Accept(QUndoCommand* parent) override; @@ -39,7 +39,7 @@ private: /** * @brief Attached video stream */ - VideoStreamPtr stream_; + ImageStreamPtr stream_; /** * @brief Setting for associated/premultiplied alpha @@ -53,7 +53,7 @@ private: class VideoStreamChangeCommand : public QUndoCommand { public: - VideoStreamChangeCommand(VideoStreamPtr stream, + VideoStreamChangeCommand(ImageStreamPtr stream, bool premultiplied, QString colorspace, QUndoCommand* parent = nullptr); @@ -62,7 +62,7 @@ private: virtual void undo() override; private: - VideoStreamPtr stream_; + ImageStreamPtr stream_; bool new_premultiplied_; QString new_colorspace_;