]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/ParametersQtDialog.h
4d4d37f731c5404ea5aa732906f881ae3fbca4a7
[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 <QDialogButtonBox>
16 #include <QGridLayout>
17 #include <QLabel>
18 #include <QVBoxLayout>
19
20 class vtkRenderWindowInteractor;
21
22 namespace cpPlugins
23 {
24   namespace Interface
25   {
26     /**
27      */
28     class cpPlugins_Interface_EXPORT ParametersQtDialog
29       : public QDialog
30     {
31       Q_OBJECT;
32
33     public:
34       typedef cpExtensions::Interaction::ImageInteractorStyle TStyle;
35
36       typedef std::set< vtkRenderWindowInteractor* > TInteractors;
37
38     public:
39       ParametersQtDialog( QWidget* parent = 0, Qt::WindowFlags f = 0 );
40       virtual ~ParametersQtDialog( );
41
42       Parameters* getParameters( ) const;
43       void addInteractor( vtkRenderWindowInteractor* interactor );
44       TInteractors& getInteractors( );
45       const TInteractors& getInteractors( ) const;
46       bool setParameters( Parameters* parameters );
47
48       virtual int exec( );
49       virtual void show( );
50
51       void updateParameters( );
52       void updateView( );
53
54     protected slots:
55       void _dlg_OpenSingleFile( );
56       void _dlg_SaveSingleFile( );
57       void _dlg_OpenSinglePath( );
58       void _dlg_OpenMultipleFiles( );
59       void _dlg_AddInt( );
60       void _dlg_AddUint( );
61       void _dlg_AddReal( );
62
63     protected:
64       Parameters* m_Parameters;
65       QLabel* m_Title;
66       QGridLayout* m_MainLayout;
67       QVBoxLayout* m_ToolsLayout;
68       QDialogButtonBox* m_Buttons;
69
70       TInteractors m_Interactors;
71     };
72
73   } // ecapseman
74
75 } // ecapseman
76
77 #endif // cpPlugins_Interface_QT4
78
79 #endif // __CPPLUGINS__INTERFACE__PARAMETERSQTDIALOG__H__
80
81 // eof - $RCSfile$