this, SLOT(onComboScalarBarRangeIndexChanged(int)) );
QObject::connect(_ui.comboBoxColorMap, SIGNAL(currentIndexChanged(int)),
this, SLOT(onComboColorMapIndexChanged(int)) );
+ QObject::connect(_ui.spinBox, SIGNAL(valueChanged(int)),
+ this, SLOT(onSpinBoxValueChanged(int)) );
}
void
if (!_blockSig) emit comboScalarBarRangeIndexChanged(idx);
}
+void
+WidgetPresentationParameters::onSpinBoxValueChanged(int val)
+{
+ if (!_blockSig) emit spinBoxValueChanged(val);
+}
void
WidgetPresentationParameters::toggleWidget(bool show)
_blockSig = false;
}
+void
+WidgetPresentationParameters::setNbContour(int nbContour)
+{
+ if (nbContour <= 0)
+ {
+ //TODO throw?
+ STDLOG("WidgetPresentationParameters::setNbContour(): invalid number of contours!");
+ }
+
+ // Show the widget:
+ _ui.labelSpinBox->setText(tr("LAB_NB_CONTOUR"));
+ _ui.labelSpinBox->show();
+ _ui.spinBox->show();
+
+ _blockSig = true;
+ _ui.spinBox->setValue(nbContour);
+ _blockSig = false;
+}
+
+int WidgetPresentationParameters::getNbContour() const
+{
+ return _ui.spinBox->value();
+}
+
void
WidgetPresentationParameters::setScalarBarRange(MEDCALC::MEDPresentationScalarBarRange sbrange)
{