本文整理汇总了C++中QComboBox::setProperty方法的典型用法代码示例。如果您正苦于以下问题:C++ QComboBox::setProperty方法的具体用法?C++ QComboBox::setProperty怎么用?C++ QComboBox::setProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QComboBox
的用法示例。
在下文中一共展示了QComboBox::setProperty方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void QgsRelationReferenceWidget::init()
{
if ( !mReadOnlySelector && mComboBox->count() == 0 && mReferencedLayer )
{
QApplication::setOverrideCursor( Qt::WaitCursor );
QSet<QString> requestedAttrs;
QgsVectorLayerCache* layerCache = new QgsVectorLayerCache( mReferencedLayer, 100000, this );
if ( !mFilterFields.isEmpty() )
{
Q_FOREACH ( const QString& fieldName, mFilterFields )
{
QVariantList uniqueValues;
int idx = mReferencedLayer->fields().lookupField( fieldName );
QComboBox* cb = new QComboBox();
cb->setProperty( "Field", fieldName );
cb->setProperty( "FieldAlias", mReferencedLayer->attributeDisplayName( idx ) );
mFilterComboBoxes << cb;
mReferencedLayer->uniqueValues( idx, uniqueValues );
cb->addItem( mReferencedLayer->attributeDisplayName( idx ) );
QVariant nullValue = QSettings().value( QStringLiteral( "qgis/nullValue" ), "NULL" );
cb->addItem( nullValue.toString(), QVariant( mReferencedLayer->fields().at( idx ).type() ) );
qSort( uniqueValues.begin(), uniqueValues.end(), qgsVariantLessThan );
Q_FOREACH ( const QVariant& v, uniqueValues )
{
cb->addItem( v.toString(), v );
}
示例2: AddEnum
void ParamWidget::AddEnum(const QString& name,
const EnumVector& items,
int initial_value,
DisplayHint display_hint) {
ExpectNameNotFound(name);
if (display_hint != DisplayHint::kComboBox) {
throw std::invalid_argument("Invalid display hint");
}
QComboBox* combobox = new QComboBox(this);
combobox->setProperty("param_widget_type", kParamEnum);
bool found_initial_value = false;
for (size_t i = 0; i < items.size(); ++i) {
const EnumItem& item = items[i];
combobox->addItem(item.first, item.second);
if (item.second == initial_value) {
found_initial_value = true;
combobox->setCurrentIndex(i);
}
}
if (!found_initial_value) {
throw std::invalid_argument("Invalid initial value");
}
widgets_[name] = combobox;
AddLabeledRow(name, combobox);
connect(combobox,
static_cast<void(QComboBox::*)(int)>(&QComboBox::activated),
[this, name](int val) {
emit ParamChanged(name);
});
}
示例3: init
void QgsRelationReferenceWidget::init()
{
if ( !mReadOnlySelector && mComboBox->count() == 0 && mReferencedLayer )
{
QApplication::setOverrideCursor( Qt::WaitCursor );
QSet<QString> requestedAttrs;
QgsVectorLayerCache* layerCache = new QgsVectorLayerCache( mReferencedLayer, 100000, this );
if ( mFilterFields.size() )
{
Q_FOREACH ( const QString& fieldName, mFilterFields )
{
QVariantList uniqueValues;
int idx = mReferencedLayer->fieldNameIndex( fieldName );
QComboBox* cb = new QComboBox();
cb->setProperty( "Field", fieldName );
mFilterComboBoxes << cb;
mReferencedLayer->uniqueValues( idx, uniqueValues );
cb->addItem( mReferencedLayer->attributeAlias( idx ).isEmpty() ? fieldName : mReferencedLayer->attributeAlias( idx ) );
QVariant nullValue = QSettings().value( "qgis/nullValue", "NULL" );
cb->addItem( nullValue.toString(), QVariant( mReferencedLayer->fields()[idx].type() ) );
Q_FOREACH ( const QVariant& v, uniqueValues )
{
cb->addItem( v.toString(), v );
}
示例4: foreach
foreach(sqlb::FieldPtr f, fields)
{
QTreeWidgetItem *tbitem = new QTreeWidgetItem(ui->treeWidget);
tbitem->setFlags(tbitem->flags() | Qt::ItemIsEditable);
tbitem->setText(kName, f->name());
QComboBox* typeBox = new QComboBox(ui->treeWidget);
typeBox->setProperty("column", f->name());
typeBox->setEditable(false);
typeBox->addItems(sqlb::Field::Datatypes);
int index = typeBox->findText(f->type(), Qt::MatchExactly);
if(index == -1)
{
// non standard named type
typeBox->addItem(f->type());
index = typeBox->count() - 1;
}
typeBox->setCurrentIndex(index);
connect(typeBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateTypes()));
ui->treeWidget->setItemWidget(tbitem, kType, typeBox);
tbitem->setCheckState(kNotNull, f->notnull() ? Qt::Checked : Qt::Unchecked);
tbitem->setCheckState(kPrimaryKey, f->primaryKey() ? Qt::Checked : Qt::Unchecked);
tbitem->setCheckState(kAutoIncrement, f->autoIncrement() ? Qt::Checked : Qt::Unchecked);
tbitem->setCheckState(kUnique, f->unique() ? Qt::Checked : Qt::Unchecked);
tbitem->setText(kDefault, f->defaultValue());
tbitem->setText(kCheck, f->check());
ui->treeWidget->addTopLevelItem(tbitem);
}
示例5: QComboBox
QWidget *ZoomAction::createWidget(QWidget *parent)
{
QComboBox *comboBox = new QComboBox(parent);
if (m_comboBoxModel.isNull()) {
m_comboBoxModel = comboBox->model();
comboBox->addItem("10 %", 0.1);
comboBox->addItem("25 %", 0.25);
comboBox->addItem("50 %", 0.5);
comboBox->addItem("100 %", 1.0);
comboBox->addItem("200 %", 2.0);
comboBox->addItem("400 %", 4.0);
comboBox->addItem("800 %", 8.0);
comboBox->addItem("1600 %", 16.0);
} else {
comboBox->setModel(m_comboBoxModel.data());
}
comboBox->setCurrentIndex(3);
connect(comboBox, SIGNAL(currentIndexChanged(int)), SLOT(emitZoomLevelChanged(int)));
connect(this, SIGNAL(indexChanged(int)), comboBox, SLOT(setCurrentIndex(int)));
comboBox->setProperty("hideborder", true);
return comboBox;
}
示例6: displayProperties
void VCMatrixPresetSelection::displayProperties(RGBScript *script)
{
if (script == NULL)
return;
int gridRowIdx = 0;
QList<RGBScriptProperty> properties = script->properties();
if (properties.count() > 0)
m_propertiesGroup->show();
else
m_propertiesGroup->hide();
foreach(RGBScriptProperty prop, properties)
{
switch(prop.m_type)
{
case RGBScriptProperty::List:
{
QLabel *propLabel = new QLabel(prop.m_displayName);
m_propertiesLayout->addWidget(propLabel, gridRowIdx, 0);
QComboBox *propCombo = new QComboBox(this);
propCombo->addItems(prop.m_listValues);
propCombo->setProperty("pName", prop.m_name);
QString pValue = script->property(prop.m_name);
if (!pValue.isEmpty())
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
propCombo->setCurrentText(pValue);
#else
propCombo->setCurrentIndex(propCombo->findText(pValue));
#endif
connect(propCombo, SIGNAL(currentIndexChanged(QString)),
this, SLOT(slotPropertyComboChanged(QString)));
m_propertiesLayout->addWidget(propCombo, gridRowIdx, 1);
gridRowIdx++;
}
break;
case RGBScriptProperty::Range:
{
QLabel *propLabel = new QLabel(prop.m_displayName);
m_propertiesLayout->addWidget(propLabel, gridRowIdx, 0);
QSpinBox *propSpin = new QSpinBox(this);
propSpin->setRange(prop.m_rangeMinValue, prop.m_rangeMaxValue);
propSpin->setProperty("pName", prop.m_name);
QString pValue = script->property(prop.m_name);
if (!pValue.isEmpty())
propSpin->setValue(pValue.toInt());
connect(propSpin, SIGNAL(valueChanged(int)),
this, SLOT(slotPropertySpinChanged(int)));
m_propertiesLayout->addWidget(propSpin, gridRowIdx, 1);
gridRowIdx++;
}
break;
default:
qWarning() << "Type" << prop.m_type << "not handled yet";
break;
}
}
}
示例7: createEditor
QWidget* ComboBoxDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const
{
// Create the combobox and populate it
QComboBox *cb = new QComboBox(parent);
cb->setProperty("combobox-delegate-index", QVariant::fromValue(index));
connect(cb, SIGNAL(currentIndexChanged(int)), SLOT(updateData()));
cb->insertItems(0, index.data(Qt::UserRole).toStringList());
return cb;
}
示例8: QComboBox
QWidget *BackgroundAction::createWidget(QWidget *parent)
{
QComboBox *comboBox = new QComboBox(parent);
comboBox->setFixedWidth(42);
for (int i = 0; i < colors().count(); ++i) {
comboBox->addItem(tr(""));
comboBox->setItemIcon(i, iconForColor((colors().at(i))));
}
comboBox->setCurrentIndex(0);
connect(comboBox, SIGNAL(currentIndexChanged(int)), SLOT(emitBackgroundChanged(int)));
comboBox->setProperty("hideborder", true);
return comboBox;
}
示例9: createEditorFor
QWidget* CameraParamsWidget::createEditorFor(const calibration::CameraParam& param)
{
if(!param.choices.empty())
{
QComboBox* box = new QComboBox(m_w);
for(uint i = 0; i < param.choices.size(); ++i)
{
box->addItem(
param.choices[i].label.c_str(),
param.choices[i].value
);
if(param.choices[i].value == param.value)
box->setCurrentIndex(i);
}
box->setProperty("paramID", param.id);
connect(box, SIGNAL(activated(int)), SLOT(updateComboBox()));
return box;
}
if(param.minimum == 0 && param.maximum == 1)
{
QCheckBox* box = new QCheckBox(m_w);
box->setChecked(param.value);
box->setProperty("paramID", param.id);
connect(box, SIGNAL(clicked(bool)), SLOT(updateCheckBox(bool)));
return box;
}
QSlider* slider = new QSlider(Qt::Horizontal, m_w);
slider->setMinimum(param.minimum);
slider->setMaximum(param.maximum);
slider->setValue(param.value);
slider->setProperty("paramID", param.id);
connect(slider, SIGNAL(valueChanged(int)), SLOT(updateSlider(int)));
return slider;
}
示例10: updateModeColumn
void EFXEditor::updateModeColumn(QTreeWidgetItem* item, EFXFixture* ef)
{
Q_ASSERT(item != NULL);
Q_ASSERT(ef != NULL);
if (m_tree->itemWidget(item, KColumnMode) == NULL)
{
QComboBox* combo = new QComboBox(m_tree);
combo->setAutoFillBackground(true);
combo->addItems(ef->modeList());
const int index = combo->findText(ef->modeToString(ef->mode ()) );
combo->setCurrentIndex(index);
//combo->setCurrentText (ef->modeToString (ef->mode ()));
m_tree->setItemWidget(item, KColumnMode, combo);
combo->setProperty(PROPERTY_FIXTURE, (qulonglong) ef);
connect(combo, SIGNAL(currentIndexChanged(int)),
this, SLOT(slotFixtureModeChanged(int)));
}
示例11: foreach
foreach(sqlb::FieldPtr f, fields)
{
QTreeWidgetItem *tbitem = new QTreeWidgetItem(ui->treeWidget);
tbitem->setFlags(tbitem->flags() | Qt::ItemIsEditable);
tbitem->setText(kName, f->name());
QComboBox* typeBox = new QComboBox(ui->treeWidget);
typeBox->setProperty("column", f->name());
typeBox->setEditable(true);
typeBox->addItems(sqlb::Field::Datatypes);
int index = typeBox->findText(f->type(), Qt::MatchExactly);
if(index == -1)
{
// non standard named type
typeBox->addItem(f->type());
index = typeBox->count() - 1;
}
typeBox->setCurrentIndex(index);
connect(typeBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateTypes()));
ui->treeWidget->setItemWidget(tbitem, kType, typeBox);
tbitem->setCheckState(kNotNull, f->notnull() ? Qt::Checked : Qt::Unchecked);
tbitem->setCheckState(kPrimaryKey, pk.contains(f) ? Qt::Checked : Qt::Unchecked);
tbitem->setCheckState(kAutoIncrement, f->autoIncrement() ? Qt::Checked : Qt::Unchecked);
tbitem->setCheckState(kUnique, f->unique() ? Qt::Checked : Qt::Unchecked);
// For the default value check if it is surrounded by parentheses and if that's the case
// add a '=' character before the entire string to match the input format we're expecting
// from the user when using functions in the default value field.
if(f->defaultValue().startsWith('(') && f->defaultValue().endsWith(')'))
tbitem->setText(kDefault, "=" + f->defaultValue());
else
tbitem->setText(kDefault, f->defaultValue());
tbitem->setText(kCheck, f->check());
QSharedPointer<sqlb::ForeignKeyClause> fk = m_table.constraint(f, sqlb::Constraint::ForeignKeyConstraintType).dynamicCast<sqlb::ForeignKeyClause>();
if(fk)
tbitem->setText(kForeignKey, fk->toString());
ui->treeWidget->addTopLevelItem(tbitem);
}
示例12: QComboBox
QWidget *ZoomAction::createWidget(QWidget *parent)
{
QComboBox *comboBox = new QComboBox(parent);
if (m_comboBoxModel.isNull()) {
m_comboBoxModel = comboBox->model();
comboBox->addItem(QLatin1String("6.25 %"), 0.0625);
comboBox->addItem(QLatin1String("12.5 %"), 0.125);
comboBox->addItem(QLatin1String("25 %"), 0.25);
comboBox->addItem(QLatin1String("33 %"), 0.33);
comboBox->addItem(QLatin1String("50 %"), 0.5);
comboBox->addItem(QLatin1String("66 %"), 0.66);
comboBox->addItem(QLatin1String("75 %"), 0.75);
comboBox->addItem(QLatin1String("90 %"), 0.90);
comboBox->addItem(QLatin1String("100 %"), 1.0);
comboBox->addItem(QLatin1String("125 %"), 1.25);
comboBox->addItem(QLatin1String("150 %"), 1.5);
comboBox->addItem(QLatin1String("175 %"), 1.75);
comboBox->addItem(QLatin1String("200 %"), 2.0);
comboBox->addItem(QLatin1String("300 %"), 3.0);
comboBox->addItem(QLatin1String("400 %"), 4.0);
comboBox->addItem(QLatin1String("600 %"), 6.0);
comboBox->addItem(QLatin1String("800 %"), 8.0);
comboBox->addItem(QLatin1String("1000 %"), 10.0);
comboBox->addItem(QLatin1String("1600 %"), 16.0);
} else {
comboBox->setModel(m_comboBoxModel.data());
}
comboBox->setCurrentIndex(8);
connect(comboBox, SIGNAL(currentIndexChanged(int)), SLOT(emitZoomLevelChanged(int)));
connect(this, SIGNAL(indexChanged(int)), comboBox, SLOT(setCurrentIndex(int)));
comboBox->setProperty("hideborder", true);
return comboBox;
}
示例13: rx
Channels::Channels(QWidget * parent, ModelData & model, GeneralSettings & generalSettings, FirmwareInterface * firmware):
ModelPanel(parent, model, generalSettings, firmware)
{
QGridLayout * gridLayout = new QGridLayout(this);
bool minimize = false;
int col = 1;
if (firmware->getCapability(ChannelsName)) {
minimize=true;
addLabel(gridLayout, tr("Name"), col++);
}
addLabel(gridLayout, tr("Subtrim"), col++, minimize);
addLabel(gridLayout, tr("Min"), col++, minimize);
addLabel(gridLayout, tr("Max"), col++, minimize);
addLabel(gridLayout, tr("Direction"), col++, minimize);
if (IS_TARANIS(GetEepromInterface()->getBoard()))
addLabel(gridLayout, tr("Curve"), col++, minimize);
if (firmware->getCapability(PPMCenter))
addLabel(gridLayout, tr("PPM Center"), col++, minimize);
if (firmware->getCapability(SYMLimits))
addLabel(gridLayout, tr("Linear Subtrim"), col++, true);
for (int i=0; i<firmware->getCapability(Outputs); i++) {
col = 0;
// Channel label
QLabel *label = new QLabel(this);
label->setText(tr("Channel %1").arg(i+1));
label->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
gridLayout->addWidget(label, i+1, col++, 1, 1);
// Channel name
int nameLen = firmware->getCapability(ChannelsName);
if (nameLen > 0) {
QLineEdit * name = new QLineEdit(this);
name->setProperty("index", i);
name->setMaxLength(nameLen);
QRegExp rx(CHAR_FOR_NAMES_REGEX);
name->setValidator(new QRegExpValidator(rx, this));
name->setText(model.limitData[i].name);
connect(name, SIGNAL(editingFinished()), this, SLOT(nameEdited()));
gridLayout->addWidget(name, i+1, col++, 1, 1);
}
// Channel offset
limitsGroups << new LimitsGroup(firmware, gridLayout, i+1, col++, model.limitData[i].offset, -1000, 1000, 0);
// Channel min
limitsGroups << new LimitsGroup(firmware, gridLayout, i+1, col++, model.limitData[i].min, -model.getChannelsMax()*10, 0, -1000);
// Channel max
limitsGroups << new LimitsGroup(firmware, gridLayout, i+1, col++, model.limitData[i].max, 0, model.getChannelsMax()*10, 1000);
// Channel inversion
QComboBox * invCB = new QComboBox(this);
invCB->insertItems(0, QStringList() << tr("---") << tr("INV"));
invCB->setProperty("index", i);
invCB->setCurrentIndex((model.limitData[i].revert) ? 1 : 0);
connect(invCB, SIGNAL(currentIndexChanged(int)), this, SLOT(invEdited()));
gridLayout->addWidget(invCB, i+1, col++, 1, 1);
// Curve
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
QComboBox * curveCB = new QComboBox(this);
curveCB->setProperty("index", i);
int numcurves = firmware->getCapability(NumCurves);
for (int j=-numcurves; j<=numcurves; j++) {
curveCB->addItem(CurveReference(CurveReference::CURVE_REF_CUSTOM, j).toString(), j);
}
curveCB->setCurrentIndex(model.limitData[i].curve.value+numcurves);
connect(curveCB, SIGNAL(currentIndexChanged(int)), this, SLOT(curveEdited()));
gridLayout->addWidget(curveCB, i+1, col++, 1, 1);
}
// PPM center
if (firmware->getCapability(PPMCenter)) {
QSpinBox * center = new QSpinBox(this);
center->setProperty("index", i);
center->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
center->setSuffix("us");
center->setMinimum(1375);
center->setMaximum(1625);
center->setValue(1500);
center->setValue(model.limitData[i].ppmCenter + 1500);
connect(center, SIGNAL(editingFinished()), this, SLOT(ppmcenterEdited()));
gridLayout->addWidget(center, i+1, col++, 1, 1);
}
// Symetrical limits
if (firmware->getCapability(SYMLimits)) {
QCheckBox * symlimits = new QCheckBox(this);
symlimits->setProperty("index", i);
symlimits->setChecked(model.limitData[i].symetrical);
connect(symlimits, SIGNAL(toggled(bool)), this, SLOT(symlimitsEdited()));
gridLayout->addWidget(symlimits, i+1, col++, 1, 1);
}
}
示例14: init
void QgsRelationReferenceWidget::init()
{
if ( !mReadOnlySelector && mReferencedLayer )
{
QApplication::setOverrideCursor( Qt::WaitCursor );
QSet<QString> requestedAttrs;
if ( !mFilterFields.isEmpty() )
{
for ( const QString &fieldName : qgis::as_const( mFilterFields ) )
{
int idx = mReferencedLayer->fields().lookupField( fieldName );
if ( idx == -1 )
continue;
QComboBox *cb = new QComboBox();
cb->setProperty( "Field", fieldName );
cb->setProperty( "FieldAlias", mReferencedLayer->attributeDisplayName( idx ) );
mFilterComboBoxes << cb;
QVariantList uniqueValues = mReferencedLayer->uniqueValues( idx ).toList();
cb->addItem( mReferencedLayer->attributeDisplayName( idx ) );
QVariant nullValue = QgsApplication::nullRepresentation();
cb->addItem( nullValue.toString(), QVariant( mReferencedLayer->fields().at( idx ).type() ) );
std::sort( uniqueValues.begin(), uniqueValues.end(), qgsVariantLessThan );
const auto constUniqueValues = uniqueValues;
for ( const QVariant &v : constUniqueValues )
{
cb->addItem( v.toString(), v );
}
connect( cb, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsRelationReferenceWidget::filterChanged );
// Request this attribute for caching
requestedAttrs << fieldName;
mFilterLayout->addWidget( cb );
}
if ( mChainFilters )
{
QVariant nullValue = QgsApplication::nullRepresentation();
QgsFeature ft;
QgsFeatureIterator fit = mReferencedLayer->getFeatures();
while ( fit.nextFeature( ft ) )
{
const int count = std::min( mFilterComboBoxes.count(), mFilterFields.count() );
for ( int i = 0; i < count - 1; i++ )
{
QVariant cv = ft.attribute( mFilterFields.at( i ) );
QVariant nv = ft.attribute( mFilterFields.at( i + 1 ) );
QString cf = cv.isNull() ? nullValue.toString() : cv.toString();
QString nf = nv.isNull() ? nullValue.toString() : nv.toString();
mFilterCache[mFilterFields[i]][cf] << nf;
}
}
if ( !mFilterComboBoxes.isEmpty() )
{
QComboBox *cb = mFilterComboBoxes.first();
cb->setCurrentIndex( 0 );
disableChainedComboBoxes( cb );
}
}
}
else
{
mFilterContainer->hide();
}
mComboBox->setSourceLayer( mReferencedLayer );
mComboBox->setDisplayExpression( mReferencedLayer->displayExpression() );
mComboBox->setAllowNull( mAllowNull );
mComboBox->setIdentifierField( mReferencedField );
QVariant nullValue = QgsApplication::nullRepresentation();
if ( mChainFilters && mFeature.isValid() )
{
for ( int i = 0; i < mFilterFields.size(); i++ )
{
QVariant v = mFeature.attribute( mFilterFields[i] );
QString f = v.isNull() ? nullValue.toString() : v.toString();
mFilterComboBoxes.at( i )->setCurrentIndex( mFilterComboBoxes.at( i )->findText( f ) );
}
}
// Only connect after iterating, to have only one iterator on the referenced table at once
connect( mComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsRelationReferenceWidget::comboReferenceChanged );
//call it for the first time
emit mComboBox->currentIndexChanged( mComboBox->currentIndex() );
QApplication::restoreOverrideCursor();
mInitialized = true;
}
}
示例15: buildLayout
//.........这里部分代码省略.........
removeButton->setMenu(removeMenu);
connect(applyButton, SIGNAL(clicked()), this, SLOT(onShaderApplyClicked()));
topButtonLayout = new QHBoxLayout();
topButtonLayout->addWidget(loadButton);
topButtonLayout->addWidget(saveButton);
topButtonLayout->addWidget(removeButton);
topButtonLayout->addWidget(applyButton);
m_layout->addLayout(topButtonLayout);
/* NOTE: We assume that parameters are always grouped in order by the pass number, e.g., all parameters for pass 0 come first, then params for pass 1, etc. */
for (i = 0; avail_shader && i < avail_shader->passes; i++)
{
QFormLayout *form = NULL;
QGroupBox *groupBox = NULL;
QFileInfo fileInfo(avail_shader->pass[i].source.path);
QString shaderBasename = fileInfo.completeBaseName();
QHBoxLayout *filterScaleHBoxLayout = NULL;
QComboBox *filterComboBox = new QComboBox(this);
QComboBox *scaleComboBox = new QComboBox(this);
QToolButton *moveDownButton = NULL;
QToolButton *moveUpButton = NULL;
unsigned j = 0;
/* Sometimes video_shader shows 1 pass with no source file, when there are really 0 passes. */
if (shaderBasename.isEmpty())
continue;
hasPasses = true;
filterComboBox->setProperty("pass", i);
scaleComboBox->setProperty("pass", i);
moveDownButton = new QToolButton(this);
moveDownButton->setText("↓");
moveDownButton->setProperty("pass", i);
moveUpButton = new QToolButton(this);
moveUpButton->setText("↑");
moveUpButton->setProperty("pass", i);
/* Can't move down if we're already at the bottom. */
if (i < avail_shader->passes - 1)
connect(moveDownButton, SIGNAL(clicked()), this, SLOT(onShaderPassMoveDownClicked()));
else
moveDownButton->setDisabled(true);
/* Can't move up if we're already at the top. */
if (i > 0)
connect(moveUpButton, SIGNAL(clicked()), this, SLOT(onShaderPassMoveUpClicked()));
else
moveUpButton->setDisabled(true);
for (;;)
{
QString filterLabel = getFilterLabel(j);
if (filterLabel.isEmpty())
break;
if (j == 0)
filterLabel = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DONT_CARE);