myBarDlg->setUnitsVisible(aResourceMgr->booleanValue("VISU", propertyName + "display_units", true));
// signals and slots connections ===========================================
- connect( RangeGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( changeRange( int ) ) );
+ // connect( RangeGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( changeRange( int ) ) );
+ connect( RBFrange, SIGNAL( toggled( bool ) ), this, SLOT( onFieldRange( bool ) ) );
+ connect( RBIrange, SIGNAL( toggled( bool ) ), this, SLOT( onImposedRange( bool ) ) );
+
connect( myModeCombo, SIGNAL( activated( int ) ), this, SLOT( changeScalarMode( int ) ) );
connect( OrientGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( changeDefaults( int ) ) );
connect( XSpin, SIGNAL( valueChanged( double ) ), this, SLOT( XYChanged( double ) ) );
/*!
Called when Range mode is changed
*/
+void VisuGUI_ScalarBarPane::onFieldRange( bool isOn )
+{
+ if (isOn) {
+ myScalarMap->SetSourceRange();
+ MinEdit->setEnabled( false );
+ MaxEdit->setEnabled( false );
+ changeScalarMode(myModeCombo->currentIndex());
+ }
+}
+
+void VisuGUI_ScalarBarPane::onImposedRange( bool isOn )
+{
+ if (isOn) {
+ myScalarMap->SetRange(myScalarMap->GetMin(), myScalarMap->GetMax());
+ MinEdit->setEnabled( true );
+ MaxEdit->setEnabled( true );
+ changeScalarMode(myModeCombo->currentIndex());
+ }
+}
+
void VisuGUI_ScalarBarPane::changeRange( int )
{
if ( RBFrange->isChecked() ) {
private slots:
void changeDefaults( int );
- void changeRange( int );
+ void changeRange( int );
+ void onFieldRange( bool );
+ void onImposedRange( bool );
void XYChanged( double );
void changeScalarMode( int );
void onTextPref();