finished merge of viewer and footage
This commit is contained in:
@@ -24,7 +24,8 @@ namespace olive {
|
||||
|
||||
TimeBasedPanel::TimeBasedPanel(const QString &object_name, QWidget *parent) :
|
||||
PanelWidget(object_name, parent),
|
||||
widget_(nullptr)
|
||||
widget_(nullptr),
|
||||
show_and_raise_on_connect_(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -122,6 +123,11 @@ void TimeBasedPanel::ConnectViewerNode(ViewerOutput *node)
|
||||
|
||||
if (node) {
|
||||
connect(node, &ViewerOutput::LabelChanged, this, &TimeBasedPanel::SetSubtitle);
|
||||
|
||||
if (show_and_raise_on_connect_) {
|
||||
this->show();
|
||||
this->raise();
|
||||
}
|
||||
}
|
||||
|
||||
// Update strings
|
||||
|
||||
@@ -34,7 +34,10 @@ public:
|
||||
|
||||
void ConnectViewerNode(ViewerOutput *node);
|
||||
|
||||
void DisconnectViewerNode();
|
||||
void DisconnectViewerNode()
|
||||
{
|
||||
ConnectViewerNode(nullptr);
|
||||
}
|
||||
|
||||
rational GetTime();
|
||||
|
||||
@@ -122,9 +125,16 @@ protected:
|
||||
|
||||
virtual void Retranslate() override;
|
||||
|
||||
void SetShowAndRaiseOnConnect()
|
||||
{
|
||||
show_and_raise_on_connect_ = true;
|
||||
}
|
||||
|
||||
private:
|
||||
TimeBasedWidget* widget_;
|
||||
|
||||
bool show_and_raise_on_connect_;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user