Salome HOME
Fix for problem: SIGSEGV appears if to select group after opening "Edit Group" dialog...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_aParameterDlg.h
index c78aa9c1cdd896bbaad4aea8025b76d7ea23dec9..7fd28a96f564bcf3b3e8cf03371a943cf709402e 100644 (file)
 // QT Includes
 #include <qdialog.h>
 
+#include <list>
+#include "SMESHGUI_aParameter.h"
+
 class QLabel;
 class QPushButton;
-class QSpinBox;
 class SMESHGUI;
-class QAD_SpinBoxDbl;
+class QWidget;
 
 //=================================================================================
 // class    : SMESHGUI_aParameterDlg
 // purpose  :
 //=================================================================================
 class SMESHGUI_aParameterDlg : public QDialog
-{ 
+{
     Q_OBJECT
 
 public:
-    SMESHGUI_aParameterDlg( QWidget*     parent   = 0,
-                           QString      title    = QString::null,
-                           QString      label    = QString::null,
-                           const double bottom   = -1E6,
-                           const double top      = +1E6,
-                           const int    decimals = 3,
-                           bool         modal    = TRUE );
-    SMESHGUI_aParameterDlg( QWidget*     parent   = 0,
-                           QString      title    = QString::null,
-                           QString      label    = QString::null,
-                           const int    bottom   = 0,
-                           const int    top      = 1000,
-                           bool         modal    = TRUE );
+    SMESHGUI_aParameterDlg( SMESHGUI*,
+                           std::list<SMESHGUI_aParameterPtr> params,
+                           QString                           title  = QString::null,
+                           bool                              modal  = TRUE);
 
     ~SMESHGUI_aParameterDlg();
 
-    void   setValue( const double val );
-    void   setValue( const int    val );
-    double getDblValue();
-    int    getIntValue();
+    /* Parameter function */
+    static bool Parameters( SMESHGUI*, std::list<SMESHGUI_aParameterPtr> params, const char *aTitle);
 
 protected:
-    void init( bool isDouble );
+    void init();
+
+protected slots:
+    virtual void onValueChanged();
+    
+private slots:
+    void ClickOnOk();
+    void UpdateShown( const SMESHGUI_aParameterPtr, QWidget* );
 
 private:
-    SMESHGUI*       mySMESHGUI ;
+    SMESHGUI*       mySMESHGUI;
 
     QPushButton*    myButtonOk;
     QPushButton*    myButtonCancel;
-    QLabel*         myTextLabel;
-    QSpinBox*       myIntSpin;
-    QAD_SpinBoxDbl* myDblSpin;
+
+    std::list<QWidget*>               mySpinList, myLabelList;
+    std::list<SMESHGUI_aParameterPtr> myParamList;
 };
 
 #endif // SMESHGUI_aParameterDlg.h