QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RS Class Reference

Class namespace for various global enums. More...

#include <RS.h>

List of all members.

Public Types

enum  AngleFormat {
  DegreesDecimal = 0, DegreesMinutesSeconds = 1, Gradians = 2, Radians = 3,
  Surveyors = 4
}
 Angle format for printing angles. More...
enum  AngleUnit { Deg, Rad, Gra }
 Angle Units. More...
enum  BooleanOperation { Intersection, Union, Difference, Xor }
enum  Ending { EndingStart, EndingEnd, EndingNone }
 Entity ending. More...
enum  EntityType {
  EntityAll, EntityUnknown, EntityAttribute, EntityAttributeDefinition,
  EntityBlockRef, EntityBlockRefAttr, EntityPoint, EntityLine,
  EntityXLine, EntityRay, EntityPolyline, EntityArc,
  EntityCircle, EntityEllipse, EntitySolid, Entity3dFace,
  EntityTextBased, EntityText, EntityTrace, EntityDimension,
  EntityDimLinear, EntityDimAligned, EntityDimRotated, EntityDimRadial,
  EntityDimDiametric, EntityDimAngular, EntityDimOrdinate, EntityHatch,
  EntityImage, EntityLeader, EntitySpline, EntityViewport,
  EntityUser
}
 Entity types used for property handling / filtering. More...
enum  FillType { EvenOdd, NonZero, Positive, Negative }
enum  From { FromStart, FromEnd, FromAny }
 End used to specify from which end of a shape to measure a distance. More...
enum  HAlign {
  HAlignLeft, HAlignCenter, HAlignRight, HAlignAlign,
  HAlignMid, HAlignFit
}
 Horizontal alignments. More...
enum  IsoProjectionType {
  IsoTop, IsoBottom, IsoLeft, IsoLeftBack,
  IsoRight, IsoRightBack
}
 Projection type for isometric projections. More...
enum  KnownVariable {
  ANGBASE, ANGDIR, ATTMODE, AUNITS,
  AUPREC, CECOLOR, CELTSCALE, CHAMFERA,
  CHAMFERB, CHAMFERC, CHAMFERD, 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, INSBASE, INSUNITS, ISOLINES,
  LIMCHECK, LIMMAX, LIMMIN, LTSCALE,
  LUNITS, LUPREC, MAXACTVP, 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
}
 Well established document variables. More...
enum  LinearFormat {
  Scientific = 1, Decimal = 2, Engineering = 3, ArchitecturalStacked = 4,
  FractionalStacked = 5, Architectural = 6, Fractional = 7, WindowsDesktop = 8
}
 Format for length values. More...
enum  MessageType {
  Print, Debug, Warning, Critical,
  Command
}
 Message type for debugging and displaying user messages. More...
enum  Orientation { Any, CW, CCW }
enum  ProjectionRenderingHint { RenderTop, RenderSide, RenderFront, RenderThreeD }
 Sets the current rendering hint for exports. More...
enum  Side { RightHand, LeftHand, NoSide, BothSides }
 Side used for side of a point relativ to an entity (right hand or left hand side) More...
enum  TextDrawingDirection { LeftToRight = 1, TopToBottom = 3, ByStyle = 5 }
 Text drawing direction. More...
enum  TextLineSpacingStyle { AtLeast = 1, Exact = 2 }
 Line spacing style for texts. More...
enum  Unit {
  None = 0, Inch = 1, Foot = 2, Mile = 3,
  Millimeter = 4, Centimeter = 5, Meter = 6, Kilometer = 7,
  Microinch = 8, Mil = 9, Yard = 10, Angstrom = 11,
  Nanometer = 12, Micron = 13, Decimeter = 14, Decameter = 15,
  Hectometer = 16, Gigameter = 17, Astro = 18, Lightyear = 19,
  Parsec = 20, MaxUnit = Parsec
}
 Enum of supported units (values correspond to DXF spec). More...
enum  VAlign { VAlignTop, VAlignMiddle, VAlignBase, VAlignBottom }
 Vertical alignments. More...

Static Public Member Functions

static bool compare (const QVariant &v1, const QVariant &v2)
static bool compare (const QPair< QVariant, RPropertyAttributes > &p1, const QPair< QVariant, RPropertyAttributes > &p2)
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 QStringList getFontList ()
static QString getHostId ()
 Copyright (c) 2011-2013 by Andrew Mustun.
static QStringList getLinetypeList (bool metric)
static QStringList getPatternList (bool metric)
static QString getSystemId ()
static QString getWindowManagerId ()
template<class T >
static bool mapContainsCaseInsensitive (const QMap< QString, T > &map, const QString &key)
template<class T >
static T mapValueCaseInsensitive (const QMap< QString, T > &map, const QString &key)

Static Public Attributes

static const double AngleTolerance = 1.0e-9
static const double PointTolerance = 1.0e-9
 Copyright (c) 2011-2013 by Andrew Mustun.

Detailed Description

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 wrapped for script environments.

Member Enumeration Documentation

Angle format for printing angles.

Enumerator:
DegreesDecimal 

Degrees with decimal point (e.g.

24.5<degree symbol>="">)

DegreesMinutesSeconds 

Degrees, Minutes and Seconds (e.g.

24<degree symbol>="">30'5'')

Gradians 

Gradians with decimal point (e.g.

390.5)

Radians 

Radians with decimal point (e.g.

1.57)

Surveyors 

Surveyor's units.

Angle Units.

Enumerator:
Deg 

Degrees.

Rad 

Radians.

Gra 

Gradians.

Enumerator:
Intersection 
Union 
Difference 
Xor 
enum RS::Ending

Entity ending.

Used for returning which end of an entity is ment.

Enumerator:
EndingStart 

Start point.

EndingEnd 

End point.

EndingNone 

Neither.

Entity types used for property handling / filtering.

Enumerator:
EntityAll 

All entities (for filters)

EntityUnknown 

Unknown.

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.

EntityDimension 

Any Dimension.

EntityDimLinear 

Any linear dimension.

EntityDimAligned 

Linear aligned Dimension.

EntityDimRotated 

Linear rotated Dimension.

EntityDimRadial 

Radial Dimension.

EntityDimDiametric 

Diametric Dimension.

EntityDimAngular 

Angular Dimension.

EntityDimOrdinate 

Ordinate Dimension.

EntityHatch 

Hatch.

EntityImage 

Image.

EntityLeader 

Leader.

EntitySpline 

Spline.

EntityViewport 

Viewport.

EntityUser 

User defined entity.

Use this to identify entities that are added in a separate library and resort to C++ RTTI for RTTI.

Enumerator:
EvenOdd 
NonZero 
Positive 
Negative 
enum RS::From

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

Enumerator:
FromStart 
FromEnd 
FromAny 
enum RS::HAlign

Horizontal alignments.

Enumerator:
HAlignLeft 

Left.

HAlignCenter 

Centered.

HAlignRight 

Right.

HAlignAlign 

Aligned.

HAlignMid 

Middle (?)

HAlignFit 

Fit.

Projection type for isometric projections.

Enumerator:
IsoTop 

Top projection (x/y)

IsoBottom 

Bottom projection (x/y)

IsoLeft 

Front left projection (x/z)

IsoLeftBack 

Back left projection (x/z)

IsoRight 

Front right projection (y/z)

IsoRightBack 

Back right projection (y/z)

Well established document variables.

Enumerator:
ANGBASE 
ANGDIR 
ATTMODE 
AUNITS 
AUPREC 
CECOLOR 
CELTSCALE 
CHAMFERA 
CHAMFERB 
CHAMFERC 
CHAMFERD 
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 
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 
INSBASE 
INSUNITS 
ISOLINES 
LIMCHECK 
LIMMAX 
LIMMIN 
LTSCALE 
LUNITS 
LUPREC 
MAXACTVP 
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 

Format for length values.

Enumerator:
Scientific 

Scientific (e.g.

2.5E+05)

Decimal 

Decimal (e.g.

9.5)

Engineering 

Engineering (e.g.

7' 11.5")

ArchitecturalStacked 

Architectural stacked (e.g.

7'-9 1/8")

FractionalStacked 

Fractional stacked (e.g.

7 9 1/8)

Architectural 

Architectural (e.g.

?)

Fractional 

Fractional (e.g.

?)

WindowsDesktop 

Not supported.

Message type for debugging and displaying user messages.

Enumerator:
Print 
Debug 
Warning 
Critical 
Command 
Enumerator:
Any 
CW 
CCW 

Sets the current rendering hint for exports.

See also:
RExporter::setProjectionRenderingHint
Enumerator:
RenderTop 
RenderSide 
RenderFront 
RenderThreeD 
enum RS::Side

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

Enumerator:
RightHand 
LeftHand 
NoSide 
BothSides 

Text drawing direction.

Enumerator:
LeftToRight 

Left to right.

TopToBottom 

Top to bottom.

ByStyle 

Inherited from associated text style.

Line spacing style for texts.

Enumerator:
AtLeast 

Taller characters will override.

Exact 

Taller characters will not override.

enum RS::Unit

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

Enumerator:
None 

No unit (unit from parent)

Inch 

Inch.

Foot 

Foot: 12 Inches.

Mile 

Mile: 1760 Yards = 1609 m.

Millimeter 

Millimeter: 0.001m.

Centimeter 

Centimeter: 0.01m.

Meter 

Meter.

Kilometer 

Kilometer: 1000m.

Microinch 

Microinch: 0.000001.

Mil 

Mil = 0.001 Inch.

Yard 

Yard: 3 Feet.

Angstrom 

Angstrom: 10^-10m.

Nanometer 

Nanometer: 10^-9m.

Micron 

Micron: 10^-6m.

Decimeter 

Decimeter: 0.1m.

Decameter 

Decameter: 10m.

Hectometer 

Hectometer: 100m.

Gigameter 

Gigameter: 1000000m.

Astro 

Astro: 149.6 x 10^9m.

Lightyear 

Lightyear: 9460731798 x 10^6m.

Parsec 

Parsec: 30857 x 10^12.

MaxUnit 
enum RS::VAlign

Vertical alignments.

Enumerator:
VAlignTop 

Top.

VAlignMiddle 

Middle.

VAlignBase 

Base line.

VAlignBottom 

Bottom.


Member Function Documentation

bool RS::compare ( const QVariant &  v1,
const QVariant &  v2 
)
static
bool RS::compare ( const QPair< QVariant, RPropertyAttributes > &  p1,
const QPair< QVariant, RPropertyAttributes > &  p2 
)
static
int RS::getCpuCores ( )
static
Returns:
Number of CPU cores available.
QStringList RS::getDirectoryList ( const QString &  subDirectory)
static
Returns:
List of all directories in subdirectory 'subDirectory' in all possible QCAD directories.
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.
QStringList RS::getFontList ( )
static
Returns:
A list of absolute paths to all font files found.
QString RS::getHostId ( )
static

Copyright (c) 2011-2013 by Andrew Mustun.

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, osx, win) and host name. E.g. "linux_vertigo". Used for test data that may differ on different machines.
QStringList RS::getLinetypeList ( bool  metric)
static
Returns:
A list of absolute paths to all pattern files found.
QStringList RS::getPatternList ( bool  metric)
static
Returns:
A list of absolute paths to all pattern files found.
QString RS::getSystemId ( )
static
Returns:
Unique system ID ("linux", "osx", "win").
QString RS::getWindowManagerId ( )
static
template<class T >
static bool RS::mapContainsCaseInsensitive ( const QMap< QString, T > &  map,
const QString &  key 
)
inlinestatic
template<class T >
static T RS::mapValueCaseInsensitive ( const QMap< QString, T > &  map,
const QString &  key 
)
inlinestatic

Member Data Documentation

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

Copyright (c) 2011-2013 by Andrew Mustun.

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.


The documentation for this class was generated from the following files: