+ Q_OBJECT
+
+public:
+ SMESHGUI_GenericHypothesisCreator( const QString& );
+ virtual ~SMESHGUI_GenericHypothesisCreator();
+
+ void create( SMESH::SMESH_Hypothesis_ptr,
+ const QString&, QWidget* );
+ void create( bool, const QString&, QWidget* );
+ void edit( SMESH::SMESH_Hypothesis_ptr,
+ const QString&, QWidget* );
+
+ virtual bool checkParams() const = 0;
+ virtual void onReject();
+
+ QString hypType() const;
+ QString hypName() const;
+ bool isCreation() const;
+
+protected:
+ typedef struct
+ {
+ QString myName;
+ QVariant myValue;
+
+ } StdParam;
+
+ typedef QList<StdParam> ListOfStdParams;
+ typedef QList<QWidget*> ListOfWidgets;
+
+ SMESH::SMESH_Hypothesis_var hypothesis() const;
+ SMESH::SMESH_Hypothesis_var initParamsHypothesis() const;
+ const ListOfWidgets& widgets() const;
+ ListOfWidgets& changeWidgets();
+ QtxDialog* dlg() const;
+
+ virtual QFrame* buildFrame() = 0;
+ QFrame* buildStdFrame();
+ virtual void retrieveParams() const = 0;
+ virtual QString storeParams() const = 0;
+ virtual bool stdParams( ListOfStdParams& ) const;
+ bool getStdParamFromDlg( ListOfStdParams& ) const;
+ static QString stdParamValues( const ListOfStdParams& );
+ virtual void attuneStdWidget( QWidget*, const int ) const;
+ virtual QWidget* getCustomWidget( const StdParam&,
+ QWidget*, const int ) const;
+ virtual bool getParamFromCustomWidget( StdParam&, QWidget* ) const;
+ virtual QString caption() const;
+ virtual QPixmap icon() const;
+ virtual QString type() const;
+
+protected slots:
+ virtual void onValueChanged();
+
+private slots:
+ virtual void onDialogFinished( int );
+
+private:
+ bool editHypothesis( SMESH::SMESH_Hypothesis_ptr,
+ const QString&, QWidget* );
+
+private:
+ SMESH::SMESH_Hypothesis_var myHypo, myInitParamsHypo;
+ QString myHypName;
+ QString myHypType;
+ ListOfWidgets myParamWidgets;
+ bool myIsCreate;
+ QtxDialog* myDlg;
+ QEventLoop* myEventLoop;