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
Contents
[hide]Plug_Entity Class Reference
Wrapper for acces entities from plugins.
Wrapper class for create, access and modify entities from plugins. <p>TODO: terminate access function -> getData()
implementation of modify function -> modData()
implementation of create function -> createData()
#include <document_interface.h</a>>
Public Member Functions | |
virtual | <a href="#a7186c81063debb130e4eb2a6819f66ec">~Plug_Entity</a> () |
virtual void | <a href="#a3e2acf80beecc81e0e7596bf782b869a">getData</a> (QHash< int, QVariant > *data)=0 |
Obtain the entity data. <a href="#a3e2acf80beecc81e0e7596bf782b869a"></a> | |
virtual void | <a href="#a83b1ec84b81854d4fb8099d95930397b">move</a> (QPointF offset)=0 |
Move the entity. | |
virtual void | <a href="#a2a4a27a59029c7c43f6ee7750db1d4af">rotate</a> (QPointF center, double angle)=0 |
rotate the entity. | |
virtual void | <a href="#a93f8d76ad98f7f5b0f24f111681c31a4">scale</a> (QPointF center, QPointF factor)=0 |
Scale the entity. |
Constructor & Destructor Documentation
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:
data | pointer to a QHash<int, QVariant> to store the entity data. |
virtual void Plug_Entity::move | ( | QPointF | offset | ) | [pure virtual] |
Move the entity.
Parameters:
offset | move the entity by the given QPointF. |
virtual void Plug_Entity::rotate </td>
<td>(</td>
<td class="paramtype">QPointF </td>
<td class="paramname">center, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname">angle </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> [pure virtual]
</td>
</tr>
</table>
rotate the entity.
Parameters:
center | center of rotation. |
angle | angle to rotate. |
virtual void Plug_Entity::scale | ( | QPointF | center, |
QPointF | factor | ||
) | [pure virtual] |
Scale the entity.
Parameters:
center | base point for scale. |
factor | scale factor. |