当前位置: 首页>>代码示例>>C++>>正文


C++ RundownItemSelectedEvent类代码示例

本文整理汇总了C++中RundownItemSelectedEvent的典型用法代码示例。如果您正苦于以下问题:C++ RundownItemSelectedEvent类的具体用法?C++ RundownItemSelectedEvent怎么用?C++ RundownItemSelectedEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了RundownItemSelectedEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: 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);
}
开发者ID:CasparCG,项目名称:Client,代码行数:27,代码来源:InspectorCustomCommandWidget.cpp

示例2: 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);
}
开发者ID:CasparCG,项目名称:Client,代码行数:32,代码来源:InspectorFillWidget.cpp

示例3: 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);
}
开发者ID:Mistobaan,项目名称:CasparCG,代码行数:32,代码来源:InspectorVolumeWidget.cpp

示例4: if

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);
}
开发者ID:Ivaho,项目名称:Client,代码行数:35,代码来源:PreviewWidget.cpp

示例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);
}
开发者ID:Mistobaan,项目名称:CasparCG,代码行数:26,代码来源:InspectorSaturationWidget.cpp

示例6: 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);
}
开发者ID:Ivaho,项目名称:Client,代码行数:27,代码来源:InspectorAudioWidget.cpp

示例7: 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);
}
开发者ID:AsgeirSH,项目名称:Client,代码行数:16,代码来源:InspectorClearOutputWidget.cpp

示例8: 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);
}
开发者ID:CasparCG,项目名称:Client,代码行数:16,代码来源:InspectorPlayoutCommandWidget.cpp

示例9: 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);
}
开发者ID:CasparCG,项目名称:Client,代码行数:16,代码来源:InspectorKeyerWidget.cpp

示例10: 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);
}
开发者ID:seccpur,项目名称:Client,代码行数:17,代码来源:InspectorAtemKeyerStateWidget.cpp

示例11: blockAllSignals

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);
}
开发者ID:piotrszmidt,项目名称:Client,代码行数:46,代码来源:InspectorMetadataWidget.cpp

示例12: 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);
}
开发者ID:CasparCG,项目名称:Client,代码行数:18,代码来源:InspectorPresetWidget.cpp

示例13: 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);
}
开发者ID:seccpur,项目名称:Client,代码行数:18,代码来源:InspectorAtemAudioGainWidget.cpp

示例14: rundownItemSelected

void InspectorPanasonicPresetWidget::rundownItemSelected(const RundownItemSelectedEvent& event)
{
    this->command = nullptr;

    blockAllSignals(true);

    if (dynamic_cast<PanasonicPresetCommand*>(event.getCommand()))
    {
        this->command = dynamic_cast<PanasonicPresetCommand*>(event.getCommand());

        this->lineEditAddress->setText(this->command->getAddress());
        this->spinBoxPreset->setValue(this->command->getPreset());
        this->checkBoxTriggerOnNext->setChecked(this->command->getTriggerOnNext());
    }

    checkEmptyAddress();

    blockAllSignals(false);
}
开发者ID:CasparCG,项目名称:Client,代码行数:19,代码来源:InspectorPanasonicPresetWidget.cpp

示例15: rundownItemSelected

void InspectorBrightnessWidget::rundownItemSelected(const RundownItemSelectedEvent& event)
{
    this->command = nullptr;
    this->model = event.getLibraryModel();

    blockAllSignals(true);

    if (dynamic_cast<BrightnessCommand*>(event.getCommand()))
    {
        this->command = dynamic_cast<BrightnessCommand*>(event.getCommand());

        this->sliderBrightness->setValue(QString("%1").arg(this->command->getBrightness() * 100).toFloat());
        this->spinBoxBrightness->setValue(QString("%1").arg(this->command->getBrightness() * 100).toFloat());
        this->spinBoxTransitionDuration->setValue(this->command->getTransitionDuration());
        this->comboBoxTween->setCurrentIndex(this->comboBoxTween->findText(this->command->getTween()));
        this->checkBoxDefer->setChecked(this->command->getDefer());
    }

    blockAllSignals(false);
}
开发者ID:CasparCG,项目名称:Client,代码行数:20,代码来源:InspectorBrightnessWidget.cpp


注:本文中的RundownItemSelectedEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。