1 // File: GLViewer_Compass.h
2 // Created: November, 2004
4 // Copyright (C) CEA 2004
6 #ifndef GLVIEWER_COMPASS_H
7 #define GLVIEWER_COMPASS_H
14 #pragma warning( disable:4251 )
17 /*! Class GLViewer_Compass
18 * Class implement representatiof of compass in one of corner in GLViewer.
19 * Compass it's a some round visual pointer rotated with view window and
20 * located in fixed place (in one fixed corner)
23 class GLViewer_TexFont;
25 class GLVIEWER_API GLViewer_Compass
28 //! Position of compass
39 *\param color - a color of compass
40 *\param size - a diameter of compass
41 *\param pos - a position
42 *\param WidthTop - width of wide part of arrow
43 *\param WidthBottom - width of base part of arrow
44 *\param HeightTop - height of arrow header
45 *\param HeightBottom - height of arrow cut on bottom
47 GLViewer_Compass( const QColor& color = QColor ( 0, 255, 0 ),
49 const Position pos = TopRight,
50 const int WidthTop = 20,
51 const int WidthBottom = 10,
52 const int HeightTop = 25,
53 const int HeightBottom = 7 );
57 //! A function installing main parameters of compass
58 void setCompass( const QColor& color, const int size, const Position pos );
59 //! A function installing a visible status
60 void setVisible( const bool vis = true );
61 //! Returns visible status
62 bool getVisible(){ return myIsVisible; };
64 //! A function installing diameter
65 void setSize( const int size );
67 int getSize(){ return mySize; }
69 //! A function installing position
70 void setPos( const Position pos ){ myPos = pos; }
72 int getPos(){ return myPos; }
74 //! A function installing color
75 void setColor( const QColor& color ){ myCol = color; }
77 QColor getColor(){ return myCol; }
79 //! A function installing width of wide part of arrow
80 void setArrowWidthTop( const int WidthTop );
81 //! Returns width of wide part of arrow
82 int getArrowWidthTop(){ return myArrowWidthTop; }
84 //! A function installing width of base part of arrow
85 void setArrowWidthBottom( const int WidthBot );
86 //! Returns width of base part of arrow
87 int getArrowWidthBottom(){return myArrowWidthBottom;};
89 //! A function installing height of arrow header
90 void setArrowHeightTop( const int HeightTop );
91 //! Returns height of arrow header
92 int getArrowHeightTop(){return myArrowHeightTop;};
94 //! A function installing height of arrow cut on bottom
95 void setArrowHeightBottom( const int HeightBot );
96 //! Returns height of arrow cut on bottom
97 int getArrowHeightBottom(){return myArrowHeightBottom;};
99 //! A function installing
100 void setFont( QFont theFont );
102 GLViewer_TexFont* getFont();
111 //! Compass invisible status
113 //! Width of wide part of arrow
115 //! Width of base part of arrow
116 int myArrowWidthBottom;
117 //! Height of arrow header
118 int myArrowHeightTop;
119 //! Height of arrow cut on bottom
120 int myArrowHeightBottom;
122 GLViewer_TexFont* myFont;
123 //! Status of generated font
128 #pragma warning ( default:4251 )