]> Creatis software - cpPlugins.git/blob - appli/PipelineEditor/PipelineEditorMainWindow.cxx
Code cleaning
[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   _QT_CONNECT_ACTION( Open );
30   _QT_CONNECT_ACTION( Save );
31   _QT_CONNECT_ACTION( Close );
32   _QT_CONNECT_ACTION( LoadPluginFile );
33   _QT_CONNECT_ACTION( LoadPluginDirectory );
34   _QT_CONNECT_ACTION( ShowPlugins );
35 }
36
37 // -------------------------------------------------------------------------
38 PipelineEditorMainWindow::
39 ~PipelineEditorMainWindow( )
40 {
41   delete this->m_UI;
42 }
43
44 // -------------------------------------------------------------------------
45 void PipelineEditorMainWindow::
46 _ActionOpen( )
47 {
48   this->_InteractiveLoadWorkspace( );
49 }
50
51 // -------------------------------------------------------------------------
52 void PipelineEditorMainWindow::
53 _ActionSave( )
54 {
55   this->_InteractiveSaveWorkspace( );
56 }
57
58 // -------------------------------------------------------------------------
59 void PipelineEditorMainWindow::
60 _ActionClose( )
61 {
62 }
63
64 // -------------------------------------------------------------------------
65 void PipelineEditorMainWindow::
66 _ActionLoadPluginFile( )
67 {
68   this->_InteractiveLoadPlugins( );
69 }
70
71 // -------------------------------------------------------------------------
72 void PipelineEditorMainWindow::
73 _ActionLoadPluginDirectory( )
74 {
75   this->_InteractiveLoadPluginsFromPath( );
76 }
77
78 // -------------------------------------------------------------------------
79 void PipelineEditorMainWindow::
80 _ActionShowPlugins( )
81 {
82   this->_ShowPlugins( );
83 }
84
85 // eof - $RCSfile$