Esempio n. 1
0
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);
}
Esempio n. 2
0
void DeviceDialog::setDeviceModel(const DeviceModel& model)
{
    this->editMode = true;

    setWindowTitle("Edit CasparCG Server");

    this->lineEditDeviceName->setText(model.getName());
    this->lineEditAddress->setText(model.getAddress());
    this->lineEditPort->setText(QString("%1").arg(model.getPort()));
    this->lineEditUsername->setText(model.getUsername());
    this->lineEditPassword->setText(model.getPassword());
    this->lineEditDescription->setText(model.getDescription());
    this->checkBoxShadow->setChecked((model.getShadow() == "Yes") ? true : false);
}
Esempio n. 3
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;
}