#include <vtkRenderWindowInteractor.h>
#include <QCheckBox>
+#include <QComboBox>
#include <QDoubleSpinBox>
#include <QFileDialog>
#include <QHBoxLayout>
case Parameters::PathNameList:
break;
case Parameters::Choices:
- break;
+ {
+ QComboBox* v_choices = new QComboBox( this );
+ v_choices->setObjectName( pIt->first.c_str( ) );
+
+ std::istringstream str0( pIt->second.second );
+ std::string choices;
+ std::getline( str0, choices, '@' );
+ std::istringstream str1( choices );
+ std::string token;
+ int id = 0;
+ while( std::getline( str1, token, '#' ) )
+ v_choices->insertItem( id++, token.c_str( ) );
+ w_input = v_choices;
+ }
+ break;
default:
w_input = NULL;
break;
);
this->m_ToolsLayout->addWidget( this->m_Buttons );
+ // Update values
+ this->updateView( );
+
return( true );
}
case Parameters::PathNameList:
break;
case Parameters::Choices:
- break;
+ {
+ QComboBox* v_choices = this->findChild< QComboBox* >( pName );
+ if( v_choices != NULL )
+ {
+ std::istringstream str_choices( pIt->second.second );
+ std::string real_choices;
+ std::getline( str_choices, real_choices, '@' );
+ pIt->second.second =
+ real_choices + "@" +
+ v_choices->currentText( ).toStdString( );
+
+ } // fi
+ }
+ break;
default:
break;
} // hctiws
case Parameters::PathNameList:
break;
case Parameters::Choices:
- break;
+ {
+ QComboBox* v_choices = this->findChild< QComboBox* >( pName );
+ if( v_choices != NULL )
+ {
+ std::istringstream str_choices( pIt->second.second );
+ std::string choices, real_choice;
+ std::getline( str_choices, choices, '@' );
+ std::getline( str_choices, real_choice, '@' );
+ std::istringstream str( choices );
+ std::string token;
+ int id = -1, cont = 0;
+ while( std::getline( str, token, '#' ) )
+ {
+ if( token == real_choice )
+ id = cont;
+ cont++;
+
+ } // elihw
+
+ if( id > -1 )
+ v_choices->setCurrentIndex( id );
+
+ } // fi
+ }
+ break;
default:
break;
} // hctiws