|
QCAD Application Framework
CAD Application Development and Automation.
|
Functions | |
| void | coordinateToString (void coordinate, void decimals, void relative, void polar) |
| Formats the given coordinate (RVector) into a locale aware string. | |
| void | copyDirectory (void sourceDirPath, void destDirPath) |
| Copies a directory recursively. | |
| void | deg2rad (void val) |
| Converts degrees to radiant. | |
| void | entityTypeToString (void type, void plural) |
| Converts the given entity type enum to a human readable, translated string. | |
| void | findFile (void dirPath, void fileName, void ignoreDirs) |
| Finds a file recursively. | |
| void | getAbsolutePathForArg (void file) |
| void | getCurrentDateTime (void format) |
| void | getMainWindow () |
| void | getTypeOf (void v) |
| Check the real type of the given object. | |
| void | getVersionNumber (void major, void minor, void revision, void build) |
| void | getWidgetPath (void widget) |
| Gets the widget path for the given widget. | |
| void | getWidgets (void widget, void ca) |
| Gets all child widgets and stores them in an array. | |
| void | initFontComboBox (void comboBox) |
| Insert CAD fonts at the top into the given font combo box. | |
| 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 | 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 | isComboBox (void obj) |
| Checks the type of the given object. | |
| void | isDimAlignedEntity (void obj) |
| Checks if the given object is an aligned dimension entity. | |
| void | isDimAngularEntity (void obj) |
| Checks if the given object is an angular 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 | 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 | isLeaderEntity (void obj) |
| Checks if the given object is a leader entity. | |
| 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 | isOfType (void obj, void type) |
| Checks if the given object is of the given type. | |
| 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) |
| Checks if the given object is a polyline entity. | |
| 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 | isShape (void obj) |
| Checks if the given object is a shape. | |
| 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 | 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 | isTextEntity (void obj) |
| Checks if the given object is a text entity. | |
| void | isTriangleShape (void obj) |
| Checks if the given object is a triangle shape. | |
| void | isValidVector (void obj) |
| Checks if the given object is a valid vector. | |
| void | mergeProperties (void obj1, void obj2) |
| 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. | |
| void | rad2deg (void val) |
| Converts radiant to degrees. | |
| void | removeDirectory (void dirPath) |
| Removes a directory recursively. | |
| void | requiresFramework (void minVersion, void maxVersion) |
| Checks if the QCAD Application Framework is at least of version minVersion and not newer than maxVersion. | |
| void | roundDouble (void num, void dec) |
| void | roundVector (void v, void dec) |
| void | setMainWindow (void w) |
| void | shapeToEntity (void document, void shape) |
| Creates and returns a new entity based on the given shape. | |
| void | sleep (void msec) |
| Sleeps for the given milliseconds. | |
| void | stringToCoordinate (void relativeZero, void str) |
| Parses the given string as coordinate. | |
| void coordinateToString | ( | void | coordinate, |
| void | decimals, | ||
| void | relative, | ||
| void | polar | ||
| ) |
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 deg2rad | ( | void | val | ) |
Converts degrees to radiant.
| val | the value in degrees |
| 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 findFile | ( | void | dirPath, |
| void | fileName, | ||
| void | ignoreDirs | ||
| ) |
Finds a file recursively.
| dirPath | The directory to search. |
| fileName | File name. |
| void getAbsolutePathForArg | ( | void | file | ) |
| void getCurrentDateTime | ( | void | format | ) |
| void getMainWindow | ( | ) |
| 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 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 | ||
| ) |
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 |
| void initFontComboBox | ( | void | comboBox | ) |
Insert CAD fonts at the top into the given font combo box.
| 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 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 isComboBox | ( | void | obj | ) |
Checks the type of the given object.
| void isDimAlignedEntity | ( | void | obj | ) |
Checks if the given object is an aligned dimension entity.
| void isDimAngularEntity | ( | void | obj | ) |
Checks if the given object is an angular 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 | ) |
| 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 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 isLeaderEntity | ( | void | obj | ) |
Checks if the given object is a leader entity.
| 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 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 | ) |
Checks if the given object is a polyline entity.
| 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 isShape | ( | void | obj | ) |
Checks if the given object is a shape.
| 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 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 isTextEntity | ( | void | obj | ) |
Checks if the given object is a text entity.
| void isTriangleShape | ( | void | obj | ) |
Checks if the given object is a triangle shape.
| void isValidVector | ( | void | obj | ) |
Checks if the given object is a valid vector.
| void mergeProperties | ( | void | obj1, |
| void | obj2 | ||
| ) |
| 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 rad2deg | ( | void | val | ) |
Converts radiant to degrees.
| val | the value in radiant |
| 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 roundDouble | ( | void | num, |
| void | dec | ||
| ) |
| void roundVector | ( | void | v, |
| void | dec | ||
| ) |
| void setMainWindow | ( | void | w | ) |
| void shapeToEntity | ( | void | document, |
| void | shape | ||
| ) |
Creates and returns a new entity based on the given shape.
| void sleep | ( | void | msec | ) |
Sleeps for the given milliseconds.
| msec | the time to sleep |
| void stringToCoordinate | ( | void | relativeZero, |
| void | str | ||
| ) |