@@ -65,7 +65,7 @@ RundownTreeWidget::RundownTreeWidget(QWidget* parent)
65
65
clearDelayedCommandsOnAutoStep(false ), activeRundown(Rundown::DEFAULT_NAME), currentAutoPlayWidget(NULL ), copyItem(NULL ), currentPlayingItem(NULL ), currentPlayingAutoStepItem(NULL ),
66
66
upControlSubscription(NULL ), downControlSubscription(NULL ), playAndAutoStepControlSubscription(NULL ), playNowAndAutoStepControlSubscription(NULL ),
67
67
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 ),
69
69
clearControlSubscription(NULL ), clearVideolayerControlSubscription(NULL ), clearChannelControlSubscription(NULL ), repositoryDevice(NULL )
70
70
{
71
71
setupUi (this );
@@ -1597,6 +1597,9 @@ void RundownTreeWidget::resetOscSubscriptions()
1597
1597
if (this ->updateControlSubscription != NULL )
1598
1598
this ->updateControlSubscription ->disconnect (); // Disconnect all events.
1599
1599
1600
+ if (this ->previewControlSubscription != NULL )
1601
+ this ->previewControlSubscription ->disconnect (); // Disconnect all events.
1602
+
1600
1603
if (this ->clearControlSubscription != NULL )
1601
1604
this ->clearControlSubscription ->disconnect (); // Disconnect all events.
1602
1605
@@ -1678,6 +1681,11 @@ void RundownTreeWidget::configureOscSubscriptions()
1678
1681
QObject::connect (this ->invokeControlSubscription , SIGNAL (subscriptionReceived (const QString&, const QList<QVariant>&)),
1679
1682
this , SLOT (invokeControlSubscriptionReceived (const QString&, const QList<QVariant>&)));
1680
1683
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
+
1681
1689
QString clearControlFilter = Osc::RUNDOWN_CONTROL_CLEAR_FILTER;
1682
1690
this ->clearControlSubscription = new OscSubscription (clearControlFilter, this );
1683
1691
QObject::connect (this ->clearControlSubscription , SIGNAL (subscriptionReceived (const QString&, const QList<QVariant>&)),
@@ -1925,6 +1933,20 @@ void RundownTreeWidget::invokeControlSubscriptionReceived(const QString& predica
1925
1933
EventManager::getInstance ().fireExecuteRundownItemEvent (ExecuteRundownItemEvent (Playout::PlayoutType::Invoke, this ->treeWidgetRundown ->currentItem ()));
1926
1934
}
1927
1935
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
+
1928
1950
void RundownTreeWidget::clearControlSubscriptionReceived (const QString& predicate, const QList<QVariant>& arguments)
1929
1951
{
1930
1952
Q_UNUSED (predicate);
0 commit comments