]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/ParametersQtDialog.h
XML IO added. Workspace singleton added to simplify pipeline definition and execution.
[cpPlugins.git] / lib / cpPlugins / Interface / ParametersQtDialog.h
index ea9f84de53ebc017dc137c0949b57c1becc04164..d19d31450323814a4ceec7f3ae11cd8d12110784 100644 (file)
@@ -7,18 +7,58 @@
 
 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
 #include <cpPlugins/Interface/Parameters.h>
+#include <cpExtensions/Interaction/ImageInteractorStyle.h>
 
-class QWidget;
+#include <set>
+
+#include <QDialog>
+#include <QGridLayout>
+#include <QLabel>
+#include <QVBoxLayout>
+
+class vtkRenderWindowInteractor;
 
 namespace cpPlugins
 {
   namespace Interface
   {
-    bool cpPlugins_Interface_EXPORT ParametersQtDialog(
-      Parameters* parameters,
-      const std::string& title,
-      QWidget* parent = NULL
-      );
+    /**
+     */
+    class cpPlugins_Interface_EXPORT ParametersQtDialog
+      : public QDialog
+    {
+      Q_OBJECT;
+
+    public:
+      typedef cpExtensions::Interaction::ImageInteractorStyle TStyle;
+
+      typedef std::set< vtkRenderWindowInteractor* > TInteractors;
+
+    public:
+      ParametersQtDialog( QWidget* parent = 0, Qt::WindowFlags f = 0 );
+      virtual ~ParametersQtDialog( );
+
+      bool IsModal( ) const;
+      Parameters* getParameters( ) const;
+      void addInteractor( vtkRenderWindowInteractor* interactor );
+      TInteractors& getInteractors( );
+      const TInteractors& getInteractors( ) const;
+      bool setParameters( Parameters* parameters );
+      void setTitle( const std::string& title );
+
+      virtual int exec( );
+      virtual void show( );
+      void syncParameters( );
+
+    protected:
+      Parameters* m_Parameters;
+      QLabel* m_Title;
+      QGridLayout* m_MainLayout;
+      QVBoxLayout* m_ToolsLayout;
+      bool m_IsModal;
+
+      TInteractors m_Interactors;
+    };
 
   } // ecapseman