RundownGroupWidget::RundownGroupWidget(const LibraryModel& model, QWidget* parent, const QString& color, bool active, bool autoStep, bool compactView) : QWidget(parent), active(active), autoStep(autoStep), compactView(compactView), color(color), model(model) { setupUi(this); this->animation = new ActiveAnimation(this->labelActiveColor); setColor(color); setActive(active); setCompactView(compactView); this->labelAutoStep->setVisible(this->autoStep); this->labelGroupColor->setStyleSheet(QString("background-color: %1;").arg(Color::DEFAULT_GROUP_COLOR)); this->labelColor->setStyleSheet(QString("background-color: %1;").arg(Color::DEFAULT_GROUP_COLOR)); this->labelLabel->setText(this->model.getLabel()); QObject::connect(&this->command, SIGNAL(notesChanged(const QString&)), this, SLOT(notesChanged(const QString&))); QObject::connect(&this->command, SIGNAL(allowGpiChanged(bool)), this, SLOT(allowGpiChanged(bool))); QObject::connect(&this->command, SIGNAL(autoStepChanged(bool)), this, SLOT(autoStepChanged(bool))); QObject::connect(GpiManager::getInstance().getGpiDevice().data(), SIGNAL(connectionStateChanged(bool, GpiDevice*)), this, SLOT(gpiDeviceConnected(bool, GpiDevice*))); checkGpiTriggerable(); qApp->installEventFilter(this); }
RundownSonyPresetWidget::RundownSonyPresetWidget(const LibraryModel& model, QWidget* parent, const QString& color, bool active, bool inGroup, bool compactView) : QWidget(parent), active(active), inGroup(inGroup), compactView(compactView), color(color), model(model), stopControlSubscription(NULL), playControlSubscription(NULL), playNowControlSubscription(NULL), updateControlSubscription(NULL), clearControlSubscription(NULL), clearVideolayerControlSubscription(NULL), clearChannelControlSubscription(NULL) { setupUi(this); this->device = new ViscaDevice(this); this->animation = new ActiveAnimation(this->labelActiveColor); this->markUsedItems = (DatabaseManager::getInstance().getConfigurationByName("MarkUsedItems").getValue() == "true") ? true : false; setColor(color); setActive(active); setCompactView(compactView); this->labelDisconnected->setVisible(false); this->labelGroupColor->setVisible(this->inGroup); this->labelGroupColor->setStyleSheet(QString("background-color: %1;").arg(Color::DEFAULT_GROUP_COLOR)); this->labelColor->setStyleSheet(QString("background-color: %1;").arg(Color::DEFAULT_PANASONIC_COLOR)); this->labelLabel->setText(this->model.getLabel()); this->labelDelay->setText(QString("Delay: %1").arg(this->command.getDelay())); this->executeTimer.setSingleShot(true); QObject::connect(&this->executeTimer, SIGNAL(timeout()), SLOT(executePlay())); QObject::connect(&this->command, SIGNAL(delayChanged(int)), this, SLOT(delayChanged(int))); QObject::connect(&this->command, SIGNAL(allowGpiChanged(bool)), this, SLOT(allowGpiChanged(bool))); QObject::connect(&this->command, SIGNAL(remoteTriggerIdChanged(const QString&)), this, SLOT(remoteTriggerIdChanged(const QString&))); QObject::connect(&EventManager::getInstance(), SIGNAL(labelChanged(const LabelChangedEvent&)), this, SLOT(labelChanged(const LabelChangedEvent&))); QObject::connect(GpiManager::getInstance().getGpiDevice().data(), SIGNAL(connectionStateChanged(bool, GpiDevice*)), this, SLOT(gpiConnectionStateChanged(bool, GpiDevice*))); checkGpiConnection(); }
RundownSaturationWidget::RundownSaturationWidget(const LibraryModel& model, QWidget* parent, const QString& color, bool active, bool inGroup, bool disconnected, bool compactview) : QWidget(parent), active(active), inGroup(inGroup), disconnected(disconnected), compactView(compactView), color(color), model(model) { setupUi(this); this->animation = new ActiveAnimation(this->labelActiveColor); setColor(color); setActive(active); setCompactView(compactView); this->labelDisconnected->setVisible(this->disconnected); this->labelGroupColor->setVisible(this->inGroup); this->labelGroupColor->setStyleSheet(QString("background-color: %1;").arg(Color::DEFAULT_GROUP_COLOR)); this->labelColor->setStyleSheet(QString("background-color: %1;").arg(Color::DEFAULT_MIXER_COLOR)); this->labelLabel->setText(this->model.getLabel()); this->labelChannel->setText(QString("Channel: %1").arg(this->command.getChannel())); this->labelVideolayer->setText(QString("Video layer: %1").arg(this->command.getVideolayer())); this->labelDelay->setText(QString("Delay: %1").arg(this->command.getDelay())); this->labelDevice->setText(QString("Device: %1").arg(this->model.getDeviceName())); this->executeTimer.setSingleShot(true); QObject::connect(&this->executeTimer, SIGNAL(timeout()), SLOT(executePlay())); QObject::connect(&this->command, SIGNAL(channelChanged(int)), this, SLOT(channelChanged(int))); QObject::connect(&this->command, SIGNAL(videolayerChanged(int)), this, SLOT(videolayerChanged(int))); QObject::connect(&this->command, SIGNAL(delayChanged(int)), this, SLOT(delayChanged(int))); QObject::connect(&this->command, SIGNAL(allowGpiChanged(bool)), this, SLOT(allowGpiChanged(bool))); QObject::connect(GpiManager::getInstance().getGpiDevice().data(), SIGNAL(connectionStateChanged(bool, GpiDevice*)), this, SLOT(gpiDeviceConnected(bool, GpiDevice*))); checkEmptyDevice(); checkGpiTriggerable(); qApp->installEventFilter(this); }
RundownGpiOutputWidget::RundownGpiOutputWidget(const LibraryModel& model, QWidget* parent, const QString& color, bool active, bool inGroup, bool compactView) : QWidget(parent), active(active), inGroup(inGroup), compactView(compactView), color(color), model(model), stopControlSubscription(NULL), playControlSubscription(NULL), updateControlSubscription(NULL), clearControlSubscription(NULL), clearVideolayerControlSubscription(NULL), clearChannelControlSubscription(NULL) { setupUi(this); this->animation = new ActiveAnimation(this->labelActiveColor); setColor(this->color); setActive(this->active); setCompactView(this->compactView); this->labelDisconnected->setVisible(!GpiManager::getInstance().getGpiDevice()->isConnected()); this->labelGroupColor->setVisible(this->inGroup); this->labelGroupColor->setStyleSheet(QString("background-color: %1;").arg(Color::DEFAULT_GROUP_COLOR)); this->labelColor->setStyleSheet(QString("background-color: %1;").arg(Color::DEFAULT_GPI_COLOR)); this->labelLabel->setText(this->model.getLabel()); this->labelDelay->setText(QString("Delay: %1").arg(this->command.getDelay())); this->executeTimer.setSingleShot(true); QObject::connect(&this->executeTimer, SIGNAL(timeout()), SLOT(executePlay())); QObject::connect(&this->command, SIGNAL(delayChanged(int)), this, SLOT(delayChanged(int))); QObject::connect(&this->command, SIGNAL(gpoPortChanged(int)), this, SLOT(gpiOutputPortChanged(int))); QObject::connect(&this->command, SIGNAL(allowGpiChanged(bool)), this, SLOT(allowGpiChanged(bool))); QObject::connect(&this->command, SIGNAL(remoteTriggerIdChanged(const QString&)), this, SLOT(remoteTriggerIdChanged(const QString&))); QObject::connect(&EventManager::getInstance(), SIGNAL(labelChanged(const LabelChangedEvent&)), this, SLOT(labelChanged(const LabelChangedEvent&))); gpiOutputPortChanged(this->command.getGpoPort()); QObject::connect(GpiManager::getInstance().getGpiDevice().data(), SIGNAL(connectionStateChanged(bool, GpiDevice*)), this, SLOT(gpiConnectionStateChanged(bool, GpiDevice*))); checkGpiConnection(); configureOscSubscriptions(); }
RundownGroupWidget::RundownGroupWidget(const LibraryModel& model, QWidget* parent, const QString& color, bool active, bool compactView) : QWidget(parent), active(active), compactView(compactView), color(color), model(model), stopControlSubscription(NULL), playControlSubscription(NULL), loadControlSubscription(NULL), pauseControlSubscription(NULL), nextControlSubscription(NULL), updateControlSubscription(NULL), invokeControlSubscription(NULL), clearControlSubscription(NULL), clearVideolayerControlSubscription(NULL), clearChannelControlSubscription(NULL) { setupUi(this); this->animation = new ActiveAnimation(this->labelActiveColor); this->markUsedItems = (DatabaseManager::getInstance().getConfigurationByName("MarkUsedItems").getValue() == "true") ? true : false; this->useDropFrameNotation = (DatabaseManager::getInstance().getConfigurationByName("UseDropFrameNotation").getValue() == "true") ? true : false; setColor(this->color); setActive(this->active); setCompactView(this->compactView); this->labelAutoStep->setVisible(false); this->labelAutoPlay->setVisible(false); this->labelGroupColor->setStyleSheet(QString("background-color: %1;").arg(Color::DEFAULT_GROUP_COLOR)); this->labelColor->setStyleSheet(QString("background-color: %1;").arg(Color::DEFAULT_GROUP_COLOR)); this->labelLabel->setText(this->model.getLabel()); QObject::connect(&this->command, SIGNAL(durationChanged(int)), this, SLOT(durationChanged(int))); QObject::connect(&this->command, SIGNAL(notesChanged(const QString&)), this, SLOT(notesChanged(const QString&))); QObject::connect(&this->command, SIGNAL(allowGpiChanged(bool)), this, SLOT(allowGpiChanged(bool))); QObject::connect(&this->command, SIGNAL(autoStepChanged(bool)), this, SLOT(autoStepChanged(bool))); QObject::connect(&this->command, SIGNAL(autoPlayChanged(bool)), this, SLOT(autoPlayChanged(bool))); QObject::connect(&this->command, SIGNAL(remoteTriggerIdChanged(const QString&)), this, SLOT(remoteTriggerIdChanged(const QString&))); QObject::connect(&EventManager::getInstance(), SIGNAL(labelChanged(const LabelChangedEvent&)), this, SLOT(labelChanged(const LabelChangedEvent&))); QObject::connect(GpiManager::getInstance().getGpiDevice().data(), SIGNAL(connectionStateChanged(bool, GpiDevice*)), this, SLOT(gpiConnectionStateChanged(bool, GpiDevice*))); checkGpiConnection(); }