本文整理汇总了C++中RundownItemSelectedEvent::getLibraryModel方法的典型用法代码示例。如果您正苦于以下问题:C++ RundownItemSelectedEvent::getLibraryModel方法的具体用法?C++ RundownItemSelectedEvent::getLibraryModel怎么用?C++ RundownItemSelectedEvent::getLibraryModel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RundownItemSelectedEvent
的用法示例。
在下文中一共展示了RundownItemSelectedEvent::getLibraryModel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rundownItemSelected
void InspectorFillWidget::rundownItemSelected(const RundownItemSelectedEvent& event)
{
this->command = nullptr;
this->model = event.getLibraryModel();
blockAllSignals(true);
if (dynamic_cast<FillCommand*>(event.getCommand()))
{
this->command = dynamic_cast<FillCommand*>(event.getCommand());
const DeviceModel model = DatabaseManager::getInstance().getDeviceByName(this->model->getDeviceName());
if (!model.getName().isEmpty())
{
const QStringList& channelFormats = DatabaseManager::getInstance().getDeviceByName(model.getName()).getChannelFormats().split(",");
const FormatModel& formatModel = DatabaseManager::getInstance().getFormat(channelFormats.at(this->command->getChannel() - 1));
this->resolutionWidth = formatModel.getWidth();
this->resolutionHeight = formatModel.getHeight();
setScaleAndPositionValues();
}
this->spinBoxTransitionDuration->setValue(this->command->getTransitionDuration());
this->comboBoxTween->setCurrentIndex(this->comboBoxTween->findText(this->command->getTween()));
this->checkBoxTriggerOnNext->setChecked(this->command->getTriggerOnNext());
this->checkBoxDefer->setChecked(this->command->getDefer());
this->checkBoxUseMipmap->setChecked(this->command->getUseMipmap());
}
blockAllSignals(false);
}
示例2: eventFilter
bool PreviewWidget::eventFilter(QObject* target, QEvent* event)
{
if (event->type() == static_cast<QEvent::Type>(Enum::EventType::LibraryItemSelected) ||
event->type() == static_cast<QEvent::Type>(Enum::EventType::RundownItemSelected))
{
int thumbnailId = 0;
if (dynamic_cast<LibraryItemSelectedEvent*>(event))
{
LibraryItemSelectedEvent* libraryItemSelectedEvent = dynamic_cast<LibraryItemSelectedEvent*>(event);
thumbnailId = libraryItemSelectedEvent->getLibraryModel()->getThumbnailId();
}
else if (dynamic_cast<RundownItemSelectedEvent*>(event))
{
RundownItemSelectedEvent* rundownItemSelected = dynamic_cast<RundownItemSelectedEvent*>(event);
thumbnailId = rundownItemSelected->getLibraryModel()->getThumbnailId();
}
if (thumbnailId > 0)
{
QString data = DatabaseManager::getInstance().getThumbnailById(thumbnailId).getData();
this->image.loadFromData(QByteArray::fromBase64(data.toAscii()), "PNG");
if (this->previewAlpha)
this->labelPreview->setPixmap(QPixmap::fromImage(this->image.alphaChannel()));
else
this->labelPreview->setPixmap(QPixmap::fromImage(this->image));
}
else
{
this->labelPreview->setPixmap(NULL);
}
}
return QObject::eventFilter(target, event);
}
示例3: eventFilter
bool InspectorAudioWidget::eventFilter(QObject* target, QEvent* event)
{
if (event->type() == static_cast<QEvent::Type>(Enum::EventType::RundownItemSelected))
{
RundownItemSelectedEvent* rundownItemSelectedEvent = dynamic_cast<RundownItemSelectedEvent*>(event);
this->model = rundownItemSelectedEvent->getLibraryModel();
blockAllSignals(true);
if (dynamic_cast<AudioCommand*>(rundownItemSelectedEvent->getCommand()))
{
this->command = dynamic_cast<AudioCommand*>(rundownItemSelectedEvent->getCommand());
this->comboBoxTransition->setCurrentIndex(this->comboBoxTransition->findText(this->command->getTransition()));
this->spinBoxDuration->setValue(this->command->getDuration());
this->comboBoxTween->setCurrentIndex(this->comboBoxTween->findText(this->command->getTween()));
this->comboBoxDirection->setCurrentIndex(this->comboBoxDirection->findText(this->command->getDirection()));
this->checkBoxLoop->setChecked(this->command->getLoop());
this->checkBoxTriggerOnNext->setChecked(this->command->getTriggerOnNext());
this->checkBoxUseAuto->setChecked(this->command->getUseAuto());
}
blockAllSignals(false);
}
return QObject::eventFilter(target, event);
}
示例4: rundownItemSelected
void InspectorCustomCommandWidget::rundownItemSelected(const RundownItemSelectedEvent& event)
{
this->command = nullptr;
this->model = event.getLibraryModel();
blockAllSignals(true);
if (dynamic_cast<CustomCommand*>(event.getCommand()))
{
this->command = dynamic_cast<CustomCommand*>(event.getCommand());
this->lineEditStop->setText(this->command->getStopCommand());
this->lineEditPlay->setText(this->command->getPlayCommand());
this->lineEditLoad->setText(this->command->getLoadCommand());
this->lineEditPause->setText(this->command->getPauseCommand());
this->lineEditNext->setText(this->command->getNextCommand());
this->lineEditUpdate->setText(this->command->getUpdateCommand());
this->lineEditInvoke->setText(this->command->getInvokeCommand());
this->lineEditPreview->setText(this->command->getPreviewCommand());
this->lineEditClear->setText(this->command->getClearCommand());
this->lineEditClearVideolayer->setText(this->command->getClearVideolayerCommand());
this->lineEditClearChannel->setText(this->command->getClearChannelCommand());
this->checkBoxTriggerOnNext->setChecked(this->command->getTriggerOnNext());
}
blockAllSignals(false);
}
示例5: eventFilter
bool InspectorSaturationWidget::eventFilter(QObject* target, QEvent* event)
{
if (event->type() == static_cast<QEvent::Type>(Enum::EventType::RundownItemSelected))
{
RundownItemSelectedEvent* rundownItemSelectedEvent = dynamic_cast<RundownItemSelectedEvent*>(event);
if (dynamic_cast<SaturationCommand*>(rundownItemSelectedEvent->getCommand()))
{
this->preview = false;
this->model = rundownItemSelectedEvent->getLibraryModel();
this->command = dynamic_cast<SaturationCommand*>(rundownItemSelectedEvent->getCommand());
// This will also set the slider value.
// TODO: Why QString -> float, see InspectorVolumeWidget.cpp
this->spinBoxSaturation->setValue(QString("%1").arg(this->command->getSaturation() * 100).toFloat());
this->spinBoxDuration->setValue(this->command->getDuration());
this->comboBoxTween->setCurrentIndex(this->comboBoxTween->findText(this->command->getTween()));
this->checkBoxDefer->setChecked(this->command->getDefer());
this->preview = true;
}
}
return QObject::eventFilter(target, event);
}
示例6: eventFilter
bool InspectorVolumeWidget::eventFilter(QObject* target, QEvent* event)
{
if (event->type() == static_cast<QEvent::Type>(Enum::EventType::RundownItemSelected))
{
RundownItemSelectedEvent* rundownItemSelectedEvent = dynamic_cast<RundownItemSelectedEvent*>(event);
if (dynamic_cast<VolumeCommand*>(rundownItemSelectedEvent->getCommand()))
{
this->preview = false;
this->model = rundownItemSelectedEvent->getLibraryModel();
this->command = dynamic_cast<VolumeCommand*>(rundownItemSelectedEvent->getCommand());
// If getVolume() = 0.56999993 then
// f1 = 56 and
// i = 57.
// Why???
float f1 = this->command->getVolume() * 100;
int i = f1;
// This will also set the slider value.
this->spinBoxVolume->setValue(QString("%1").arg(this->command->getVolume() * 100).toFloat());
this->spinBoxDuration->setValue(this->command->getDuration());
this->comboBoxTween->setCurrentIndex(this->comboBoxTween->findText(this->command->getTween()));
this->checkBoxDefer->setChecked(this->command->getDefer());
this->preview = true;
}
}
return QObject::eventFilter(target, event);
}
示例7: rundownItemSelected
void InspectorKeyerWidget::rundownItemSelected(const RundownItemSelectedEvent& event)
{
this->command = nullptr;
this->model = event.getLibraryModel();
blockAllSignals(true);
if (dynamic_cast<KeyerCommand*>(event.getCommand()))
{
this->command = dynamic_cast<KeyerCommand*>(event.getCommand());
this->checkBoxDefer->setChecked(this->command->getDefer());
}
blockAllSignals(false);
}
示例8: rundownItemSelected
void InspectorClearOutputWidget::rundownItemSelected(const RundownItemSelectedEvent& event)
{
this->model = event.getLibraryModel();
blockAllSignals(true);
if (dynamic_cast<ClearOutputCommand*>(event.getCommand()))
{
this->command = dynamic_cast<ClearOutputCommand*>(event.getCommand());
this->checkBoxClearChannel->setChecked(this->command->getClearChannel());
this->checkBoxTriggerOnNext->setChecked(this->command->getTriggerOnNext());
}
blockAllSignals(false);
}
示例9: rundownItemSelected
void InspectorPlayoutCommandWidget::rundownItemSelected(const RundownItemSelectedEvent& event)
{
this->command = nullptr;
this->model = event.getLibraryModel();
blockAllSignals(true);
if (dynamic_cast<PlayoutCommand*>(event.getCommand()))
{
this->command = dynamic_cast<PlayoutCommand*>(event.getCommand());
this->comboBoxPlayoutCommand->setCurrentIndex(this->comboBoxPlayoutCommand->findText(this->command->getPlayoutCommand()));
}
blockAllSignals(false);
}
示例10: eventFilter
bool InspectorMetadataWidget::eventFilter(QObject* target, QEvent* event)
{
if (event->type() == static_cast<QEvent::Type>(Event::EventType::LibraryItemSelected))
{
LibraryItemSelectedEvent* libraryItemSelectedEvent = dynamic_cast<LibraryItemSelectedEvent*>(event);
this->model = libraryItemSelectedEvent->getLibraryModel();
blockAllSignals(true);
this->lineEditLabel->setEnabled(false);
this->lineEditType->setText(this->model->getType());
this->lineEditLabel->clear();
blockAllSignals(false);
}
else if (event->type() == static_cast<QEvent::Type>(Event::EventType::RundownItemSelected))
{
RundownItemSelectedEvent* rundownItemSelectedEvent = dynamic_cast<RundownItemSelectedEvent*>(event);
this->model = rundownItemSelectedEvent->getLibraryModel();
blockAllSignals(true);
this->lineEditLabel->setEnabled(true);
this->lineEditLabel->setReadOnly(false);
this->lineEditType->setText(this->model->getType());
this->lineEditLabel->setText(this->model->getLabel());
blockAllSignals(false);
}
else if (event->type() == static_cast<QEvent::Type>(Event::EventType::EmptyRundown))
{
blockAllSignals(true);
this->lineEditLabel->setEnabled(false);
this->lineEditType->clear();
this->lineEditLabel->clear();
blockAllSignals(false);
}
return QObject::eventFilter(target, event);
}
示例11: rundownItemSelected
void InspectorAtemKeyerStateWidget::rundownItemSelected(const RundownItemSelectedEvent& event)
{
this->model = event.getLibraryModel();
blockAllSignals(true);
if (dynamic_cast<AtemKeyerStateCommand*>(event.getCommand()))
{
this->command = dynamic_cast<AtemKeyerStateCommand*>(event.getCommand());
this->comboBoxKeyer->setCurrentIndex(this->comboBoxKeyer->findData(this->command->getKeyer()));
this->checkBoxState->setChecked(this->command->getState());
this->checkBoxTriggerOnNext->setChecked(this->command->getTriggerOnNext());
}
blockAllSignals(false);
}
示例12: rundownItemSelected
void InspectorAtemAudioGainWidget::rundownItemSelected(const RundownItemSelectedEvent& event)
{
this->model = event.getLibraryModel();
blockAllSignals(true);
if (dynamic_cast<AtemAudioGainCommand*>(event.getCommand()))
{
this->command = dynamic_cast<AtemAudioGainCommand*>(event.getCommand());
this->comboBoxSource->setCurrentIndex(this->comboBoxSource->findData(this->command->getSource()));
this->sliderGain->setValue(this->command->getGain() * 100);
this->doubleSpinBoxGain->setValue(this->command->getGain());
this->checkBoxTriggerOnNext->setChecked(this->command->getTriggerOnNext());
}
blockAllSignals(false);
}
示例13: rundownItemSelected
void InspectorPresetWidget::rundownItemSelected(const RundownItemSelectedEvent& event)
{
this->command = nullptr;
this->model = event.getLibraryModel();
blockAllSignals(true);
if (dynamic_cast<PresetCommand*>(event.getCommand()))
{
this->command = dynamic_cast<PresetCommand*>(event.getCommand());
this->comboBoxSource->setCurrentIndex(this->comboBoxSource->findData(this->command->getSource()));
this->comboBoxPreset->setCurrentIndex(this->comboBoxPreset->findData(this->command->getPreset()));
this->checkBoxTriggerOnNext->setChecked(this->command->getTriggerOnNext());
}
blockAllSignals(false);
}
示例14: eventFilter
bool InspectorClearOutputWidget::eventFilter(QObject* target, QEvent* event)
{
if (event->type() == static_cast<QEvent::Type>(Enum::EventType::RundownItemSelected))
{
RundownItemSelectedEvent* rundownItemSelectedEvent = dynamic_cast<RundownItemSelectedEvent*>(event);
if (dynamic_cast<ClearOutputCommand*>(rundownItemSelectedEvent->getCommand()))
{
this->preview = false;
this->model = rundownItemSelectedEvent->getLibraryModel();
this->command = dynamic_cast<ClearOutputCommand*>(rundownItemSelectedEvent->getCommand());
this->checkBoxClearChannel->setChecked(this->command->getClearChannel());
this->preview = true;
}
}
return QObject::eventFilter(target, event);
}
示例15: rundownItemSelected
void InspectorDeckLinkInputWidget::rundownItemSelected(const RundownItemSelectedEvent& event)
{
this->model = event.getLibraryModel();
blockAllSignals(true);
if (dynamic_cast<DeckLinkInputCommand*>(event.getCommand()))
{
this->command = dynamic_cast<DeckLinkInputCommand*>(event.getCommand());
this->spinBoxDevice->setValue(this->command->getDevice());
this->comboBoxFormat->setCurrentIndex(this->comboBoxFormat->findText(this->command->getFormat()));
this->comboBoxTransition->setCurrentIndex(this->comboBoxTransition->findText(this->command->getTransition()));
this->spinBoxTransitionDuration->setValue(this->command->getTransitionDuration());
this->comboBoxTween->setCurrentIndex(this->comboBoxTween->findText(this->command->getTween()));
this->comboBoxDirection->setCurrentIndex(this->comboBoxDirection->findText(this->command->getDirection()));
}
blockAllSignals(false);
}