1 #include <cpExtensions/QT/ConfigurationChooser.h>
3 #ifdef cpExtensions_QT4
5 #include <cpExtensions/QT/ui_ConfigurationChooser.h>
6 #include <cpExtensions/QT/ActorsWidgetInterface.h>
7 #include <cpExtensions/QT/WindowLevelImageConfiguration.h>
9 // -------------------------------------------------------------------------
10 cpExtensions::QT::ConfigurationChooser::
11 ConfigurationChooser( QWidget* parent, Qt::WindowFlags f )
12 : Superclass( parent, f ),
13 m_UI( new Ui::ConfigurationChooser ),
16 this->m_UI->setupUi( this );
19 // -------------------------------------------------------------------------
20 cpExtensions::QT::ConfigurationChooser::
21 ~ConfigurationChooser( )
26 // -------------------------------------------------------------------------
27 void cpExtensions::QT::ConfigurationChooser::
28 setData( ActorsWidgetInterface* data )
31 if( this->m_Data != NULL )
33 auto actors = this->m_Data->GetActorsNames( );
34 for( auto n = actors.begin( ); n != actors.end( ); ++n )
36 if( this->m_Data->IsWindowLevelImageActor( *n ) )
38 auto wl_wdg = new WindowLevelImageConfiguration( this );
39 wl_wdg->setData( data, *n );
40 this->m_UI->Configurations->addTab( wl_wdg, n->c_str( ) );
42 else if( this->m_Data->IsLUTImageActor( *n ) )
45 else if( this->m_Data->Is3DActor( *n ) )
54 #endif // cpExtensions_QT4