Logo Search packages:      
Sourcecode: qcad version File versions  Download package

RS_Insert Class Reference

#include <rs_insert.h>

Inheritance diagram for RS_Insert:

RS_EntityContainer RS_Entity RS_Undoable RS_Flags

List of all members.


Detailed Description

An insert inserts a block into the drawing at a certain location with certain attributes (angle, scale, ...). Inserts don't really contain other entities internally. They just refer to a block. However, to the outside world they act exactly like EntityContainer.

Author:
Andrew Mustun

Definition at line 112 of file rs_insert.h.


Public Member Functions

virtual void addEntity (RS_Entity *entity)
void addGraphicVariable (const RS_String &key, const RS_String &val, int code)
void addGraphicVariable (const RS_String &key, int val, int code)
void addGraphicVariable (const RS_String &key, double val, int code)
virtual void adjustBorders (RS_Entity *entity)
virtual void calculateBorders ()
virtual void changeUndoState ()
virtual void clear ()
virtual RS_Entityclone ()
virtual unsigned long int count ()
virtual unsigned long int countDeep ()
virtual unsigned long int countSelected ()
RS_PtrListIterator< RS_EntitycreateIterator ()
virtual RS_EntitycurrentEntity ()
void delFlag (unsigned int f)
void delUserDefVar (RS_String key)
virtual void detach ()
virtual void draw (RS_Painter *painter, RS_GraphicView *view, double patternOffset=0.0)
virtual int entityAt ()
virtual RS_EntityentityAt (uint index)
virtual int findEntity (RS_Entity *entity)
virtual RS_EntityfirstEntity (RS2::ResolveLevel level=RS2::ResolveNone)
virtual void forcedCalculateBorders ()
RS_StringList getAllKeys ()
double getAngle () const
RS_BlockgetBlock ()
RS_BlockgetBlockForInsert ()
RS_EntitygetBlockOrInsert ()
int getCols () const
RS_InsertData getData () const
virtual double getDistanceToPoint (const RS_Vector &coord, RS_Entity **entity, RS2::ResolveLevel level=RS2::ResolveNone, double solidDist=RS_MAXDOUBLE)
RS_DocumentgetDocument ()
bool getFlag (unsigned int f) const
unsigned int getFlags () const
RS_GraphicgetGraphic ()
RS2::Unit getGraphicUnit ()
double getGraphicVariableDouble (const RS_String &key, double def)
int getGraphicVariableInt (const RS_String &key, int def)
RS_String getGraphicVariableString (const RS_String &key, const RS_String &def)
unsigned long int getId () const
RS_InsertgetInsert ()
RS_Vector getInsertionPoint () const
RS_LayergetLayer (bool resolve=true) const
virtual double getLength ()
RS_Vector getMax () const
RS_Vector getMin () const
RS_String getName () const
virtual RS_Vector getNearestCenter (const RS_Vector &coord, double *dist=NULL)
virtual RS_Vector getNearestDist (double, bool)
virtual RS_Vector getNearestDist (double distance, const RS_Vector &coord, double *dist=NULL)
virtual RS_Vector getNearestEndpoint (const RS_Vector &coord, double *dist=NULL)
RS_EntitygetNearestEntity (const RS_Vector &point, double *dist=NULL, RS2::ResolveLevel level=RS2::ResolveAll)
virtual RS_Vector getNearestIntersection (const RS_Vector &coord, double *dist=NULL)
virtual RS_Vector getNearestMiddle (const RS_Vector &coord, double *dist=NULL)
virtual RS_Vector getNearestPointOnEntity (const RS_Vector &coord, bool onEntity=true, double *dist=NULL, RS_Entity **entity=NULL)
virtual RS_Vector getNearestRef (const RS_Vector &coord, double *dist=NULL)
virtual RS_Vector getNearestSelectedRef (const RS_Vector &coord, double *dist=NULL)
RS_EntityContainergetParent () const
RS_Pen getPen (bool resolve=true) const
virtual RS_VectorSolutions getRefPoints ()
int getRows () const
RS_Vector getScale () const
RS_Vector getSize () const
RS_Vector getSpacing () const
double getStyleFactor (RS_GraphicView *view)
RS_String * getUserDefVar (RS_String key)
virtual bool hasEndpointsWithinWindow (RS_Vector v1, RS_Vector v2)
void init ()
virtual void initId ()
virtual void insertEntity (int index, RS_Entity *entity)
virtual bool isAtomic () const
virtual bool isContainer () const
virtual bool isDocument () const
virtual bool isEdge () const
virtual bool isEmpty ()
virtual bool isHighlighted ()
virtual bool isInWindow (RS_Vector v1, RS_Vector v2)
virtual bool isLocked ()
virtual bool isParentSelected ()
virtual bool isPointOnEntity (const RS_Vector &coord, double tolerance=RS_TOLERANCE)
virtual bool isProcessed () const
virtual bool isSelected () const
virtual bool isUndone () const
virtual bool isVisible ()
virtual RS_EntitylastEntity (RS2::ResolveLevel level=RS2::ResolveNone)
virtual void mirror (RS_Vector axisPoint1, RS_Vector axisPoint2)
virtual void move (RS_Vector offset)
virtual void moveRef (const RS_Vector &ref, const RS_Vector &offset)
virtual void moveSelectedRef (const RS_Vector &ref, const RS_Vector &offset)
virtual RS_EntitynextEntity (RS2::ResolveLevel level=RS2::ResolveNone)
virtual bool optimizeContours ()
virtual RS_EntityprevEntity (RS2::ResolveLevel level=RS2::ResolveNone)
virtual bool removeEntity (RS_Entity *entity)
virtual void renameInserts (const RS_String &oldName, const RS_String &newName)
virtual void reparent (RS_EntityContainer *parent)
virtual void replaceEntity (int index, RS_Entity *entity)
void resetBorders ()
void resetFlags ()
virtual void rotate (RS_Vector center, double angle)
 RS_Insert (RS_EntityContainer *parent, const RS_InsertData &d)
virtual RS2::EntityType rtti () const
virtual void scale (RS_Vector center, double factor)
virtual void scale (RS_Vector center, RS_Vector factor)
virtual void selectWindow (RS_Vector v1, RS_Vector v2, bool select=true, bool cross=false)
void setAngle (double a)
virtual void setAutoUpdateBorders (bool enable)
void setCols (int c)
void setFlag (unsigned int f)
void setFlags (unsigned int f)
virtual void setHighlighted (bool on)
void setInsertionPoint (const RS_Vector &i)
void setLayer (RS_Layer *l)
void setLayer (const RS_String &name)
void setLayerToActive ()
void setName (const RS_String &newName)
void setParent (RS_EntityContainer *p)
void setPen (const RS_Pen &pen)
void setPenToActive ()
virtual void setProcessed (bool on)
void setRows (int r)
void setScale (const RS_Vector &s)
virtual bool setSelected (bool select=true)
void setSpacing (const RS_Vector &s)
virtual void setUndoCycle (RS_UndoCycle *cycle)
virtual void setUndoState (bool undone)
virtual void setUpdateEnabled (bool on)
void setUserDefVar (RS_String key, RS_String val)
virtual void setVisible (bool v)
virtual void stretch (RS_Vector firstCorner, RS_Vector secondCorner, RS_Vector offset)
void toggleFlag (unsigned int f)
virtual bool toggleSelected ()
virtual RS2::UndoableType undoRtti ()
virtual void undoStateChanged (bool undone)
virtual void update ()
virtual void updateDimensions ()
virtual void updateInserts ()
virtual void updateSplines ()
virtual ~RS_Insert ()

Protected Attributes

RS_Blockblock
RS_InsertData data
RS_PtrList< RS_Entityentities
unsigned long int id
 Entity id.
RS_Layerlayer
 Pointer to layer.
RS_Vector maxV
 maximum coordinates
RS_Vector minV
 minimum coordinates
RS_EntityContainerparent
 Entity's parent entity or NULL is this entity has no parent.
RS_Pen pen
 pen (attributes) for this entity
RS_EntityContainersubContainer
bool updateEnabled
 auto updating enabled?

Static Protected Attributes

static bool autoUpdateBorders = true

Friends

std::ostream & operator<< (std::ostream &os, RS_Entity &e)
std::ostream & operator<< (std::ostream &os, RS_EntityContainer &ec)
std::ostream & operator<< (std::ostream &os, const RS_Insert &i)

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

Generated by  Doxygen 1.6.0   Back to index