Skip to content

Commit e128c87

Browse files
authored
Add files via upload
1 parent 67a5c58 commit e128c87

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

src/Widgets/Rundown/RundownTreeWidget.cpp

+23-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ RundownTreeWidget::RundownTreeWidget(QWidget* parent)
6565
clearDelayedCommandsOnAutoStep(false), activeRundown(Rundown::DEFAULT_NAME), currentAutoPlayWidget(NULL), copyItem(NULL), currentPlayingItem(NULL), currentPlayingAutoStepItem(NULL),
6666
upControlSubscription(NULL), downControlSubscription(NULL), playAndAutoStepControlSubscription(NULL), playNowAndAutoStepControlSubscription(NULL),
6767
playNowIfChannelControlSubscription(NULL), stopControlSubscription(NULL), playControlSubscription(NULL), playNowControlSubscription(NULL),
68-
loadControlSubscription(NULL), pauseControlSubscription(NULL), nextControlSubscription(NULL), updateControlSubscription(NULL), invokeControlSubscription(NULL),
68+
loadControlSubscription(NULL), pauseControlSubscription(NULL), nextControlSubscription(NULL), updateControlSubscription(NULL), invokeControlSubscription(NULL), previewControlSubscription(NULL),
6969
clearControlSubscription(NULL), clearVideolayerControlSubscription(NULL), clearChannelControlSubscription(NULL), repositoryDevice(NULL)
7070
{
7171
setupUi(this);
@@ -1597,6 +1597,9 @@ void RundownTreeWidget::resetOscSubscriptions()
15971597
if (this->updateControlSubscription != NULL)
15981598
this->updateControlSubscription->disconnect(); // Disconnect all events.
15991599

1600+
if (this->previewControlSubscription != NULL)
1601+
this->previewControlSubscription->disconnect(); // Disconnect all events.
1602+
16001603
if (this->clearControlSubscription != NULL)
16011604
this->clearControlSubscription->disconnect(); // Disconnect all events.
16021605

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

1684+
QString previewControlFilter = Osc::DEFAULT_PREVIEW_RUNDOWN_CONTROL_FILTER;
1685+
this->previewControlSubscription = new OscSubscription(previewControlFilter, this);
1686+
QObject::connect(this->previewControlSubscription, SIGNAL(subscriptionReceived(const QString&, const QList<QVariant>&)),
1687+
this, SLOT(previewControlSubscriptionReceived(const QString&, const QList<QVariant>&)));
1688+
16811689
QString clearControlFilter = Osc::RUNDOWN_CONTROL_CLEAR_FILTER;
16821690
this->clearControlSubscription = new OscSubscription(clearControlFilter, this);
16831691
QObject::connect(this->clearControlSubscription, SIGNAL(subscriptionReceived(const QString&, const QList<QVariant>&)),
@@ -1925,6 +1933,20 @@ void RundownTreeWidget::invokeControlSubscriptionReceived(const QString& predica
19251933
EventManager::getInstance().fireExecuteRundownItemEvent(ExecuteRundownItemEvent(Playout::PlayoutType::Invoke, this->treeWidgetRundown->currentItem()));
19261934
}
19271935

1936+
void RundownTreeWidget::previewControlSubscriptionReceived(const QString& predicate, const QList<QVariant>& arguments)
1937+
{
1938+
Q_UNUSED(predicate);
1939+
1940+
if (!this->active)
1941+
return;
1942+
1943+
if (this->treeWidgetRundown->currentItem() == NULL)
1944+
return;
1945+
1946+
if (this->allowRemoteRundownTriggering && arguments.count() > 0 && arguments[0].toInt() > 0 && !this->previewOnAutoStep)
1947+
EventManager::getInstance().fireExecuteRundownItemEvent(ExecuteRundownItemEvent(Playout::PlayoutType::Preview, this->treeWidgetRundown->currentItem()));
1948+
}
1949+
19281950
void RundownTreeWidget::clearControlSubscriptionReceived(const QString& predicate, const QList<QVariant>& arguments)
19291951
{
19301952
Q_UNUSED(predicate);

src/Widgets/Rundown/RundownTreeWidget.h

+2
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ class WIDGETS_EXPORT RundownTreeWidget : public QWidget, Ui::RundownTreeWidget
110110
OscSubscription* nextControlSubscription;
111111
OscSubscription* updateControlSubscription;
112112
OscSubscription* invokeControlSubscription;
113+
OscSubscription* previewControlSubscription;
113114
OscSubscription* clearControlSubscription;
114115
OscSubscription* clearVideolayerControlSubscription;
115116
OscSubscription* clearChannelControlSubscription;
@@ -204,6 +205,7 @@ class WIDGETS_EXPORT RundownTreeWidget : public QWidget, Ui::RundownTreeWidget
204205
Q_SLOT void nextControlSubscriptionReceived(const QString&, const QList<QVariant>&);
205206
Q_SLOT void updateControlSubscriptionReceived(const QString&, const QList<QVariant>&);
206207
Q_SLOT void invokeControlSubscriptionReceived(const QString&, const QList<QVariant>&);
208+
Q_SLOT void previewControlSubscriptionReceived(const QString&, const QList<QVariant>&)
207209
Q_SLOT void clearControlSubscriptionReceived(const QString&, const QList<QVariant>&);
208210
Q_SLOT void clearVideolayerControlSubscriptionReceived(const QString&, const QList<QVariant>&);
209211
Q_SLOT void clearChannelControlSubscriptionReceived(const QString&, const QList<QVariant>&);

0 commit comments

Comments
 (0)