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