]> Creatis software - cpPlugins.git/blob - appli/PipelineEditor/PipelineEditorMainWindow.cxx
...
[cpPlugins.git] / appli / PipelineEditor / PipelineEditorMainWindow.cxx
1 #include <appli/PipelineEditor/PipelineEditorMainWindow.h>
2 #include <appli/PipelineEditor/ui_PipelineEditorMainWindow.h>
3
4 #include <QMessageBox>
5
6 // -------------------------------------------------------------------------
7 #define _QT_CONNECT_ACTION( ACTION )                    \
8   this->connect(                                        \
9     this->m_UI->Action##ACTION, SIGNAL( triggered( ) ), \
10     this, SLOT( _Action##ACTION( ) )                    \
11     )
12
13 // -------------------------------------------------------------------------
14 PipelineEditorMainWindow::
15 PipelineEditorMainWindow(
16   int argc, char* argv[], QApplication* app, QWidget* parent
17   )
18   : Superclass( argc, argv, app, parent ),
19     m_UI( new Ui::PipelineEditorMainWindow )
20 {
21   // Basic UI configuration
22   this->m_UI->setupUi( this );
23   this->UpdateEnvironment( );
24   this->_Configure(
25     this->m_UI->Plugins, this->m_UI->MPR, this->m_UI->Canvas->editor( )
26     );
27
28   // Slots <-> signals
29   this->connect(
30     this->m_UI->ActionOpen, SIGNAL( triggered( ) ),
31     this, SLOT( _InteractiveLoadWorkspace( ) )
32     );
33   this->connect(
34     this->m_UI->ActionSave, SIGNAL( triggered( ) ),
35     this, SLOT( _InteractiveSaveWorkspace( ) )
36     );
37   // TODO: _QT_CONNECT_ACTION( Close );
38   this->connect(
39     this->m_UI->ActionLoadPluginFile, SIGNAL( triggered( ) ),
40     this, SLOT( _InteractiveLoadPlugins( ) )
41     );
42   this->connect(
43     this->m_UI->ActionLoadPluginDirectory, SIGNAL( triggered( ) ),
44     this, SLOT( _InteractiveLoadPluginsFromPath( ) )
45     );
46   this->connect(
47     this->m_UI->ActionShowPlugins, SIGNAL( triggered( ) ),
48     this, SLOT( _ShowPlugins( ) )
49     );
50   this->connect(
51     this->m_UI->ActionAddEnvironmentPath, SIGNAL( triggered( ) ),
52     this, SLOT( _InteractiveAddEnviromentPaths( ) )
53     );
54 }
55
56 // -------------------------------------------------------------------------
57 PipelineEditorMainWindow::
58 ~PipelineEditorMainWindow( )
59 {
60   delete this->m_UI;
61 }
62
63 // eof - $RCSfile$