1 #include <cpPlugins/QT/ParametersDialog.h>
7 #include <cpPlugins/BaseObjects/ProcessObject.h>
11 #include <QDoubleSpinBox>
12 #include <QFileDialog>
13 #include <QHBoxLayout>
14 #include <QInputDialog>
16 #include <QPushButton>
19 // -------------------------------------------------------------------------
20 cpPlugins::QT::ParametersDialog::
21 ParametersDialog( QWidget* parent, Qt::WindowFlags f, bool manual )
22 : QDialog( parent, f ),
23 m_ProcessObject( NULL ),
24 m_WidgetsUpdated( false ),
29 this->m_Title = new QLabel( this );
30 this->m_Title->setText( "Parameters dialog title" );
31 this->m_MainLayout = new QGridLayout( this );
32 this->m_ToolsLayout = new QVBoxLayout( );
33 this->m_ToolsLayout->addWidget( this->m_Title );
34 this->m_MainLayout->addLayout( this->m_ToolsLayout, 0, 0, 1, 1 );
38 this, SIGNAL( accepted( ) ), this, SLOT( _dlg_Accepted( ) )
42 // -------------------------------------------------------------------------
43 cpPlugins::QT::ParametersDialog::
49 delete this->m_ToolsLayout;
50 delete this->m_MainLayout;
55 // -------------------------------------------------------------------------
56 cpPlugins::BaseObjects::ProcessObject*
57 cpPlugins::QT::ParametersDialog::
58 getProcessObject( ) const
60 return( this->m_ProcessObject );
63 // -------------------------------------------------------------------------
64 bool cpPlugins::QT::ParametersDialog::
65 setProcessObject( cpPlugins::BaseObjects::ProcessObject* obj )
67 if( this->m_ProcessObject != NULL || obj == NULL )
69 this->m_ProcessObject = obj;
70 this->m_WidgetsUpdated = false;
71 this->_updateWidgets( );
76 // -------------------------------------------------------------------------
77 void cpPlugins::QT::ParametersDialog::
80 if( this->m_ProcessObject == NULL )
85 // Check if an explicit re-execution button is needed
87 this->findChild< QCheckBox* >( "___ExplicitExecution___" );
89 this->m_ProcessObject->SetExplicitExecution( v_bool->isChecked( ) );
92 auto parameters = this->m_ProcessObject->GetParameters( );
93 auto& raw_params = parameters->GetRawParameters( );
94 for( auto pIt = raw_params.begin( ); pIt != raw_params.end( ); ++pIt )
96 QString pName = pIt->first.c_str( );
97 switch( pIt->second.first )
99 case cpPlugins::BaseObjects::Parameters::String:
100 case cpPlugins::BaseObjects::Parameters::OpenFileName:
101 case cpPlugins::BaseObjects::Parameters::SaveFileName:
102 case cpPlugins::BaseObjects::Parameters::PathName:
103 case cpPlugins::BaseObjects::Parameters::IntList:
104 case cpPlugins::BaseObjects::Parameters::UintList:
105 case cpPlugins::BaseObjects::Parameters::RealList:
106 case cpPlugins::BaseObjects::Parameters::OpenFileNameList:
108 QLineEdit* v_string = this->findChild< QLineEdit* >( pName );
109 if( v_string != NULL )
110 pIt->second.second = v_string->text( ).toStdString( );
113 case cpPlugins::BaseObjects::Parameters::Bool:
115 QCheckBox* v_bool = this->findChild< QCheckBox* >( pName );
117 pIt->second.second = ( v_bool->isChecked( ) )? "1": "0";
120 case cpPlugins::BaseObjects::Parameters::Int:
121 case cpPlugins::BaseObjects::Parameters::Uint:
123 QSpinBox* v_uint = this->findChild< QSpinBox* >( pName );
126 std::stringstream str;
127 str << v_uint->value( );
128 pIt->second.second = str.str( );
133 case cpPlugins::BaseObjects::Parameters::Real:
135 QDoubleSpinBox* v_double = this->findChild< QDoubleSpinBox* >( pName );
138 std::stringstream str;
139 str << v_double->value( );
140 pIt->second.second = str.str( );
145 case cpPlugins::BaseObjects::Parameters::StringList:
147 case cpPlugins::BaseObjects::Parameters::BoolList:
149 case cpPlugins::BaseObjects::Parameters::SaveFileNameList:
151 case cpPlugins::BaseObjects::Parameters::PathNameList:
153 case cpPlugins::BaseObjects::Parameters::Choices:
155 QComboBox* v_choices = this->findChild< QComboBox* >( pName );
156 if( v_choices != NULL )
158 std::istringstream str_choices( pIt->second.second );
159 std::string real_choices;
160 std::getline( str_choices, real_choices, '@' );
163 v_choices->currentText( ).toStdString( );
173 this->m_ProcessObject->Modified( );
176 // -------------------------------------------------------------------------
177 void cpPlugins::QT::ParametersDialog::
180 if( this->m_ProcessObject == NULL )
185 // Check if an explicit re-execution button is needed
187 this->findChild< QCheckBox* >( "___ExplicitExecution___" );
189 v_bool->setChecked( this->m_ProcessObject->GetExplicitExecution( ) );
192 auto parameters = this->m_ProcessObject->GetParameters( );
193 auto& raw_params = parameters->GetRawParameters( );
194 for( auto pIt = raw_params.begin( ); pIt != raw_params.end( ); ++pIt )
196 QString pName = pIt->first.c_str( );
197 switch( pIt->second.first )
199 case cpPlugins::BaseObjects::Parameters::String:
200 case cpPlugins::BaseObjects::Parameters::OpenFileName:
201 case cpPlugins::BaseObjects::Parameters::SaveFileName:
202 case cpPlugins::BaseObjects::Parameters::PathName:
203 case cpPlugins::BaseObjects::Parameters::IntList:
204 case cpPlugins::BaseObjects::Parameters::UintList:
205 case cpPlugins::BaseObjects::Parameters::RealList:
206 case cpPlugins::BaseObjects::Parameters::OpenFileNameList:
208 QLineEdit* v_string = this->findChild< QLineEdit* >( pName );
209 if( v_string != NULL )
210 v_string->setText( pIt->second.second.c_str( ) );
213 case cpPlugins::BaseObjects::Parameters::Bool:
215 QCheckBox* v_bool = this->findChild< QCheckBox* >( pName );
217 v_bool->setChecked( pIt->second.second == "1" );
220 case cpPlugins::BaseObjects::Parameters::Int:
221 case cpPlugins::BaseObjects::Parameters::Uint:
223 QSpinBox* v_uint = this->findChild< QSpinBox* >( pName );
226 std::istringstream tok_str( pIt->second.second );
229 v_uint->setValue( v );
234 case cpPlugins::BaseObjects::Parameters::Real:
236 QDoubleSpinBox* v_double = this->findChild< QDoubleSpinBox* >( pName );
239 std::istringstream tok_str( pIt->second.second );
242 v_double->setValue( v );
247 case cpPlugins::BaseObjects::Parameters::StringList:
249 case cpPlugins::BaseObjects::Parameters::BoolList:
251 case cpPlugins::BaseObjects::Parameters::SaveFileNameList:
253 case cpPlugins::BaseObjects::Parameters::PathNameList:
255 case cpPlugins::BaseObjects::Parameters::Choices:
257 QComboBox* v_choices = this->findChild< QComboBox* >( pName );
258 if( v_choices != NULL )
260 std::istringstream str_choices( pIt->second.second );
261 std::string choices, real_choice;
262 std::getline( str_choices, choices, '@' );
263 std::getline( str_choices, real_choice, '@' );
264 std::istringstream str( choices );
266 int id = -1, cont = 0;
267 while( std::getline( str, token, '#' ) )
269 if( token == real_choice )
276 v_choices->setCurrentIndex( id );
288 // -------------------------------------------------------------------------
289 void cpPlugins::QT::ParametersDialog::
296 this->m_Buttons = new QDialogButtonBox(
297 QDialogButtonBox::Ok | QDialogButtonBox::Cancel
300 this->m_Buttons, SIGNAL( accepted( ) ), this, SLOT( accept( ) )
303 this->m_Buttons, SIGNAL( rejected( ) ), this, SLOT( reject( ) )
305 this->m_ToolsLayout->addWidget( this->m_Buttons );
308 this->m_WidgetsUpdated = true;
311 // -------------------------------------------------------------------------
312 void cpPlugins::QT::ParametersDialog::
315 if( this->m_WidgetsUpdated || this->m_ProcessObject == NULL )
321 std::stringstream title;
323 << "Parameters for an object of class \""
324 << this->m_ProcessObject->GetClassName( )
326 this->m_Title->setText( title.str( ).c_str( ) );
328 // Check if an explicit re-execution button is needed
329 QCheckBox* v_bool = new QCheckBox( this );
330 v_bool->setObjectName( "___ExplicitExecution___" );
331 v_bool->setText( "Explicit re-execution" );
332 v_bool->setChecked( this->m_ProcessObject->GetExplicitExecution( ) );
334 QHBoxLayout* new_layout = new QHBoxLayout( );
335 new_layout->addWidget( v_bool );
336 this->m_ToolsLayout->addLayout( new_layout );
339 auto parameters = this->m_ProcessObject->GetParameters( );
340 auto& raw_params = parameters->GetRawParameters( );
341 for( auto pIt = raw_params.begin( ); pIt != raw_params.end( ); ++pIt )
343 QWidget* w_input = NULL;
344 switch( pIt->second.first )
346 case cpPlugins::BaseObjects::Parameters::String:
348 QLineEdit* v_string = new QLineEdit( this );
349 v_string->setObjectName( pIt->first.c_str( ) );
350 v_string->setText( pIt->second.second.c_str( ) );
354 case cpPlugins::BaseObjects::Parameters::Bool:
356 QCheckBox* v_bool = new QCheckBox( this );
357 v_bool->setObjectName( pIt->first.c_str( ) );
358 v_bool->setText( "[ON/OFF]" );
359 v_bool->setChecked( pIt->second.second == "1" );
363 case cpPlugins::BaseObjects::Parameters::Int:
364 case cpPlugins::BaseObjects::Parameters::Uint:
366 std::istringstream tok_str( pIt->second.second );
369 QSpinBox* v_uint = new QSpinBox( this );
370 v_uint->setObjectName( pIt->first.c_str( ) );
371 if( pIt->second.first == cpPlugins::BaseObjects::Parameters::Uint )
372 v_uint->setMinimum( 0 );
374 v_uint->setMinimum( -std::numeric_limits< int >::max( ) );
375 v_uint->setMaximum( std::numeric_limits< int >::max( ) );
376 v_uint->setValue( v );
380 case cpPlugins::BaseObjects::Parameters::Real:
382 std::istringstream tok_str( pIt->second.second );
385 QDoubleSpinBox* v_double = new QDoubleSpinBox( this );
386 v_double->setObjectName( pIt->first.c_str( ) );
387 v_double->setDecimals( 3 );
388 v_double->setMinimum( -std::numeric_limits< double >::max( ) );
389 v_double->setMaximum( std::numeric_limits< double >::max( ) );
390 v_double->setValue( v );
394 case cpPlugins::BaseObjects::Parameters::OpenFileName:
396 QFrame* frame = new QFrame( this );
397 QHBoxLayout* layout = new QHBoxLayout( frame );
398 QLineEdit* v_string = new QLineEdit( frame );
399 v_string->setObjectName( pIt->first.c_str( ) );
400 v_string->setText( pIt->second.second.c_str( ) );
401 QPushButton* v_button = new QPushButton( frame );
402 v_button->setObjectName( ( pIt->first + "_=?btn" ).c_str( ) );
403 v_button->setText( "..." );
405 v_button, SIGNAL( clicked( ) ),
406 this, SLOT( _dlg_OpenSingleFile( ) )
408 layout->addWidget( v_string );
409 layout->addWidget( v_button );
412 case cpPlugins::BaseObjects::Parameters::SaveFileName:
414 QFrame* frame = new QFrame( this );
415 QHBoxLayout* layout = new QHBoxLayout( frame );
416 QLineEdit* v_string = new QLineEdit( frame );
417 v_string->setObjectName( pIt->first.c_str( ) );
418 v_string->setText( pIt->second.second.c_str( ) );
419 QPushButton* v_button = new QPushButton( frame );
420 v_button->setObjectName( ( pIt->first + "_=?btn" ).c_str( ) );
421 v_button->setText( "..." );
423 v_button, SIGNAL( clicked( ) ),
424 this, SLOT( _dlg_SaveSingleFile( ) )
426 layout->addWidget( v_string );
427 layout->addWidget( v_button );
431 case cpPlugins::BaseObjects::Parameters::PathName:
433 QFrame* frame = new QFrame( this );
434 QHBoxLayout* layout = new QHBoxLayout( frame );
435 QLineEdit* v_string = new QLineEdit( frame );
436 v_string->setObjectName( pIt->first.c_str( ) );
437 v_string->setText( pIt->second.second.c_str( ) );
438 QPushButton* v_button = new QPushButton( frame );
439 v_button->setObjectName( ( pIt->first + "_=?btn" ).c_str( ) );
440 v_button->setText( "..." );
442 v_button, SIGNAL( clicked( ) ),
443 this, SLOT( _dlg_OpenSinglePath( ) )
445 layout->addWidget( v_string );
446 layout->addWidget( v_button );
450 case cpPlugins::BaseObjects::Parameters::StringList:
452 case cpPlugins::BaseObjects::Parameters::BoolList:
454 case cpPlugins::BaseObjects::Parameters::IntList:
456 QFrame* frame = new QFrame( this );
457 QHBoxLayout* layout = new QHBoxLayout( frame );
458 QLineEdit* v_string = new QLineEdit( frame );
459 v_string->setObjectName( pIt->first.c_str( ) );
460 v_string->setText( pIt->second.second.c_str( ) );
461 QPushButton* v_button = new QPushButton( frame );
462 v_button->setObjectName( ( pIt->first + "_=?btn" ).c_str( ) );
463 v_button->setText( "+" );
465 v_button, SIGNAL( clicked( ) ),
466 this, SLOT( _dlg_AddInt( ) )
468 layout->addWidget( v_string );
469 layout->addWidget( v_button );
473 case cpPlugins::BaseObjects::Parameters::UintList:
475 QFrame* frame = new QFrame( this );
476 QHBoxLayout* layout = new QHBoxLayout( frame );
477 QLineEdit* v_string = new QLineEdit( frame );
478 v_string->setObjectName( pIt->first.c_str( ) );
479 v_string->setText( pIt->second.second.c_str( ) );
480 QPushButton* v_button = new QPushButton( frame );
481 v_button->setObjectName( ( pIt->first + "_=?btn" ).c_str( ) );
482 v_button->setText( "+" );
484 v_button, SIGNAL( clicked( ) ),
485 this, SLOT( _dlg_AddUint( ) )
487 layout->addWidget( v_string );
488 layout->addWidget( v_button );
492 case cpPlugins::BaseObjects::Parameters::RealList:
494 QFrame* frame = new QFrame( this );
495 QHBoxLayout* layout = new QHBoxLayout( frame );
496 QLineEdit* v_string = new QLineEdit( frame );
497 v_string->setObjectName( pIt->first.c_str( ) );
498 v_string->setText( pIt->second.second.c_str( ) );
499 QPushButton* v_button = new QPushButton( frame );
500 v_button->setObjectName( ( pIt->first + "_=?btn" ).c_str( ) );
501 v_button->setText( "+" );
503 v_button, SIGNAL( clicked( ) ),
504 this, SLOT( _dlg_AddReal( ) )
506 layout->addWidget( v_string );
507 layout->addWidget( v_button );
511 case cpPlugins::BaseObjects::Parameters::OpenFileNameList:
513 QFrame* frame = new QFrame( this );
514 QHBoxLayout* layout = new QHBoxLayout( frame );
515 QLineEdit* v_string = new QLineEdit( frame );
516 v_string->setObjectName( pIt->first.c_str( ) );
517 v_string->setMaxLength( std::numeric_limits< int >::max( ) );
518 v_string->setText( pIt->second.second.c_str( ) );
519 QPushButton* v_button = new QPushButton( frame );
520 v_button->setObjectName( ( pIt->first + "_=?btn" ).c_str( ) );
521 v_button->setText( "..." );
523 v_button, SIGNAL( clicked( ) ),
524 this, SLOT( _dlg_OpenMultipleFiles( ) )
526 layout->addWidget( v_string );
527 layout->addWidget( v_button );
531 case cpPlugins::BaseObjects::Parameters::SaveFileNameList:
533 case cpPlugins::BaseObjects::Parameters::PathNameList:
535 case cpPlugins::BaseObjects::Parameters::Choices:
537 QComboBox* v_choices = new QComboBox( this );
538 v_choices->setObjectName( pIt->first.c_str( ) );
540 std::istringstream str0( pIt->second.second );
542 std::getline( str0, choices, '@' );
543 std::istringstream str1( choices );
546 while( std::getline( str1, token, '#' ) )
547 v_choices->insertItem( id++, token.c_str( ) );
556 // Ok, a representation was created
557 if( w_input != NULL )
559 QHBoxLayout* new_layout = new QHBoxLayout( );
560 QLabel* label = new QLabel( this );
561 label->setText( QString( pIt->first.c_str( ) ) );
562 new_layout->addWidget( label );
563 new_layout->addWidget( w_input );
564 this->m_ToolsLayout->addLayout( new_layout );
571 this->_addButtons( );
574 // -------------------------------------------------------------------------
575 void cpPlugins::QT::ParametersDialog::
578 this->updateParameters( );
581 // -------------------------------------------------------------------------
582 void cpPlugins::QT::ParametersDialog::
583 _dlg_OpenSingleFile( )
585 auto parameters = this->m_ProcessObject->GetParameters( );
586 QPushButton* btn = dynamic_cast< QPushButton* >( this->sender( ) );
589 std::string bName = btn->objectName( ).toStdString( );
590 std::string line_name = bName.substr( 0, bName.find( "_=?btn" ) );
591 QLineEdit* line = this->findChild< QLineEdit* >( line_name.c_str( ) );
594 std::string param_name = line->objectName( ).toStdString( );
595 if( param_name != "" )
597 std::string param_value = parameters->GetOpenFileName( param_name );
598 if( param_value == "" )
600 QStringList dialog_filters;
601 std::string extensions = parameters->GetAcceptedFileExtensions( param_name );
602 if( extensions != "" )
603 dialog_filters << extensions.c_str( );
604 dialog_filters << "Any file (*)";
606 // Show dialog and check if it was accepted
607 QFileDialog dialog( this );
608 dialog.setFileMode( QFileDialog::ExistingFile );
609 dialog.setDirectory( QFileDialog::tr( param_value.c_str( ) ) );
610 dialog.setNameFilters( dialog_filters );
611 dialog.setAcceptMode( QFileDialog::AcceptOpen );
613 line->setText( *( dialog.selectedFiles( ).begin( ) ) );
622 // -------------------------------------------------------------------------
623 void cpPlugins::QT::ParametersDialog::
624 _dlg_SaveSingleFile( )
626 auto parameters = this->m_ProcessObject->GetParameters( );
627 QPushButton* btn = dynamic_cast< QPushButton* >( this->sender( ) );
630 std::string bName = btn->objectName( ).toStdString( );
631 std::string line_name = bName.substr( 0, bName.find( "_=?btn" ) );
632 QLineEdit* line = this->findChild< QLineEdit* >( line_name.c_str( ) );
635 std::string param_name = line->objectName( ).toStdString( );
636 if( param_name != "" )
638 std::string param_value = parameters->GetSaveFileName( param_name );
639 if( param_value == "" )
641 QStringList dialog_filters;
642 std::string extensions = parameters->GetAcceptedFileExtensions( param_name );
643 if( extensions != "" )
644 dialog_filters << extensions.c_str( );
645 dialog_filters << "Any file (*)";
647 // Show dialog and check if it was accepted
648 QFileDialog dialog( this );
649 dialog.setFileMode( QFileDialog::AnyFile );
650 dialog.setDirectory( QFileDialog::tr( param_value.c_str( ) ) );
651 dialog.setNameFilters( dialog_filters );
652 dialog.setAcceptMode( QFileDialog::AcceptSave );
654 line->setText( *( dialog.selectedFiles( ).begin( ) ) );
663 // -------------------------------------------------------------------------
664 void cpPlugins::QT::ParametersDialog::
665 _dlg_OpenSinglePath( )
667 auto parameters = this->m_ProcessObject->GetParameters( );
668 QPushButton* btn = dynamic_cast< QPushButton* >( this->sender( ) );
671 std::string bName = btn->objectName( ).toStdString( );
672 std::string line_name = bName.substr( 0, bName.find( "_=?btn" ) );
673 QLineEdit* line = this->findChild< QLineEdit* >( line_name.c_str( ) );
676 std::string param_name = line->objectName( ).toStdString( );
677 if( param_name != "" )
679 std::string param_value = parameters->GetPathName( param_name );
680 if( param_value == "" )
683 // Show dialog and check if it was accepted
684 QFileDialog dialog( this );
685 dialog.setFileMode( QFileDialog::Directory );
686 dialog.setDirectory( QFileDialog::tr( param_value.c_str( ) ) );
687 dialog.setAcceptMode( QFileDialog::AcceptOpen );
689 line->setText( *( dialog.selectedFiles( ).begin( ) ) );
698 // -------------------------------------------------------------------------
699 void cpPlugins::QT::ParametersDialog::
700 _dlg_OpenMultipleFiles( )
702 auto parameters = this->m_ProcessObject->GetParameters( );
703 QPushButton* btn = dynamic_cast< QPushButton* >( this->sender( ) );
706 std::string bName = btn->objectName( ).toStdString( );
707 std::string line_name = bName.substr( 0, bName.find( "_=?btn" ) );
709 QLineEdit* line = this->findChild< QLineEdit* >( line_name.c_str( ) );
712 std::string param_name = line->objectName( ).toStdString( );
713 if( param_name != "" )
715 QStringList dialog_filters;
716 std::string extensions = parameters->GetAcceptedFileExtensions( param_name );
717 if( extensions != "" )
718 dialog_filters << extensions.c_str( );
719 dialog_filters << "Any file (*)";
721 // Show dialog and check if it was accepted
722 QFileDialog dialog( this );
723 dialog.setFileMode( QFileDialog::ExistingFiles );
724 dialog.setNameFilters( dialog_filters );
725 dialog.setAcceptMode( QFileDialog::AcceptOpen );
728 if( dialog.selectedFiles( ).size( ) > 0 )
730 std::stringstream str;
731 auto files = dialog.selectedFiles( );
732 auto fIt = files.begin( );
733 str << fIt->toStdString( );
735 for( ; fIt != files.end( ); ++fIt )
736 str << "#" << fIt->toStdString( );
737 line->setText( str.str( ).c_str( ) );
750 // -------------------------------------------------------------------------
751 void cpPlugins::QT::ParametersDialog::
754 QPushButton* btn = dynamic_cast< QPushButton* >( this->sender( ) );
757 std::string bName = btn->objectName( ).toStdString( );
758 std::string line_name = bName.substr( 0, bName.find( "_=?btn" ) );
759 QLineEdit* line = this->findChild< QLineEdit* >( line_name.c_str( ) );
762 std::string param_name = line->objectName( ).toStdString( );
763 if( param_name != "" )
767 QInputDialog::getInt(
770 std::string( "Add new value to \"" ) +
776 -std::numeric_limits< int >::max( ),
777 std::numeric_limits< int >::max( ),
782 std::string values = line->text( ).toStdString( );
785 std::stringstream str;
786 str << values << value;
787 line->setText( str.str( ).c_str( ) );
798 // -------------------------------------------------------------------------
799 void cpPlugins::QT::ParametersDialog::
802 QPushButton* btn = dynamic_cast< QPushButton* >( this->sender( ) );
805 std::string bName = btn->objectName( ).toStdString( );
806 std::string line_name = bName.substr( 0, bName.find( "_=?btn" ) );
807 QLineEdit* line = this->findChild< QLineEdit* >( line_name.c_str( ) );
810 std::string param_name = line->objectName( ).toStdString( );
811 if( param_name != "" )
815 QInputDialog::getInt(
818 std::string( "Add new value to \"" ) +
823 0, 0, std::numeric_limits< int >::max( ), 1,
828 std::string values = line->text( ).toStdString( );
831 std::stringstream str;
832 str << values << value;
833 line->setText( str.str( ).c_str( ) );
844 // -------------------------------------------------------------------------
845 void cpPlugins::QT::ParametersDialog::
848 QPushButton* btn = dynamic_cast< QPushButton* >( this->sender( ) );
851 std::string bName = btn->objectName( ).toStdString( );
852 std::string line_name = bName.substr( 0, bName.find( "_=?btn" ) );
853 QLineEdit* line = this->findChild< QLineEdit* >( line_name.c_str( ) );
856 std::string param_name = line->objectName( ).toStdString( );
857 if( param_name != "" )
861 QInputDialog::getDouble(
864 std::string( "Add new value to \"" ) +
870 -std::numeric_limits< double >::max( ),
871 std::numeric_limits< double >::max( ),
876 std::string values = line->text( ).toStdString( );
879 std::stringstream str;
880 str << values << value;
881 line->setText( str.str( ).c_str( ) );
892 #endif // cpPlugins_QT4