Salome HOME
refs #514: add 'Cursor for specific operations' section into preferences of HYDRO...
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ProfileInterpolateOp.h
index c3fe408fd7ed56ba67c2b461c221ded18d261c40..946c3b1bdd53011d301738f724b295f92f3e4e19 100644 (file)
 
 #include <HYDROData_Profile.h>
 
-class HYDROGUI_CurveCreatorProfile;
+#include <AIS_Shape.hxx>
+
+#include <QPair>
+#include <QList>
+
+class HYDROData_IProfilesInterpolator;
 
 class HYDROGUI_ProfileInterpolateOp : public HYDROGUI_Operation
 {
   Q_OBJECT
 
 public:
-  HYDROGUI_ProfileInterpolateOp( HYDROGUI_Module* theModule, bool isEdit );
+  HYDROGUI_ProfileInterpolateOp( HYDROGUI_Module* theModule );
   virtual ~HYDROGUI_ProfileInterpolateOp();
 
-  void                       deleteSelected();
-  bool                       deleteEnabled();
+protected:
+  typedef QList< QPair<QString, QString> > ParamsList;
 
 protected:
   virtual void               startOperation();
@@ -50,14 +55,22 @@ protected:
   virtual bool               processApply( int& theUpdateFlags, QString& theErrorMsg,
                                            QStringList& theBrowseObjectsEntries );
 
-private:
-  void                       displayPreview();
-  void                       erasePreview();
+  QStringList                interpolators() const;
+  HYDROData_IProfilesInterpolator* interpolator( const QString& ) const;
+  void                       updateInterpolator( HYDROData_IProfilesInterpolator* );
+  HYDROData_Profile::ProfilePoints profile( const QString& ) const;
+  ParamsList                 parameters( const QString& ) const;
+  QString                    parameters( const ParamsList& ) const;
+
+  TopoDS_Shape               previewShape( HYDROData_IProfilesInterpolator* ) const;
+
+private slots:
+  void                       updatePreview();
+  void                       onRiverChanged( const QString& );
+  void                       onInterpolatorChanged( const QString& );
 
 private:
-  bool                       myIsEdit;
-  Handle(HYDROData_Profile)  myEditedObject;
-  HYDROGUI_CurveCreatorProfile* myProfile;
+  Handle(AIS_Shape)          myPreview;
 };
 
 #endif