QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RDocument.h
Go to the documentation of this file.
1
20#ifndef RDOCUMENT_H
21#define RDOCUMENT_H
22
23#include "core_global.h"
24
25#include <QString>
26#include <QSharedPointer>
27
28#include "RNonCopyable.h"
29#include "RRequireHeap.h"
30#include "RTransactionStack.h"
31#include "RMath.h"
32#include "RLineweight.h"
33
34class RBlock;
35class RBox;
36class RColor;
37class RDimStyle;
39class REntity;
40class RLayer;
41class RLayerState;
42class RLayout;
43class RLinetype;
45class RVector;
46class RSpatialIndex;
47class RStorage;
48class RUcs;
49class RView;
50
51#ifndef RDEFAULT_QVARIANT
52#define RDEFAULT_QVARIANT QVariant()
53#endif
54
55#ifndef RDEFAULT_QSTRINGLIST
56#define RDEFAULT_QSTRINGLIST QStringList()
57#endif
58
59#ifndef RDEFAULT_MIN1
60#define RDEFAULT_MIN1 -1
61#endif
62
63#define RDEFAULT_QLIST_RS_ENTITYTYPE QList<RS::EntityType>()
64
65
79public:
80 RDocument(RStorage& storage, RSpatialIndex& spatialIndex, bool beforeLoad = false);
81 virtual ~RDocument();
82
83 void init(bool beforeLoad=false);
84 void initLinetypes(RTransaction* transaction=NULL);
85 QList<QSharedPointer<RObject> > getDefaultLinetypes();
86
87 RStorage& getStorage();
88 const RStorage& getStorage() const;
89 RSpatialIndex& getSpatialIndex();
90 const RSpatialIndex& getSpatialIndex() const;
91 RSpatialIndex* getSpatialIndexForBlock(RObject::Id blockId) const;
92 RSpatialIndex* getSpatialIndexForCurrentBlock() const;
93 RTransactionStack& getTransactionStack();
94
95 void clear(bool beforeLoad=false);
96
97 RObject::Id queryClosestXY(
98 const RVector& wcsPosition,
99 double range,
100 bool draft,
101 double strictRange = RMAXDOUBLE,
102 bool includeLockedLayers = true,
103 bool selectedOnly = false
104 );
105 QPair<RObject::Id, QSet<int> > queryClosestXYWithIndices(
106 const RVector& wcsPosition,
107 double range,
108 bool draft,
109 double strictRange = RMAXDOUBLE,
110 bool includeLockedLayers = true,
111 bool selectedOnly = false
112 );
113
115 QSet<RObject::Id>& candidates,
116 const RVector& wcsPosition,
117 double range,
118 bool draft,
119 double strictRange = RMAXDOUBLE
120 );
121 QPair<RObject::Id, QSet<int> > queryClosestXYWithIndices(
122 QMap<RObject::Id, QSet<int> >& candidates,
123 const RVector& wcsPosition,
124 double range,
125 bool draft,
126 double strictRange = RMAXDOUBLE);
127
128 QSet<RObject::Id> queryAllObjects() const;
129 QSet<RObject::Id> querySelectedLayers() const;
130 QSet<RObject::Id> queryAllVisibleEntities() const;
131 QSet<RObject::Id> queryAllEntities(bool undone = false, bool allBlocks = false, RS::EntityType type = RS::EntityAll) const;
132 QSet<RObject::Id> queryAllEntities(bool undone, bool allBlocks, QList<RS::EntityType> types) const;
133 QSet<RObject::Id> queryWorkingSetEntities() const;
134 QSet<RObject::Id> queryAllUcs() const;
135 QSet<RObject::Id> queryAllLayers() const;
136 QSet<RObject::Id> queryAllLayerStates() const;
137 QSet<RObject::Id> queryAllBlocks() const;
138 QSet<RObject::Id> queryAllLayoutBlocks(bool includeModelSpace = false) const;
139 QSet<RObject::Id> queryAllLayouts() const;
140 QSet<RObject::Id> queryAllViews() const;
141 QSet<RObject::Id> queryAllLinetypes() const;
142
143 QSet<RObject::Id> queryLayerEntities(RObject::Id layerId, bool allBlocks = false) const;
144 QSet<RObject::Id> querySelectedLayerEntities(RObject::Id layerId, bool allBlocks = false) const;
145 bool hasBlockEntities(RObject::Id blockId) const;
146 QSet<RObject::Id> queryBlockEntities(RObject::Id blockId) const;
147 QSet<RObject::Id> queryLayerBlockEntities(RObject::Id layerId, RObject::Id blockId) const;
148 QSet<RObject::Id> queryChildEntities(RObject::Id parentId, RS::EntityType type = RS::EntityAll) const;
149 bool hasChildEntities(RObject::Id parentId) const;
150 QSet<RObject::Id> queryBlockReferences(RObject::Id blockId) const;
151 QSet<RObject::Id> queryAllBlockReferences() const;
152 QSet<RObject::Id> queryAllViewports() const;
153
154 QSet<RObject::Id> queryContainedEntities(const RBox& box) const;
155
156 QSet<RObject::Id> queryInfiniteEntities() const;
157
158 QSet<RObject::Id> queryIntersectedEntitiesXYFast(const RBox& box);
159 QSet<RObject::Id> queryIntersectedShapesXYFast(const RBox& box, bool noInfiniteEntities = false);
160
161 QSet<RObject::Id> queryIntersectedEntitiesXY(const RBox& box,
162 bool checkBoundingBoxOnly=false,
163 bool includeLockedLayers=true,
165 const QList<RS::EntityType>& filter = RDEFAULT_QLIST_RS_ENTITYTYPE,
166 bool selectedOnly = false,
167 RObject::Id layerId = RObject::INVALID_ID) const;
168
169 QMap<RObject::Id, QSet<int> > queryIntersectedEntitiesXYWithIndex(const RBox& box,
170 bool checkBoundingBoxOnly=false,
171 bool includeLockedLayers=true,
173 const QList<RS::EntityType>& filter = RDEFAULT_QLIST_RS_ENTITYTYPE,
174 bool selectedOnly = false,
175 RObject::Id layerId = RObject::INVALID_ID) const;
176
177 QMap<RObject::Id, QSet<int> > queryIntersectedShapesXY(const RBox& box,
178 bool checkBoundingBoxOnly=false,
179 bool includeLockedLayers=true,
181 const QList<RS::EntityType>& filter = RDEFAULT_QLIST_RS_ENTITYTYPE,
182 bool selectedOnly = false,
183 RObject::Id layerId = RObject::INVALID_ID) const;
184
185 QSet<RObject::Id> queryContainedEntitiesXY(const RBox& box) const;
186
187 QSet<RObject::Id> querySelectedEntities() const;
188
189 QSet<RObject::Id> queryConnectedEntities(RObject::Id entityId, double tolerance = RS::PointTolerance, RObject::Id layerId = RObject::INVALID_ID);
190
191 QSet<RObject::Id> queryPropertyEditorObjects();
192
193 QSharedPointer<RDocumentVariables> queryDocumentVariables() const;
194 QSharedPointer<RDocumentVariables> queryDocumentVariablesDirect() const;
195 QSharedPointer<RDimStyle> queryDimStyle() const;
196 QSharedPointer<RDimStyle> queryDimStyleDirect() const;
197 QSharedPointer<RObject> queryObject(RObject::Id objectId) const;
198 QSharedPointer<RObject> queryObjectDirect(RObject::Id objectId) const;
199 RObject* queryObjectCC(RObject::Id objectId) const;
200 QSharedPointer<RObject> queryObjectByHandle(RObject::Handle objectHandle) const;
201 QSharedPointer<REntity> queryEntity(RObject::Id entityId) const;
202 QSharedPointer<REntity> queryEntityDirect(RObject::Id entityId) const;
203 QSharedPointer<REntity> queryVisibleEntityDirect(RObject::Id entityId) const;
204 QSharedPointer<RUcs> queryUcs(RObject::Id ucsId) const;
205 QSharedPointer<RUcs> queryUcs(const QString& ucsName) const;
206 QSharedPointer<RLayer> queryLayer(RObject::Id layerId) const;
207 QSharedPointer<RLayer> queryLayerDirect(RObject::Id layerId) const;
208 QSharedPointer<RLayer> queryLayer(const QString& layerName) const;
209 QSharedPointer<RLayerState> queryLayerState(RObject::Id layerStateId) const;
210 QSharedPointer<RLayerState> queryLayerStateDirect(RObject::Id layerStateId) const;
211 QSharedPointer<RLayerState> queryLayerState(const QString& layerStateName) const;
212 QSharedPointer<RLayout> queryLayout(RObject::Id layoutId) const;
213 QSharedPointer<RLayout> queryLayoutDirect(RObject::Id layoutId) const;
214 QSharedPointer<RLayout> queryLayout(const QString& layoutName) const;
215 QSharedPointer<RBlock> queryBlock(RObject::Id blockId) const;
216 QSharedPointer<RBlock> queryBlockDirect(RObject::Id blockId) const;
217 QSharedPointer<RBlock> queryBlockDirect(const QString& blockName) const;
218 QSharedPointer<RBlock> queryBlock(const QString& blockName) const;
219 QSharedPointer<RView> queryView(RObject::Id viewId) const;
220 QSharedPointer<RView> queryView(const QString& viewName) const;
221 QSharedPointer<RLinetype> queryLinetype(RObject::Id linetypeId) const;
222 QSharedPointer<RLinetype> queryLinetype(const QString& linetypeName) const;
223
224 int countSelectedEntities() const;
225
226 void clearSelection(
227 QSet<RObject::Id>* affectedEntities=NULL
228 );
229
230 void selectAllEntities(QSet<RObject::Id>* affectedEntities = NULL);
231
232 void selectEntity(
233 RObject::Id entityId,
234 bool add=false,
235 QSet<RObject::Id>* affectedEntities=NULL
236 );
237 void deselectEntity(
238 RObject::Id entityId,
239 QSet<RObject::Id>* affectedEntities=NULL
240 );
241 int selectEntities(
242 const QSet<RObject::Id>& entityId,
243 bool add=false,
244 QSet<RObject::Id>* affectedEntities=NULL
245 );
246 int deselectEntities(
247 const QSet<RObject::Id>& entityId,
248 QSet<RObject::Id>* affectedEntities=NULL
249 );
250 bool isSelected(RObject::Id entityId);
251 bool isSelectedWorkingSet(RObject::Id entityId);
252 bool isLayerLocked(RObject::Id layerId) const;
253 bool isLayerLocked(const RLayer& layer) const;
254 bool isParentLayerLocked(RObject::Id layerId) const;
255 bool isParentLayerLocked(const RLayer& layer) const;
256
257 bool isEntity(RObject::Id objectId) const;
258 bool isEntityEditable(RObject::Id entityId) const;
259 //bool isEntityLayerLocked(RObject::Id entityId) const;
260
261 bool isLayerOff(RObject::Id layerId) const;
262 bool isLayerOff(const RLayer& layer) const;
263
264 bool isLayerOffOrFrozen(RObject::Id layerId) const;
265 bool isLayerOffOrFrozen(const RLayer& layer) const;
266
267 bool isLayerFrozen(RObject::Id layerId) const;
268 bool isLayerFrozen(const RLayer& layer) const;
269 bool isLayerPlottable(RObject::Id layerId) const;
270 bool isLayerPlottable(const RLayer& layer) const;
271 bool isLayerSnappable(RObject::Id layerId) const;
272 bool isLayerSnappable(const RLayer& layer) const;
273 bool isParentLayerFrozen(RObject::Id layerId) const;
274 bool isParentLayerFrozen(const RLayer& layer) const;
275 bool isBlockFrozen(RObject::Id blockId) const;
276 bool isLayoutBlock(RObject::Id blockId) const;
277 bool isEntityLayerFrozen(RObject::Id entityId) const;
278
279 bool isEntityVisible(const REntity& entity, RObject::Id blockId = RObject::INVALID_ID) const;
280
281 bool isParentLayerSnappable(RObject::Id layerId) const;
282 bool isParentLayerSnappable(const RLayer& layer) const;
283
284 bool isParentLayerPlottable(RObject::Id layerId) const;
285 bool isParentLayerPlottable(const RLayer& layer) const;
286
287 bool hasSelection() const;
288
289 RBox getBoundingBox(bool ignoreHiddenLayers = true, bool ignoreEmpty = false) const;
290 RBox getSelectionBox() const;
291 RBox getEntitiesBox(QSet<RObject::Id>& ids) const;
292
293 //void addToSpatialIndex(RObject& object, bool isNew = false);
294 void clearSpatialIndices();
295 virtual void rebuildSpatialIndex();
296 //void addToSpatialIndex(QSharedPointer<REntity> entity);
297 void addToSpatialIndex(QSharedPointer<REntity> entity);
298
299 bool blockContainsReferences(RObject::Id blockId, RObject::Id referencedBlockId);
300
301 void removeBlockFromSpatialIndex(RObject::Id blockId);
302 bool addBlockToSpatialIndex(RObject::Id blockId, RObject::Id ignoreBlockId);
303 virtual void removeFromSpatialIndex(QSharedPointer<REntity> entity, const QList<RBox>& boundingBoxes);
304 void removeFromSpatialIndex(QSharedPointer<REntity> entity);
305
306 void updateAllEntities();
307
308 QList<RTransaction> undo();
309 QList<RTransaction> redo();
310 bool isUndoAvailable() const;
311 bool isRedoAvailable() const;
312
313 void startTransactionGroup();
314 int getTransactionGroup() const;
315
320 autoTransactionGroup = on;
321 }
323 return autoTransactionGroup;
324 }
325
326 void resetTransactionStack();
327
328 void setFileName(const QString& fn);
329 QString getFileName() const;
330
331 void setFileVersion(const QString& fv);
332 QString getFileVersion() const;
333
334 QSharedPointer<RLayer> queryCurrentLayer();
335// RTransaction setCurrentLayer(RObject::Id layerId);
336// RTransaction setCurrentLayer(const QString& layerName);
337// void setCurrentLayer(RTransaction& transaction, RObject::Id layerId);
338// void setCurrentLayer(RTransaction& transaction, const QString& layerName);
339 void setCurrentLayer(RObject::Id layerId, RTransaction* transaction=NULL);
340 void setCurrentLayer(const QString& layerName, RTransaction* transaction=NULL);
341 RObject::Id getCurrentLayerId() const;
342 QString getCurrentLayerName() const;
343
344 void setCurrentColor(const RColor& color);
345 RColor getCurrentColor() const;
346
347 void setCurrentLineweight(RLineweight::Lineweight lw);
348 RLineweight::Lineweight getCurrentLineweight() const;
349
350 void setCurrentLinetype(RObject::Id ltId);
351 void setCurrentLinetype(const QString& name);
352 void setCurrentLinetypePattern(const RLinetypePattern& p);
353 RObject::Id getCurrentLinetypeId() const;
354 RLinetypePattern getCurrentLinetypePattern() const;
355
356 QSharedPointer<RBlock> queryCurrentBlock();
357 void setCurrentBlock(RObject::Id blockId);
358 void setCurrentBlock(const QString& blockName);
359 RObject::Id getCurrentBlockId() const;
360 QString getCurrentBlockName() const;
361
362 void setCurrentViewport(RObject::Id viewportId);
363 RObject::Id getCurrentViewportId();
364 bool hasCurrentViewport();
365 void unsetCurrentViewport();
366
367// void setSelectedBlock(RObject::Id blockId);
368// void setSelectedBlock(const QString& blockName);
369// RObject::Id getSelectedBlockId() const;
370
371 QSharedPointer<RView> queryCurrentView();
372 void setCurrentView(RObject::Id viewId);
373 void setCurrentView(const QString& viewName);
374 RObject::Id getCurrentViewId() const;
375
376 QString getTempBlockName() const;
377 QString getUniqueBlockName(const QString& currentName, const QStringList& usedBlockNames = RDEFAULT_QSTRINGLIST) const;
378 QString getBlockName(RObject::Id blockId) const;
379 QString getBlockNameFromHandle(RObject::Handle blockHandle) const;
380 QString getBlockNameFromLayout(const QString& layoutName) const;
381 QString getBlockNameFromLayout(RObject::Id layoutId) const;
382 QSet<QString> getBlockNames(const QString& rxStr = RDEFAULT_QSTRING, bool undone = false) const;
383 QList<RObject::Id> sortBlocks(const QList<RObject::Id>& blockIds) const;
384 QList<RObject::Id> sortLayers(const QList<RObject::Id>& layerIds) const;
385 QString getLayerName(RObject::Id layerId) const;
386 QSet<QString> getLayerNames(const QString& rxStr = RDEFAULT_QSTRING) const;
387 QString getLayerStateName(RObject::Id layerStateId) const;
388 QSet<QString> getLayerStateNames(const QString& rxStr = RDEFAULT_QSTRING) const;
389 QString getLayoutName(RObject::Id layoutId) const;
390 QSet<QString> getViewNames() const;
391
392 bool hasLayer(const QString& layerName) const;
393 bool hasLayerStates() const;
394 bool hasLayerState(const QString& layerStateName) const;
395 bool hasBlock(const QString& blockName) const;
396 bool hasLayout(const QString& layoutName) const;
397 bool hasView(const QString& viewName) const;
398 bool hasLinetype(const QString& linetypeName) const;
399
400 RObject::Id getLayerId(const QString& layerName) const;
401 RObject::Id getLayer0Id() const;
402
403 RObject::Id getLayerStateId(const QString& layerStateName) const;
404
405 RObject::Id getBlockId(const QString& blockName) const;
406 RObject::Id getBlockIdAuto(const QString& blockLayoutName) const;
407 RObject::Id getModelSpaceBlockId() const;
408
409 RObject::Id getLinetypeId(const QString& linetypeName) const;
411 return linetypeByLayerId;
412 }
414 return linetypeByBlockId;
415 }
416 QString getLinetypeName(RObject::Id linetypeId) const;
417 QString getLinetypeDescription(RObject::Id linetypeId) const;
418 QString getLinetypeLabel(RObject::Id linetypeId) const;
419 QSet<QString> getLinetypeNames() const;
420 QList<RLinetypePattern> getLinetypePatterns() const;
421 bool isByLayer(RObject::Id linetypeId) const;
422 bool isByBlock(RObject::Id linetypeId) const;
423
424 RLineweight::Lineweight getMaxLineweight() const;
425
426 QStringList getVariables() const;
427 void setVariable(const QString& key, const QVariant& value, bool overwrite=true);
428 QVariant getVariable(const QString& key, const QVariant& defaultValue = RDEFAULT_QVARIANT, bool useSettings = false) const;
429 bool hasVariable(const QString& key) const;
430 void removeVariable(const QString& key);
431
432 void setKnownVariable(RS::KnownVariable key, const QVariant& value, RTransaction* transaction = NULL);
433 void setKnownVariable(RS::KnownVariable key, const RVector& value, RTransaction* transaction = NULL);
434 QVariant getKnownVariable(RS::KnownVariable key, const QVariant& defaultValue = RDEFAULT_QVARIANT) const;
435
436 void setUnit(RS::Unit unit, RTransaction* transaction = NULL);
437 RS::Unit getUnit() const;
438
439 void setMeasurement(RS::Measurement m, RTransaction* transaction = NULL);
440 RS::Measurement getMeasurement() const;
441
442 bool isMetric() const;
443
444 void setDimensionFont(const QString& f, RTransaction* transaction = NULL);
445 QString getDimensionFont() const;
446
447 void setLinetypeScale(double v, RTransaction* transaction = NULL);
448 double getLinetypeScale() const;
449
450 QString formatLinear(double value);
451 QString formatAngle(double value);
452
453 void setLinearFormat(RS::LinearFormat f);
454 RS::LinearFormat getLinearFormat() const;
455 int getLinearPrecision();
456 bool showLeadingZeroes();
457 bool showTrailingZeroes();
458 bool showLeadingZeroesAngle();
459 bool showTrailingZeroesAngle();
460 RS::AngleFormat getAngleFormat();
461 int getAnglePrecision();
462 char getDecimalSeparator();
463
464 bool isModified() const;
465 QDateTime getLastModifiedDateTime() const;
466 QString getLastModified() const;
467 void setModified(bool m);
468
469 void copyVariablesFrom(const RDocument& other);
470
471 QString addAutoVariable(double value);
472 QStringList getAutoVariables() const;
473 QString substituteAutoVariables(const QString& expression);
474 double eval(const QString& expression, bool* ok = NULL);
475
476 bool isEditingWorkingSet() const;
477 void setIgnoreWorkingSet(bool on);
478
479 void setNotifyListeners(bool on);
480 bool getNotifyListeners() const;
481
482// RObject::Id getWorkingSetBlockReferenceId() const;
483// void setWorkingSetBlockReferenceId(RObject::Id id, int group = RDEFAULT_MIN1, RTransaction* transaction = NULL);
484
485 /*
486 void copyToDocument(const RVector& reference, RDocument& other,
487 bool selectionOnly, bool clear, RTransaction& transaction);
488 void copyToDocument(REntity& entity, const RVector& reference,
489 RDocument& other, RTransaction& transaction);
490 */
491
492 static RDocument& getClipboard();
493
497 friend QDebug operator<<(QDebug dbg, RDocument& d);
498
499 void dump();
500
501protected:
503
504private:
505 QString fileName;
506 QString fileVersion;
507
509 // spatial index used to spawn new spatial indices for each block:
512 // map of spatial indices (per block):
515 //RObject::Id modelSpaceBlockId;
518
520};
521
524
525#endif
void init(void basePath)
Definition AddBlockInit.js:2
QDebug operator<<(QDebug dbg, const RBox &b)
Stream operator for QDebug.
Definition RBox.cpp:640
#define RDEFAULT_QSTRING
Definition RDebug.h:41
#define RDEFAULT_QLIST_RS_ENTITYTYPE
Definition RDocument.h:63
Q_DECLARE_METATYPE(RMath *)
#define RMAXDOUBLE
Definition RMath.h:66
#define RDEFAULT_QSTRINGLIST
Definition RObject.h:47
#define RDEFAULT_QVARIANT
Definition RTextLabel.h:32
Definition RDebug.h:38
Represents a block definition in a drawing.
Definition RBlock.h:42
Represents a box e.g.
Definition RBox.h:46
Color.
Definition RColor.h:43
Dimension style class.
Definition RDimStyle.h:42
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition RDocument.h:78
RObject::Id linetypeByBlockId
Definition RDocument.h:517
bool autoTransactionGroup
Definition RDocument.h:519
QMap< RObject::Id, RSpatialIndex * > spatialIndicesByBlock
Definition RDocument.h:513
RObject::Id queryClosestXY(QSet< RObject::Id > &candidates, const RVector &wcsPosition, double range, bool draft, double strictRange=RMAXDOUBLE)
void setAutoTransactionGroup(bool on)
True: add all operations to the current transaction group.
Definition RDocument.h:319
bool getAutoTransactionGroup() const
Definition RDocument.h:322
static RDocument * clipboard
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RDocument.h:502
RStorage & storage
Definition RDocument.h:508
RObject::Id linetypeByLayerId
Definition RDocument.h:516
RSpatialIndex & spatialIndex
Definition RDocument.h:510
RObject::Id getLinetypeByBlockId() const
Definition RDocument.h:413
RTransactionStack transactionStack
Definition RDocument.h:514
QString fileName
Definition RDocument.h:505
RObject::Id getLinetypeByLayerId() const
Definition RDocument.h:410
bool disableSpatialIndicesByBlock
Definition RDocument.h:511
QString fileVersion
Definition RDocument.h:506
This type of object is used to store document wide variables.
Definition RDocumentVariables.h:38
Base class for all entity classes.
Definition REntity.h:63
Represents a layer in a drawing.
Definition RLayer.h:45
Represents a layer state (state of list of layers) in a drawing.
Definition RLayerState.h:37
Represents a layout definition in a drawing.
Definition RLayout.h:42
Represents a linetype in a drawing.
Definition RLinetype.h:45
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RLinetypePattern.h:42
Lineweight
Definition RLineweight.h:44
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RNonCopyable.h:32
Abstract base class for all objects.
Definition RObject.h:64
static const Id INVALID_ID
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RObject.h:70
int Handle
Definition RObject.h:71
int Id
Definition RObject.h:69
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RRequireHeap.h:30
EntityType
Entity types used for property handling / filtering.
Definition RS.h:227
@ EntityAll
All entities (for filters)
Definition RS.h:241
AngleFormat
Angle format for printing angles.
Definition RS.h:454
static const double PointTolerance
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RS.h:920
Measurement
Enum of supported measurement systems.
Definition RS.h:416
LinearFormat
Format for length values.
Definition RS.h:470
KnownVariable
Well established document variables.
Definition RS.h:501
Unit
Enum of supported units (values correspond to DXF spec).
Definition RS.h:425
Abstract base class for spatial index implementations.
Definition RSpatialIndex.h:69
This is the abstract base class for all storage implementations.
Definition RStorage.h:67
Transaction implementation.
Definition RTransaction.h:73
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RTransactionStack.h:37
Represents a user coordinate system (UCS) in a drawing.
Definition RUcs.h:41
Represents a 3d vector (x/y/z).
Definition RVector.h:47
Represents a view in a drawing.
Definition RView.h:41
#define QCADCORE_EXPORT
Definition core_global.h:10
void setCurrentLayer(void layerName)
Sets the current layer to the given layer.
Definition simple_create.js:127
void setCurrentColor(void color)
Sets the current color for newly added entities.
Definition simple_create.js:36
void hasLayer(void name)
Checks if the given layer exists.
Definition simple_create.js:119
void isEntity(void obj)
Checks if the given object is a graphics entity.
Definition library.js:364
void getClipboard()
Definition library.js:870
#define NULL
Definition opennurbs_system.h:256