QCAD
Open Source 2D CAD
library.js File Reference

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)
 

Function Documentation

◆ activateFont()

void activateFont ( void  fontComboBox,
void  fontName 
)

◆ addActionsToWidgets()

void addActionsToWidgets ( )

◆ addDirtyFlag()

void addDirtyFlag ( void  title)

◆ angleToString()

void angleToString ( void  num,
void  decimals 
)

◆ applyTheme()

void applyTheme ( )

◆ autoIconPath()

void autoIconPath ( void  path)

◆ autoPath()

void autoPath ( void  path)

◆ coordinateToString()

void coordinateToString ( void  coordinate,
void  decimals,
void  relative,
void  polar,
void  doc 
)

Formats the given coordinate (RVector) into a locale aware string.

◆ copyDirectory()

void copyDirectory ( void  sourceDirPath,
void  destDirPath 
)

Copies a directory recursively.

Existing files are not overridden.

Parameters
sourceDirPathThe source directory.
destDirPathThe destination directory.
Returns
true, if the directory was deleted successfully

◆ createSpatialIndex()

void createSpatialIndex ( )

◆ deepCopy()

void deepCopy ( void  obj)

Clones the given object (deep copy).

◆ deg2rad()

void deg2rad ( void  val)

Converts degrees to radiant.

Parameters
valthe value in degrees
Returns
the value in radiant

◆ entityTypeToClass()

void entityTypeToClass ( void  type)

Converts the given entity type enum to the class name.

Returns
Class name (e.g. "RLineEntity" for RS.EntityLine
Parameters
typeEntity type (RS::EntityType)

◆ entityTypeToString()

void entityTypeToString ( void  type,
void  plural 
)

Converts the given entity type enum to a human readable, translated string.

Returns
A translated string for the given entity type.
Parameters
typeEntity type (RS::EntityType)
pluralTrue to return plural, false (default) to return singular.

◆ exists()

void exists ( void  path)

◆ findFile()

void findFile ( void  dirPath,
void  fileName,
void  ignoreDirs 
)

Finds a file recursively.

Parameters
dirPathThe directory to search.
fileNameFile name.
Returns
Path of the file or undefined.

◆ fixSymbolTableName()

void fixSymbolTableName ( void  name)

Fixes the given symbol table name (e.g.

block or layer name).

Parameters
nameSuggested name, for example coming from a file base name.
Returns
Fixed name or undefined if the name cannot be fixed (i.e. contains invalid characters).

◆ getAbsolutePathForArg()

void getAbsolutePathForArg ( void  file)

◆ getClipboard()

void getClipboard ( )

◆ getClosestSimpleShape()

void getClosestSimpleShape ( void  entity,
void  pos 
)

◆ getCurrentDateTime()

void getCurrentDateTime ( void  format)

◆ getDontUseNativeDialog()

void getDontUseNativeDialog ( )

◆ getEntityType()

void getEntityType ( void  typeName)

Converts the given entity type name to the entity type enum.

Returns
entity type enum.
Parameters
typeNameEntity type name ("Line", "Arc", ...)

◆ getInBlockEasyDragAndDrop()

void getInBlockEasyDragAndDrop ( void  entity)

◆ getInBlockTextEdit()

void getInBlockTextEdit ( void  entity)

◆ getKeyboardModifiers()

void getKeyboardModifiers ( void  event)

◆ getMainWindow()

void getMainWindow ( )

◆ getOwnPropertyCI()

void getOwnPropertyCI ( void  obj,
void  prop 
)

◆ getTypeOf()

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.

◆ getUrlsFromMimeData()

void getUrlsFromMimeData ( void  mimeData)

◆ getVersionNumber()

void getVersionNumber ( void  major,
void  minor,
void  revision,
void  build 
)

◆ getWidgetPath()

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

Parameters
widgetthe widget
Returns
the widget path

◆ getWidgets()

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;

Parameters
widgetthe parent widget
cathe initial array which holds some child widgets for recursive calls
allowDuplicatesTrue to collect widgets with same name under a different key ("MyField", "MyField_1", "MyField_2").
Returns
Array of child widgets.

◆ hasOwnPropertyCI()

void hasOwnPropertyCI ( void  obj,
void  prop 
)

◆ hasPlugin()

void hasPlugin ( void  name)

◆ initFontComboBox()

void initFontComboBox ( void  comboBox)

Insert CAD fonts at the top into the given font combo box.

◆ initUserShortcuts()

void initUserShortcuts ( )

◆ isAltPressed()

void isAltPressed ( void  event)

◆ isArcEntity()

void isArcEntity ( void  obj)

Checks if the given object is an arc entity.

Returns
true if the given object is an arc entity (RArcEntity).

◆ isArcShape()

void isArcShape ( void  obj)

Checks if the given object is an arc shape.

Returns
true if the given object is an arc shape (RArc).

◆ isArray()

void isArray ( void  obj)

Checks the type of the given object.

Returns
true if the given object is an array.

◆ isAttributeDefinitionEntity()

void isAttributeDefinitionEntity ( void  obj)

Checks if the given object is an attribute definition entity.

Returns
true if the given object is an attribute definition entity (RAttributeDefinitionEntity).

◆ isAttributeEntity()

void isAttributeEntity ( void  obj)

Checks if the given object is an attribute entity.

Returns
true if the given object is an attribute entity (RAttributeEntity).

◆ isBlock()

void isBlock ( void  obj)

Checks if the given object is a block (RBlock).

Returns
true if the given object is a block.

◆ isBlockReferenceEntity()

void isBlockReferenceEntity ( void  obj)

Checks if the given object is a block reference entity.

Returns
true if the given object is a block reference entity (RBlockReferenceEntity).

◆ isBoolean()

void isBoolean ( void  obj)

Checks if the given object is a valid boolean value.

Returns
true if the given object is a boolean and not NULL or undefined.

◆ isCircleEntity()

void isCircleEntity ( void  obj)

Checks if the given object is a circle entity.

Returns
true if the given object is a line entity (RCircleEntity).

◆ isCircleShape()

void isCircleShape ( void  obj)

Checks if the given object is a circle shape.

Returns
true if the given object is a circle shape (RCircle).

◆ isClosedPolylineEntity()

void isClosedPolylineEntity ( void  obj,
void  tolerance 
)

◆ isClosedPolylineShape()

void isClosedPolylineShape ( void  obj)

◆ isClosedSplineEntity()

void isClosedSplineEntity ( void  obj,
void  tolerance 
)

◆ isClosedSplineShape()

void isClosedSplineShape ( void  obj,
void  tolerance 
)

Checks if the given object is a closed spline shape.

Returns
true if the given object is a closed spline shape (RSpline).

◆ isColor()

void isColor ( void  obj)

Checks if the given object is a color.

Returns
true if the given object is an RColor object.

◆ isComboBox()

void isComboBox ( void  obj)

Checks the type of the given object.

Returns
true if the given object is a combo box.

◆ isControlPressed()

void isControlPressed ( void  event)

◆ isDimAlignedEntity()

void isDimAlignedEntity ( void  obj)

Checks if the given object is an aligned dimension entity.

Returns
true if the given object is an aligned dimension entity (RDimAlignedEntity).

◆ isDimAngular2LEntity()

void isDimAngular2LEntity ( void  obj)

Checks if the given object is an angular dimension from 2 lines entity.

Returns
true if the given object is an angular dimension entity (RDimAngular2LEntity).

◆ isDimAngular3PEntity()

void isDimAngular3PEntity ( void  obj)

Checks if the given object is an angular dimension from 3 points entity.

Returns
true if the given object is an angular dimension entity (RDimAngular3PEntity).

◆ isDimAngularEntity()

void isDimAngularEntity ( void  obj)

Checks if the given object is an angular dimension entity.

Returns
true if the given object is an angular dimension entity (RDimAngular2LEntity or RDimAngular3PEntity).

◆ isDimArcLengthEntity()

void isDimArcLengthEntity ( void  obj)

Checks if the given object is an arc length dimension entity.

Returns
true if the given object is an arc length dimension entity (RDimArcLengthEntity).

◆ isDimDiametricEntity()

void isDimDiametricEntity ( void  obj)

Checks if the given object is a diametric dimension entity.

Returns
true if the given object is a diametric dimension entity (RDimDiametricEntity).

◆ isDimensionEntity()

void isDimensionEntity ( void  obj)

Checks if the given object is a dimension entity of any kind.

Returns
true if the given object is a dimension entity (RDimensionEntity).

◆ isDimLinearEntity()

void isDimLinearEntity ( void  obj)

Checks if the given object is a linear dimension entity.

Returns
true if the given object is a linear dimension entity (RDimLinearEntity).

◆ isDimOrdinateEntity()

void isDimOrdinateEntity ( void  obj)

Checks if the given object is an ordinate dimension entity.

Returns
true if the given object is an ordinate dimension entity (RDimOrdinateEntity).

◆ isDimRadialEntity()

void isDimRadialEntity ( void  obj)

Checks if the given object is a radial dimension entity.

Returns
true if the given object is a radial dimension entity (RDimRadialEntity).

◆ isDimRotatedEntity()

void isDimRotatedEntity ( void  obj)

Checks if the given object is a rotated dimension entity.

Returns
true if the given object is a rotated dimension entity (RDimRotatedEntity).

◆ isDirectedShape()

void isDirectedShape ( void  obj)

Checks if the given object is a directed shape.

Returns
true if the given object is a directed shape.

◆ isEllipseArcShape()

void isEllipseArcShape ( void  obj)

Checks if the given object is an ellipse arc shape.

Returns
true if the given object is an ellipse arc shape (REllipse).

◆ isEllipseEntity()

void isEllipseEntity ( void  obj)

Checks if the given object is an ellipse entity.

Returns
true if the given object is an ellipse entity (REllipseEntity).

◆ isEllipseShape()

void isEllipseShape ( void  obj)

Checks if the given object is an ellipse shape.

Returns
true if the given object is an ellipse shape (REllipse).

◆ isEntity()

void isEntity ( void  obj)

Checks if the given object is a graphics entity.

Returns
true if the given object is an entity (derived from REntity).

◆ isEntityType()

void isEntityType ( void  obj,
void  type 
)

Checks if the given object is an entity of the given type.

◆ isFaceEntity()

void isFaceEntity ( void  obj)

Checks if the given object is a face entity.

Returns
true if the given object is a face entity (RFaceEntity).

◆ isFullEllipseEntity()

void isFullEllipseEntity ( void  obj)

Checks if the given object is an ellipse entity and represents a full ellipse.

Returns
true if the given object is an ellipse entity (REllipseEntity).

◆ isFullEllipseShape()

void isFullEllipseShape ( void  obj)

Checks if the given object is a full ellipse shape.

Returns
true if the given object is a full ellipse shape (REllipse).

◆ isFunction()

void isFunction ( void  obj)

Checks if the given object is a valid function.

Returns
true if the given object is a function.

◆ isHatchEntity()

void isHatchEntity ( void  obj)

Checks if the given object is a hatch entity.

Returns
true if the given object is an arc entity (RHatchEntity).

◆ isImageEntity()

void isImageEntity ( void  obj)

Checks if the given object is an image entity.

Returns
true if the given object is an image entity (RImageEntity).

◆ isLayer()

void isLayer ( void  obj)

Checks if the given object is a layer.

Returns
true if the given object is a layer.

◆ isLayout()

void isLayout ( void  obj)

Checks if the given object is a layout (RLayout).

Returns
true if the given object is a layout.

◆ isLeaderEntity()

void isLeaderEntity ( void  obj)

Checks if the given object is a leader entity.

Returns
true if the given object is a leader entity (RLeaderEntity).

◆ isLineBasedEntity()

void isLineBasedEntity ( void  obj)

Checks if the given object is a line, xline or ray entity.

Returns
true if the given object is a line based entity (RLineEntity, RXLineEntity, RRayEntity).

◆ isLineBasedShape()

void isLineBasedShape ( void  obj)

Checks if the given object is a line based shape.

Returns
true if the given object is a line based shape (RLine, RXline, RRay).

◆ isLineEntity()

void isLineEntity ( void  obj)

Checks if the given object is a line entity.

Returns
true if the given object is a line entity (RLineEntity).

◆ isLineShape()

void isLineShape ( void  obj)

Checks if the given object is a line shape.

Returns
true if the given object is a line shape (RLine).

◆ isNull()

void isNull ( void  obj)

Checks if the given object is undefined or null.

Returns
true if the given object is defined and not null. This method also supports shared pointers, i.e. obj.isNull()==true.

◆ isNumber()

void isNumber ( void  obj)

Checks if the given object is a valid number.

Returns
true if the given object is a number and not NaN or +/-Infinity or NULL or undefined.

◆ isNumberGreaterEqualZero()

void isNumberGreaterEqualZero ( void  n)

◆ isNumberGreaterZero()

void isNumberGreaterZero ( void  n)

◆ isObject()

void isObject ( void  obj)

Checks if the given object is an RObject.

Returns
true if the given object is an object (derived from RObject).

◆ isOfType()

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.

◆ isPointEntity()

void isPointEntity ( void  obj)

Checks if the given object is a point entity.

Returns
true if the given object is a point entity (RPointEntity).

◆ isPointShape()

void isPointShape ( void  obj)

Checks if the given object is a point shape.

Returns
true if the given object is a point shape (RPoint).

◆ isPolylineEntity()

void isPolylineEntity ( void  obj)

◆ isPolylineShape()

void isPolylineShape ( void  obj)

Checks if the given object is a polyline shape.

Returns
true if the given object is a polyline shape (RPolyline).

◆ isQObject()

void isQObject ( void  obj)

Checks if the given object is a valid QObject.

Returns
true if the given object is a QObject.

◆ isQWidget()

void isQWidget ( void  obj)

Checks if the given object is a valid QWidget.

Returns
true if the given object is a QWidget.

◆ isRayEntity()

void isRayEntity ( void  obj)

Checks if the given object is a ray entity.

Returns
true if the given object is a ray entity (RRayEntity).

◆ isRayShape()

void isRayShape ( void  obj)

Checks if the given object is a ray shape.

Returns
true if the given object is a ray shape (RRay).

◆ isSeparator()

void isSeparator ( void  obj)

◆ isShape()

void isShape ( void  obj)

Checks if the given object is a shape.

Returns
true if the given object is a shape (derived from RShape).

◆ isShiftPressed()

void isShiftPressed ( void  event)

◆ isSimpleTextEntity()

void isSimpleTextEntity ( void  obj)

Checks if the given object is a simple text entity.

Returns
true if the given object is a text entity (RTextEntity) and simple.

◆ isSolidEntity()

void isSolidEntity ( void  obj)

Checks if the given object is a solid entity.

Returns
true if the given object is a solid entity (RSolidEntity).

◆ isSplineEntity()

void isSplineEntity ( void  obj)

Checks if the given object is a spline entity.

Returns
true if the given object is a spline entity (RSplineEntity).

◆ isSplineEntityWithFitPoints()

void isSplineEntityWithFitPoints ( void  obj)

Checks if the given object is a spline entity with fit points.

Returns
true if the given object is a spline entity (RSplineEntity) with fit points.

◆ isSplineShape()

void isSplineShape ( void  obj)

Checks if the given object is a spline shape.

Returns
true if the given object is a spline shape (RSpline).

◆ isString()

void isString ( void  obj)

Checks if the given object is a string.

Returns
true if the given object is a string

◆ isTextBasedEntity()

void isTextBasedEntity ( void  obj)

Checks if the given object is a text, attribute or attribute definition entity.

Returns
true if the given object is a text based entity (RTextBasedEntity).

◆ isTextEntity()

void isTextEntity ( void  obj)

Checks if the given object is a text entity.

Returns
true if the given object is a text entity (RTextEntity).

◆ isToleranceEntity()

void isToleranceEntity ( void  obj)

Checks if the given object is a tolerance entity.

Returns
true if the given object is a tolerance entity (RToleranceEntity).

◆ isTraceEntity()

void isTraceEntity ( void  obj)

Checks if the given object is a trace entity.

Returns
true if the given object is a trace entity (RTraceEntity).

◆ isTriangleShape()

void isTriangleShape ( void  obj)

Checks if the given object is a triangle shape.

Returns
true if the given object is a triangle shape (RTriangle).

◆ isUrl()

void isUrl ( void  urlString)

◆ isValidColor()

void isValidColor ( void  obj)

Checks if the given object is a valid color.

Returns
true if the given object is a valid RColor object.

◆ isValidVector()

void isValidVector ( void  obj)

Checks if the given object is a valid vector.

Returns
true if the given object is a valid RVector object.

◆ isVector()

void isVector ( void  obj)

Checks if the given object is of type RVector.

Returns
true if the given object is an RVector object.

◆ isViewportEntity()

void isViewportEntity ( void  obj)

Checks if the given object is a viewport entity.

Returns
true if the given object is a viewport entity (RViewportEntity).

◆ isXLineEntity()

void isXLineEntity ( void  obj)

Checks if the given object is an xline entity.

Returns
true if the given object is an xline entity (RXLineEntity).

◆ isXLineShape()

void isXLineShape ( void  obj)

Checks if the given object is an xline shape.

Returns
true if the given object is an xline shape (RXLine).

◆ mergeProperties()

void mergeProperties ( void  obj1,
void  obj2 
)

◆ modifyEntity()

void modifyEntity ( void  op,
void  entity,
void  shape 
)

Modify the given entity to represent the given shape.

Possible conversions: Line -> XLine, Ray XLine -> Line, Ray Ray -> XLine, Line Circle -> Arc

◆ neutralPath()

void neutralPath ( void  path)

◆ numberToString()

void numberToString ( void  num,
void  decimals 
)

Formats the given number into a locale aware string.

◆ objectFromPath()

void objectFromPath ( void  path)

Gets an object from its object path.

Object paths are separated by ::.

Parameters
paththe object path
widgetthe widget [optional, used for the recursive call], obsolete
Returns
Object or undefined

◆ qsTranslate2()

void qsTranslate2 ( void  context,
void  sourceText,
void  disambiguation,
void  n 
)

◆ rad2deg()

void rad2deg ( void  val)

Converts radiant to degrees.

Parameters
valthe value in radiant
Returns
the value in degrees

◆ rayToLine()

void rayToLine ( void  ray)

◆ readTextFile()

void readTextFile ( void  fileName)

◆ removeDirectory()

void removeDirectory ( void  dirPath)

Removes a directory recursively.

Parameters
dirPathThe directory to remove.
Returns
true, if no errors occurs

◆ requiresFramework()

void requiresFramework ( void  minVersion,
void  maxVersion 
)

Checks if the QCAD Application Framework is at least of version minVersion and not newer than maxVersion.

Parameters
minVersionarray in the format [major,minor,revision,build]
maxVersionarray in the format [major,minor,revision,build]

◆ restoreOverrideCursor()

void restoreOverrideCursor ( )

◆ roundDouble()

void roundDouble ( void  num,
void  dec 
)

◆ roundVector()

void roundVector ( void  v,
void  dec 
)

◆ setInBlockEasyDragAndDrop()

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.

◆ setInBlockTextEdit()

void setInBlockTextEdit ( void  entity,
void  v 
)

Enable / disable in block text editing for the given entity.

◆ setMainWindow()

void setMainWindow ( void  w)

◆ setOverrideCursor()

void setOverrideCursor ( void  cursor)

◆ setOverrideWaitCursor()

void setOverrideWaitCursor ( )

◆ shapeToEntity()

void shapeToEntity ( void  document,
void  shape 
)

Creates and returns a new entity based on the given shape.

◆ stringToCoordinate()

void stringToCoordinate ( void  relativeZero,
void  str 
)

Parses the given string as coordinate.

Parameters
relativeZeroRVector position of relative zero point.
strString to parse (e.g. "34,15.6" or "@10,30" or "50<60", ...)
Returns
undefined if the string is not a coordinate, an invalid RVector if str is an invalid coordinate or the RVector result.

◆ stringToDirectDistanceEntry()

void stringToDirectDistanceEntry ( void  relativeZero,
void  cursorPosition,
void  str 
)

Parses the given string as direct distance entry.

Author
Robert S
Parameters
relativeZeroRVector position of relative zero point.
cursorPositionRVector position of cursor.
strString to parse (e.g. "34" or "15.123", ...)
Returns
Invalid RVector if str is an invalid dde or return the dde point.

◆ stripDirtyFlag()

void stripDirtyFlag ( void  title)

◆ translateFilterStrings()

void translateFilterStrings ( void  filterStrings)

◆ trimEndPoint()

void trimEndPoint ( void  shape,
void  trimPoint,
void  clickPoint 
)

◆ trimStartPoint()

void trimStartPoint ( void  shape,
void  trimPoint,
void  clickPoint 
)

◆ writeTextFile()

void writeTextFile ( void  fileName,
void  str 
)

◆ xLineToRay()

void xLineToRay ( void  xline)