MorphoGraphX  2.0-1-227
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mgx::ScaleBar Class Reference

#include <ScaleBar.hpp>

Public Types

enum  Position {
  Top, Bottom, Left, Right,
  TopLeft, BottomLeft, TopRight, BottomRight,
  Center
}
 
enum  Direction { Horizontal, Vertical }
 
enum  TextPosition { In, Out }
 
typedef Vector< 2, size_t > Point2u
 

Public Member Functions

 ScaleBar ()
 
void setWantedSize (double ws)
 
void setScale (double s)
 
void setUnit (QString u)
 
void setPosition (Position p)
 
void setThickness (int th)
 
void setShiftBorder (const Point2u &pt)
 
void setFont (const QFont &fnt)
 
void setFontSize (int size)
 
void init (QGLViewer *viewer)
 
void draw (QGLViewer *viewer, QPaintDevice *device=0)
 
void readParms (Parms &parms, QString section)
 
void writeParms (QTextStream &pout, QString section)
 
void scaleDrawing (double s)
 
void restoreScale ()
 

Protected Member Functions

void findScale (double unit_size)
 

Protected Attributes

double wantedSize
 
double scale
 
QString unit
 
bool displayUnit
 
Position pos
 
Direction dir
 
QFont unit_font
 
double thickness
 
Point2u shiftBorder
 
TextPosition textPosition
 
int fontSize
 
bool autoScale
 
bool autoUnit
 
double minSize
 
double maxSize
 
double globalScale
 

Detailed Description

Definition at line 31 of file ScaleBar.hpp.

Member Typedef Documentation

◆ Point2u

typedef Vector<2, size_t> mgx::ScaleBar::Point2u

Definition at line 34 of file ScaleBar.hpp.

Member Enumeration Documentation

◆ Direction

Enumerator
Horizontal 
Vertical 

Definition at line 37 of file ScaleBar.hpp.

◆ Position

Enumerator
Top 
Bottom 
Left 
Right 
TopLeft 
BottomLeft 
TopRight 
BottomRight 
Center 

Definition at line 35 of file ScaleBar.hpp.

◆ TextPosition

Enumerator
In 
Out 

Definition at line 39 of file ScaleBar.hpp.

Constructor & Destructor Documentation

◆ ScaleBar()

mgx::ScaleBar::ScaleBar ( )

Member Function Documentation

◆ draw()

void mgx::ScaleBar::draw ( QGLViewer viewer,
QPaintDevice *  device = 0 
)

◆ findScale()

void mgx::ScaleBar::findScale ( double  unit_size)
protected

◆ init()

void mgx::ScaleBar::init ( QGLViewer viewer)

◆ readParms()

void mgx::ScaleBar::readParms ( Parms parms,
QString  section 
)

◆ restoreScale()

void mgx::ScaleBar::restoreScale ( )

◆ scaleDrawing()

void mgx::ScaleBar::scaleDrawing ( double  s)

◆ setFont()

void mgx::ScaleBar::setFont ( const QFont &  fnt)
inline

Definition at line 80 of file ScaleBar.hpp.

◆ setFontSize()

void mgx::ScaleBar::setFontSize ( int  size)
inline

Definition at line 84 of file ScaleBar.hpp.

◆ setPosition()

void mgx::ScaleBar::setPosition ( Position  p)
inline

Definition at line 63 of file ScaleBar.hpp.

◆ setScale()

void mgx::ScaleBar::setScale ( double  s)
inline

Definition at line 49 of file ScaleBar.hpp.

◆ setShiftBorder()

void mgx::ScaleBar::setShiftBorder ( const Point2u pt)
inline

Definition at line 76 of file ScaleBar.hpp.

◆ setThickness()

void mgx::ScaleBar::setThickness ( int  th)
inline

Definition at line 68 of file ScaleBar.hpp.

◆ setUnit()

void mgx::ScaleBar::setUnit ( QString  u)
inline

Definition at line 55 of file ScaleBar.hpp.

◆ setWantedSize()

void mgx::ScaleBar::setWantedSize ( double  ws)
inline

Definition at line 43 of file ScaleBar.hpp.

◆ writeParms()

void mgx::ScaleBar::writeParms ( QTextStream &  pout,
QString  section 
)

Member Data Documentation

◆ autoScale

bool mgx::ScaleBar::autoScale
protected

Definition at line 110 of file ScaleBar.hpp.

◆ autoUnit

bool mgx::ScaleBar::autoUnit
protected

Definition at line 110 of file ScaleBar.hpp.

◆ dir

Direction mgx::ScaleBar::dir
protected

Definition at line 104 of file ScaleBar.hpp.

◆ displayUnit

bool mgx::ScaleBar::displayUnit
protected

Definition at line 102 of file ScaleBar.hpp.

◆ fontSize

int mgx::ScaleBar::fontSize
protected

Definition at line 109 of file ScaleBar.hpp.

◆ globalScale

double mgx::ScaleBar::globalScale
protected

Definition at line 113 of file ScaleBar.hpp.

◆ maxSize

double mgx::ScaleBar::maxSize
protected

Definition at line 111 of file ScaleBar.hpp.

◆ minSize

double mgx::ScaleBar::minSize
protected

Definition at line 111 of file ScaleBar.hpp.

◆ pos

Position mgx::ScaleBar::pos
protected

Definition at line 103 of file ScaleBar.hpp.

◆ scale

double mgx::ScaleBar::scale
protected

Definition at line 100 of file ScaleBar.hpp.

◆ shiftBorder

Point2u mgx::ScaleBar::shiftBorder
protected

Definition at line 107 of file ScaleBar.hpp.

◆ textPosition

TextPosition mgx::ScaleBar::textPosition
protected

Definition at line 108 of file ScaleBar.hpp.

◆ thickness

double mgx::ScaleBar::thickness
protected

Definition at line 106 of file ScaleBar.hpp.

◆ unit

QString mgx::ScaleBar::unit
protected

Definition at line 101 of file ScaleBar.hpp.

◆ unit_font

QFont mgx::ScaleBar::unit_font
protected

Definition at line 105 of file ScaleBar.hpp.

◆ wantedSize

double mgx::ScaleBar::wantedSize
protected

Definition at line 99 of file ScaleBar.hpp.


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