Salome HOME
refs #567: add "POLYLINES" partition and modified icon for Land Cover object.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ImagePrs.h
1 // Copyright (C) 2014-2015  EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
6 //
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10 // Lesser General Public License for more details.
11 //
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
15 //
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
17 //
18
19 #ifndef HYDROGUI_IMAGEPRS_H
20 #define HYDROGUI_IMAGEPRS_H
21
22 #include <AIS_InteractiveObject.hxx>
23
24 #include <Image_PixMap.hxx>
25
26 #include <QPolygonF>
27
28 class Font_FTFont;
29 class HYDROGUI_ImagePrs;
30
31 DEFINE_STANDARD_HANDLE(HYDROGUI_ImagePrs, AIS_InteractiveObject)
32
33 class HYDROGUI_ImagePrs : public AIS_InteractiveObject
34 {
35 public:
36     HYDROGUI_ImagePrs();
37     HYDROGUI_ImagePrs( const Handle(Image_PixMap)&, const QPolygonF& );
38     virtual ~HYDROGUI_ImagePrs();
39
40     QPolygonF              GetContour() const;
41     void                   SetContour( const QPolygonF& );
42
43     Handle(Image_PixMap)   GetImage() const;
44     void                   SetImage( const Handle(Image_PixMap)& );
45
46     virtual void           Compute( const Handle(PrsMgr_PresentationManager3d)&,
47                                     const Handle(Prs3d_Presentation)&, const Standard_Integer = 0 );
48     virtual void           ComputeSelection( const Handle(SelectMgr_Selection)&, const Standard_Integer );
49
50     DEFINE_STANDARD_RTTI(HYDROGUI_ImagePrs)
51
52 private:
53     gp_Pnt                 convert( const QPointF& ) const;
54
55 private:
56     Handle(Image_PixMap)   myImage;
57     QPolygonF              myContour;
58 };
59
60 #endif