#include <qs_documentwrapper.h>
Public Slots | |
| QS_EntityWrapper * | firstEntity () |
| QS_EntityWrapper * | nextEntity () |
| void | setActivePen (QS_PenWrapper *p) |
| Sets the currenly active pen for this document. | |
| void | setActiveLayer (QS_LayerWrapper *l) |
| Sets the currenly active layer for this document. | |
| void | setActiveLayer (const QString &l) |
| Sets the currenly active layer by name. | |
| void | addLayer (const QString &name, QS_PenWrapper *pen) |
| Adds a new layer to this document. | |
| void | addEntity (QS_EntityWrapper *e) |
| Adds the given entity to this document. | |
Public Member Functions | |
| QS_DocumentWrapper (RS_Document *d) | |
| RS_Document * | getDocument () |
Protected Member Functions | |
| QS_EntityWrapper * | wrap (RS_Entity *e) |
| Internal. | |
|
|
Adds the given entity to this document. This example script adds a line to a document: var doc = new Document; var line = new Line(doc, 0,0, 100,100); doc.addEntity(line); |
|
||||||||||||
|
Adds a new layer to this document. This example script adds a layer to a document:
var doc = new Document;
var pen = new Pen(255,0,0);
doc.addLayer("layername", pen);
|
|
|
|
|
|
|
|
|
Sets the currenly active layer by name. This example script activates layer "mylayer".
var doc = new Document;
doc.setActiveLayer("mylayer");
|
|
|
Sets the currenly active layer for this document. Newly added entities will be placed on this layer. |
|
|
Sets the currenly active pen for this document. This pen will be used when new entities are added. This example script activates a red 1mm pen. var doc = new Document; var pen = new Pen(255,0,0, 100); doc.setActivePen(pen); |
|
|
Internal. Wraps the given native entity into an entity wrapper. |
1.4.4