QCAD
Open Source 2D CAD
RSettings Class Reference

#include <RSettings.h>

Static Public Member Functions

static void addRecentFile (const QString &fileName)
 Adds a recent file to the list of recent files. More...
 
static void appendOpenGLMessage (const QString &msg)
 
static void clearRecentFiles ()
 Clears the list of recent files. More...
 
static QStringList getAllKeys (const QString &group)
 
static bool getAllowMouseMoveInterruptions ()
 
static QString getAppId ()
 App ID used for DXF/DWG exports / imports to identify app XData. More...
 
static QString getApplicationNameOverride ()
 
static QString getApplicationPath ()
 
static double getArcAngleLengthThreshold ()
 
static QString getArgument (const QStringList &args, const QString &shortFlag, const QString &longFlag, const QString &def=RDEFAULT_QSTRING)
 
static QStringList getArguments (const QStringList &args, const QString &shortFlag, const QString &longFlag)
 
static bool getAutoScaleGrid ()
 
static bool getAutoScaleLinetypePatterns ()
 
static bool getAutoScaleMetaGrid ()
 
static bool getAutoScalePatterns ()
 
static bool getAutoZoomOnLoad ()
 
static bool getBoolValue (const QString &key, bool defaultValue)
 
static RBox getBoxArgument (const QStringList &args, const QString &shortFlag, const QString &longFlag, const RBox &def=RDEFAULT_RBOX)
 
static int getBuildVersion ()
 
static QString getCacheLocation ()
 
static QString getCartesianCoordinateSeparator ()
 
static QChar getCharValue (const QString &key, const QChar &defaultValue)
 
static RColor getColor (const QString &key, const RColor &defaultValue=RDEFAULT_RCOLOR)
 
static RColor getColorArgument (const QStringList &args, const QString &shortFlag, const QString &longFlag, const RColor &def=RDEFAULT_RCOLOR)
 
static bool getColorCorrection ()
 
static bool getColorCorrectionDisableForPrinting ()
 
static int getColorThreshold ()
 
static RColor getColorValue (const QString &key, const RColor &defaultValue)
 
static QString getCompilerVersion ()
 
static bool getConcurrentDrawing ()
 
static int getCurrentVersion ()
 
static int getDashThreshold ()
 
static QString getDataLocation ()
 
static QString getDefaultPrinterName ()
 
static QString getDesktopLocation ()
 
static double getDevicePixelRatio ()
 
static QString getDocumentsLocation ()
 
static double getDoubleValue (const QString &key, double defaultValue)
 
static RColor getEndReferencePointColor ()
 
static QString getFileName ()
 
static double getFloatArgument (const QStringList &args, const QString &shortFlag, const QString &longFlag, double def=RNANDOUBLE)
 
static bool getHideAttributeWithBlock ()
 
static bool getHighResolutionGraphicsView ()
 
static QString getHomeLocation ()
 
static bool getIgnoreAllReferencePoints ()
 
static bool getIgnoreBlockReferencePoint ()
 
static bool getImportRecomputedDimBlocks ()
 
static QFont getInfoLabelFont ()
 
static int getIntArgument (const QStringList &args, const QString &shortFlag, const QString &longFlag, int def)
 
static QList< int > getIntListArgument (const QStringList &args, const QString &shortFlag, const QString &longFlag, QList< int > def=RDEFAULT_QLISTINT)
 
static int getIntValue (const QString &key, int defaultValue)
 
static QString getLaunchPath ()
 
static bool getLimitZoomAndScroll ()
 
static QString getLocale ()
 
static int getMajorVersion ()
 
static double getMinArcAngleStep ()
 
static int getMinorVersion ()
 
static int getMouseThreshold ()
 
static QLocale getNumberLocale ()
 
static QString getNumericalVersionString ()
 
static QStringList getOpenGLMessages ()
 
static QStringList getOriginalArguments ()
 
static QString getOSVersion ()
 
static QString getPath ()
 
static int getPickRange ()
 
static QString getPluginPath ()
 
static QStringList getPluginPaths ()
 
static QString getPolarCoordinateSeparator ()
 
static bool getPositionByMousePress ()
 
static int getPreviewEntities ()
 
static int getPreviousVersion ()
 
static QStringList getPrinterNames ()
 
static bool getPropertyEditorShowOnRequest ()
 
static QSettings * getQSettings ()
 
static int getQtVersion ()
 
static QString getQtVersionString ()
 
static QStringList getRecentFiles ()
 
static RColor getReferencePointColor ()
 
static int getReferencePointShape ()
 
static int getReferencePointSize ()
 
static QString getRelativeCoordinatePrefix ()
 
static QString getReleaseDate ()
 
static QString getRevisionString ()
 
static int getRevisionVersion ()
 
static QFont getRulerFont ()
 
static RColor getSecondaryReferencePointColor ()
 
static bool getSelectBlockWithAttribute ()
 
static RColor getSelectionColor ()
 
static bool getShowCrosshair ()
 
static bool getShowLargeCrosshair ()
 
static bool getShowLargeOriginAxis ()
 
static QFont getSnapLabelFont ()
 
static int getSnapRange ()
 
static QString getStandardLocation (int sl)
 
static RColor getStartReferencePointColor ()
 
static QFont getStatusBarFont ()
 
static QStringList getStringListValue (const QString &key, const QStringList &defaultValue)
 
static QString getStringValue (const QString &key, const QString &defaultValue)
 
static QString getTempLocation ()
 
static RColor getTertiaryReferencePointColor ()
 
static int getTextHeightThreshold ()
 
static QString getThemePath ()
 
static bool getUseSecondarySelectionColor ()
 
static bool getUseSolidLineSelection ()
 
static QVariant getValue (const QString &key, const QVariant &defaultValue=RDEFAULT_QVARIANT)
 
static RVector getVectorArgument (const QStringList &args, const QString &shortFlag, const QString &longFlag, const RVector &def=RDEFAULT_RVECTOR)
 
static QString getVersionString ()
 
static int getZeroWeightWeight ()
 
static bool hasApplicationNameOverride ()
 
static bool hasCustomStyleSheet ()
 
static bool hasDarkGuiBackground ()
 
static bool hasQuitFlag ()
 
static bool hasValue (const QString &key)
 
static void initRecentFiles ()
 Initializes the recent files list (recentFiles). More...
 
static bool isDarkMode ()
 
static bool isDebuggerEnabled ()
 
static bool isDeployed ()
 
static bool isFirstStart ()
 
static bool isGuiEnabled ()
 
static bool isLayer0CompatibilityOn ()
 
static bool isNewVersion ()
 
static bool isNextVersionEnabled ()
 
static bool isQt (int majorVersion)
 
static bool isTextRenderedAsText ()
 
static int isUpdated (int versionCheck=-1)
 
static bool isXDataEnabled ()
 
static void loadTranslations (const QString &module, const QStringList &dirs=RDEFAULT_QSTRINGLIST)
 Loads the translations for the given module. More...
 
static void removeRecentFile (const QString &fileName)
 Removes the given file from the list of recent files. More...
 
static void removeValue (const QString &key)
 Removes the value for the given key. More...
 
static void resetCache ()
 
static void setApplicationNameOverride (const QString &n)
 Sets the application name override used for the configuration file name (e.g. More...
 
static void setConcurrentDrawing (bool on)
 
static void setFirstStart (bool on)
 
static void setLaunchPath (const QString &launchPath)
 
static void setNewVersion (bool on)
 
static void setNextVersionEnabled (bool on)
 
static void setNoWrite (bool on=true)
 
static void setOriginalArguments (const QStringList &a)
 
static void setPreviousVersion (int pv)
 
static void setQuitFlag ()
 
static void setRulerFont (const QFont &font)
 
static void setShowCrosshair (bool on)
 
static void setShowLargeCrosshair (bool on)
 
static void setShowLargeOriginAxis (bool on)
 
static void setSnapLabelFont (const QFont &font)
 
static void setValue (const QString &key, const QVariant &value, bool overwrite=true)
 Sets the variable with the given key and value, overwriting an existing value if overwrite is true (default). More...
 
static void setXDataEnabled (bool on)
 
static bool testArgument (const QStringList &args, const QString &shortFlag, const QString &longFlag)
 
static QString translate (const QString &context, const QString &str)
 Translates the given string for the given context. More...
 
static void uninit ()
 

Static Private Member Functions

static bool isInitialized ()
 
static void shortenRecentFiles ()
 Purges recent files that exceed the RecentFiles/RecentFilesSize limit. More...
 

Static Private Attributes

static int allowMouseMoveInterruptions = -1
 
static QString applicationNameOverride
 
static double arcAngleLengthThreshold = -1
 
static int autoScaleLinetypePattern = -1
 
static QVariantMap cache
 
static QString cartesianCoordinateSeparator = QString::null
 
static int concurrentDrawing = -1
 
static int darkGuiBackground = -1
 
static int darkMode = -1
 
static int dashThreshold = -1
 
static RColorendReferencePointColor = NULL
 
static bool firstStart = false
 
static int hideAttributeWithBlock = -1
 
static int highResolutionGraphicsView = -1
 
static int ignoreAllReferencePoints = -1
 
static int ignoreBlockReferencePoint = -1
 
static int importRecomputedDimBlocks = -1
 
static QFont * infoLabelFont = NULL
 
static QString launchPath
 
static int layer0CompatibilityOn = -1
 
static int limitZoomAndScroll = -1
 
static double minArcAngleStep = -1
 
static int mouseThreshold = -1
 
static bool newVersion = false
 
static bool nextVersionEnabled = false
 
static bool noWrite = false
 Copyright (c) 2011-2018 by Andrew Mustun. More...
 
static QLocale * numberLocale = NULL
 
static QStringList openGLMessages
 
static QStringList originalArguments
 
static int pickRange = -1
 
static QString polarCoordinateSeparator = QString::null
 
static int positionByMousePress = -1
 
static int previewEntities = -1
 
static int previousVersion = 0
 
static int propertyEditorShowOnRequest = -1
 
static QSettings * qSettings = NULL
 
static bool quitFlag = false
 
static QStringList recentFiles
 
static RColorreferencePointColor = NULL
 
static int referencePointShape = -1
 
static int referencePointSize = -1
 
static QString relativeCoordinatePrefix = QString::null
 
static QFont * rulerFont = NULL
 
static RColorsecondaryReferencePointColor = NULL
 
static int selectBlockWithAttribute = -1
 
static RColorselectionColor = NULL
 
static int showCrosshair = -1
 
static int showLargeCrosshair = -1
 
static int showLargeOriginAxis = -1
 
static QFont * snapLabelFont = NULL
 
static int snapRange = -1
 
static RColorstartReferencePointColor = NULL
 
static QFont * statusBarFont = NULL
 
static RColortertiaryReferencePointColor = NULL
 
static int textRenderedAsText = -1
 
static QString themePath
 
static int useSecondarySelectionColor = -1
 
static int useSolidLineSelection = -1
 
static bool xDataEnabled = false
 
static int zeroWeightWeight = -1
 

Detailed Description

Scriptable:\nThis class is available in script environments.\n

Member Function Documentation

◆ addRecentFile()

void RSettings::addRecentFile ( const QString &  fileName)
static

Adds a recent file to the list of recent files.

The newest file is always at the end of the list.

◆ appendOpenGLMessage()

void RSettings::appendOpenGLMessage ( const QString &  msg)
static

◆ clearRecentFiles()

void RSettings::clearRecentFiles ( )
static

Clears the list of recent files.

◆ getAllKeys()

QStringList RSettings::getAllKeys ( const QString &  group)
static
Returns
List of all keys stored in the application settings file.

◆ getAllowMouseMoveInterruptions()

bool RSettings::getAllowMouseMoveInterruptions ( )
static

◆ getAppId()

QString RSettings::getAppId ( )
static

App ID used for DXF/DWG exports / imports to identify app XData.

◆ getApplicationNameOverride()

QString RSettings::getApplicationNameOverride ( )
static

◆ getApplicationPath()

QString RSettings::getApplicationPath ( )
static
Returns
Path where all application resources are stored ('scripts', 'patterns', 'ts', 'doc', 'linetypes', ...)

◆ getArcAngleLengthThreshold()

double RSettings::getArcAngleLengthThreshold ( )
static

◆ getArgument()

QString RSettings::getArgument ( const QStringList &  args,
const QString &  shortFlag,
const QString &  longFlag,
const QString &  def = RDEFAULT_QSTRING 
)
static
Returns
The argument after the first one of the given flags or the given default value.
Parameters
argsArray of strings (program arguments)
shortFlagE.g. "-o"
longFlagE.g. "-output"

◆ getArguments()

QStringList RSettings::getArguments ( const QStringList &  args,
const QString &  shortFlag,
const QString &  longFlag 
)
static
Returns
Array of all arguments after the given flags or an empty array.
Parameters
argsArray of strings (program arguments)
shortFlagE.g. "-o"
longFlagE.g. "-output"

◆ getAutoScaleGrid()

bool RSettings::getAutoScaleGrid ( )
static

◆ getAutoScaleLinetypePatterns()

bool RSettings::getAutoScaleLinetypePatterns ( )
static

◆ getAutoScaleMetaGrid()

bool RSettings::getAutoScaleMetaGrid ( )
static

◆ getAutoScalePatterns()

bool RSettings::getAutoScalePatterns ( )
static

◆ getAutoZoomOnLoad()

bool RSettings::getAutoZoomOnLoad ( )
static

◆ getBoolValue()

bool RSettings::getBoolValue ( const QString &  key,
bool  defaultValue 
)
static
Returns
Value of the given setting as boolean or defaultValue.

◆ getBoxArgument()

RBox RSettings::getBoxArgument ( const QStringList &  args,
const QString &  shortFlag,
const QString &  longFlag,
const RBox def = RDEFAULT_RBOX 
)
static

◆ getBuildVersion()

int RSettings::getBuildVersion ( )
static

◆ getCacheLocation()

QString RSettings::getCacheLocation ( )
static
Returns
Standard path for caches.

◆ getCartesianCoordinateSeparator()

QString RSettings::getCartesianCoordinateSeparator ( )
static
Returns
Cartesian coordinate separator (,).

◆ getCharValue()

QChar RSettings::getCharValue ( const QString &  key,
const QChar &  defaultValue 
)
static
Non-Scriptable:\nThis function is not available in script environments.\n
Returns
Value of the given setting as char or defaultValue.

◆ getColor()

RColor RSettings::getColor ( const QString &  key,
const RColor defaultValue = RDEFAULT_RCOLOR 
)
static
Returns
Value of the given setting as color or defaultValue.

◆ getColorArgument()

RColor RSettings::getColorArgument ( const QStringList &  args,
const QString &  shortFlag,
const QString &  longFlag,
const RColor def = RDEFAULT_RCOLOR 
)
static

◆ getColorCorrection()

bool RSettings::getColorCorrection ( )
static

◆ getColorCorrectionDisableForPrinting()

bool RSettings::getColorCorrectionDisableForPrinting ( )
static

◆ getColorThreshold()

int RSettings::getColorThreshold ( )
static

◆ getColorValue()

RColor RSettings::getColorValue ( const QString &  key,
const RColor defaultValue 
)
static
Returns
Value of the given setting as color or defaultValue.

◆ getCompilerVersion()

QString RSettings::getCompilerVersion ( )
static
Returns
Compiler name and version as human readable string.

◆ getConcurrentDrawing()

bool RSettings::getConcurrentDrawing ( )
static

◆ getCurrentVersion()

static int RSettings::getCurrentVersion ( )
inlinestatic
Returns
Current version as int in format 11223344 where 11 is the major version, 22 the minor version, 33 the revision and 44 the build version.

◆ getDashThreshold()

int RSettings::getDashThreshold ( )
static

◆ getDataLocation()

QString RSettings::getDataLocation ( )
static
Returns
Standard path for user data.

◆ getDefaultPrinterName()

QString RSettings::getDefaultPrinterName ( )
static

◆ getDesktopLocation()

QString RSettings::getDesktopLocation ( )
static
Returns
Standard path for user desktop files.

◆ getDevicePixelRatio()

double RSettings::getDevicePixelRatio ( )
static
Returns
Device pixel ratio of the display. Usually 1 or 2 (for retina/high res displays).

◆ getDocumentsLocation()

QString RSettings::getDocumentsLocation ( )
static
Returns
Standard path for user documents.

◆ getDoubleValue()

double RSettings::getDoubleValue ( const QString &  key,
double  defaultValue 
)
static
Returns
Value of the given setting as double or defaultValue.

◆ getEndReferencePointColor()

RColor RSettings::getEndReferencePointColor ( )
static

◆ getFileName()

QString RSettings::getFileName ( )
static
Returns
File name of the application settings file (.ini or .conf).

◆ getFloatArgument()

double RSettings::getFloatArgument ( const QStringList &  args,
const QString &  shortFlag,
const QString &  longFlag,
double  def = RNANDOUBLE 
)
static

◆ getHideAttributeWithBlock()

bool RSettings::getHideAttributeWithBlock ( )
static

◆ getHighResolutionGraphicsView()

bool RSettings::getHighResolutionGraphicsView ( )
static

◆ getHomeLocation()

QString RSettings::getHomeLocation ( )
static
Returns
Standard path for user home.

◆ getIgnoreAllReferencePoints()

bool RSettings::getIgnoreAllReferencePoints ( )
static
Returns
True if dragging reference points should be treated like dragging the whole selection.

◆ getIgnoreBlockReferencePoint()

bool RSettings::getIgnoreBlockReferencePoint ( )
static
Returns
True if dragging the reference points of selected block references should be treated like dragging the whole selection.

◆ getImportRecomputedDimBlocks()

bool RSettings::getImportRecomputedDimBlocks ( )
static

◆ getInfoLabelFont()

QFont RSettings::getInfoLabelFont ( )
static

◆ getIntArgument()

int RSettings::getIntArgument ( const QStringList &  args,
const QString &  shortFlag,
const QString &  longFlag,
int  def 
)
static

◆ getIntListArgument()

QList< int > RSettings::getIntListArgument ( const QStringList &  args,
const QString &  shortFlag,
const QString &  longFlag,
QList< int >  def = RDEFAULT_QLISTINT 
)
static

◆ getIntValue()

int RSettings::getIntValue ( const QString &  key,
int  defaultValue 
)
static
Returns
Value of the given setting as int or defaultValue.

◆ getLaunchPath()

QString RSettings::getLaunchPath ( )
static
Returns
Path from where the application was launched (can be any path).

◆ getLimitZoomAndScroll()

bool RSettings::getLimitZoomAndScroll ( )
static

◆ getLocale()

QString RSettings::getLocale ( )
static
Returns
Locale to be used for translations ('en', 'de', 'de_DE', ...)

◆ getMajorVersion()

int RSettings::getMajorVersion ( )
static

◆ getMinArcAngleStep()

double RSettings::getMinArcAngleStep ( )
static

◆ getMinorVersion()

int RSettings::getMinorVersion ( )
static

◆ getMouseThreshold()

int RSettings::getMouseThreshold ( )
static

◆ getNumberLocale()

QLocale RSettings::getNumberLocale ( )
static

◆ getNumericalVersionString()

QString RSettings::getNumericalVersionString ( )
static
Returns
Application version as 01020304 for 1.2.3.4

◆ getOpenGLMessages()

QStringList RSettings::getOpenGLMessages ( )
static

◆ getOriginalArguments()

QStringList RSettings::getOriginalArguments ( )
static
Returns
List of arguments passed to the application binary.

◆ getOSVersion()

QString RSettings::getOSVersion ( )
static
Returns
OS name and version as human readable string.

◆ getPath()

QString RSettings::getPath ( )
static
Returns
Path where the configuration file is stored.

◆ getPickRange()

int RSettings::getPickRange ( )
static

◆ getPluginPath()

QString RSettings::getPluginPath ( )
static
Returns
Path to the application plugins folder.

◆ getPluginPaths()

QStringList RSettings::getPluginPaths ( )
static
Returns
List of all plugin paths for application plugins and add on plugins in the application data location (for user specific plugins).

◆ getPolarCoordinateSeparator()

QString RSettings::getPolarCoordinateSeparator ( )
static
Returns
Polar coordinate separator (<).

◆ getPositionByMousePress()

bool RSettings::getPositionByMousePress ( )
static

◆ getPreviewEntities()

int RSettings::getPreviewEntities ( )
static

◆ getPreviousVersion()

static int RSettings::getPreviousVersion ( )
inlinestatic

◆ getPrinterNames()

QStringList RSettings::getPrinterNames ( )
static

◆ getPropertyEditorShowOnRequest()

bool RSettings::getPropertyEditorShowOnRequest ( )
static
Returns
True to show slow properties availabe on request.

◆ getQSettings()

QSettings * RSettings::getQSettings ( )
static
Returns
Pointer to underlying QSettings object.

◆ getQtVersion()

int RSettings::getQtVersion ( )
static
Returns
Qt version as int (Qt 1.2.3 -> 0x010203).

◆ getQtVersionString()

QString RSettings::getQtVersionString ( )
static
Returns
Qt version as human readable string ("1.2.3").

◆ getRecentFiles()

QStringList RSettings::getRecentFiles ( )
static
Returns
List of recent files.

◆ getReferencePointColor()

RColor RSettings::getReferencePointColor ( )
static

◆ getReferencePointShape()

int RSettings::getReferencePointShape ( )
static
Returns
Shape of reference points.

◆ getReferencePointSize()

int RSettings::getReferencePointSize ( )
static
Returns
Size of reference points.

◆ getRelativeCoordinatePrefix()

QString RSettings::getRelativeCoordinatePrefix ( )
static
Returns
Relative coordinate prefix (@).

◆ getReleaseDate()

QString RSettings::getReleaseDate ( )
static

◆ getRevisionString()

QString RSettings::getRevisionString ( )
static
Returns
Git revision number, stored in file revision.txt for deployed applications.

◆ getRevisionVersion()

int RSettings::getRevisionVersion ( )
static

◆ getRulerFont()

QFont RSettings::getRulerFont ( )
static

◆ getSecondaryReferencePointColor()

RColor RSettings::getSecondaryReferencePointColor ( )
static

◆ getSelectBlockWithAttribute()

bool RSettings::getSelectBlockWithAttribute ( )
static

◆ getSelectionColor()

RColor RSettings::getSelectionColor ( )
static

◆ getShowCrosshair()

bool RSettings::getShowCrosshair ( )
static

◆ getShowLargeCrosshair()

bool RSettings::getShowLargeCrosshair ( )
static

◆ getShowLargeOriginAxis()

bool RSettings::getShowLargeOriginAxis ( )
static

◆ getSnapLabelFont()

QFont RSettings::getSnapLabelFont ( )
static

◆ getSnapRange()

int RSettings::getSnapRange ( )
static

◆ getStandardLocation()

QString RSettings::getStandardLocation ( int  sl)
static
Returns
Standard path for the given standard location.
Parameters
slQStandardPaths::StandardLocation or QDesktopServices::StandardLocation

◆ getStartReferencePointColor()

RColor RSettings::getStartReferencePointColor ( )
static

◆ getStatusBarFont()

QFont RSettings::getStatusBarFont ( )
static

◆ getStringListValue()

QStringList RSettings::getStringListValue ( const QString &  key,
const QStringList &  defaultValue 
)
static
Returns
Value of the given setting as string list or defaultValue.

◆ getStringValue()

QString RSettings::getStringValue ( const QString &  key,
const QString &  defaultValue 
)
static
Returns
Value of the given setting as string or defaultValue.

◆ getTempLocation()

QString RSettings::getTempLocation ( )
static
Returns
Standard path for temporary files.

◆ getTertiaryReferencePointColor()

RColor RSettings::getTertiaryReferencePointColor ( )
static

◆ getTextHeightThreshold()

int RSettings::getTextHeightThreshold ( )
static

◆ getThemePath()

QString RSettings::getThemePath ( )
static
Returns
Path to current theme or empty to use the default theme.

◆ getUseSecondarySelectionColor()

bool RSettings::getUseSecondarySelectionColor ( )
static

◆ getUseSolidLineSelection()

bool RSettings::getUseSolidLineSelection ( )
static

◆ getValue()

QVariant RSettings::getValue ( const QString &  key,
const QVariant &  defaultValue = RDEFAULT_QVARIANT 
)
static
Returns
Value of the given setting as variant or defaultValue.

◆ getVectorArgument()

RVector RSettings::getVectorArgument ( const QStringList &  args,
const QString &  shortFlag,
const QString &  longFlag,
const RVector def = RDEFAULT_RVECTOR 
)
static

◆ getVersionString()

QString RSettings::getVersionString ( )
static
Returns
Application version as human readable string.

◆ getZeroWeightWeight()

int RSettings::getZeroWeightWeight ( )
static

◆ hasApplicationNameOverride()

bool RSettings::hasApplicationNameOverride ( )
static

◆ hasCustomStyleSheet()

bool RSettings::hasCustomStyleSheet ( )
static
Returns
True if a custom stylesheet is present for the whole application. Z.B. a theme is present.

◆ hasDarkGuiBackground()

bool RSettings::hasDarkGuiBackground ( )
static

◆ hasQuitFlag()

bool RSettings::hasQuitFlag ( )
static
Returns
True if -quit was passed to the application binary.

◆ hasValue()

bool RSettings::hasValue ( const QString &  key)
static
Returns
True if the given key is available in the application settings file.

◆ initRecentFiles()

void RSettings::initRecentFiles ( )
static

Initializes the recent files list (recentFiles).

◆ isDarkMode()

bool RSettings::isDarkMode ( )
static
Returns
True for macOS dark mode only.

◆ isDebuggerEnabled()

bool RSettings::isDebuggerEnabled ( )
static
Returns
True if the script debugger is enabled.

◆ isDeployed()

bool RSettings::isDeployed ( )
static
Returns
True if the application is deployed and all resources are inside the App bundle. This always returns true if the OS is not a Mac OS.

◆ isFirstStart()

static bool RSettings::isFirstStart ( )
inlinestatic

◆ isGuiEnabled()

bool RSettings::isGuiEnabled ( )
static
Returns
True if the GUI is enabled (no -no-gui switch present). The GUI is typically disabled for command line tools.

◆ isInitialized()

bool RSettings::isInitialized ( )
staticprivate

◆ isLayer0CompatibilityOn()

bool RSettings::isLayer0CompatibilityOn ( )
static

◆ isNewVersion()

static bool RSettings::isNewVersion ( )
inlinestatic

◆ isNextVersionEnabled()

bool RSettings::isNextVersionEnabled ( )
static

◆ isQt()

bool RSettings::isQt ( int  majorVersion)
static
Returns
True if application was compiled against the given major Qt version.

◆ isTextRenderedAsText()

bool RSettings::isTextRenderedAsText ( )
static

◆ isUpdated()

static int RSettings::isUpdated ( int  versionCheck = -1)
inlinestatic
Returns
True if this is the first start of the software or the current version is a newer version than the one previously installed while the current version is the same or newer than versionCheck. This can be used to check for an update from a version older than the given version to a version newer or equal to the given version.

◆ isXDataEnabled()

bool RSettings::isXDataEnabled ( )
static

◆ loadTranslations()

void RSettings::loadTranslations ( const QString &  module,
const QStringList &  dirs = RDEFAULT_QSTRINGLIST 
)
static

Loads the translations for the given module.

Parameters
moduleModule name ('qcadcore', 'qcadentity', ...)
dirsList of directories to look for translation files or empty to check default directories.

◆ removeRecentFile()

void RSettings::removeRecentFile ( const QString &  fileName)
static

Removes the given file from the list of recent files.

◆ removeValue()

void RSettings::removeValue ( const QString &  key)
static

Removes the value for the given key.

◆ resetCache()

void RSettings::resetCache ( )
static

◆ setApplicationNameOverride()

void RSettings::setApplicationNameOverride ( const QString &  n)
static

Sets the application name override used for the configuration file name (e.g.

QCAD3).

◆ setConcurrentDrawing()

void RSettings::setConcurrentDrawing ( bool  on)
static

◆ setFirstStart()

static void RSettings::setFirstStart ( bool  on)
inlinestatic

◆ setLaunchPath()

void RSettings::setLaunchPath ( const QString &  launchPath)
static

◆ setNewVersion()

static void RSettings::setNewVersion ( bool  on)
inlinestatic

◆ setNextVersionEnabled()

void RSettings::setNextVersionEnabled ( bool  on)
static

◆ setNoWrite()

void RSettings::setNoWrite ( bool  on = true)
static

◆ setOriginalArguments()

void RSettings::setOriginalArguments ( const QStringList &  a)
static

◆ setPreviousVersion()

static void RSettings::setPreviousVersion ( int  pv)
inlinestatic

◆ setQuitFlag()

void RSettings::setQuitFlag ( )
static

◆ setRulerFont()

void RSettings::setRulerFont ( const QFont &  font)
static

◆ setShowCrosshair()

void RSettings::setShowCrosshair ( bool  on)
static

◆ setShowLargeCrosshair()

void RSettings::setShowLargeCrosshair ( bool  on)
static

◆ setShowLargeOriginAxis()

void RSettings::setShowLargeOriginAxis ( bool  on)
static

◆ setSnapLabelFont()

void RSettings::setSnapLabelFont ( const QFont &  font)
static

◆ setValue()

void RSettings::setValue ( const QString &  key,
const QVariant &  value,
bool  overwrite = true 
)
static

Sets the variable with the given key and value, overwriting an existing value if overwrite is true (default).

◆ setXDataEnabled()

void RSettings::setXDataEnabled ( bool  on)
static

◆ shortenRecentFiles()

void RSettings::shortenRecentFiles ( )
staticprivate

Purges recent files that exceed the RecentFiles/RecentFilesSize limit.

◆ testArgument()

bool RSettings::testArgument ( const QStringList &  args,
const QString &  shortFlag,
const QString &  longFlag 
)
static
Returns
True if the given arguments contain one of the given flags.

◆ translate()

QString RSettings::translate ( const QString &  context,
const QString &  str 
)
static

Translates the given string for the given context.

◆ uninit()

void RSettings::uninit ( )
static

Member Data Documentation

◆ allowMouseMoveInterruptions

int RSettings::allowMouseMoveInterruptions = -1
staticprivate

◆ applicationNameOverride

QString RSettings::applicationNameOverride
staticprivate

◆ arcAngleLengthThreshold

double RSettings::arcAngleLengthThreshold = -1
staticprivate

◆ autoScaleLinetypePattern

int RSettings::autoScaleLinetypePattern = -1
staticprivate

◆ cache

QVariantMap RSettings::cache
staticprivate

◆ cartesianCoordinateSeparator

QString RSettings::cartesianCoordinateSeparator = QString::null
staticprivate

◆ concurrentDrawing

int RSettings::concurrentDrawing = -1
staticprivate

◆ darkGuiBackground

int RSettings::darkGuiBackground = -1
staticprivate

◆ darkMode

int RSettings::darkMode = -1
staticprivate

◆ dashThreshold

int RSettings::dashThreshold = -1
staticprivate

◆ endReferencePointColor

RColor * RSettings::endReferencePointColor = NULL
staticprivate

◆ firstStart

bool RSettings::firstStart = false
staticprivate

◆ hideAttributeWithBlock

int RSettings::hideAttributeWithBlock = -1
staticprivate

◆ highResolutionGraphicsView

int RSettings::highResolutionGraphicsView = -1
staticprivate

◆ ignoreAllReferencePoints

int RSettings::ignoreAllReferencePoints = -1
staticprivate

◆ ignoreBlockReferencePoint

int RSettings::ignoreBlockReferencePoint = -1
staticprivate

◆ importRecomputedDimBlocks

int RSettings::importRecomputedDimBlocks = -1
staticprivate

◆ infoLabelFont

QFont * RSettings::infoLabelFont = NULL
staticprivate

◆ launchPath

QString RSettings::launchPath
staticprivate

◆ layer0CompatibilityOn

int RSettings::layer0CompatibilityOn = -1
staticprivate

◆ limitZoomAndScroll

int RSettings::limitZoomAndScroll = -1
staticprivate

◆ minArcAngleStep

double RSettings::minArcAngleStep = -1
staticprivate

◆ mouseThreshold

int RSettings::mouseThreshold = -1
staticprivate

◆ newVersion

bool RSettings::newVersion = false
staticprivate

◆ nextVersionEnabled

bool RSettings::nextVersionEnabled = false
staticprivate

◆ noWrite

bool RSettings::noWrite = false
staticprivate

Copyright (c) 2011-2018 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.

◆ numberLocale

QLocale * RSettings::numberLocale = NULL
staticprivate

◆ openGLMessages

QStringList RSettings::openGLMessages
staticprivate

◆ originalArguments

QStringList RSettings::originalArguments
staticprivate

◆ pickRange

int RSettings::pickRange = -1
staticprivate

◆ polarCoordinateSeparator

QString RSettings::polarCoordinateSeparator = QString::null
staticprivate

◆ positionByMousePress

int RSettings::positionByMousePress = -1
staticprivate

◆ previewEntities

int RSettings::previewEntities = -1
staticprivate

◆ previousVersion

int RSettings::previousVersion = 0
staticprivate

◆ propertyEditorShowOnRequest

int RSettings::propertyEditorShowOnRequest = -1
staticprivate

◆ qSettings

QSettings * RSettings::qSettings = NULL
staticprivate

◆ quitFlag

bool RSettings::quitFlag = false
staticprivate

◆ recentFiles

QStringList RSettings::recentFiles
staticprivate

◆ referencePointColor

RColor * RSettings::referencePointColor = NULL
staticprivate

◆ referencePointShape

int RSettings::referencePointShape = -1
staticprivate

◆ referencePointSize

int RSettings::referencePointSize = -1
staticprivate

◆ relativeCoordinatePrefix

QString RSettings::relativeCoordinatePrefix = QString::null
staticprivate

◆ rulerFont

QFont * RSettings::rulerFont = NULL
staticprivate

◆ secondaryReferencePointColor

RColor * RSettings::secondaryReferencePointColor = NULL
staticprivate

◆ selectBlockWithAttribute

int RSettings::selectBlockWithAttribute = -1
staticprivate

◆ selectionColor

RColor * RSettings::selectionColor = NULL
staticprivate

◆ showCrosshair

int RSettings::showCrosshair = -1
staticprivate

◆ showLargeCrosshair

int RSettings::showLargeCrosshair = -1
staticprivate

◆ showLargeOriginAxis

int RSettings::showLargeOriginAxis = -1
staticprivate

◆ snapLabelFont

QFont * RSettings::snapLabelFont = NULL
staticprivate

◆ snapRange

int RSettings::snapRange = -1
staticprivate

◆ startReferencePointColor

RColor * RSettings::startReferencePointColor = NULL
staticprivate

◆ statusBarFont

QFont * RSettings::statusBarFont = NULL
staticprivate

◆ tertiaryReferencePointColor

RColor * RSettings::tertiaryReferencePointColor = NULL
staticprivate

◆ textRenderedAsText

int RSettings::textRenderedAsText = -1
staticprivate

◆ themePath

QString RSettings::themePath
staticprivate

◆ useSecondarySelectionColor

int RSettings::useSecondarySelectionColor = -1
staticprivate

◆ useSolidLineSelection

int RSettings::useSolidLineSelection = -1
staticprivate

◆ xDataEnabled

bool RSettings::xDataEnabled = false
staticprivate

◆ zeroWeightWeight

int RSettings::zeroWeightWeight = -1
staticprivate

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