Version: 9.15.0
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

◆ Position

Position of compass.

Enumerator
TopLeft 
TopRight 
BottomLeft 
BottomRight 

Constructor & Destructor Documentation

◆ GLViewer_Compass()

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 
)

A 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

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::~GLViewer_Compass ( )

A destructor.

Destructor

References myFont.

Member Function Documentation

◆ getArrowHeightBottom()

int GLViewer_Compass::getArrowHeightBottom ( )
inline

Returns height of arrow cut on bottom.

◆ getArrowHeightTop()

int GLViewer_Compass::getArrowHeightTop ( )
inline

Returns height of arrow header.

◆ getArrowWidthBottom()

int GLViewer_Compass::getArrowWidthBottom ( )
inline

Returns width of base part of arrow.

◆ getArrowWidthTop()

int GLViewer_Compass::getArrowWidthTop ( )
inline

Returns width of wide part of arrow.

◆ getColor()

QColor GLViewer_Compass::getColor ( )
inline

Returns color.

◆ getFont()

GLViewer_TexFont * GLViewer_Compass::getFont ( )

Returns.

Returns
font of compass

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

◆ getPos()

int GLViewer_Compass::getPos ( )
inline

Returns position.

◆ getSize()

int GLViewer_Compass::getSize ( )
inline

Returns diameter.

◆ getVisible()

bool GLViewer_Compass::getVisible ( )
inline

Returns visible status.

◆ setArrowHeightBottom()

void GLViewer_Compass::setArrowHeightBottom ( const int  HeightBot)

A function installing height of arrow cut on bottom.

Sets arrow height bottom

Parameters
HeightBot- new arrow height bottom

References myArrowHeightBottom, myArrowHeightTop, and mySize.

◆ setArrowHeightTop()

void GLViewer_Compass::setArrowHeightTop ( const int  HeightTop)

A function installing height of arrow header.

Sets arrow height top

Parameters
HeightTop- new arrow height top

References myArrowHeightBottom, myArrowHeightTop, and mySize.

◆ setArrowWidthBottom()

void GLViewer_Compass::setArrowWidthBottom ( const int  WidthBot)

A function installing width of base part of arrow.

Sets arrow width bottom

Parameters
WidthBot- new arrow width bottom

References myArrowWidthBottom, and myArrowWidthTop.

◆ setArrowWidthTop()

void GLViewer_Compass::setArrowWidthTop ( const int  WidthTop)

A function installing width of wide part of arrow.

Sets arrow width top

Parameters
WidthTop- new arrow width top

References myArrowWidthTop, and mySize.

◆ setColor()

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

A function installing color.

References OCCViewer::color().

◆ setCompass()

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

A function installing main parameters of compass.

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.

◆ setFont()

void GLViewer_Compass::setFont ( QFont  theFont)

A function installing.

Sets font of compass

Parameters
theFont- new font

References myFont.

◆ setPos()

void GLViewer_Compass::setPos ( const Position  pos)
inline

A function installing position.

◆ setSize()

void GLViewer_Compass::setSize ( const int  size)

A function installing diameter.

Sets size of compass

Parameters
size- new size

References mySize.

◆ setVisible()

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

A function installing a visible status.

Sets visibility of compass

Parameters
vis- new visibility state

References myIsVisible.

Member Data Documentation

◆ isGenereted

bool GLViewer_Compass::isGenereted
protected

Status of generated font.

◆ myArrowHeightBottom

int GLViewer_Compass::myArrowHeightBottom
protected

Height of arrow cut on bottom.

◆ myArrowHeightTop

int GLViewer_Compass::myArrowHeightTop
protected

Height of arrow header.

◆ myArrowWidthBottom

int GLViewer_Compass::myArrowWidthBottom
protected

Width of base part of arrow.

◆ myArrowWidthTop

int GLViewer_Compass::myArrowWidthTop
protected

Width of wide part of arrow.

◆ myCol

QColor GLViewer_Compass::myCol
protected

Compass color.

◆ myFont

GLViewer_TexFont* GLViewer_Compass::myFont
protected

Compass font.

◆ myIsVisible

bool GLViewer_Compass::myIsVisible
protected

Compass invisible status.

◆ myPos

int GLViewer_Compass::myPos
protected

Compass position.

◆ mySize

int GLViewer_Compass::mySize
protected

Compass diameter.


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