]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/ParametersQtDialog.h
Merge branch 'master' of ssh://git.creatis.insa-lyon.fr/cpPlugins
[cpPlugins.git] / lib / cpPlugins / Interface / ParametersQtDialog.h
1 #ifndef __CPPLUGINS__INTERFACE__PARAMETERSQTDIALOG__H__
2 #define __CPPLUGINS__INTERFACE__PARAMETERSQTDIALOG__H__
3
4 #include <cpPlugins/Interface/Config.h>
5
6 #ifdef cpPlugins_Interface_QT4
7
8 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
9 #include <cpPlugins/Interface/Parameters.h>
10
11 #include <vector>
12
13 #include <QDialog>
14 #include <QGridLayout>
15 #include <QLabel>
16 #include <QVBoxLayout>
17
18 class vtkAbstractWidget;
19 class vtkRenderWindowInteractor;
20
21 namespace cpPlugins
22 {
23   namespace Interface
24   {
25     /**
26      */
27     class cpPlugins_Interface_EXPORT ParametersQtDialog
28       : public QDialog
29     {
30       Q_OBJECT;
31
32     public:
33       ParametersQtDialog( QWidget* parent = 0, Qt::WindowFlags f = 0 );
34       virtual ~ParametersQtDialog( );
35
36       bool IsModal( ) const;
37       Parameters* getParameters( ) const;
38       void setInteractor( vtkRenderWindowInteractor* interactor );
39       bool setParameters( Parameters* parameters );
40       void setTitle( const std::string& title );
41
42       virtual int exec( );
43       virtual void show( );
44       void syncParameters( );
45
46     protected:
47       Parameters* m_Parameters;
48       QLabel* m_Title;
49       QGridLayout* m_MainLayout;
50       QVBoxLayout* m_ToolsLayout;
51       bool m_IsModal;
52
53       vtkRenderWindowInteractor*        m_Interactor;
54       std::vector< vtkAbstractWidget* > m_Widgets;
55     };
56
57   } // ecapseman
58
59 } // ecapseman
60
61 #endif // cpPlugins_Interface_QT4
62
63 #endif // __CPPLUGINS__INTERFACE__PARAMETERSQTDIALOG__H__
64
65 // eof - $RCSfile$