1 #include <cpExtensions/QT/ConfigurationChooser.h>
2 #include <cpExtensions/QT/ui_ConfigurationChooser.h>
3 #include <cpExtensions/QT/ActorsWidgetInterface.h>
4 #include <cpExtensions/QT/WindowLevelImageConfiguration.h>
6 // -------------------------------------------------------------------------
7 cpExtensions::QT::ConfigurationChooser::
8 ConfigurationChooser( QWidget* parent, Qt::WindowFlags f )
9 : Superclass( parent, f ),
10 m_UI( new Ui::ConfigurationChooser ),
13 this->m_UI->setupUi( this );
16 // -------------------------------------------------------------------------
17 cpExtensions::QT::ConfigurationChooser::
18 ~ConfigurationChooser( )
23 // -------------------------------------------------------------------------
24 void cpExtensions::QT::ConfigurationChooser::
25 setData( ActorsWidgetInterface* data )
28 if( this->m_Data != NULL )
30 auto actors = this->m_Data->GetActorsNames( );
31 for( auto n = actors.begin( ); n != actors.end( ); ++n )
33 if( this->m_Data->IsWindowLevelImageActor( *n ) )
35 auto wl_wdg = new WindowLevelImageConfiguration( this );
36 wl_wdg->setData( data, *n );
37 this->m_UI->Configurations->addTab( wl_wdg, n->c_str( ) );
39 else if( this->m_Data->IsLUTImageActor( *n ) )
42 else if( this->m_Data->Is3DActor( *n ) )