void InspectorOutputWidget::deviceAdded(CasparDevice& device)
{
    DeviceModel model = DeviceManager::getInstance().getDeviceModelByAddress(device.getAddress());
    if (model.getShadow() == "Yes")
        return; // Don't add shadow systems.

    int index = this->comboBoxDevice->currentIndex();

    this->comboBoxDevice->addItem(model.getName());

    if (index == -1)
        this->comboBoxDevice->setCurrentIndex(index);
}
Beispiel #2
0
void DeviceFilterWidget::deviceAdded(CasparDevice& device)
{
    this->sendEvents = false;

    DeviceModel model = DeviceManager::getInstance().getDeviceModelByAddress(device.getAddress());
    if (model.getShadow() == "Yes")
        return; // Don't add shadow systems.

    this->comboBoxDeviceFilter->addItem(QString("%1").arg(model.getName()));

    dynamic_cast<QStandardItemModel*>(this->comboBoxDeviceFilter->model())->item(this->comboBoxDeviceFilter->count() - 1, 0)->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
    dynamic_cast<QStandardItemModel*>(this->comboBoxDeviceFilter->model())->item(this->comboBoxDeviceFilter->count() - 1, 0)->setData(Qt::Unchecked, Qt::CheckStateRole);

    this->sendEvents = true;
}
void InspectorMetadataWidget::deviceAdded(CasparDevice& device)
{
    int index = this->comboBoxDevice->currentIndex();

    this->comboBoxDevice->addItem(DeviceManager::getInstance().getDeviceModelByAddress(device.getAddress()).getName());

    if (index == -1)
        this->comboBoxDevice->setCurrentIndex(index);
}