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