X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_Shape.h;h=6226f542fbcff620d7907c1012eef022af2d6007;hb=81c9f5cdf82909d0aebd2c491c50fa7516cc80b7;hp=6757079efce6467b2722cedd1b44d24ffb7273ef;hpb=ca0e09c1e1bb19c9855e2f3839243da36097ee1c;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_Shape.h b/src/HYDROGUI/HYDROGUI_Shape.h index 6757079e..6226f542 100644 --- a/src/HYDROGUI/HYDROGUI_Shape.h +++ b/src/HYDROGUI/HYDROGUI_Shape.h @@ -24,31 +24,33 @@ #define HYDROGUI_SHAPE_H #include -#include +#include -#include +#include #include #include #include #include +#include class HYDROGUI_Shape { public: HYDROGUI_Shape( const Handle(AIS_InteractiveContext)& theContext, - const Handle(HYDROData_Object)& theObject ); + const Handle(HYDROData_Entity)& theObject, + const int theZLayer = -1 ); ~HYDROGUI_Shape(); public: virtual void display( const bool theIsUpdateViewer = true ); virtual void erase( const bool theIsUpdateViewer = true ); - virtual void highlight( bool theIsHighlight ); + virtual void highlight( bool theIsHighlight, bool isUpdateViewer ); virtual bool isHighlighted() const; - Handle(HYDROData_Object) getObject() const { return myObject; } + Handle(HYDROData_Entity) getObject() const { return myObject; } virtual void update( const bool theIsUpdateViewer = true ); @@ -63,6 +65,10 @@ public: const bool theToDisplay = true, const bool theIsUpdateViewer = true ); + virtual void setFaces( const TopoDS_Compound& theWires, + const bool theToDisplay = true, + const bool theIsUpdateViewer = true ); + virtual void setFace( const TopoDS_Wire& theWire, const bool theToDisplay = true, const bool theIsUpdateViewer = true ); @@ -71,6 +77,10 @@ public: const bool theToDisplay = true, const bool theIsUpdateViewer = true ); + virtual void setShape( const TopoDS_Shape& theShape, + const bool theToDisplay = true, + const bool theIsUpdateViewer = true ); + virtual void setFillingColor( const QColor& theColor, const bool theToDisplay = true, const bool theIsUpdateViewer = true ); @@ -89,25 +99,33 @@ public: const bool theIsUpdateViewer = true ); virtual QString getTextureFileName() const; + virtual Handle(AIS_Shape) getAISShape() const { return myShape; } + + void setZLayer( const int theZLayer ); + protected: virtual void buildShape(); virtual void updateShape( const bool theToDisplay = true, const bool theIsUpdateViewer = true ); + void displayShape( const bool theIsUpdateViewer ); + virtual QColor getActiveColor() const; private: static double getQuantityColorVal( const int theColorVal ); void colorShapeBorder( const QColor& theColor ); - static QString generateTextureFileName( const Handle(HYDROData_Object)& theImageObj ); + static QString generateTextureFileName( const Handle(HYDROData_Entity)& theImageObj ); void removeTextureFile() const; static QImage reduceTexture( const QImage& theImage, const int theSizeLimit ); private: Handle(AIS_InteractiveContext) myContext; - Handle(HYDROData_Object) myObject; - Handle(AIS_TexturedShape) myShape; + Handle(HYDROData_Entity) myObject; + Handle(AIS_Shape) myShape; + + int myZLayer; bool myIsToUpdate; bool myIsVisible;