Skip to content

RS

Class in Core Module
Header: #include <src/core/RS.h>

Class namespace for various global enums.

Most enums fit in a class, but some are truly global, others cannot be declared in a class because this would result in problems with include files that depend on each other (note that there is no way to forward-declare nested classes or enums).

Scriptable: This class is available in script environments.

enum AngleFormat { DegreesDecimal, DegreesMinutesSeconds, Gradians, Radians, Surveyors }
Angle format for printing angles.
enum AngleUnit { Deg, Rad, Gra }
Angle Units.
enum BooleanOperation { Intersection, Union, Difference, Xor }
enum Easing { Linear, InQuad, OutQuad, InOutQuad, OutInQuad, InCubic, OutCubic, InOutCubic, OutInCubic, InQuart, OutQuart, InOutQuart, OutInQuart, InQuint, OutQuint, InOutQuint, OutInQuint, InSine, OutSine, InOutSine, OutInSine, InExpo, OutExpo, InOutExpo, OutInExpo, InCirc, OutCirc, InOutCirc, OutInCirc, InElastic, OutElastic, InOutElastic, OutInElastic, InBack, OutBack, InOutBack, OutInBack, InBounce, OutBounce, InOutBounce, OutInBounce }
enum Ending { EndingStart, EndingEnd, EndingNone }
Entity ending.
enum EndType { EndClosedPolygon, EndClosedLine, EndOpenButt, EndOpenSquare, EndOpenRound, EndOpenSingle }
enum EntityType { ObjectAll, ObjectUnknown, ObjectLinetype, ObjectLayer, ObjectBlock, ObjectLayout, ObjectLayerState, ObjectView, ObjectUcs, ObjectDocumentVariable, ObjectDimStyle, ObjectConstraint, EntityAll, EntityUnknown, EntityAttribute, EntityAttributeDefinition, EntityBlockRef, EntityBlockRefAttr, EntityPoint, EntityLine, EntityXLine, EntityRay, EntityPolyline, EntityArc, EntityCircle, EntityEllipse, EntitySolid, Entity3dFace, EntityTextBased, EntityText, EntityTrace, EntityFace, EntityDimension, EntityDimLinear, EntityDimAligned, EntityDimRotated, EntityDimRadial, EntityDimDiametric, EntityDimAngular, EntityDimAngular2L, EntityDimAngular3P, EntityDimArcLength, EntityDimOrdinate, EntityHatch, EntityImage, EntityLeader, EntitySpline, EntityViewport, EntityTolerance, EntityWipeout, EntityXRef, EntityPolyMesh, EntityCustom, EntityUser }
Entity types used for property handling / filtering.
enum FillType { EvenOdd, NonZero, Positive, Negative }
enum From { FromStart, FromEnd, FromAny, AlongPolyline }
End used to specify from which end of a shape to measure a distance.
enum HAlign { HAlignLeft, HAlignCenter, HAlignRight, HAlignAlign, HAlignMid, HAlignFit }
Horizontal alignments.
enum IsoProjectionType { NoProjection, Top, Bottom, Left, LeftBack, Right, RightBack, Isometric, IsometricTrue, Planometric, Dimetric, Cabinet, Cabinet30, Cavalier, User1, User2, User3, User4, IsoTop, IsoBottom, IsoLeft, IsoLeftBack, IsoRight, IsoRightBack }
Projection type for isometric projections.
enum JoinType { JoinBevel, JoinRound, JoinMiter }
enum KnownVariable { ANGBASE, ANGDIR, ATTMODE, AUNITS, AUPREC, CECOLOR, CELTSCALE, CHAMFERA, CHAMFERB, CHAMFERC, CHAMFERD, CLAYER, CMLJUST, CMLSCALE, DIMADEC, DIMALT, DIMALTD, DIMALTF, DIMALTRND, DIMALTTD, DIMALTTZ, DIMALTU, DIMALTZ, DIMAPOST, DIMASZ, DIMATFIT, DIMAUNIT, DIMAZIN, DIMBLK, DIMBLK1, DIMBLK2, DIMCEN, DIMCLRD, DIMCLRE, DIMCLRT, DIMDEC, DIMDLE, DIMDLI, DIMDSEP, DIMEXE, DIMEXO, DIMFRAC, DIMGAP, DIMJUST, DIMLDRBLK, DIMLFAC, DIMLIM, DIMLUNIT, DIMLWD, DIMLWE, DIMPOST, DIMRND, DIMSAH, DIMSCALE, DIMSD1, DIMSD2, DIMSE1, DIMSE2, DIMSOXD, DIMTAD, DIMTDEC, DIMTFAC, DIMTIH, DIMTIX, DIMTM, DIMTOFL, DIMTOH, DIMTOL, DIMTOLJ, DIMTP, DIMTSZ, DIMTVP, DIMTXSTY, DIMTXT, DIMTZIN, DIMUPT, DIMZIN, DISPSILH, DWGCODEPAGE, DRAWORDERCTL, ELEVATION, EXTMAX, EXTMIN, FACETRES, FILLETRAD, FILLMODE, IMAGEFRAME, INSBASE, INSUNITS, ISOLINES, LIMCHECK, LIMMAX, LIMMIN, LTSCALE, LUNITS, LUPREC, MAXACTVP, MEASUREMENT, MIRRTEXT, ORTHOMODE, PDMODE, PDSIZE, PELEVATION, PELLIPSE, PEXTMAX, PEXTMIN, PINSBASE, PLIMCHECK, PLIMMAX, PLIMMIN, PLINEGEN, PLINEWID, PROXYGRAPHICS, PSLTSCALE, PUCSNAME, PUCSORG, PUCSXDIR, PUCSYDIR, QTEXTMODE, REGENMODE, SHADEDGE, SHADEDIF, SKETCHINC, SKPOLY, SPLFRAME, SPLINESEGS, SPLINETYPE, SURFTAB1, SURFTAB2, SURFTYPE, SURFU, SURFV, TEXTQLTY, TEXTSIZE, TEXTSTYLE, THICKNESS, TILEMODE, TRACEWID, TREEDEPTH, UCSNAME, UCSORG, UCSXDIR, UCSYDIR, UNITMODE, USERI1, USERI2, USERI3, USERI4, USERI5, USERR1, USERR2, USERR3, USERR4, USERR5, USRTIMER, VISRETAIN, WORLDVIEW, MaxKnownVariable, INVALID }
Well established document variables.
enum KnownVariableType { VarTypeBool, VarTypeInt, VarTypeDouble, VarTypeColor, VarTypeUnknown }
enum LinearFormat { Scientific, Decimal, Engineering, ArchitecturalStacked, FractionalStacked, Architectural, Fractional, WindowsDesktop }
Format for length values.
enum Measurement { UnknownMeasurement, Imperial, Metric }
Enum of supported measurement systems.
enum MessageType { Print, Debug, Warning, Critical, Command }
Message type for debugging and displaying user messages.
enum MetaType { Bool, Char, Double, Int, UnknownType, LongLong, BitArray, Bitmap, Brush, ByteArray, Color, Cursor, Date, DateTime, EasingCurve, Font, Hash, Icon, Image, KeySequence, Line, LineF, List, Locale, Map, Matrix4x4, Palette, Pen, Pixmap, Point, PointF, Polygon, Rect, RectF, Region, Size, SizeF, SizePolicy, String, StringList, TextFormat, TextLength, Time, Transform, Url, Vector2D, Vector3D, Vector4D, Quaternion, UInt, ULongLong, UserType }
enum Orientation { UnknownOrientation, Any, CW, CCW }
enum OrthoMode { OrthoVertical, OrthoHorizonal, Orthogonal }
Orthogonal mode, used for snap restrictions.
enum ProjectionRenderingHint { RenderTop, RenderSide, RenderFront, RenderThreeD }
Sets the current rendering hint for exports.
enum Side { NoSide, LeftHand, RightHand, BothSides }
Side used for side of a point relative to an entity (right hand or left hand side).
enum TextDrawingDirection { LeftToRight, TopToBottom, ByStyle }
Text drawing direction.
enum TextLineSpacingStyle { AtLeast, Exact }
Line spacing style for texts.
enum Unit { None, Inch, Foot, Mile, Millimeter, Centimeter, Meter, Kilometer, Microinch, Mil, Yard, Angstrom, Nanometer, Micron, Decimeter, Decameter, Hectometer, Gigameter, Astro, Lightyear, Parsec, MaxUnit }
Enum of supported units (values correspond to DXF spec).
enum VAlign { VAlignTop, VAlignMiddle, VAlignBase, VAlignBottom }
Vertical alignments.
static QString captured(const QRegularExpression &rx, const QRegularExpressionMatch &match, int nth=0)
static bool compare(const QPair< QVariant, RPropertyAttributes > &p1, const QPair< QVariant, RPropertyAttributes > &p2, bool noTolerance=false)
static bool compare(const QVariant &v1, const QVariant &v2, bool noTolerance=false)
static int compareAlphanumerical(const QString &s1, const QString &s2)
Alphanumerical, locale aware, case insensitive comparison.
static QStringList compareChunkify(const QString &s)
static QString convert(const QByteArray &str, const QString &codecName)
static QRegularExpression createRegEpCI(const QString &str, bool regExp2=false)
static QString escape(const QString &plain)
static bool exactMatch(const QRegularExpression &rx, const QString &string)
static bool exactMatch(const QRegularExpression &rx, QRegularExpressionMatch &match, const QString &string)
static bool exactMatch(const QString &rxStr, const QString &string)
static QSize getAvailableGeometry(int screen)
static QString getBuildCpuArchitecture()
static QString getCpuArchitecture()
static int getCpuCores()
static QStringList getDirectoryList(const QString &subDirectory)
static QStringList getFileList(const QString &subDirectory, const QString &fileExtension)
Searches for files in various directories under the given subdirectory which match the given file extension.
static QString getFontFamily(const QTextCharFormat &format)
static QString getFontFamilyFromFileName(const QString &fileName)
static QStringList getFontList()
static QString getHostId()
static int getIdealThreadCount()
static QString getImageFilePath(const QString &docFileName, const QString &importedFileName, const QByteArray &imageData)
static QStringList getLinetypeList(bool metric)
static int getMetaType(const QVariant &v)
static QSizeF getPageSize(const QString &name)
static int getPageSizeId(const QString &name)
static QStringList getPatternList(bool metric)
static int getScreenCount()
static QString getSystemId()
static QString getWindowManagerId()
static int indexIn(const QRegularExpression &rx, QRegularExpressionMatch &match, const QString &string, int from=0)
static bool lessThanAlphanumerical(const QString &s1, const QString &s2)
static bool mapContainsCaseInsensitive(const QMap< QString, T > &map, const QString &key)
static T mapValueCaseInsensitive(const QMap< QString, T > &map, const QString &key)
static int matchedLength(const QRegularExpression &rx, const QRegularExpressionMatch &match)
static void setUtf8Codec(QTextStream &ts)
static bool showInFileManager(const QString &filePaths)
static QStringList sortAlphanumerical(const QStringList &list)
Alphanumerical sorting.
static QList< T > toList(const QSet< T > &set)
static QSet< T > toSet(const QList< T > &list)
static QList< T > unique(const QList< T > &list)
static const double AngleTolerance
static const QPrinter::Orientation Landscape
static const Qt::MouseButton MiddleButton
static const double PointTolerance
static const QPrinter::Orientation Portrait

enum AngleFormat

Angle format for printing angles.

Value Description
DegreesDecimal = 0 Degrees with decimal point (e.g. 24.5<degree symbol>)
DegreesMinutesSeconds = 1 Degrees, Minutes and Seconds (e.g. 24<degree symbol>30’5’’)
Gradians = 2 Gradians with decimal point (e.g. 390.5)
Radians = 3 Radians with decimal point (e.g. 1.57)
Surveyors = 4 Surveyor’s units.

enum AngleUnit

Angle Units.

Value Description
Deg Degrees.
Rad Radians.
Gra Gradians.

enum BooleanOperation
Value Description
Intersection
Union
Difference
Xor

enum Easing
Value Description
Linear = REASING_LINEAR
InQuad = REASING_INQUAD
OutQuad = REASING_OUTQUAD
InOutQuad = REASING_INOUTQUAD
OutInQuad = REASING_OUTINQUAD
InCubic = REASING_INCUBIC
OutCubic = REASING_OUTCUBIC
InOutCubic = REASING_INOUTCUBIC
OutInCubic = REASING_OUTINCUBIC
InQuart = REASING_INQUART
OutQuart = REASING_OUTQUART
InOutQuart = REASING_INOUTQUART
OutInQuart = REASING_OUTINQUART
InQuint = REASING_INQUINT
OutQuint = REASING_OUTQUINT
InOutQuint = REASING_INOUTQUINT
OutInQuint = REASING_OUTINQUINT
InSine = REASING_INSINE
OutSine = REASING_OUTSINE
InOutSine = REASING_INOUTSINE
OutInSine = REASING_OUTINSINE
InExpo = REASING_INEXPO
OutExpo = REASING_OUTEXPO
InOutExpo = REASING_INOUTEXPO
OutInExpo = REASING_OUTINEXPO
InCirc = REASING_INCIRC
OutCirc = REASING_OUTCIRC
InOutCirc = REASING_INOUTCIRC
OutInCirc = REASING_OUTINCIRC
InElastic = REASING_INELASTIC
OutElastic = REASING_OUTELASTIC
InOutElastic = REASING_INOUTELASTIC
OutInElastic = REASING_OUTINELASTIC
InBack = REASING_INBACK
OutBack = REASING_OUTBACK
InOutBack = REASING_INOUTBACK
OutInBack = REASING_OUTINBACK
InBounce = REASING_INBOUNCE
OutBounce = REASING_OUTBOUNCE
InOutBounce = REASING_INOUTBOUNCE
OutInBounce = REASING_OUTINBOUNCE

enum Ending

Entity ending.

Used for returning which end of an entity is meant.

Value Description
EndingStart Start point.
EndingEnd End point.
EndingNone Neither.

enum EndType
Value Description
EndClosedPolygon
EndClosedLine
EndOpenButt
EndOpenSquare
EndOpenRound
EndOpenSingle

enum EntityType

Entity types used for property handling / filtering.

Value Description
ObjectAll
ObjectUnknown Unknown object.
ObjectLinetype
ObjectLayer
ObjectBlock
ObjectLayout
ObjectLayerState
ObjectView
ObjectUcs
ObjectDocumentVariable
ObjectDimStyle
ObjectConstraint Constraint.
EntityAll All entities (for filters).
EntityUnknown Unknown entity.
EntityAttribute Block attribute.
EntityAttributeDefinition Block attribute definition.
EntityBlockRef Block reference.
EntityBlockRefAttr Block reference with attributes.
EntityPoint Point.
EntityLine Line.
EntityXLine XLine.
EntityRay Ray.
EntityPolyline Polyline.
EntityArc Arc.
EntityCircle Circle.
EntityEllipse Ellipse.
EntitySolid Solid.
Entity3dFace 3d Face
EntityTextBased Any text based entity (text, attribute def, attribute).
EntityText Text.
EntityTrace Trace.
EntityFace Face.
EntityDimension Any Dimension.
EntityDimLinear Any linear dimension.
EntityDimAligned Linear aligned Dimension.
EntityDimRotated Linear rotated Dimension.
EntityDimRadial Radial Dimension.
EntityDimDiametric Diametric Dimension.
EntityDimAngular Angular Dimension.
EntityDimAngular2L Angular Dimension from 2 lines.
EntityDimAngular3P Angular Dimension from 3 points.
EntityDimArcLength Arc Length Dimension.
EntityDimOrdinate Ordinate Dimension.
EntityHatch Hatch.
EntityImage Image.
EntityLeader Leader.
EntitySpline Spline.
EntityViewport Viewport.
EntityTolerance Tolerance.
EntityWipeout Wipeout.
EntityXRef XRef.
EntityPolyMesh Polygon mesh (indexed faces, see RPolyMeshEntity).
EntityCustom = 1000 Custom entity with custom renderer.
EntityUser = 2000 User defined entity. Use this to identify entities that are added in a separate library and resort to C++ RTTI for RTTI.

enum FillType
Value Description
EvenOdd
NonZero
Positive
Negative

enum From

End used to specify from which end of a shape to measure a distance.

Value Description
FromStart = 0x1
FromEnd = 0x2
FromAny = FromStart FromEnd
AlongPolyline = 0x4

enum HAlign

Horizontal alignments.

Value Description
HAlignLeft Left.
HAlignCenter Centered.
HAlignRight Right.
HAlignAlign Aligned.
HAlignMid Middle (?).
HAlignFit Fit.

enum IsoProjectionType

Projection type for isometric projections.

Value Description
NoProjection = 0x00000000 No projection (2d x/y).
Top = 0x00000001 Top projection (x/y).
Bottom = 0x00000002 Bottom projection (x/y).
Left = 0x00000004 Front left projection (x/z).
LeftBack = 0x00000008 Back left projection (x/z).
Right = 0x00000010 Front right projection (y/z).
RightBack = 0x00000020 Back right projection (y/z).
Isometric = 0x00010000 Isometric.
IsometricTrue = 0x00020000 Isometric.
Planometric = 0x00040000 Planometric.
Dimetric = 0x00080000 Dimetric.
Cabinet = 0x00100000 Cabinet.
Cabinet30 = 0x00200000 Cabinet30.
Cavalier = 0x00400000 Cavalier.
User1 = 0x01000000 User defined 1.
User2 = 0x02000000 User defined 2.
User3 = 0x04000000 User defined 3.
User4 = 0x08000000 User defined 4.
IsoTop = Top Isometric
IsoBottom = Bottom Isometric
IsoLeft = Left Isometric
IsoLeftBack = LeftBack Isometric
IsoRight = Right Isometric
IsoRightBack = RightBack Isometric

enum JoinType
Value Description
JoinBevel
JoinRound
JoinMiter

enum KnownVariable

Well established document variables.

Value Description
ANGBASE
ANGDIR
ATTMODE
AUNITS
AUPREC
CECOLOR
CELTSCALE
CHAMFERA
CHAMFERB
CHAMFERC
CHAMFERD
CLAYER
CMLJUST
CMLSCALE
DIMADEC Decimal places in angular dimensions.
DIMALT
DIMALTD
DIMALTF
DIMALTRND
DIMALTTD
DIMALTTZ
DIMALTU
DIMALTZ
DIMAPOST
DIMASZ
DIMATFIT
DIMAUNIT Formatting of angular dimensions.
DIMAZIN Controls display of leading / trailing zeros for angular dimensions.
DIMBLK
DIMBLK1
DIMBLK2
DIMCEN
DIMCLRD
DIMCLRE
DIMCLRT
DIMDEC Decimal places in linear dimensions.
DIMDLE
DIMDLI
DIMDSEP Decimal separator in dimensions.
DIMEXE
DIMEXO
DIMFRAC
DIMGAP Distance between dimension text and dimension lines, negative for box.
DIMJUST Vertical position of dimension label.
DIMLDRBLK
DIMLFAC
DIMLIM
DIMLUNIT Formatting of linear dimensions.
DIMLWD
DIMLWE
DIMPOST
DIMRND
DIMSAH
DIMSCALE
DIMSD1
DIMSD2
DIMSE1
DIMSE2
DIMSOXD
DIMTAD Vertical position of dimension label.
DIMTDEC
DIMTFAC
DIMTIH
DIMTIX
DIMTM
DIMTOFL
DIMTOH
DIMTOL
DIMTOLJ
DIMTP
DIMTSZ Archtick size or 0 for arrows.
DIMTVP
DIMTXSTY
DIMTXT Dimension text size.
DIMTZIN
DIMUPT
DIMZIN Controls display of leading / trailing zeros for linear dimensions.
DISPSILH
DWGCODEPAGE
DRAWORDERCTL
ELEVATION
EXTMAX
EXTMIN
FACETRES
FILLETRAD
FILLMODE
IMAGEFRAME
INSBASE
INSUNITS
ISOLINES
LIMCHECK
LIMMAX
LIMMIN
LTSCALE
LUNITS
LUPREC
MAXACTVP
MEASUREMENT
MIRRTEXT
ORTHOMODE
PDMODE
PDSIZE
PELEVATION
PELLIPSE
PEXTMAX
PEXTMIN
PINSBASE
PLIMCHECK
PLIMMAX
PLIMMIN
PLINEGEN
PLINEWID
PROXYGRAPHICS
PSLTSCALE
PUCSNAME
PUCSORG
PUCSXDIR
PUCSYDIR
QTEXTMODE
REGENMODE
SHADEDGE
SHADEDIF
SKETCHINC
SKPOLY
SPLFRAME
SPLINESEGS
SPLINETYPE
SURFTAB1
SURFTAB2
SURFTYPE
SURFU
SURFV
TEXTQLTY
TEXTSIZE
TEXTSTYLE
THICKNESS
TILEMODE
TRACEWID
TREEDEPTH
UCSNAME
UCSORG
UCSXDIR
UCSYDIR
UNITMODE
USERI1
USERI2
USERI3
USERI4
USERI5
USERR1
USERR2
USERR3
USERR4
USERR5
USRTIMER
VISRETAIN
WORLDVIEW
MaxKnownVariable = WORLDVIEW
INVALID = -1

enum KnownVariableType
Value Description
VarTypeBool = 1
VarTypeInt = 2
VarTypeDouble = 3
VarTypeColor = 4
VarTypeUnknown = -1

enum LinearFormat

Format for length values.

Value Description
Scientific = 1 Scientific (e.g. 2.5E+05)
Decimal = 2 Decimal (e.g. 9.5)
Engineering = 3 Engineering (e.g. 7’ 11.5”)
ArchitecturalStacked = 4 Architectural stacked (e.g. 7’-9 1/8”)
FractionalStacked = 5 Fractional stacked (e.g. 7 9 1/8)
Architectural = 6 Architectural (e.g. ?)
Fractional = 7 Fractional (e.g. ?)
WindowsDesktop = 8 Not supported.

enum Measurement

Enum of supported measurement systems.

Value Description
UnknownMeasurement = -1
Imperial = 0 Imperial.
Metric = 1 Metric.

enum MessageType

Message type for debugging and displaying user messages.

Value Description
Print
Debug
Warning
Critical
Command

enum MetaType
Value Description
Bool = QVariant::Bool
Char = QVariant::Char
Double = QVariant::Double
Int = QVariant::Int
UnknownType = QVariant::Invalid
LongLong = QVariant::LongLong
BitArray = QVariant::BitArray
Bitmap = QVariant::Bitmap
Brush = QVariant::Brush
ByteArray = QVariant::ByteArray
Color = QVariant::Color
Cursor = QVariant::Cursor
Date = QVariant::Date
DateTime = QVariant::DateTime
EasingCurve = QVariant::EasingCurve
Font = QVariant::Font
Hash = QVariant::Hash
Icon = QVariant::Icon
Image = QVariant::Image
KeySequence = QVariant::KeySequence
Line = QVariant::Line
LineF = QVariant::LineF
List = QVariant::List
Locale = QVariant::Locale
Map = QVariant::Map
Matrix4x4 = QVariant::Matrix4x4
Palette = QVariant::Palette
Pen = QVariant::Pen
Pixmap = QVariant::Pixmap
Point = QVariant::Point
PointF = QVariant::PointF
Polygon = QVariant::Polygon
Rect = QVariant::Rect
RectF = QVariant::RectF
Region = QVariant::Region
Size = QVariant::Size
SizeF = QVariant::SizeF
SizePolicy = QVariant::SizePolicy
String = QVariant::String
StringList = QVariant::StringList
TextFormat = QVariant::TextFormat
TextLength = QVariant::TextLength
Time = QVariant::Time
Transform = QVariant::Transform
Url = QVariant::Url
Vector2D = QVariant::Vector2D
Vector3D = QVariant::Vector3D
Vector4D = QVariant::Vector4D
Quaternion = QVariant::Quaternion
UInt = QVariant::UInt
ULongLong = QVariant::ULongLong
UserType = QVariant::UserType

enum Orientation
Value Description
UnknownOrientation = -1
Any = 0
CW = 1
CCW = 2

enum OrthoMode

Orthogonal mode, used for snap restrictions.

Value Description
OrthoVertical
OrthoHorizonal
Orthogonal

enum ProjectionRenderingHint

Sets the current rendering hint for exports.

See also: RExporter::setProjectionRenderingHint

Value Description
RenderTop
RenderSide
RenderFront
RenderThreeD

enum Side

Side used for side of a point relative to an entity (right hand or left hand side).

Value Description
NoSide = 0
LeftHand = 1
RightHand = 2
BothSides = 3

enum TextDrawingDirection

Text drawing direction.

Value Description
LeftToRight = 1 Left to right.
TopToBottom = 3 Top to bottom.
ByStyle = 5 Inherited from associated text style.

enum TextLineSpacingStyle

Line spacing style for texts.

Value Description
AtLeast = 1 Taller characters will override.
Exact = 2 Taller characters will not override.

enum Unit

Enum of supported units (values correspond to DXF spec).

Value Description
None = 0 No unit (unit from parent).
Inch = 1 Inch.
Foot = 2 Foot: 12 Inches.
Mile = 3 Mile: 1760 Yards = 1609 m.
Millimeter = 4 Millimeter: 0.001m.
Centimeter = 5 Centimeter: 0.01m.
Meter = 6 Meter.
Kilometer = 7 Kilometer: 1000m.
Microinch = 8 Microinch: 0.000001.
Mil = 9 Mil = 0.001 Inch.
Yard = 10 Yard: 3 Feet.
Angstrom = 11 Angstrom: 10^-10m.
Nanometer = 12 Nanometer: 10^-9m.
Micron = 13 Micron: 10^-6m.
Decimeter = 14 Decimeter: 0.1m.
Decameter = 15 Decameter: 10m.
Hectometer = 16 Hectometer: 100m.
Gigameter = 17 Gigameter: 1000000m.
Astro = 18 Astro: 149.6 x 10^9m.
Lightyear = 19 Lightyear: 9460731798 x 10^6m.
Parsec = 20 Parsec: 30857 x 10^12.
MaxUnit = Parsec

enum VAlign

Vertical alignments.

Value Description
VAlignTop Top.
VAlignMiddle Middle.
VAlignBase Base line.
VAlignBottom Bottom.

static QString RS::captured(const QRegularExpression &rx, const QRegularExpressionMatch &match, int nth=0)

static

Non-Scriptable: This function is not available in script environments.

static bool RS::compare(const QPair< QVariant, RPropertyAttributes > &p1, const QPair< QVariant, RPropertyAttributes > &p2, bool noTolerance=false)

static

static bool RS::compare(const QVariant &v1, const QVariant &v2, bool noTolerance=false)

static

Returns: True if the two values are considered to be equal.

Parameters:

  • noTolerance: True strict comparison of doubles.

static int RS::compareAlphanumerical(const QString &s1, const QString &s2)

static

Alphanumerical, locale aware, case insensitive comparison.

static QStringList RS::compareChunkify(const QString &s)

static

Returns: List of strings containing either only numbers or non-numbers. E.g. “abc123” -> “abc”, “123”

static QString RS::convert(const QByteArray &str, const QString &codecName)

static

Non-Scriptable: This function is not available in script environments.

static QRegularExpression RS::createRegEpCI(const QString &str, bool regExp2=false)

static

Non-Scriptable: This function is not available in script environments.

static QString RS::escape(const QString &plain)

static

static bool RS::exactMatch(const QRegularExpression &rx, const QString &string)

static

Non-Scriptable: This function is not available in script environments.

static bool RS::exactMatch(const QRegularExpression &rx, QRegularExpressionMatch &match, const QString &string)

static

Non-Scriptable: This function is not available in script environments.

static bool RS::exactMatch(const QString &rxStr, const QString &string)

static

Non-Scriptable: This function is not available in script environments.

static QSize RS::getAvailableGeometry(int screen)

static

static QString RS::getBuildCpuArchitecture()

static

Returns: x32 or x64, depending on the architecture the binary was built for.

static QString RS::getCpuArchitecture()

static

static int RS::getCpuCores()

static

Returns: Number of CPU cores available.

static QStringList RS::getDirectoryList(const QString &subDirectory)

static

Returns: List of all directories in subdirectory ‘subDirectory’ in all possible QCAD directories.

static QStringList RS::getFileList(const QString &subDirectory, const QString &fileExtension)

static

Searches for files in various directories under the given subdirectory which match the given file extension.

Returns: List of the absolute paths of the files found.

static QString RS::getFontFamily(const QTextCharFormat &format)

static inline

static QString RS::getFontFamilyFromFileName(const QString &fileName)

static

Returns: Font family name from the given font file name. This only works for Windows and might not even be possible on all systems.

static QStringList RS::getFontList()

static

Returns: A list of absolute paths to all font files found.

static QString RS::getHostId()

static

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD.

Returns: Unique combination of system ID (linux, freebsd, netbsd, openbsd, solaris, osx, win) and host name. E.g. “linux_vertigo”. Used for test data that may differ on different machines.

static int RS::getIdealThreadCount()

static

Returns: Ideal thread count for multithreading.

static QString RS::getImageFilePath(const QString &docFileName, const QString &importedFileName, const QByteArray &imageData)

static

Returns: a unique image file path for an image from an imported file based on the base name of the imported file and an MD5 hash of the image data.

Parameters:

  • docFileName: the name of the document file the image is imported into, used to determine the path for the image (same path) or empty if the imported file is opened not imported.
  • importedFileName: the name of the file the image was imported from, used to determine the base name of the image file name (e.g. an SVG, EPS or PDF file)
  • imageData: the data of the image, used to calculate an MD5 hash that is added to the base name

static QStringList RS::getLinetypeList(bool metric)

static

Returns: A list of absolute paths to all pattern files found.

static int RS::getMetaType(const QVariant &v)

static inline

static QSizeF RS::getPageSize(const QString &name)

static

static int RS::getPageSizeId(const QString &name)

static

static QStringList RS::getPatternList(bool metric)

static

Returns: A list of absolute paths to all pattern files found.

static int RS::getScreenCount()

static

static QString RS::getSystemId()

static

Returns: Unique system ID (“linux”, “freebsd”, “netbsd”, “openbsd”, “solaris”, “osx”, “win”).

static QString RS::getWindowManagerId()

static

static int RS::indexIn(const QRegularExpression &rx, QRegularExpressionMatch &match, const QString &string, int from=0)

static

Non-Scriptable: This function is not available in script environments.

static bool RS::lessThanAlphanumerical(const QString &s1, const QString &s2)

static

template <class T>
static bool RS::mapContainsCaseInsensitive(const QMap< QString, T > &map, const QString &key)

static inline

template <class T>
static T RS::mapValueCaseInsensitive(const QMap< QString, T > &map, const QString &key)

static inline

static int RS::matchedLength(const QRegularExpression &rx, const QRegularExpressionMatch &match)

static

Non-Scriptable: This function is not available in script environments.

static void RS::setUtf8Codec(QTextStream &ts)

static

static bool RS::showInFileManager(const QString &filePaths)

static

static QStringList RS::sortAlphanumerical(const QStringList &list)

static

Alphanumerical sorting.

template <class T>
static QList< T > RS::toList(const QSet< T > &set)

static inline

template <class T>
static QSet< T > RS::toSet(const QList< T > &list)

static inline

template <class T>
static QList< T > RS::unique(const QList< T > &list)

static inline

static const double RS::AngleTolerance = 1.0e-9

static

static const QPrinter::Orientation RS::Landscape = QPrinter::Landscape

static

static const Qt::MouseButton RS::MiddleButton = Qt::MidButton

static

static const double RS::PointTolerance = 1.0e-9

static

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD.

static const QPrinter::Orientation RS::Portrait = QPrinter::Portrait

static