]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/QT/ConfigurationChooser.cxx
...
[cpPlugins.git] / lib / cpExtensions / QT / ConfigurationChooser.cxx
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>
5
6 // -------------------------------------------------------------------------
7 cpExtensions::QT::ConfigurationChooser::
8 ConfigurationChooser( QWidget* parent, Qt::WindowFlags f )
9   : Superclass( parent, f ),
10     m_UI( new Ui::ConfigurationChooser ),
11     m_Data( NULL )
12 {
13   this->m_UI->setupUi( this );
14 }
15
16 // -------------------------------------------------------------------------
17 cpExtensions::QT::ConfigurationChooser::
18 ~ConfigurationChooser( )
19 {
20   delete this->m_UI;
21 }
22
23 // -------------------------------------------------------------------------
24 void cpExtensions::QT::ConfigurationChooser::
25 setData( ActorsWidgetInterface* data )
26 {
27   this->m_Data = data;
28   if( this->m_Data != NULL )
29   {
30     auto actors = this->m_Data->GetActorsNames( );
31     for( auto n = actors.begin( ); n != actors.end( ); ++n )
32     {
33       if( this->m_Data->IsWindowLevelImageActor( *n ) )
34       {
35         auto wl_wdg = new WindowLevelImageConfiguration( this );
36         wl_wdg->setData( data, *n );
37         this->m_UI->Configurations->addTab( wl_wdg, n->c_str( ) );
38       }
39       else if( this->m_Data->IsLUTImageActor( *n ) )
40       {
41       }
42       else if( this->m_Data->Is3DActor( *n ) )
43       {
44       } // fi
45
46     } // rof
47
48   } // fi
49 }
50
51 // eof - $RCSfile$