Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
amwtech authored Jan 7, 2024
1 parent 67a5c58 commit e128c87
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/Widgets/Rundown/RundownTreeWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ RundownTreeWidget::RundownTreeWidget(QWidget* parent)
clearDelayedCommandsOnAutoStep(false), activeRundown(Rundown::DEFAULT_NAME), currentAutoPlayWidget(NULL), copyItem(NULL), currentPlayingItem(NULL), currentPlayingAutoStepItem(NULL),
upControlSubscription(NULL), downControlSubscription(NULL), playAndAutoStepControlSubscription(NULL), playNowAndAutoStepControlSubscription(NULL),
playNowIfChannelControlSubscription(NULL), stopControlSubscription(NULL), playControlSubscription(NULL), playNowControlSubscription(NULL),
loadControlSubscription(NULL), pauseControlSubscription(NULL), nextControlSubscription(NULL), updateControlSubscription(NULL), invokeControlSubscription(NULL),
loadControlSubscription(NULL), pauseControlSubscription(NULL), nextControlSubscription(NULL), updateControlSubscription(NULL), invokeControlSubscription(NULL), previewControlSubscription(NULL),
clearControlSubscription(NULL), clearVideolayerControlSubscription(NULL), clearChannelControlSubscription(NULL), repositoryDevice(NULL)
{
setupUi(this);
Expand Down Expand Up @@ -1597,6 +1597,9 @@ void RundownTreeWidget::resetOscSubscriptions()
if (this->updateControlSubscription != NULL)
this->updateControlSubscription->disconnect(); // Disconnect all events.

if (this->previewControlSubscription != NULL)
this->previewControlSubscription->disconnect(); // Disconnect all events.

if (this->clearControlSubscription != NULL)
this->clearControlSubscription->disconnect(); // Disconnect all events.

Expand Down Expand Up @@ -1678,6 +1681,11 @@ void RundownTreeWidget::configureOscSubscriptions()
QObject::connect(this->invokeControlSubscription, SIGNAL(subscriptionReceived(const QString&, const QList<QVariant>&)),
this, SLOT(invokeControlSubscriptionReceived(const QString&, const QList<QVariant>&)));

QString previewControlFilter = Osc::DEFAULT_PREVIEW_RUNDOWN_CONTROL_FILTER;
this->previewControlSubscription = new OscSubscription(previewControlFilter, this);
QObject::connect(this->previewControlSubscription, SIGNAL(subscriptionReceived(const QString&, const QList<QVariant>&)),
this, SLOT(previewControlSubscriptionReceived(const QString&, const QList<QVariant>&)));

QString clearControlFilter = Osc::RUNDOWN_CONTROL_CLEAR_FILTER;
this->clearControlSubscription = new OscSubscription(clearControlFilter, this);
QObject::connect(this->clearControlSubscription, SIGNAL(subscriptionReceived(const QString&, const QList<QVariant>&)),
Expand Down Expand Up @@ -1925,6 +1933,20 @@ void RundownTreeWidget::invokeControlSubscriptionReceived(const QString& predica
EventManager::getInstance().fireExecuteRundownItemEvent(ExecuteRundownItemEvent(Playout::PlayoutType::Invoke, this->treeWidgetRundown->currentItem()));
}

void RundownTreeWidget::previewControlSubscriptionReceived(const QString& predicate, const QList<QVariant>& arguments)
{
Q_UNUSED(predicate);

if (!this->active)
return;

if (this->treeWidgetRundown->currentItem() == NULL)
return;

if (this->allowRemoteRundownTriggering && arguments.count() > 0 && arguments[0].toInt() > 0 && !this->previewOnAutoStep)
EventManager::getInstance().fireExecuteRundownItemEvent(ExecuteRundownItemEvent(Playout::PlayoutType::Preview, this->treeWidgetRundown->currentItem()));
}

void RundownTreeWidget::clearControlSubscriptionReceived(const QString& predicate, const QList<QVariant>& arguments)
{
Q_UNUSED(predicate);
Expand Down
2 changes: 2 additions & 0 deletions src/Widgets/Rundown/RundownTreeWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class WIDGETS_EXPORT RundownTreeWidget : public QWidget, Ui::RundownTreeWidget
OscSubscription* nextControlSubscription;
OscSubscription* updateControlSubscription;
OscSubscription* invokeControlSubscription;
OscSubscription* previewControlSubscription;
OscSubscription* clearControlSubscription;
OscSubscription* clearVideolayerControlSubscription;
OscSubscription* clearChannelControlSubscription;
Expand Down Expand Up @@ -204,6 +205,7 @@ class WIDGETS_EXPORT RundownTreeWidget : public QWidget, Ui::RundownTreeWidget
Q_SLOT void nextControlSubscriptionReceived(const QString&, const QList<QVariant>&);
Q_SLOT void updateControlSubscriptionReceived(const QString&, const QList<QVariant>&);
Q_SLOT void invokeControlSubscriptionReceived(const QString&, const QList<QVariant>&);
Q_SLOT void previewControlSubscriptionReceived(const QString&, const QList<QVariant>&)
Q_SLOT void clearControlSubscriptionReceived(const QString&, const QList<QVariant>&);
Q_SLOT void clearVideolayerControlSubscriptionReceived(const QString&, const QList<QVariant>&);
Q_SLOT void clearChannelControlSubscriptionReceived(const QString&, const QList<QVariant>&);
Expand Down

0 comments on commit e128c87

Please sign in to comment.