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

RS_Graphic Class Reference

#include <rs_graphic.h>

Inheritance diagram for RS_Graphic:

RS_Document RS_EntityContainer RS_Undo RS_Entity RS_Undoable RS_Flags

List of all members.


Detailed Description

A graphic document which can contain entities layers and blocks.

Author:
Andrew Mustun

Definition at line 48 of file rs_graphic.h.


Public Member Functions

void activateBlock (RS_Block *block)
void activateBlock (const RS_String &name)
void activateLayer (RS_Layer *layer)
void activateLayer (const RS_String &name)
virtual bool addBlock (RS_Block *block, bool notify=true)
void addBlockListListener (RS_BlockListListener *listener)
virtual void addBlockNotification ()
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 addLayer (RS_Layer *layer)
void addLayerListListener (RS_LayerListListener *listener)
virtual void addUndoable (RS_Undoable *u)
void addUndoCycle (RS_UndoCycle *i)
void addVariable (const RS_String &key, double value, int code)
void addVariable (const RS_String &key, int value, int code)
void addVariable (const RS_String &key, const RS_String &value, int code)
void addVariable (const RS_String &key, const RS_Vector &value, int code)
virtual void adjustBorders (RS_Entity *entity)
RS_BlockblockAt (uint i)
virtual void calculateBorders ()
void centerToPage ()
virtual void changeUndoState ()
virtual void clear ()
void clearBlocks ()
void clearLayers ()
void clearVariables ()
virtual RS_Entityclone ()
virtual unsigned long int count ()
uint countBlocks ()
virtual unsigned long int countDeep ()
virtual unsigned long int countLayerEntities (RS_Layer *layer)
uint countLayers () const
virtual int countRedoCycles ()
virtual unsigned long int countSelected ()
virtual int countUndoCycles ()
int countVariables ()
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 void editLayer (RS_Layer *layer, const RS_Layer &source)
virtual void endUndoCycle ()
virtual int entityAt ()
virtual RS_EntityentityAt (uint index)
RS_BlockfindBlock (const RS_String &name)
virtual int findEntity (RS_Entity *entity)
RS_LayerfindLayer (const RS_String &name)
virtual RS_EntityfirstEntity (RS2::ResolveLevel level=RS2::ResolveNone)
void fitToPage ()
virtual void forcedCalculateBorders ()
void freezeAllBlocks (bool freeze)
void freezeAllLayers (bool freeze)
RS_BlockgetActiveBlock ()
RS_LayergetActiveLayer ()
RS_Pen getActivePen () const
RS_StringList getAllKeys ()
RS2::AngleFormat getAngleFormat ()
int getAnglePrecision ()
RS_BlockgetBlock ()
virtual RS_BlockListgetBlockList ()
RS_EntitygetBlockOrInsert ()
virtual double getDistanceToPoint (const RS_Vector &coord, RS_Entity **entity, RS2::ResolveLevel level=RS2::ResolveNone, double solidDist=RS_MAXDOUBLE)
RS_DocumentgetDocument ()
RS_String getFilename () const
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_LayergetLayer (bool resolve=true) const
virtual RS_LayerListgetLayerList ()
virtual double getLength ()
RS2::LinearFormat getLinearFormat ()
int getLinearPrecision ()
RS_Vector getMax () const
RS_Vector getMin () 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)
RS2::PaperFormat getPaperFormat (bool *landscape)
RS_Vector getPaperInsertionBase ()
double getPaperScale ()
RS_Vector getPaperSize ()
RS_EntityContainergetParent () const
RS_Pen getPen (bool resolve=true) const
virtual RS_UndoCyclegetRedoCycle ()
virtual RS_VectorSolutions getRefPoints ()
RS_Vector getSize () const
double getStyleFactor (RS_GraphicView *view)
virtual RS_UndoCyclegetUndoCycle ()
virtual RS2::Unit getUnit ()
RS_String * getUserDefVar (RS_String key)
RS_Dict< RS_Variable > & getVariableDict ()
double getVariableDouble (const RS_String &key, double def)
int getVariableInt (const RS_String &key, int def)
RS_String getVariableString (const RS_String &key, const RS_String &def)
RS_Vector getVariableVector (const RS_String &key, const RS_Vector &def)
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
bool isDraftOn ()
virtual bool isEdge () const
virtual bool isEmpty ()
bool isGridOn ()
virtual bool isHighlighted ()
virtual bool isInWindow (RS_Vector v1, RS_Vector v2)
virtual bool isLocked ()
virtual bool isModified () const
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)
RS_LayerlayerAt (uint i)
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)
RS_String newBlockName ()
virtual void newDoc ()
virtual RS_EntitynextEntity (RS2::ResolveLevel level=RS2::ResolveNone)
virtual bool open (const RS_String &filename, RS2::FormatType type)
virtual bool optimizeContours ()
virtual RS_EntityprevEntity (RS2::ResolveLevel level=RS2::ResolveNone)
virtual void redo ()
virtual void removeBlock (RS_Block *block)
void removeBlockListListener (RS_BlockListListener *listener)
virtual bool removeEntity (RS_Entity *entity)
virtual void removeLayer (RS_Layer *layer)
void removeLayerListListener (RS_LayerListListener *listener)
virtual void removeUndoable (RS_Undoable *u)
void removeVariable (const RS_String &key)
virtual void renameInserts (const RS_String &oldName, const RS_String &newName)
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_Graphic (RS_EntityContainer *parent=NULL)
virtual RS2::EntityType rtti () const
virtual bool save ()
virtual bool saveAs (const RS_String &filename, RS2::FormatType type)
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 setActivePen (RS_Pen p)
virtual void setAutoUpdateBorders (bool enable)
void setDraftOn (bool on)
void setFilename (const RS_String &fn)
void setFlag (unsigned int f)
void setFlags (unsigned int f)
void setGridOn (bool on)
virtual void setHighlighted (bool on)
void setLayer (RS_Layer *l)
void setLayer (const RS_String &name)
void setLayerToActive ()
virtual void setModified (bool m)
void setPaperFormat (RS2::PaperFormat f, bool landscape)
void setPaperInsertionBase (const RS_Vector &p)
void setPaperScale (double s)
void setPaperSize (const RS_Vector &s)
void setParent (RS_EntityContainer *p)
void setPen (const RS_Pen &pen)
void setPenToActive ()
virtual void setProcessed (bool on)
virtual bool setSelected (bool select=true)
virtual void setUndoCycle (RS_UndoCycle *cycle)
virtual void setUndoState (bool undone)
virtual void setUnit (RS2::Unit u)
virtual void setUpdateEnabled (bool on)
void setUserDefVar (RS_String key, RS_String val)
virtual void setVisible (bool v)
virtual void startUndoCycle ()
virtual void stretch (RS_Vector firstCorner, RS_Vector secondCorner, RS_Vector offset)
void toggleBlock (RS_Block *block)
void toggleBlock (const RS_String &name)
void toggleFlag (unsigned int f)
void toggleLayer (RS_Layer *layer)
void toggleLayer (const RS_String &name)
void toggleLayerLock (RS_Layer *layer)
virtual bool toggleSelected ()
virtual void undo ()
virtual RS2::UndoableType undoRtti ()
virtual void undoStateChanged (bool undone)
virtual void update ()
virtual void updateDimensions ()
virtual void updateInserts ()
virtual void updateSplines ()
virtual ~RS_Graphic ()

Static Public Member Functions

static bool test ()

Protected Attributes

RS_Pen activePen
RS_UndoCyclecurrentCycle
RS_PtrList< RS_Entityentities
RS_String filename
RS2::FormatType formatType
unsigned long int id
 Entity id.
RS_Layerlayer
 Pointer to layer.
RS_Vector maxV
 maximum coordinates
RS_Vector minV
 minimum coordinates
bool modified
RS_EntityContainerparent
 Entity's parent entity or NULL is this entity has no parent.
RS_Pen pen
 pen (attributes) for this entity
RS_EntityContainersubContainer
RS_PtrList< RS_UndoCycleundoList
 List of undo list items. every item is something that can be undone.
int undoPointer
bool updateEnabled
 auto updating enabled?

Static Protected Attributes

static bool autoUpdateBorders = true

Private Attributes

RS_BlockList blockList
RS_LayerList layerList
RS_VariableDict variableDict

Friends

std::ostream & operator<< (std::ostream &os, RS_Undo &a)
std::ostream & operator<< (std::ostream &os, RS_Entity &e)
std::ostream & operator<< (std::ostream &os, RS_EntityContainer &ec)
std::ostream & operator<< (std::ostream &os, RS_Graphic &g)

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

Generated by  Doxygen 1.6.0   Back to index