QCAD
Open Source 2D CAD
RS Class Reference

Class namespace for various global enums. More...

#include <RS.h>

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  EndType {
  EndClosedPolygon, EndClosedLine, EndOpenButt, EndOpenSquare,
  EndOpenRound, EndOpenSingle
}
 
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 = 0x1, FromEnd = 0x2, FromAny = 0x3, AlongPolyline = 0x4 }
 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  JoinType { JoinBevel, JoinRound, JoinMiter }
 
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. More...
 
static QStringList getFontList ()
 
static QString getHostId ()
 Copyright (c) 2011-2015 by Andrew Mustun. More...
 
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-2015 by Andrew Mustun. More...
 

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 available in script environments.

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-2015 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-2015 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: