We have moved to https://dokuwiki.librecad.org/

Lots of content was already moved to the new wiki, but there is still work to do. If you want to contribute, please register a new account at https://dokuwiki.librecad.org/

This wiki will be kept for a while to keep search engine results valid. Moved sites may be deleted here in future.

Plug Entity class

From LibreCAD wiki
Revision as of 09:25, 26 July 2012 by Rallaz (Talk | contribs)

Jump to: navigation, search

Plug_Entity Class Reference

Wrapper for acces entities from plugins.

Wrapper class for create, access and modify entities from plugins.

TODO: terminate access function -> getData()

implementation of modify function -> modData()

implementation of create function -> createData()

#include <document_interface.h>

Public Member Functions

virtual ~Plug_Entity ()
virtual void getData (QHash< int, QVariant > *data)=0Obtain the entity data.
virtual void move (QPointF offset)=0Move the entity.
virtual void rotate (QPointF center, double angle)=0rotate the entity.
virtual void scale (QPointF center, QPointF factor)=0Scale the entity.


virtual Plug_Entity::~Plug_Entity () [inline, virtual]

Member Function Documentation

virtual void Plug_Entity::getData (QHash< int, QVariant > *data) [pure virtual]

Obtain the entity data.

Parameters:

datapointer to a QHash<int, QVariant> that store the entity data.

virtual void Plug_Entity::move (QPointF offset) [pure virtual]

Move the entity.

Parameters:

offsetmove the entity by the given QPointF.

virtual void Plug_Entity::rotate (QPointF center, double angle) [pure virtual]

rotate the entity.

Parameters:

centercenter of rotation.
angleangle to rotate.

virtual void Plug_Entity::scale (QPointF center, QPointF factor) [pure virtual]

Scale the entity.

Parameters:

centerbase point for scale.
factorscale factor.