QCAD
Open Source 2D CAD
|
Functions | |
void | activateFont (void fontComboBox, void fontName) |
void | addActionsToWidgets () |
void | addDirtyFlag (void title) |
void | angleToString (void num, void decimals) |
void | applyTheme () |
void | autoIconPath (void path) |
void | autoPath (void path) |
void | coordinateToString (void coordinate, void decimals, void relative, void polar, void doc) |
Formats the given coordinate (RVector) into a locale aware string. More... | |
void | copyDirectory (void sourceDirPath, void destDirPath) |
Copies a directory recursively. More... | |
void | createSpatialIndex () |
void | deepCopy (void obj) |
Clones the given object (deep copy). More... | |
void | deg2rad (void val) |
Converts degrees to radiant. More... | |
void | entityTypeToClass (void type) |
Converts the given entity type enum to the class name. More... | |
void | entityTypeToString (void type, void plural) |
Converts the given entity type enum to a human readable, translated string. More... | |
void | exists (void path) |
void | findFile (void dirPath, void fileName, void ignoreDirs) |
Finds a file recursively. More... | |
void | fixSymbolTableName (void name) |
Fixes the given symbol table name (e.g. More... | |
void | getAbsolutePathForArg (void file) |
void | getClipboard () |
void | getClosestSimpleShape (void entity, void pos) |
void | getCurrentDateTime (void format) |
void | getDontUseNativeDialog () |
void | getEntityType (void typeName) |
Converts the given entity type name to the entity type enum. More... | |
void | getInBlockEasyDragAndDrop (void entity) |
void | getInBlockTextEdit (void entity) |
void | getKeyboardModifiers (void event) |
void | getMainWindow () |
void | getOwnPropertyCI (void obj, void prop) |
void | getTypeOf (void v) |
Check the real type of the given object. More... | |
void | getUrlsFromMimeData (void mimeData) |
void | getVersionNumber (void major, void minor, void revision, void build) |
void | getWidgetPath (void widget) |
Gets the widget path for the given widget. More... | |
void | getWidgets (void widget, void ca, void allowDuplicates) |
Gets all child widgets and stores them in an array. More... | |
void | hasOwnPropertyCI (void obj, void prop) |
void | hasPlugin (void name) |
void | initFontComboBox (void comboBox) |
Insert CAD fonts at the top into the given font combo box. More... | |
void | initUserShortcuts () |
void | isAltPressed (void event) |
void | isArcEntity (void obj) |
Checks if the given object is an arc entity. More... | |
void | isArcShape (void obj) |
Checks if the given object is an arc shape. More... | |
void | isArray (void obj) |
Checks the type of the given object. More... | |
void | isAttributeDefinitionEntity (void obj) |
Checks if the given object is an attribute definition entity. More... | |
void | isAttributeEntity (void obj) |
Checks if the given object is an attribute entity. More... | |
void | isBlock (void obj) |
Checks if the given object is a block (RBlock). More... | |
void | isBlockReferenceEntity (void obj) |
Checks if the given object is a block reference entity. More... | |
void | isBoolean (void obj) |
Checks if the given object is a valid boolean value. More... | |
void | isCircleEntity (void obj) |
Checks if the given object is a circle entity. More... | |
void | isCircleShape (void obj) |
Checks if the given object is a circle shape. More... | |
void | isClosedPolylineEntity (void obj, void tolerance) |
void | isClosedPolylineShape (void obj) |
void | isClosedSplineEntity (void obj, void tolerance) |
void | isClosedSplineShape (void obj, void tolerance) |
Checks if the given object is a closed spline shape. More... | |
void | isColor (void obj) |
Checks if the given object is a color. More... | |
void | isComboBox (void obj) |
Checks the type of the given object. More... | |
void | isControlPressed (void event) |
void | isDimAlignedEntity (void obj) |
Checks if the given object is an aligned dimension entity. More... | |
void | isDimAngular2LEntity (void obj) |
Checks if the given object is an angular dimension from 2 lines entity. More... | |
void | isDimAngular3PEntity (void obj) |
Checks if the given object is an angular dimension from 3 points entity. More... | |
void | isDimAngularEntity (void obj) |
Checks if the given object is an angular dimension entity. More... | |
void | isDimArcLengthEntity (void obj) |
Checks if the given object is an arc length dimension entity. More... | |
void | isDimDiametricEntity (void obj) |
Checks if the given object is a diametric dimension entity. More... | |
void | isDimensionEntity (void obj) |
Checks if the given object is a dimension entity of any kind. More... | |
void | isDimLinearEntity (void obj) |
Checks if the given object is a linear dimension entity. More... | |
void | isDimOrdinateEntity (void obj) |
Checks if the given object is an ordinate dimension entity. More... | |
void | isDimRadialEntity (void obj) |
Checks if the given object is a radial dimension entity. More... | |
void | isDimRotatedEntity (void obj) |
Checks if the given object is a rotated dimension entity. More... | |
void | isDirectedShape (void obj) |
Checks if the given object is a directed shape. More... | |
void | isEllipseArcShape (void obj) |
Checks if the given object is an ellipse arc shape. More... | |
void | isEllipseEntity (void obj) |
Checks if the given object is an ellipse entity. More... | |
void | isEllipseShape (void obj) |
Checks if the given object is an ellipse shape. More... | |
void | isEntity (void obj) |
Checks if the given object is a graphics entity. More... | |
void | isEntityType (void obj, void type) |
Checks if the given object is an entity of the given type. More... | |
void | isFaceEntity (void obj) |
Checks if the given object is a face entity. More... | |
void | isFullEllipseEntity (void obj) |
Checks if the given object is an ellipse entity and represents a full ellipse. More... | |
void | isFullEllipseShape (void obj) |
Checks if the given object is a full ellipse shape. More... | |
void | isFunction (void obj) |
Checks if the given object is a valid function. More... | |
void | isHatchEntity (void obj) |
Checks if the given object is a hatch entity. More... | |
void | isImageEntity (void obj) |
Checks if the given object is an image entity. More... | |
void | isLayer (void obj) |
Checks if the given object is a layer. More... | |
void | isLayout (void obj) |
Checks if the given object is a layout (RLayout). More... | |
void | isLeaderEntity (void obj) |
Checks if the given object is a leader entity. More... | |
void | isLineBasedEntity (void obj) |
Checks if the given object is a line, xline or ray entity. More... | |
void | isLineBasedShape (void obj) |
Checks if the given object is a line based shape. More... | |
void | isLineEntity (void obj) |
Checks if the given object is a line entity. More... | |
void | isLineShape (void obj) |
Checks if the given object is a line shape. More... | |
void | isNull (void obj) |
Checks if the given object is undefined or null. More... | |
void | isNumber (void obj) |
Checks if the given object is a valid number. More... | |
void | isNumberGreaterEqualZero (void n) |
void | isNumberGreaterZero (void n) |
void | isObject (void obj) |
Checks if the given object is an RObject. More... | |
void | isOfType (void obj, void type) |
Checks if the given object is of the given type. More... | |
void | isPointEntity (void obj) |
Checks if the given object is a point entity. More... | |
void | isPointShape (void obj) |
Checks if the given object is a point shape. More... | |
void | isPolylineEntity (void obj) |
void | isPolylineShape (void obj) |
Checks if the given object is a polyline shape. More... | |
void | isQObject (void obj) |
Checks if the given object is a valid QObject. More... | |
void | isQWidget (void obj) |
Checks if the given object is a valid QWidget. More... | |
void | isRayEntity (void obj) |
Checks if the given object is a ray entity. More... | |
void | isRayShape (void obj) |
Checks if the given object is a ray shape. More... | |
void | isSeparator (void obj) |
void | isShape (void obj) |
Checks if the given object is a shape. More... | |
void | isShiftPressed (void event) |
void | isSimpleTextEntity (void obj) |
Checks if the given object is a simple text entity. More... | |
void | isSolidEntity (void obj) |
Checks if the given object is a solid entity. More... | |
void | isSplineEntity (void obj) |
Checks if the given object is a spline entity. More... | |
void | isSplineEntityWithFitPoints (void obj) |
Checks if the given object is a spline entity with fit points. More... | |
void | isSplineShape (void obj) |
Checks if the given object is a spline shape. More... | |
void | isString (void obj) |
Checks if the given object is a string. More... | |
void | isTextBasedEntity (void obj) |
Checks if the given object is a text, attribute or attribute definition entity. More... | |
void | isTextEntity (void obj) |
Checks if the given object is a text entity. More... | |
void | isToleranceEntity (void obj) |
Checks if the given object is a tolerance entity. More... | |
void | isTraceEntity (void obj) |
Checks if the given object is a trace entity. More... | |
void | isTriangleShape (void obj) |
Checks if the given object is a triangle shape. More... | |
void | isUrl (void urlString) |
void | isValidColor (void obj) |
Checks if the given object is a valid color. More... | |
void | isValidVector (void obj) |
Checks if the given object is a valid vector. More... | |
void | isVector (void obj) |
Checks if the given object is of type RVector. More... | |
void | isViewportEntity (void obj) |
Checks if the given object is a viewport entity. More... | |
void | isXLineEntity (void obj) |
Checks if the given object is an xline entity. More... | |
void | isXLineShape (void obj) |
Checks if the given object is an xline shape. More... | |
void | mergeProperties (void obj1, void obj2) |
void | modifyEntity (void op, void entity, void shape) |
Modify the given entity to represent the given shape. More... | |
void | neutralPath (void path) |
void | numberToString (void num, void decimals) |
Formats the given number into a locale aware string. More... | |
void | objectFromPath (void path) |
Gets an object from its object path. More... | |
void | qsTranslate2 (void context, void sourceText, void disambiguation, void n) |
void | rad2deg (void val) |
Converts radiant to degrees. More... | |
void | rayToLine (void ray) |
void | readTextFile (void fileName) |
void | removeDirectory (void dirPath) |
Removes a directory recursively. More... | |
void | requiresFramework (void minVersion, void maxVersion) |
Checks if the QCAD Application Framework is at least of version minVersion and not newer than maxVersion. More... | |
void | restoreOverrideCursor () |
void | roundDouble (void num, void dec) |
void | roundVector (void v, void dec) |
void | setInBlockEasyDragAndDrop (void entity, void v) |
Enable / disable easy drag and drop for the given entity. More... | |
void | setInBlockTextEdit (void entity, void v) |
Enable / disable in block text editing for the given entity. More... | |
void | setMainWindow (void w) |
void | setOverrideCursor (void cursor) |
void | setOverrideWaitCursor () |
void | shapeToEntity (void document, void shape) |
Creates and returns a new entity based on the given shape. More... | |
void | stringToCoordinate (void relativeZero, void str) |
Parses the given string as coordinate. More... | |
void | stringToDirectDistanceEntry (void relativeZero, void cursorPosition, void str) |
Parses the given string as direct distance entry. More... | |
void | stripDirtyFlag (void title) |
void | translateFilterStrings (void filterStrings) |
void | trimEndPoint (void shape, void trimPoint, void clickPoint) |
void | trimStartPoint (void shape, void trimPoint, void clickPoint) |
void | writeTextFile (void fileName, void str) |
void | xLineToRay (void xline) |
void activateFont | ( | void | fontComboBox, |
void | fontName | ||
) |
void addActionsToWidgets | ( | ) |
void addDirtyFlag | ( | void | title | ) |
void angleToString | ( | void | num, |
void | decimals | ||
) |
void applyTheme | ( | ) |
void autoIconPath | ( | void | path | ) |
void autoPath | ( | void | path | ) |
void coordinateToString | ( | void | coordinate, |
void | decimals, | ||
void | relative, | ||
void | polar, | ||
void | doc | ||
) |
Formats the given coordinate (RVector) into a locale aware string.
void copyDirectory | ( | void | sourceDirPath, |
void | destDirPath | ||
) |
Copies a directory recursively.
Existing files are not overridden.
sourceDirPath | The source directory. |
destDirPath | The destination directory. |
void createSpatialIndex | ( | ) |
void deepCopy | ( | void | obj | ) |
Clones the given object (deep copy).
void deg2rad | ( | void | val | ) |
Converts degrees to radiant.
val | the value in degrees |
void entityTypeToClass | ( | void | type | ) |
Converts the given entity type enum to the class name.
type | Entity type (RS::EntityType) |
void entityTypeToString | ( | void | type, |
void | plural | ||
) |
Converts the given entity type enum to a human readable, translated string.
type | Entity type (RS::EntityType) |
plural | True to return plural, false (default) to return singular. |
void exists | ( | void | path | ) |
void findFile | ( | void | dirPath, |
void | fileName, | ||
void | ignoreDirs | ||
) |
Finds a file recursively.
dirPath | The directory to search. |
fileName | File name. |
void fixSymbolTableName | ( | void | name | ) |
Fixes the given symbol table name (e.g.
block or layer name).
name | Suggested name, for example coming from a file base name. |
void getAbsolutePathForArg | ( | void | file | ) |
void getClipboard | ( | ) |
void getClosestSimpleShape | ( | void | entity, |
void | pos | ||
) |
void getCurrentDateTime | ( | void | format | ) |
void getDontUseNativeDialog | ( | ) |
void getEntityType | ( | void | typeName | ) |
Converts the given entity type name to the entity type enum.
typeName | Entity type name ("Line", "Arc", ...) |
void getInBlockEasyDragAndDrop | ( | void | entity | ) |
void getInBlockTextEdit | ( | void | entity | ) |
void getKeyboardModifiers | ( | void | event | ) |
void getMainWindow | ( | ) |
void getOwnPropertyCI | ( | void | obj, |
void | prop | ||
) |
void getTypeOf | ( | void | v | ) |
Check the real type of the given object.
Standard ECMAScript typeof returns "string" for a string literal but "object" for a string object constructed with new. Same goes for arrays, etc. This function provides a workaround.
void getUrlsFromMimeData | ( | void | mimeData | ) |
void getVersionNumber | ( | void | major, |
void | minor, | ||
void | revision, | ||
void | build | ||
) |
void getWidgetPath | ( | void | widget | ) |
Gets the widget path for the given widget.
The widgets in the path are separated with ::
, e.g. MainWindow::LayerListDock::LayerWidget::btAdd
widget | the widget |
void getWidgets | ( | void | widget, |
void | ca, | ||
void | allowDuplicates | ||
) |
Gets all child widgets and stores them in an array.
All child widgets are retrieved (recursively).
Use of this function as shown in the example below (formWidget is the parent widget). var widgets = getWidgets(formWidget); widgets["FindText"].text = text;
widget | the parent widget |
ca | the initial array which holds some child widgets for recursive calls |
allowDuplicates | True to collect widgets with same name under a different key ("MyField", "MyField_1", "MyField_2"). |
void hasOwnPropertyCI | ( | void | obj, |
void | prop | ||
) |
void hasPlugin | ( | void | name | ) |
void initFontComboBox | ( | void | comboBox | ) |
Insert CAD fonts at the top into the given font combo box.
void initUserShortcuts | ( | ) |
void isAltPressed | ( | void | event | ) |
void isArcEntity | ( | void | obj | ) |
Checks if the given object is an arc entity.
void isArcShape | ( | void | obj | ) |
Checks if the given object is an arc shape.
void isArray | ( | void | obj | ) |
Checks the type of the given object.
void isAttributeDefinitionEntity | ( | void | obj | ) |
Checks if the given object is an attribute definition entity.
void isAttributeEntity | ( | void | obj | ) |
Checks if the given object is an attribute entity.
void isBlock | ( | void | obj | ) |
Checks if the given object is a block (RBlock).
void isBlockReferenceEntity | ( | void | obj | ) |
Checks if the given object is a block reference entity.
void isBoolean | ( | void | obj | ) |
Checks if the given object is a valid boolean value.
void isCircleEntity | ( | void | obj | ) |
Checks if the given object is a circle entity.
void isCircleShape | ( | void | obj | ) |
Checks if the given object is a circle shape.
void isClosedPolylineEntity | ( | void | obj, |
void | tolerance | ||
) |
void isClosedPolylineShape | ( | void | obj | ) |
void isClosedSplineEntity | ( | void | obj, |
void | tolerance | ||
) |
void isClosedSplineShape | ( | void | obj, |
void | tolerance | ||
) |
Checks if the given object is a closed spline shape.
void isColor | ( | void | obj | ) |
Checks if the given object is a color.
void isComboBox | ( | void | obj | ) |
Checks the type of the given object.
void isControlPressed | ( | void | event | ) |
void isDimAlignedEntity | ( | void | obj | ) |
Checks if the given object is an aligned dimension entity.
void isDimAngular2LEntity | ( | void | obj | ) |
Checks if the given object is an angular dimension from 2 lines entity.
void isDimAngular3PEntity | ( | void | obj | ) |
Checks if the given object is an angular dimension from 3 points entity.
void isDimAngularEntity | ( | void | obj | ) |
Checks if the given object is an angular dimension entity.
void isDimArcLengthEntity | ( | void | obj | ) |
Checks if the given object is an arc length dimension entity.
void isDimDiametricEntity | ( | void | obj | ) |
Checks if the given object is a diametric dimension entity.
void isDimensionEntity | ( | void | obj | ) |
Checks if the given object is a dimension entity of any kind.
void isDimLinearEntity | ( | void | obj | ) |
Checks if the given object is a linear dimension entity.
void isDimOrdinateEntity | ( | void | obj | ) |
Checks if the given object is an ordinate dimension entity.
void isDimRadialEntity | ( | void | obj | ) |
Checks if the given object is a radial dimension entity.
void isDimRotatedEntity | ( | void | obj | ) |
Checks if the given object is a rotated dimension entity.
void isDirectedShape | ( | void | obj | ) |
Checks if the given object is a directed shape.
void isEllipseArcShape | ( | void | obj | ) |
Checks if the given object is an ellipse arc shape.
void isEllipseEntity | ( | void | obj | ) |
Checks if the given object is an ellipse entity.
void isEllipseShape | ( | void | obj | ) |
Checks if the given object is an ellipse shape.
void isEntity | ( | void | obj | ) |
Checks if the given object is a graphics entity.
void isEntityType | ( | void | obj, |
void | type | ||
) |
Checks if the given object is an entity of the given type.
void isFaceEntity | ( | void | obj | ) |
Checks if the given object is a face entity.
void isFullEllipseEntity | ( | void | obj | ) |
Checks if the given object is an ellipse entity and represents a full ellipse.
void isFullEllipseShape | ( | void | obj | ) |
Checks if the given object is a full ellipse shape.
void isFunction | ( | void | obj | ) |
Checks if the given object is a valid function.
void isHatchEntity | ( | void | obj | ) |
Checks if the given object is a hatch entity.
void isImageEntity | ( | void | obj | ) |
Checks if the given object is an image entity.
void isLayer | ( | void | obj | ) |
Checks if the given object is a layer.
void isLayout | ( | void | obj | ) |
Checks if the given object is a layout (RLayout).
void isLeaderEntity | ( | void | obj | ) |
Checks if the given object is a leader entity.
void isLineBasedEntity | ( | void | obj | ) |
Checks if the given object is a line, xline or ray entity.
void isLineBasedShape | ( | void | obj | ) |
void isLineEntity | ( | void | obj | ) |
Checks if the given object is a line entity.
void isLineShape | ( | void | obj | ) |
Checks if the given object is a line shape.
void isNull | ( | void | obj | ) |
Checks if the given object is undefined or null.
void isNumber | ( | void | obj | ) |
Checks if the given object is a valid number.
void isNumberGreaterEqualZero | ( | void | n | ) |
void isNumberGreaterZero | ( | void | n | ) |
void isObject | ( | void | obj | ) |
void isOfType | ( | void | obj, |
void | type | ||
) |
Checks if the given object is of the given type.
E.g. isOfType(myObject, QLabel) returns true if myObject is a QLabel. Note that isOfType(myObject, QWidget) returns false even though QLabel is derived from QWidget.
void isPointEntity | ( | void | obj | ) |
Checks if the given object is a point entity.
void isPointShape | ( | void | obj | ) |
Checks if the given object is a point shape.
void isPolylineEntity | ( | void | obj | ) |
void isPolylineShape | ( | void | obj | ) |
Checks if the given object is a polyline shape.
void isQObject | ( | void | obj | ) |
Checks if the given object is a valid QObject.
void isQWidget | ( | void | obj | ) |
Checks if the given object is a valid QWidget.
void isRayEntity | ( | void | obj | ) |
Checks if the given object is a ray entity.
void isRayShape | ( | void | obj | ) |
Checks if the given object is a ray shape.
void isSeparator | ( | void | obj | ) |
void isShape | ( | void | obj | ) |
Checks if the given object is a shape.
void isShiftPressed | ( | void | event | ) |
void isSimpleTextEntity | ( | void | obj | ) |
Checks if the given object is a simple text entity.
void isSolidEntity | ( | void | obj | ) |
Checks if the given object is a solid entity.
void isSplineEntity | ( | void | obj | ) |
Checks if the given object is a spline entity.
void isSplineEntityWithFitPoints | ( | void | obj | ) |
Checks if the given object is a spline entity with fit points.
void isSplineShape | ( | void | obj | ) |
Checks if the given object is a spline shape.
void isString | ( | void | obj | ) |
Checks if the given object is a string.
void isTextBasedEntity | ( | void | obj | ) |
Checks if the given object is a text, attribute or attribute definition entity.
void isTextEntity | ( | void | obj | ) |
Checks if the given object is a text entity.
void isToleranceEntity | ( | void | obj | ) |
Checks if the given object is a tolerance entity.
void isTraceEntity | ( | void | obj | ) |
Checks if the given object is a trace entity.
void isTriangleShape | ( | void | obj | ) |
Checks if the given object is a triangle shape.
void isUrl | ( | void | urlString | ) |
void isValidColor | ( | void | obj | ) |
Checks if the given object is a valid color.
void isValidVector | ( | void | obj | ) |
Checks if the given object is a valid vector.
void isVector | ( | void | obj | ) |
void isViewportEntity | ( | void | obj | ) |
Checks if the given object is a viewport entity.
void isXLineEntity | ( | void | obj | ) |
Checks if the given object is an xline entity.
void isXLineShape | ( | void | obj | ) |
Checks if the given object is an xline shape.
void mergeProperties | ( | void | obj1, |
void | obj2 | ||
) |
void modifyEntity | ( | void | op, |
void | entity, | ||
void | shape | ||
) |
void neutralPath | ( | void | path | ) |
void numberToString | ( | void | num, |
void | decimals | ||
) |
Formats the given number into a locale aware string.
void objectFromPath | ( | void | path | ) |
Gets an object from its object path.
Object paths are separated by ::
.
path | the object path |
widget | the widget [optional, used for the recursive call], obsolete |
void qsTranslate2 | ( | void | context, |
void | sourceText, | ||
void | disambiguation, | ||
void | n | ||
) |
void rad2deg | ( | void | val | ) |
Converts radiant to degrees.
val | the value in radiant |
void rayToLine | ( | void | ray | ) |
void readTextFile | ( | void | fileName | ) |
void removeDirectory | ( | void | dirPath | ) |
Removes a directory recursively.
dirPath | The directory to remove. |
void requiresFramework | ( | void | minVersion, |
void | maxVersion | ||
) |
Checks if the QCAD Application Framework is at least of version minVersion and not newer than maxVersion.
minVersion | array in the format [major,minor,revision,build] |
maxVersion | array in the format [major,minor,revision,build] |
void restoreOverrideCursor | ( | ) |
void roundDouble | ( | void | num, |
void | dec | ||
) |
void roundVector | ( | void | v, |
void | dec | ||
) |
void setInBlockEasyDragAndDrop | ( | void | entity, |
void | v | ||
) |
Enable / disable easy drag and drop for the given entity.
Entities tagged for easy drag and drop can be moved by dragging them while a block reference is selected.
void setInBlockTextEdit | ( | void | entity, |
void | v | ||
) |
Enable / disable in block text editing for the given entity.
void setMainWindow | ( | void | w | ) |
void setOverrideCursor | ( | void | cursor | ) |
void setOverrideWaitCursor | ( | ) |
void shapeToEntity | ( | void | document, |
void | shape | ||
) |
Creates and returns a new entity based on the given shape.
void stringToCoordinate | ( | void | relativeZero, |
void | str | ||
) |
void stringToDirectDistanceEntry | ( | void | relativeZero, |
void | cursorPosition, | ||
void | str | ||
) |
void stripDirtyFlag | ( | void | title | ) |
void translateFilterStrings | ( | void | filterStrings | ) |
void trimEndPoint | ( | void | shape, |
void | trimPoint, | ||
void | clickPoint | ||
) |
void trimStartPoint | ( | void | shape, |
void | trimPoint, | ||
void | clickPoint | ||
) |
void writeTextFile | ( | void | fileName, |
void | str | ||
) |
void xLineToRay | ( | void | xline | ) |