Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GLViewer_Compass Class Reference

#include <GLViewer_Compass.h>

Public Types

enum  Position { TopLeft, TopRight, BottomLeft, BottomRight }
 Position of compass. More...
 

Public Member Functions

 GLViewer_Compass (const QColor &color=QColor(0, 255, 0), const int size=60, const Position pos=TopRight, const int WidthTop=20, const int WidthBottom=10, const int HeightTop=25, const int HeightBottom=7)
 A constructor. More...
 
 ~GLViewer_Compass ()
 A destructor. More...
 
void setCompass (const QColor &color, const int size, const Position pos)
 A function installing main parameters of compass. More...
 
void setVisible (const bool vis=true)
 A function installing a visible status. More...
 
bool getVisible ()
 Returns visible status. More...
 
void setSize (const int size)
 A function installing diameter. More...
 
int getSize ()
 Returns diameter. More...
 
void setPos (const Position pos)
 A function installing position. More...
 
int getPos ()
 Returns position. More...
 
void setColor (const QColor &color)
 A function installing color. More...
 
QColor getColor ()
 Returns color. More...
 
void setArrowWidthTop (const int WidthTop)
 A function installing width of wide part of arrow. More...
 
int getArrowWidthTop ()
 Returns width of wide part of arrow. More...
 
void setArrowWidthBottom (const int WidthBot)
 A function installing width of base part of arrow. More...
 
int getArrowWidthBottom ()
 Returns width of base part of arrow. More...
 
void setArrowHeightTop (const int HeightTop)
 A function installing height of arrow header. More...
 
int getArrowHeightTop ()
 Returns height of arrow header. More...
 
void setArrowHeightBottom (const int HeightBot)
 A function installing height of arrow cut on bottom. More...
 
int getArrowHeightBottom ()
 Returns height of arrow cut on bottom. More...
 
void setFont (QFont theFont)
 A function installing. More...
 
GLViewer_TexFontgetFont ()
 Returns. More...
 

Protected Attributes

QColor myCol
 Compass color. More...
 
int mySize
 Compass diameter. More...
 
int myPos
 Compass position. More...
 
bool myIsVisible
 Compass invisible status. More...
 
int myArrowWidthTop
 Width of wide part of arrow. More...
 
int myArrowWidthBottom
 Width of base part of arrow. More...
 
int myArrowHeightTop
 Height of arrow header. More...
 
int myArrowHeightBottom
 Height of arrow cut on bottom. More...
 
GLViewer_TexFontmyFont
 Compass font. More...
 
bool isGenereted
 Status of generated font. More...
 

Detailed Description

Class GLViewer_Compass Class implement representatiof of compass in one of corner in GLViewer. Compass it's a some round visual pointer rotated with view window and located in fixed place (in one fixed corner)

Member Enumeration Documentation

Enumerator
TopLeft 
TopRight 
BottomLeft 
BottomRight 

Constructor & Destructor Documentation

GLViewer_Compass::GLViewer_Compass ( const QColor &  color = QColor ( 0, 255, 0 ),
const int  size = 60,
const Position  pos = TopRight,
const int  WidthTop = 20,
const int  WidthBottom = 10,
const int  HeightTop = 25,
const int  HeightBottom = 7 
)
Parameters
color- a color of compass
size- a diameter of compass
pos- a position
WidthTop- width of wide part of arrow
WidthBottom- width of base part of arrow
HeightTop- height of arrow header
HeightBottom- height of arrow cut on bottom

Constructor

Parameters
color- a color of compass
size- a diameter of compass
pos- a position
WidthTop- width of wide part of arrow
WidthBottom- width of base part of arrow
HeightTop- height of arrow header
HeightBottom- height of arrow cut on bottom

References OCCViewer::color(), isGenereted, myArrowHeightBottom, myArrowHeightTop, myArrowWidthBottom, myArrowWidthTop, myCol, myFont, myIsVisible, myPos, and mySize.

GLViewer_Compass::~GLViewer_Compass ( )

Destructor

References myFont.

Member Function Documentation

int GLViewer_Compass::getArrowHeightBottom ( )
inline
int GLViewer_Compass::getArrowHeightTop ( )
inline
int GLViewer_Compass::getArrowWidthBottom ( )
inline
int GLViewer_Compass::getArrowWidthTop ( )
inline
QColor GLViewer_Compass::getColor ( )
inline
GLViewer_TexFont * GLViewer_Compass::getFont ( )
Returns
font of compass

References GLViewer_TexFont::generateTexture(), isGenereted, and myFont.

int GLViewer_Compass::getPos ( )
inline
int GLViewer_Compass::getSize ( )
inline
bool GLViewer_Compass::getVisible ( )
inline
void GLViewer_Compass::setArrowHeightBottom ( const int  HeightBot)

Sets arrow height bottom

Parameters
HeightBot- new arrow height bottom

References myArrowHeightBottom, myArrowHeightTop, and mySize.

void GLViewer_Compass::setArrowHeightTop ( const int  HeightTop)

Sets arrow height top

Parameters
HeightTop- new arrow height top

References myArrowHeightBottom, myArrowHeightTop, and mySize.

void GLViewer_Compass::setArrowWidthBottom ( const int  WidthBot)

Sets arrow width bottom

Parameters
WidthBot- new arrow width bottom

References myArrowWidthBottom, and myArrowWidthTop.

void GLViewer_Compass::setArrowWidthTop ( const int  WidthTop)

Sets arrow width top

Parameters
WidthTop- new arrow width top

References myArrowWidthTop, and mySize.

void GLViewer_Compass::setColor ( const QColor &  color)
inline

References OCCViewer::color().

void GLViewer_Compass::setCompass ( const QColor &  color,
const int  size,
const Position  pos 
)

Sets parameters of compass

Parameters
color- a color of compass
size- a diameter of compass
pos- a position

References OCCViewer::color(), myCol, myPos, and mySize.

void GLViewer_Compass::setFont ( QFont  theFont)

Sets font of compass

Parameters
theFont- new font

References myFont.

void GLViewer_Compass::setPos ( const Position  pos)
inline
void GLViewer_Compass::setSize ( const int  size)

Sets size of compass

Parameters
size- new size

References mySize.

void GLViewer_Compass::setVisible ( const bool  vis = true)

Sets visibility of compass

Parameters
vis- new visibility state

References myIsVisible.

Member Data Documentation

bool GLViewer_Compass::isGenereted
protected
int GLViewer_Compass::myArrowHeightBottom
protected
int GLViewer_Compass::myArrowHeightTop
protected
int GLViewer_Compass::myArrowWidthBottom
protected
int GLViewer_Compass::myArrowWidthTop
protected
QColor GLViewer_Compass::myCol
protected
GLViewer_TexFont* GLViewer_Compass::myFont
protected
bool GLViewer_Compass::myIsVisible
protected
int GLViewer_Compass::myPos
protected
int GLViewer_Compass::mySize
protected

The documentation for this class was generated from the following files: