]> SALOME platform Git repositories - modules/hydro.git/blobdiff - src/HYDROGUI/HYDROGUI_ShapeBathymetry.h
Salome HOME
refs #1327: implementation of the scaling operations
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ShapeBathymetry.h
index f71e433643d02ebecdaf0cd755f24b26b03771ba..e505f8722db306575c1d435dd0959e26f048a284 100644 (file)
@@ -24,8 +24,9 @@
 #include <Quantity_HArray1OfColor.hxx>
 
 class HYDROData_Bathymetry;
-class Aspect_ColorScale;
+class AIS_ColorScale;
 class HYDROGUI_OCCDisplayer;
+class OCCViewer_ViewWindow;
 
 class HYDROGUI_ShapeBathymetry : public HYDROGUI_Shape
 {
@@ -37,7 +38,18 @@ public:
   virtual ~HYDROGUI_ShapeBathymetry();
 
   void GetRange( double& theMin, double& theMax ) const;
-  void UpdateWithColorScale( const Handle(Aspect_ColorScale)& );
+  void UpdateWithColorScale( const Handle(AIS_ColorScale)& );
+
+  // Re-scale by visible points
+  void RescaleByVisible( OCCViewer_ViewWindow* );
+  // Re-scale by selected points
+  void RescaleBySelection();
+  // Custom (user) re-scale 
+  void Rescale( double theMin, double theMax );
+  // Default re-scale (by all points)
+  void RescaleDefault();
+
+  void TextLabels( bool isOn );
 
   virtual void display( const bool theIsUpdateViewer = true );
   virtual void erase( const bool theIsUpdateViewer = true );
@@ -47,14 +59,26 @@ public:
 
   virtual void               setVisible( const bool theState,
                                          const bool theIsUpdateViewer = true );
+
+  void Build();
+
 protected:
   virtual Handle(AIS_InteractiveObject) createShape() const;
   virtual void displayShape( const bool theIsUpdateViewer );
 
+  void setToUpdateColorScale( bool isChanged );
+  void Rescale( const QList<int>& theIndices, bool isForcedAll );
+
+  QList<int> selected() const;
+
 private:
   HYDROGUI_OCCDisplayer* myDisplayer;
   Handle(TColgp_HArray1OfPnt)     myCoords;
   Handle(Quantity_HArray1OfColor) myColors;
+
+  double myMin;
+  double myMax;
+  bool myRangeInitialized;
 };
 
 #endif