QCAD Application Framework
CAD Application Development and Automation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ROrthoGrid Class Reference

Grid representation. More...

#include <ROrthoGrid.h>

Inheritance diagram for ROrthoGrid:
RGrid

List of all members.

Public Member Functions

virtual QString getInfoText ()
virtual void paint (RGraphicsView &view)
 This is called by the graphics view this grid is attached to whenever the grid should be painted.
virtual void paintMetaGrid (RGraphicsView &view)
 This is called by the graphics view this grid is attached to whenever the meta grid should be painted.
virtual void paintRuler (RGraphicsView &view, RRuler &ruler)
 ROrthoGrid ()
RVector snapToGrid (RGraphicsView &view, const RVector &positionUcs)
 Maps the given model position to the grid.
virtual void update (RGraphicsView &view, bool force=false)
 Updates the grid information, in particular the grid spacing and grid region to the current view port.
virtual ~ROrthoGrid ()
- Public Member Functions inherited from RGrid
 RGrid ()
virtual ~RGrid ()

Static Public Member Functions

static QList< RVectorgetIdealSpacing (const RGraphicsView &view, int minPixelSpacing, const RVector &minSpacing)
static bool isFractionalFormat (RS::LinearFormat linearFormat)

Static Private Member Functions

static double inchAutoscale (double value, double idealSpacing, RS::Unit unit)

Private Attributes

RVector autoMetaSpacing
RVector autoSpacing
RBox gridBox
QString infoText
RBox metaGridBox
RVector metaSpacing
int minPixelSpacing
RVector minSpacing
bool scaleGrid
RVector spacing
RBox viewBox

Detailed Description

Grid representation.

This class is responsible for updating the grid and snapping to the grid.

Scriptable:
This class is wrapped for script environments.

Constructor & Destructor Documentation

ROrthoGrid::ROrthoGrid ( )
ROrthoGrid::~ROrthoGrid ( )
virtual

Member Function Documentation

QList< RVector > ROrthoGrid::getIdealSpacing ( const RGraphicsView view,
int  minPixelSpacing,
const RVector minSpacing 
)
static
QString ROrthoGrid::getInfoText ( )
virtual

Implements RGrid.

double ROrthoGrid::inchAutoscale ( double  value,
double  idealSpacing,
RS::Unit  unit 
)
staticprivate
bool ROrthoGrid::isFractionalFormat ( RS::LinearFormat  linearFormat)
static
void ROrthoGrid::paint ( RGraphicsView view)
virtual

This is called by the graphics view this grid is attached to whenever the grid should be painted.

Implements RGrid.

void ROrthoGrid::paintMetaGrid ( RGraphicsView view)
virtual

This is called by the graphics view this grid is attached to whenever the meta grid should be painted.

Implements RGrid.

void ROrthoGrid::paintRuler ( RGraphicsView view,
RRuler ruler 
)
virtual

Implements RGrid.

RVector ROrthoGrid::snapToGrid ( RGraphicsView view,
const RVector positionUcs 
)
virtual

Maps the given model position to the grid.

Implements RGrid.

void ROrthoGrid::update ( RGraphicsView view,
bool  force = false 
)
virtual

Updates the grid information, in particular the grid spacing and grid region to the current view port.

Implements RGrid.


Member Data Documentation

RVector ROrthoGrid::autoMetaSpacing
private
RVector ROrthoGrid::autoSpacing
private
RBox ROrthoGrid::gridBox
private
QString ROrthoGrid::infoText
private
RBox ROrthoGrid::metaGridBox
private
RVector ROrthoGrid::metaSpacing
private
int ROrthoGrid::minPixelSpacing
private
RVector ROrthoGrid::minSpacing
private
bool ROrthoGrid::scaleGrid
private
RVector ROrthoGrid::spacing
private
RBox ROrthoGrid::viewBox
private

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