]> Creatis software - cpPlugins.git/blob - appli/PipelineEditor/PipelineEditor.h
...
[cpPlugins.git] / appli / PipelineEditor / PipelineEditor.h
1 #ifndef __PIPELINEEDITOR__H__
2 #define __PIPELINEEDITOR__H__
3
4 // Qt stuff
5 #include <QApplication>
6 #include <QMainWindow>
7 #include <cpPlugins/Interface.h>
8 #include <cpPlugins/Workspace.h>
9
10 /**
11  */
12 class PipelineEditor_Blocker
13   : public QObject
14 {
15 protected:
16   virtual bool eventFilter( QObject* obj, QEvent* event ) override;
17 };
18
19 /*
20   class PipelineEditor;
21   struct PipelineEditor_Application
22   {
23   QApplication           Application;
24   PipelineEditor         Window;
25   PipelineEditor_Blocker Blocker;
26   PipelineEditor_Application( int argc, char* argv[] );
27   void Show( );
28   int Exec( );
29   void Block( );
30   void UnBlock( );
31   };
32 */
33
34 // -------------------------------------------------------------------------
35 namespace Ui
36 {
37   class PipelineEditor;
38 }
39
40 /**
41  */
42 class PipelineEditor
43   : public QMainWindow
44 {
45   Q_OBJECT;
46
47 public:
48   typedef PipelineEditor Self;
49   typedef QMainWindow    Superclass;
50
51 public:
52   explicit PipelineEditor(
53     int argc, char* argv[],
54     QApplication* app,
55     QWidget* parent = NULL
56     );
57   virtual ~PipelineEditor( );
58
59 protected:
60   void _LoadPluginsFromPath( const std::string& path );
61   void _UpdateLoadedPlugins( );
62   void _Block( );
63   void _UnBlock( );
64
65 protected slots:
66   void _ButtonLoadPluginsFile( );
67   void _ButtonLoadPluginsPath( );
68   void _ActionOpenWorkspace( );
69   void _ActionSaveWorkspace( );
70   void _ExecFilter( const std::string& filter_name );
71   void _ShowFilterOutput(
72     const std::string& filter_name, const std::string& output_name
73     );
74
75 private:
76   Ui::PipelineEditor*    m_UI;
77   QApplication*          m_Application;
78   PipelineEditor_Blocker m_Blocker;
79   cpPlugins::Workspace*  m_Workspace;
80   cpPlugins::Interface   m_Interface;
81   std::string            m_PluginsPath;
82 };
83
84 #endif // __CPPIPELINEEDITOR__H__
85
86 // eof - $RCSfile$