Update: (ovqt) CBinOpDialogT<NL3D::CPlaneBasis> not supported all operations.

This commit is contained in:
dnk-88 2010-11-11 16:44:01 +02:00
parent f67bae179b
commit ed19f2adfd
2 changed files with 15 additions and 7 deletions

View file

@ -39,13 +39,7 @@ CBinOpDialog::CBinOpDialog(QWidget *widget1, QWidget *widget2, QWidget *parent)
setWindowTitle(tr("Bin operator"));
_comboBox->clear();
_comboBox->insertItems(0, QStringList()
<< tr("SelectArg1")
<< tr("SelectArg2")
<< tr("Modulate")
<< tr("Add")
<< tr("Subtract"));
qobject_cast<QGroupBox*>(widget1)->setTitle(tr("Arg1"));
qobject_cast<QGroupBox*>(widget2)->setTitle(tr("Arg2"));
connect(_comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setNewOp(int)));

View file

@ -96,14 +96,28 @@ public:
_AttrbDlg[k]->setSchemeWrapper(&_SchemeWrapper[k]) ;
_AttrbDlg[k]->init();
}
static const char * const operators[] =
{
QT_TR_NOOP("Select Arg1"),
QT_TR_NOOP("Select Arg2"),
QT_TR_NOOP("Modulate"),
QT_TR_NOOP("Add"),
QT_TR_NOOP("Subtract"),
0
};
_comboBox->blockSignals(true);
for (k = 0 ; k < (uint) NL3D::CPSBinOp::last ; ++k)
{
if (_EditedScheme->supportOp( (NL3D::CPSBinOp::BinOp) k))
{
_comboBox->insertItem(_comboBox->count(), operators[k]);
if ((uint) _EditedScheme->getOp() == k)
_comboBox->setCurrentIndex(k);
}
}
_comboBox->blockSignals(false);
}
~CBinOpDialogT()