X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_Shape.h;h=007c3e52d20cecdbae30b027f805739d99686b51;hb=de7cf9bb0a7a41d6487013c87f4a54d0664cd303;hp=6572c80d5674fcc3798e086aa7941efb2cf9d5e2;hpb=0c405019de08dccfacd64f71f18211cbe912cc1d;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_Shape.h b/src/HYDROGUI/HYDROGUI_Shape.h index 6572c80d..007c3e52 100644 --- a/src/HYDROGUI/HYDROGUI_Shape.h +++ b/src/HYDROGUI/HYDROGUI_Shape.h @@ -24,11 +24,12 @@ #define HYDROGUI_SHAPE_H #include -#include +#include -#include +#include #include +#include #include #include @@ -37,7 +38,7 @@ class HYDROGUI_Shape { public: HYDROGUI_Shape( const Handle(AIS_InteractiveContext)& theContext, - const Handle(HYDROData_Object)& theObject ); + const Handle(HYDROData_Entity)& theObject ); ~HYDROGUI_Shape(); public: @@ -47,7 +48,7 @@ public: virtual void highlight( bool theIsHighlight ); 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 ); @@ -62,6 +63,10 @@ public: const bool theToDisplay = true, const bool theIsUpdateViewer = true ); + virtual void setFace( const TopoDS_Wire& theWire, + const bool theToDisplay = true, + const bool theIsUpdateViewer = true ); + virtual void setFace( const TopoDS_Face& theFace, const bool theToDisplay = true, const bool theIsUpdateViewer = true ); @@ -79,6 +84,11 @@ public: virtual void setHighlightColor( const QColor& theColor ); virtual QColor getHighlightColor() const; + virtual void setTextureFileName( const QString& theFileName, + const bool theToDisplay = true, + const bool theIsUpdateViewer = true ); + virtual QString getTextureFileName() const; + protected: virtual void buildShape(); virtual void updateShape( const bool theToDisplay = true, @@ -89,20 +99,28 @@ private: static double getQuantityColorVal( const int theColorVal ); void colorShapeBorder( const QColor& theColor ); + 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_Shape) myShape; + Handle(HYDROData_Entity) myObject; + Handle(AIS_TexturedShape) myShape; bool myIsToUpdate; bool myIsVisible; bool myIsHighlight; - TopoDS_Face myFace; + TopoDS_Shape myTopoShape; + int myDisplayMode; QColor myFillingColor; QColor myBorderColor; QColor myHighlightColor; + + QString myTextureFileName; }; #endif