Version: 6.3.1
Public Types | Public Member Functions | Protected Attributes

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.
 ~GLViewer_Compass ()
 A destructor.
void setCompass (const QColor &color, const int size, const Position pos)
 A function installing main parameters of compass.
void setVisible (const bool vis=true)
 A function installing a visible status.
bool getVisible ()
 Returns visible status.
void setSize (const int size)
 A function installing diameter.
int getSize ()
 Returns diameter.
void setPos (const Position pos)
 A function installing position.
int getPos ()
 Returns position.
void setColor (const QColor &color)
 A function installing color.
QColor getColor ()
 Returns color.
void setArrowWidthTop (const int WidthTop)
 A function installing width of wide part of arrow.
int getArrowWidthTop ()
 Returns width of wide part of arrow.
void setArrowWidthBottom (const int WidthBot)
 A function installing width of base part of arrow.
int getArrowWidthBottom ()
 Returns width of base part of arrow.
void setArrowHeightTop (const int HeightTop)
 A function installing height of arrow header.
int getArrowHeightTop ()
 Returns height of arrow header.
void setArrowHeightBottom (const int HeightBot)
 A function installing height of arrow cut on bottom.
int getArrowHeightBottom ()
 Returns height of arrow cut on bottom.
void setFont (QFont theFont)
 A function installing.
GLViewer_TexFontgetFont ()
 Returns.

Protected Attributes

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

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 isGenereted, myArrowHeightBottom, myArrowHeightTop, myArrowWidthBottom, myArrowWidthTop, myCol, myFont, myIsVisible, myPos, and mySize.

GLViewer_Compass::~GLViewer_Compass ( )

Destructor

References myFont.


Member Function Documentation

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 myCol, myPos, and mySize.

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

Sets visibility of compass

Parameters:
vis- new visibility state

References myIsVisible.

bool GLViewer_Compass.getVisible ( )
void GLViewer_Compass::setSize ( const int  size)

Sets size of compass

Parameters:
size- new size

References mySize.

int GLViewer_Compass.getSize ( )
void GLViewer_Compass.setPos ( const Position  pos)
int GLViewer_Compass.getPos ( )
void GLViewer_Compass.setColor ( const QColor &  color)
QColor GLViewer_Compass.getColor ( )
void GLViewer_Compass::setArrowWidthTop ( const int  WidthTop)

Sets arrow width top

Parameters:
WidthTop- new arrow width top

References myArrowWidthTop, and mySize.

int GLViewer_Compass.getArrowWidthTop ( )
void GLViewer_Compass::setArrowWidthBottom ( const int  WidthBot)

Sets arrow width bottom

Parameters:
WidthBot- new arrow width bottom

References myArrowWidthBottom, and myArrowWidthTop.

int GLViewer_Compass.getArrowWidthBottom ( )
void GLViewer_Compass::setArrowHeightTop ( const int  HeightTop)

Sets arrow height top

Parameters:
HeightTop- new arrow height top

References myArrowHeightBottom, myArrowHeightTop, and mySize.

int GLViewer_Compass.getArrowHeightTop ( )
void GLViewer_Compass::setArrowHeightBottom ( const int  HeightBot)

Sets arrow height bottom

Parameters:
HeightBot- new arrow height bottom

References myArrowHeightBottom, myArrowHeightTop, and mySize.

int GLViewer_Compass.getArrowHeightBottom ( )
void GLViewer_Compass::setFont ( QFont  theFont)

Sets font of compass

Parameters:
theFont- new font

References myFont.

GLViewer_TexFont * GLViewer_Compass::getFont ( )
Returns:
font of compass

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


Field Documentation

QColor GLViewer_Compass.myCol [protected]
int GLViewer_Compass.mySize [protected]
int GLViewer_Compass.myPos [protected]
bool GLViewer_Compass.myIsVisible [protected]
bool GLViewer_Compass.isGenereted [protected]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS