Salome HOME
Merge branch 'BR_H2018_2' of https://codev-tuleap.cea.fr/plugins/git/salome/hydro...
[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 class HYDROGUI_ImagePrs : public AIS_InteractiveObject
32 {
33 public:
34     HYDROGUI_ImagePrs();
35     HYDROGUI_ImagePrs( const Handle(Image_PixMap)&, const QPolygonF& );
36     virtual ~HYDROGUI_ImagePrs();
37
38     QPolygonF              GetContour() const;
39     void                   SetContour( const QPolygonF& );
40
41     Handle(Image_PixMap)   GetImage() const;
42     void                   SetImage( const Handle(Image_PixMap)& );
43
44     virtual void           Compute( const Handle(PrsMgr_PresentationManager3d)&,
45                                     const Handle(Prs3d_Presentation)&, const Standard_Integer = 0 );
46     virtual void           ComputeSelection( const Handle(SelectMgr_Selection)&, const Standard_Integer );
47
48     DEFINE_STANDARD_RTTIEXT(HYDROGUI_ImagePrs, AIS_InteractiveObject)
49
50 private:
51     gp_Pnt                 convert( const QPointF& ) const;
52
53 private:
54     Handle(Image_PixMap)   myImage;
55     QPolygonF              myContour;
56 };
57
58 #endif