Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages

RS_Preview Class Reference

This class supports previewing. More...

#include <rs_preview.h>

Inheritance diagram for RS_Preview:

RS_EntityContainer RS_Entity RS_Undoable RS_Flags List of all members.

Public Member Functions

 RS_Preview (RS_EntityContainer *parent=NULL)
 Constructor.
 ~RS_Preview ()
 Destructor.
void addPreviewEntity (RS_Entity *entity, RS_EntityContainer *subContainer=NULL)
 Adds an entity to this preview and removes any attributes / layer connectsions before that.
void addRectangle (const RS_Vector &v1, const RS_Vector &v2, RS_EntityContainer *subContainer=NULL)
 Adds an entity to this preview.
void addCloneOf (RS_Entity *entity)
 Clones the given entity and adds the clone to the preview.
void addAllFrom (RS_EntityContainer &container, RS_EntityContainer *subContainer=NULL)
 Adds all entities from 'container' to the preview (unselected).
void addSelectionFrom (RS_EntityContainer &srcContainer, RS_EntityContainer *subContainer=NULL)
 Adds all selected entities from 'container' to the preview (unselected).
void addStretchablesFrom (RS_EntityContainer &container, const RS_Vector &v1, const RS_Vector &v2, RS_EntityContainer *subContainer=NULL)
 Adds all entities in the given range and those which have endpoints in the given range to the preview.
void addMeasuringLine (const RS_Vector &p1, const RS_Vector &p2, RS_GraphicView &graphicView)
 Adds a measuring line.
void addMeasuringArc (const RS_Vector &center, const RS_Vector &p1, const RS_Vector &p2, const RS_Vector &position, RS_GraphicView &graphicView)
void addMeasuringArea (RS_InfoArea &area, RS_GraphicView &graphicView)
void addMeasuringLabel (const RS_String &label, const RS_Vector &position, double direction, RS_GraphicView &graphicView)
 Adds a label typically used to display a measuring result.

Static Public Member Functions

static RS_Pen getPreviewPen ()
static RS_Pen getPreviewInfoPen ()

Detailed Description

This class supports previewing.

The RS_Snapper class uses an instance of RS_Preview to preview entities, ranges, lines, arcs, ... on the fly.

Author:
Andrew Mustun


Member Function Documentation

void RS_Preview::addMeasuringLabel const RS_String &  label,
const RS_Vector position,
double  direction,
RS_GraphicView graphicView
 

Adds a label typically used to display a measuring result.

Parameters:
label The string to display.
position Position of the label.
direction The direction of the element that would be in the way of the label. E.g. direction PI/4 means that the label will be left-bottom aligned so it does not intersect with a line that points in direction PI/4.

void RS_Preview::addPreviewEntity RS_Entity entity,
RS_EntityContainer subContainer = NULL
 

Adds an entity to this preview and removes any attributes / layer connectsions before that.

This function ensures that the preview will not get too big and might actually drop or simplify entities.

void RS_Preview::addRectangle const RS_Vector v1,
const RS_Vector v2,
RS_EntityContainer subContainer = NULL
 

Adds an entity to this preview.

The entity is always added. This can be used for crucial preview entities such as a label of a measuring tool.

void RS_Preview::addSelectionFrom RS_EntityContainer srcContainer,
RS_EntityContainer subContainer = NULL
 

Adds all selected entities from 'container' to the preview (unselected).

Parameters:
subContainer Add the selection to this sub container of the preview. Can be NULL for direct adding to the preview.

void RS_Preview::addStretchablesFrom RS_EntityContainer container,
const RS_Vector v1,
const RS_Vector v2,
RS_EntityContainer subContainer = NULL
 

Adds all entities in the given range and those which have endpoints in the given range to the preview.

Invisible and locked entities are not added.


The documentation for this class was generated from the following files:
Generated on Sat Jan 6 13:48:23 2007 for qcadlib by  doxygen 1.4.4