trackviewitem: receive signal when mute is changed from another source
This commit is contained in:
@@ -44,6 +44,7 @@ TrackOutput::TrackOutput() :
|
||||
|
||||
muted_input_ = new NodeInput("muted_in", NodeParam::kBoolean);
|
||||
muted_input_->set_is_keyframable(false);
|
||||
connect(muted_input_, &NodeInput::ValueChanged, this, &TrackOutput::MutedInputValueChanged);
|
||||
AddInput(muted_input_);
|
||||
|
||||
// Set default height
|
||||
@@ -574,4 +575,9 @@ void TrackOutput::BlockLengthChanged()
|
||||
UpdateInOutFrom(index);
|
||||
}
|
||||
|
||||
void TrackOutput::MutedInputValueChanged()
|
||||
{
|
||||
emit MutedChanged(IsMuted());
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
@@ -178,6 +178,11 @@ signals:
|
||||
*/
|
||||
void TrackHeightChanged(int height);
|
||||
|
||||
/**
|
||||
* @brief Signal emitted when the muted setting changes
|
||||
*/
|
||||
void MutedChanged(bool e);
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
@@ -214,6 +219,8 @@ private slots:
|
||||
|
||||
void BlockLengthChanged();
|
||||
|
||||
void MutedInputValueChanged();
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
@@ -60,6 +60,8 @@ TrackViewItem::TrackViewItem(TrackOutput* track, QWidget *parent) :
|
||||
layout->addWidget(lock_button_);
|
||||
|
||||
setMinimumHeight(mute_button_->height());
|
||||
|
||||
connect(track, &TrackOutput::MutedChanged, mute_button_, &QPushButton::setChecked);
|
||||
}
|
||||
|
||||
QPushButton *TrackViewItem::CreateMSLButton(const QString& text, const QColor& checked_color) const
|
||||
|
||||
Reference in New Issue
Block a user