]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/ParametersQtDialog.h
d19d31450323814a4ceec7f3ae11cd8d12110784
[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 #include <cpExtensions/Interaction/ImageInteractorStyle.h>
11
12 #include <set>
13
14 #include <QDialog>
15 #include <QGridLayout>
16 #include <QLabel>
17 #include <QVBoxLayout>
18
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       typedef cpExtensions::Interaction::ImageInteractorStyle TStyle;
34
35       typedef std::set< vtkRenderWindowInteractor* > TInteractors;
36
37     public:
38       ParametersQtDialog( QWidget* parent = 0, Qt::WindowFlags f = 0 );
39       virtual ~ParametersQtDialog( );
40
41       bool IsModal( ) const;
42       Parameters* getParameters( ) const;
43       void addInteractor( vtkRenderWindowInteractor* interactor );
44       TInteractors& getInteractors( );
45       const TInteractors& getInteractors( ) const;
46       bool setParameters( Parameters* parameters );
47       void setTitle( const std::string& title );
48
49       virtual int exec( );
50       virtual void show( );
51       void syncParameters( );
52
53     protected:
54       Parameters* m_Parameters;
55       QLabel* m_Title;
56       QGridLayout* m_MainLayout;
57       QVBoxLayout* m_ToolsLayout;
58       bool m_IsModal;
59
60       TInteractors m_Interactors;
61     };
62
63   } // ecapseman
64
65 } // ecapseman
66
67 #endif // cpPlugins_Interface_QT4
68
69 #endif // __CPPLUGINS__INTERFACE__PARAMETERSQTDIALOG__H__
70
71 // eof - $RCSfile$