]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/QT/ConfigurationChooser.cxx
...
[cpPlugins.git] / lib / cpExtensions / QT / ConfigurationChooser.cxx
index 13eef422920ad6ddc86c365110b1ca2cef49d78e..00c121b2162124cbf17e62c237d0e11de61a9246 100644 (file)
@@ -1,10 +1,7 @@
 #include <cpExtensions/QT/ConfigurationChooser.h>
-
-#ifdef cpExtensions_QT4
-
 #include <cpExtensions/QT/ui_ConfigurationChooser.h>
+#include <cpExtensions/QT/ActorsWidgetInterface.h>
 #include <cpExtensions/QT/WindowLevelImageConfiguration.h>
-#include <cpExtensions/QT/SimpleMPRWidget.h>
 
 // -------------------------------------------------------------------------
 cpExtensions::QT::ConfigurationChooser::
@@ -25,18 +22,30 @@ cpExtensions::QT::ConfigurationChooser::
 
 // -------------------------------------------------------------------------
 void cpExtensions::QT::ConfigurationChooser::
-setData( SimpleMPRWidget* data )
+setData( ActorsWidgetInterface* data )
 {
   this->m_Data = data;
   if( this->m_Data != NULL )
   {
-    auto wl_wdg = new WindowLevelImageConfiguration( this );
-    wl_wdg->setData( data );
-    this->m_UI->Configurations->addTab( wl_wdg, "Image" );
+    auto actors = this->m_Data->GetActorsNames( );
+    for( auto n = actors.begin( ); n != actors.end( ); ++n )
+    {
+      if( this->m_Data->IsWindowLevelImageActor( *n ) )
+      {
+        auto wl_wdg = new WindowLevelImageConfiguration( this );
+        wl_wdg->setData( data, *n );
+        this->m_UI->Configurations->addTab( wl_wdg, n->c_str( ) );
+      }
+      else if( this->m_Data->IsLUTImageActor( *n ) )
+      {
+      }
+      else if( this->m_Data->Is3DActor( *n ) )
+      {
+      } // fi
+
+    } // rof
 
   } // fi
 }
 
-#endif // cpExtensions_QT4
-
 // eof - $RCSfile$