]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/ParametersQtDialog.cxx
...
[cpPlugins.git] / lib / cpPlugins / Interface / ParametersQtDialog.cxx
index 731fc77a120a9bd371c4b44a2e1dd02e4a328b76..e502c6eb28a8332692a9a3c2f14141ca3124bb2e 100644 (file)
@@ -24,6 +24,7 @@
 #include <cpPlugins/Interface/Plugins.h>
 #include <cpPlugins/Interface/BaseApplication.h>
 
+/* TODO
 class SingleSeedCommand
   : public vtkCommand
 {
@@ -87,12 +88,14 @@ public:
   cpPlugins::Interface::ParametersQtDialog* Dialog;
   std::string Name;
 };
+*/
 
 // -------------------------------------------------------------------------
 cpPlugins::Interface::ParametersQtDialog::
 ParametersQtDialog( QWidget* parent, Qt::WindowFlags f )
   : QDialog( parent, f ),
-    m_Parameters( NULL )
+    m_Parameters( NULL ),
+    m_Interactive( false )
 {
   this->m_Title = new QLabel( this );
   this->m_Title->setText( "Parameters dialog title" );
@@ -143,6 +146,34 @@ getInteractors( ) const
   return( this->m_Interactors );
 }
 
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::ParametersQtDialog::
+isInteractive( ) const
+{
+  return( this->m_Interactive );
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::Interface::ParametersQtDialog::
+setInteractive( bool i )
+{
+  this->m_Interactive = i;
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::Interface::ParametersQtDialog::
+interactiveOn( )
+{
+  this->m_Interactive = true;
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::Interface::ParametersQtDialog::
+interactiveOff( )
+{
+  this->m_Interactive = false;
+}
+
 // -------------------------------------------------------------------------
 bool cpPlugins::Interface::ParametersQtDialog::
 setParameters( Parameters* parameters )
@@ -158,6 +189,7 @@ setParameters( Parameters* parameters )
   this->m_Title->setText( title.str( ).c_str( ) );
 
   // Put values
+  this->m_Widgets.clear( );
   auto& raw_params = this->m_Parameters->GetRawParameters( );
   for( auto pIt = raw_params.begin( ); pIt != raw_params.end( ); ++pIt )
   {