RSettings
Class in Core Module
Header: #include <src/core/RSettings.h>
Description
Section titled “Description”Scriptable: This class is available in script environments.
Static Public Functions
Section titled “Static Public Functions”| static void | addRecentFile(const QString &fileName, const QImage &thumbnail=RDEFAULT_QIMAGE)Adds a recent file to the list of recent files. |
| static void | addThumbnail(const QString &fileName, const QImage &thumbnail) |
| static void | appendOpenGLMessage(const QString &msg) |
| static void | clearRecentFiles()Clears the list of recent files. |
| static QStringList | getAllKeys(const QString &group) |
| static bool | getAllowMouseMoveInterruptions() |
| static QString | getAppId()App ID used for DXF/DWG exports / imports to identify app XData. |
| static QString | getApplicationNameOverride() |
| static QString | getApplicationPath() |
| static bool | getApplyLineweightToPoints() |
| 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 RColor | getByBlockColor() |
| 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 RColor | getCrossHairColor() |
| static RColor | getCrossHairColorInactive() |
| static int | getCurrentVersion() |
| static int | getDashThreshold() |
| static QString | getDataLocation() |
| static QString | getDefaultPrinterName() |
| static QVariant | getDefaultValue(const QString &key) |
| static QString | getDesktopLocation() |
| static double | getDevicePixelRatio() |
| static QString | getDocumentsLocation() |
| static double | getDotLength() |
| static double | getDoubleValue(const QString &key, double defaultValue) |
| static RColor | getEndReferencePointColor() |
| static double | getFadingFactor() |
| static QString | getFileName() |
| static double | getFloatArgument(const QStringList &args, const QString &shortFlag, const QString &longFlag, double def=RNANDOUBLE) |
| static RColor | getGridColor() |
| 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 int | getMaxHatchComplexity() |
| static int | getMaxHatchTime() |
| static int | getMaxReferencePointEntities() |
| static int | getMaxReferencePointEntitiesDisplay() |
| static RColor | getMetaGridColor() |
| static double | getMinArcAngleStep() |
| static int | getMinorVersion() |
| static int | getMouseThreshold() |
| static QLocale | getNumberLocale() |
| static QString | getNumericalVersionString() |
| static QStringList | getOpenGLMessages() |
| static QStringList | getOriginalArguments() |
| static RColor | getOriginColor() |
| static QString | getOSVersion() |
| static QString | getPath() |
| static int | getPickRange() |
| static QString | getPluginPath() |
| static QStringList | getPluginPaths() |
| static QString | getPluginsLocation() |
| 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 bool | getRenderThinPolylines1px() |
| static QString | getRevisionString() |
| static int | getRevisionVersion() |
| static QFont | getRulerFont() |
| static QStringList | getScaleList(const RS::Unit unit) |
| static double | getScreenBasedLineweightScaleFactor() |
| static RColor | getSecondaryReferencePointColor() |
| static bool | getSelectBlockWithAttribute() |
| static RColor | getSelectionColor() |
| static bool | getShowCrosshair() |
| static bool | getShowLargeCrosshair() |
| static bool | getShowLargeOriginAxis() |
| static bool | getSimpleTextAlignLeft() |
| static QFont | getSnapLabelFont() |
| static int | getSnapRange() |
| static RColor | getSnapReferencePointColor() |
| 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 QString | getThumbnailFilePath(const QString &fileName) |
| 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 QColor | getWidgetSelectionColor(const QWidget *w) |
| static int | getZeroWeightWeight() |
| static bool | hasApplicationNameOverride() |
| static bool | hasCustomStyleSheet() |
| static bool | hasDarkGuiBackground() |
| static bool | hasDefaultValue(const QString &key) |
| static bool | hasQuitFlag() |
| static bool | hasValue(const QString &key) |
| static void | initRecentFiles()Initializes the recent files list (recentFiles). |
| static bool | isDarkMode() |
| static bool | isDebuggerEnabled() |
| static bool | isDeployed() |
| static bool | isFirstStart() |
| static bool | isGuiEnabled() |
| static bool | isKeyboardNavigationInListsEnabled() |
| static bool | isLayer0CompatibilityOn() |
| static bool | isNewVersion() |
| static bool | isNextVersionEnabled() |
| static bool | isQt(int majorVersion) |
| static bool | isScreenReaderActive() |
| 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. |
| static void | removeRecentFile(const QString &fileName)Removes the given file from the list of recent files. |
| static void | removeThumbnail(const QString &fileName) |
| static void | removeValue(const QString &key)Removes the value for the given key. |
| static void | resetCache() |
| static void | resetDarkModeCache() |
| static void | setAllowMouseMoveInterruptionsOverride(bool on) |
| static void | setApplicationNameOverride(const QString &n)Sets the application name override used for the configuration file name (e.g. |
| static void | setConcurrentDrawing(bool on) |
| static void | setDefaultValue(const QString &key, const QVariant &value)Sets the variable with the given key and value, overwriting an existing value if overwrite is true (default). |
| 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) |
| 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. |
| static void | uninit() |
| static bool | useQml() |
Static Private Functions
Section titled “Static Private Functions”| static bool | isInitialized() |
| static void | shortenRecentFiles()Purges recent files that exceed the RecentFiles/RecentFilesSize limit. |
Static Private Attributes
Section titled “Static Private Attributes”Member Documentation
Section titled “Member Documentation”addRecentFile
Section titled “addRecentFile”static void RSettings::addRecentFile(const QString &fileName, const QImage &thumbnail=RDEFAULT_QIMAGE)static
Adds a recent file to the list of recent files.
The newest file is always at the end of the list.
addThumbnail
Section titled “addThumbnail”static void RSettings::addThumbnail(const QString &fileName, const QImage &thumbnail)static
appendOpenGLMessage
Section titled “appendOpenGLMessage”static void RSettings::appendOpenGLMessage(const QString &msg)static
clearRecentFiles
Section titled “clearRecentFiles”static void RSettings::clearRecentFiles()static
Clears the list of recent files.
getAllKeys
Section titled “getAllKeys”static QStringList RSettings::getAllKeys(const QString &group)static
Returns: List of all keys stored in the application settings file.
getAllowMouseMoveInterruptions
Section titled “getAllowMouseMoveInterruptions”static bool RSettings::getAllowMouseMoveInterruptions()static
getAppId
Section titled “getAppId”static QString RSettings::getAppId()static
App ID used for DXF/DWG exports / imports to identify app XData.
getApplicationNameOverride
Section titled “getApplicationNameOverride”static QString RSettings::getApplicationNameOverride()static
getApplicationPath
Section titled “getApplicationPath”static QString RSettings::getApplicationPath()static
Returns: Path where all application resources are stored (‘scripts’, ‘patterns’, ‘ts’, ‘doc’, ‘linetypes’, …)
getApplyLineweightToPoints
Section titled “getApplyLineweightToPoints”static bool RSettings::getApplyLineweightToPoints()static
getArcAngleLengthThreshold
Section titled “getArcAngleLengthThreshold”static double RSettings::getArcAngleLengthThreshold()static
getArgument
Section titled “getArgument”static 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:
args: Array of strings (program arguments)shortFlag: E.g. “-o”longFlag: E.g. “-output”
getArguments
Section titled “getArguments”static 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:
args: Array of strings (program arguments)shortFlag: E.g. “-o”longFlag: E.g. “-output”
getAutoScaleGrid
Section titled “getAutoScaleGrid”static bool RSettings::getAutoScaleGrid()static
getAutoScaleLinetypePatterns
Section titled “getAutoScaleLinetypePatterns”static bool RSettings::getAutoScaleLinetypePatterns()static
getAutoScaleMetaGrid
Section titled “getAutoScaleMetaGrid”static bool RSettings::getAutoScaleMetaGrid()static
getAutoScalePatterns
Section titled “getAutoScalePatterns”static bool RSettings::getAutoScalePatterns()static
getAutoZoomOnLoad
Section titled “getAutoZoomOnLoad”static bool RSettings::getAutoZoomOnLoad()static
getBoolValue
Section titled “getBoolValue”static bool RSettings::getBoolValue(const QString &key, bool defaultValue)static
Returns: Value of the given setting as boolean or defaultValue.
getBoxArgument
Section titled “getBoxArgument”static RBox RSettings::getBoxArgument(const QStringList &args, const QString &shortFlag, const QString &longFlag, const RBox &def=RDEFAULT_RBOX)static
getBuildVersion
Section titled “getBuildVersion”static int RSettings::getBuildVersion()static
getByBlockColor
Section titled “getByBlockColor”static RColor RSettings::getByBlockColor()static
getCacheLocation
Section titled “getCacheLocation”static QString RSettings::getCacheLocation()static
Returns: Standard path for caches.
getCartesianCoordinateSeparator
Section titled “getCartesianCoordinateSeparator”static QString RSettings::getCartesianCoordinateSeparator()static
Returns: Cartesian coordinate separator (,).
getCharValue
Section titled “getCharValue”static QChar RSettings::getCharValue(const QString &key, const QChar &defaultValue)static
Non-Scriptable: This function is not available in script environments.
Returns: Value of the given setting as char or defaultValue.
getColor
Section titled “getColor”static RColor RSettings::getColor(const QString &key, const RColor &defaultValue=RDEFAULT_RCOLOR)static
Returns: Value of the given setting as color or defaultValue.
getColorArgument
Section titled “getColorArgument”static RColor RSettings::getColorArgument(const QStringList &args, const QString &shortFlag, const QString &longFlag, const RColor &def=RDEFAULT_RCOLOR)static
getColorCorrection
Section titled “getColorCorrection”static bool RSettings::getColorCorrection()static
getColorCorrectionDisableForPrinting
Section titled “getColorCorrectionDisableForPrinting”static bool RSettings::getColorCorrectionDisableForPrinting()static
getColorThreshold
Section titled “getColorThreshold”static int RSettings::getColorThreshold()static
getColorValue
Section titled “getColorValue”static RColor RSettings::getColorValue(const QString &key, const RColor &defaultValue)static
Returns: Value of the given setting as color or defaultValue.
getCompilerVersion
Section titled “getCompilerVersion”static QString RSettings::getCompilerVersion()static
Returns: Compiler name and version as human readable string.
getConcurrentDrawing
Section titled “getConcurrentDrawing”static bool RSettings::getConcurrentDrawing()static
getCrossHairColor
Section titled “getCrossHairColor”static RColor RSettings::getCrossHairColor()static
getCrossHairColorInactive
Section titled “getCrossHairColorInactive”static RColor RSettings::getCrossHairColorInactive()static
getCurrentVersion
Section titled “getCurrentVersion”static int RSettings::getCurrentVersion()static inline
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
Section titled “getDashThreshold”static int RSettings::getDashThreshold()static
getDataLocation
Section titled “getDataLocation”static QString RSettings::getDataLocation()static
Returns: Standard path for user data.
getDefaultPrinterName
Section titled “getDefaultPrinterName”static QString RSettings::getDefaultPrinterName()static
getDefaultValue
Section titled “getDefaultValue”static QVariant RSettings::getDefaultValue(const QString &key)static
getDesktopLocation
Section titled “getDesktopLocation”static QString RSettings::getDesktopLocation()static
Returns: Standard path for user desktop files.
getDevicePixelRatio
Section titled “getDevicePixelRatio”static double RSettings::getDevicePixelRatio()static
Returns: Device pixel ratio of the display. Usually 1 or 2 (for retina/high res displays).
getDocumentsLocation
Section titled “getDocumentsLocation”static QString RSettings::getDocumentsLocation()static
Returns: Standard path for user documents.
getDotLength
Section titled “getDotLength”static double RSettings::getDotLength()static
getDoubleValue
Section titled “getDoubleValue”static double RSettings::getDoubleValue(const QString &key, double defaultValue)static
Returns: Value of the given setting as double or defaultValue.
getEndReferencePointColor
Section titled “getEndReferencePointColor”static RColor RSettings::getEndReferencePointColor()static
getFadingFactor
Section titled “getFadingFactor”static double RSettings::getFadingFactor()static
getFileName
Section titled “getFileName”static QString RSettings::getFileName()static
Returns: File name of the application settings file (.ini or .conf).
getFloatArgument
Section titled “getFloatArgument”static double RSettings::getFloatArgument(const QStringList &args, const QString &shortFlag, const QString &longFlag, double def=RNANDOUBLE)static
getGridColor
Section titled “getGridColor”static RColor RSettings::getGridColor()static
getHideAttributeWithBlock
Section titled “getHideAttributeWithBlock”static bool RSettings::getHideAttributeWithBlock()static
getHighResolutionGraphicsView
Section titled “getHighResolutionGraphicsView”static bool RSettings::getHighResolutionGraphicsView()static
Returns: True if the graphics view renders at the full resolution of high resolution (Retina) displays with view coordinates in device pixels (preference “GraphicsView/HighResolutionGraphicsView”). Always false if the RHI based graphics view is used: it always renders at the full resolution of the display, with view coordinates in device independent pixels.
getHomeLocation
Section titled “getHomeLocation”static QString RSettings::getHomeLocation()static
Returns: Standard path for user home.
getIgnoreAllReferencePoints
Section titled “getIgnoreAllReferencePoints”static bool RSettings::getIgnoreAllReferencePoints()static
Returns: True if dragging reference points should be treated like dragging the whole selection.
getIgnoreBlockReferencePoint
Section titled “getIgnoreBlockReferencePoint”static bool RSettings::getIgnoreBlockReferencePoint()static
Returns: True if dragging the reference points of selected block references should be treated like dragging the whole selection.
getImportRecomputedDimBlocks
Section titled “getImportRecomputedDimBlocks”static bool RSettings::getImportRecomputedDimBlocks()static
getInfoLabelFont
Section titled “getInfoLabelFont”static QFont RSettings::getInfoLabelFont()static
getIntArgument
Section titled “getIntArgument”static int RSettings::getIntArgument(const QStringList &args, const QString &shortFlag, const QString &longFlag, int def)static
getIntListArgument
Section titled “getIntListArgument”static QList< int > RSettings::getIntListArgument(const QStringList &args, const QString &shortFlag, const QString &longFlag, QList< int > def=RDEFAULT_QLISTINT)static
getIntValue
Section titled “getIntValue”static int RSettings::getIntValue(const QString &key, int defaultValue)static
Returns: Value of the given setting as int or defaultValue.
getLaunchPath
Section titled “getLaunchPath”static QString RSettings::getLaunchPath()static
Returns: Path from where the application was launched (can be any path).
getLimitZoomAndScroll
Section titled “getLimitZoomAndScroll”static bool RSettings::getLimitZoomAndScroll()static
getLocale
Section titled “getLocale”static QString RSettings::getLocale()static
Returns: Locale to be used for translations (‘en’, ‘de’, ‘de_DE’, …)
getMajorVersion
Section titled “getMajorVersion”static int RSettings::getMajorVersion()static
getMaxHatchComplexity
Section titled “getMaxHatchComplexity”static int RSettings::getMaxHatchComplexity()static
Returns: Maximum complexity for a hatch to render at recommended arc resolution.
getMaxHatchTime
Section titled “getMaxHatchTime”static int RSettings::getMaxHatchTime()static
Returns: Maximum render time for a single hatch in ms.
getMaxReferencePointEntities
Section titled “getMaxReferencePointEntities”static int RSettings::getMaxReferencePointEntities()static
Returns: Max reference points to use.
getMaxReferencePointEntitiesDisplay
Section titled “getMaxReferencePointEntitiesDisplay”static int RSettings::getMaxReferencePointEntitiesDisplay()static
Returns: Max reference points to display.
getMetaGridColor
Section titled “getMetaGridColor”static RColor RSettings::getMetaGridColor()static
getMinArcAngleStep
Section titled “getMinArcAngleStep”static double RSettings::getMinArcAngleStep()static
getMinorVersion
Section titled “getMinorVersion”static int RSettings::getMinorVersion()static
getMouseThreshold
Section titled “getMouseThreshold”static int RSettings::getMouseThreshold()static
getNumberLocale
Section titled “getNumberLocale”static QLocale RSettings::getNumberLocale()static
getNumericalVersionString
Section titled “getNumericalVersionString”static QString RSettings::getNumericalVersionString()static
Returns: Application version as 01020304 for 1.2.3.4
getOpenGLMessages
Section titled “getOpenGLMessages”static QStringList RSettings::getOpenGLMessages()static
getOriginalArguments
Section titled “getOriginalArguments”static QStringList RSettings::getOriginalArguments()static
Returns: List of arguments passed to the application binary.
getOriginColor
Section titled “getOriginColor”static RColor RSettings::getOriginColor()static
getOSVersion
Section titled “getOSVersion”static QString RSettings::getOSVersion()static
Returns: OS name and version as human readable string.
getPath
Section titled “getPath”static QString RSettings::getPath()static
Returns: Path where the configuration file is stored.
getPickRange
Section titled “getPickRange”static int RSettings::getPickRange()static
getPluginPath
Section titled “getPluginPath”static QString RSettings::getPluginPath()static
Returns: Path to the application plugins folder.
getPluginPaths
Section titled “getPluginPaths”static 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).
getPluginsLocation
Section titled “getPluginsLocation”static QString RSettings::getPluginsLocation()static
Returns: Path for local plugins, independent of application name set by a plugin.
getPolarCoordinateSeparator
Section titled “getPolarCoordinateSeparator”static QString RSettings::getPolarCoordinateSeparator()static
Returns: Polar coordinate separator (<).
getPositionByMousePress
Section titled “getPositionByMousePress”static bool RSettings::getPositionByMousePress()static
getPreviewEntities
Section titled “getPreviewEntities”static int RSettings::getPreviewEntities()static
getPreviousVersion
Section titled “getPreviousVersion”static int RSettings::getPreviousVersion()static inline
getPrinterNames
Section titled “getPrinterNames”static QStringList RSettings::getPrinterNames()static
getPropertyEditorShowOnRequest
Section titled “getPropertyEditorShowOnRequest”static bool RSettings::getPropertyEditorShowOnRequest()static
Returns: True to show slow properties available on request.
getQSettings
Section titled “getQSettings”static QSettings * RSettings::getQSettings()static
Returns: Pointer to underlying QSettings object.
getQtVersion
Section titled “getQtVersion”static int RSettings::getQtVersion()static
Returns: Qt version as int (Qt 1.2.3 -> 0x010203).
getQtVersionString
Section titled “getQtVersionString”static QString RSettings::getQtVersionString()static
Returns: Qt version as human readable string (“1.2.3”).
getRecentFiles
Section titled “getRecentFiles”static QStringList RSettings::getRecentFiles()static
Returns: List of recent files.
getReferencePointColor
Section titled “getReferencePointColor”static RColor RSettings::getReferencePointColor()static
getReferencePointShape
Section titled “getReferencePointShape”static int RSettings::getReferencePointShape()static
Returns: Shape of reference points.
getReferencePointSize
Section titled “getReferencePointSize”static int RSettings::getReferencePointSize()static
Returns: Size of reference points.
getRelativeCoordinatePrefix
Section titled “getRelativeCoordinatePrefix”static QString RSettings::getRelativeCoordinatePrefix()static
Returns: Relative coordinate prefix ().
getReleaseDate
Section titled “getReleaseDate”static QString RSettings::getReleaseDate()static
getRenderThinPolylines1px
Section titled “getRenderThinPolylines1px”static bool RSettings::getRenderThinPolylines1px()static
Returns: True to render polylines with a very thin global width as 1 px.
getRevisionString
Section titled “getRevisionString”static QString RSettings::getRevisionString()static
Returns: Git revision number, stored in file revision.txt for deployed applications.
getRevisionVersion
Section titled “getRevisionVersion”static int RSettings::getRevisionVersion()static
getRulerFont
Section titled “getRulerFont”static QFont RSettings::getRulerFont()static
getScaleList
Section titled “getScaleList”static QStringList RSettings::getScaleList(const RS::Unit unit)static
getScreenBasedLineweightScaleFactor
Section titled “getScreenBasedLineweightScaleFactor”static double RSettings::getScreenBasedLineweightScaleFactor()static
Returns: Factor applied to line weights when screen-based line weights are displayed (screen-based linetypes mode). A factor of 2 shows screen-based line weights twice as wide as the default (factor 1).
getSecondaryReferencePointColor
Section titled “getSecondaryReferencePointColor”static RColor RSettings::getSecondaryReferencePointColor()static
getSelectBlockWithAttribute
Section titled “getSelectBlockWithAttribute”static bool RSettings::getSelectBlockWithAttribute()static
getSelectionColor
Section titled “getSelectionColor”static RColor RSettings::getSelectionColor()static
getShowCrosshair
Section titled “getShowCrosshair”static bool RSettings::getShowCrosshair()static
getShowLargeCrosshair
Section titled “getShowLargeCrosshair”static bool RSettings::getShowLargeCrosshair()static
getShowLargeOriginAxis
Section titled “getShowLargeOriginAxis”static bool RSettings::getShowLargeOriginAxis()static
getSimpleTextAlignLeft
Section titled “getSimpleTextAlignLeft”static bool RSettings::getSimpleTextAlignLeft()static
Returns: True to align left aligned simple text to the reference point exactly.
getSnapLabelFont
Section titled “getSnapLabelFont”static QFont RSettings::getSnapLabelFont()static
getSnapRange
Section titled “getSnapRange”static int RSettings::getSnapRange()static
getSnapReferencePointColor
Section titled “getSnapReferencePointColor”static RColor RSettings::getSnapReferencePointColor()static
getStandardLocation
Section titled “getStandardLocation”static QString RSettings::getStandardLocation(int sl)static
Returns: Standard path for the given standard location.
Parameters:
sl: QStandardPaths::StandardLocation or QDesktopServices::StandardLocation
getStartReferencePointColor
Section titled “getStartReferencePointColor”static RColor RSettings::getStartReferencePointColor()static
getStatusBarFont
Section titled “getStatusBarFont”static QFont RSettings::getStatusBarFont()static
getStringListValue
Section titled “getStringListValue”static QStringList RSettings::getStringListValue(const QString &key, const QStringList &defaultValue)static
Returns: Value of the given setting as string list or defaultValue.
getStringValue
Section titled “getStringValue”static QString RSettings::getStringValue(const QString &key, const QString &defaultValue)static
Returns: Value of the given setting as string or defaultValue.
getTempLocation
Section titled “getTempLocation”static QString RSettings::getTempLocation()static
Returns: Standard path for temporary files.
getTertiaryReferencePointColor
Section titled “getTertiaryReferencePointColor”static RColor RSettings::getTertiaryReferencePointColor()static
getTextHeightThreshold
Section titled “getTextHeightThreshold”static int RSettings::getTextHeightThreshold()static
getThemePath
Section titled “getThemePath”static QString RSettings::getThemePath()static
Returns: Path to current theme or empty to use the default theme.
getThumbnailFilePath
Section titled “getThumbnailFilePath”static QString RSettings::getThumbnailFilePath(const QString &fileName)static
getUseSecondarySelectionColor
Section titled “getUseSecondarySelectionColor”static bool RSettings::getUseSecondarySelectionColor()static
getUseSolidLineSelection
Section titled “getUseSolidLineSelection”static bool RSettings::getUseSolidLineSelection()static
getValue
Section titled “getValue”static QVariant RSettings::getValue(const QString &key, const QVariant &defaultValue=RDEFAULT_QVARIANT)static
Returns: Value of the given setting as variant or defaultValue.
getVectorArgument
Section titled “getVectorArgument”static RVector RSettings::getVectorArgument(const QStringList &args, const QString &shortFlag, const QString &longFlag, const RVector &def=RDEFAULT_RVECTOR)static
getVersionString
Section titled “getVersionString”static QString RSettings::getVersionString()static
Returns: Application version as human readable string.
getWidgetSelectionColor
Section titled “getWidgetSelectionColor”static QColor RSettings::getWidgetSelectionColor(const QWidget *w)static
getZeroWeightWeight
Section titled “getZeroWeightWeight”static int RSettings::getZeroWeightWeight()static
hasApplicationNameOverride
Section titled “hasApplicationNameOverride”static bool RSettings::hasApplicationNameOverride()static
hasCustomStyleSheet
Section titled “hasCustomStyleSheet”static bool RSettings::hasCustomStyleSheet()static
Returns: True if a custom stylesheet is present for the whole application. Z.B. a theme is present.
hasDarkGuiBackground
Section titled “hasDarkGuiBackground”static bool RSettings::hasDarkGuiBackground()static
hasDefaultValue
Section titled “hasDefaultValue”static bool RSettings::hasDefaultValue(const QString &key)static
hasQuitFlag
Section titled “hasQuitFlag”static bool RSettings::hasQuitFlag()static
Returns: True if -quit was passed to the application binary.
hasValue
Section titled “hasValue”static bool RSettings::hasValue(const QString &key)static
Returns: True if the given key is available in the application settings file.
initRecentFiles
Section titled “initRecentFiles”static void RSettings::initRecentFiles()static
Initializes the recent files list (recentFiles).
isDarkMode
Section titled “isDarkMode”static bool RSettings::isDarkMode()static
Returns: True for macOS or Windows dark mode.
isDebuggerEnabled
Section titled “isDebuggerEnabled”static bool RSettings::isDebuggerEnabled()static
Returns: True if the script debugger is enabled.
isDeployed
Section titled “isDeployed”static 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
Section titled “isFirstStart”static bool RSettings::isFirstStart()static inline
isGuiEnabled
Section titled “isGuiEnabled”static 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.
isKeyboardNavigationInListsEnabled
Section titled “isKeyboardNavigationInListsEnabled”static bool RSettings::isKeyboardNavigationInListsEnabled()static
Returns: True if the cursor keys navigate through the items of lists and trees (layer list, block list, …) instead of being forwarded to the main window (where they move the selected entities).
This is the user setting Keyboard/EnableKeyboardNavigationInLists, but it is always on while a screen reader is attached: without the cursor keys there is no way to move through the items of a list at all, which would make those lists unusable with e.g. VoiceOver.
isLayer0CompatibilityOn
Section titled “isLayer0CompatibilityOn”static bool RSettings::isLayer0CompatibilityOn()static
isNewVersion
Section titled “isNewVersion”static bool RSettings::isNewVersion()static inline
isNextVersionEnabled
Section titled “isNextVersionEnabled”static bool RSettings::isNextVersionEnabled()static
static bool RSettings::isQt(int majorVersion)static
Returns: True if application was compiled against at least the given major Qt version.
isScreenReaderActive
Section titled “isScreenReaderActive”static bool RSettings::isScreenReaderActive()static
Returns: True if a screen reader (e.g. VoiceOver, Narrator, Orca) or another assistive tool is attached to the application.
Query this whenever the information is needed, never once at startup: a screen reader is usually only attached after the widgets have been created (on macOS, accessibility is activated the first time an assistive client asks the window for an attribute), and it can be started and stopped at any time.
isTextRenderedAsText
Section titled “isTextRenderedAsText”static bool RSettings::isTextRenderedAsText()static
isUpdated
Section titled “isUpdated”static int RSettings::isUpdated(int versionCheck=-1)static inline
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
Section titled “isXDataEnabled”static bool RSettings::isXDataEnabled()static
loadTranslations
Section titled “loadTranslations”static void RSettings::loadTranslations(const QString &module, const QStringList &dirs=RDEFAULT_QSTRINGLIST)static
Loads the translations for the given module.
Parameters:
module: Module name (‘qcadcore’, ‘qcadentity’, …)dirs: List of directories to look for translation files or empty to check default directories.
removeRecentFile
Section titled “removeRecentFile”static void RSettings::removeRecentFile(const QString &fileName)static
Removes the given file from the list of recent files.
removeThumbnail
Section titled “removeThumbnail”static void RSettings::removeThumbnail(const QString &fileName)static
removeValue
Section titled “removeValue”static void RSettings::removeValue(const QString &key)static
Removes the value for the given key.
resetCache
Section titled “resetCache”static void RSettings::resetCache()static
resetDarkModeCache
Section titled “resetDarkModeCache”static void RSettings::resetDarkModeCache()static inline
setAllowMouseMoveInterruptionsOverride
Section titled “setAllowMouseMoveInterruptionsOverride”static void RSettings::setAllowMouseMoveInterruptionsOverride(bool on)static
setApplicationNameOverride
Section titled “setApplicationNameOverride”static void RSettings::setApplicationNameOverride(const QString &n)static
Sets the application name override used for the configuration file name (e.g.
QCAD3).
setConcurrentDrawing
Section titled “setConcurrentDrawing”static void RSettings::setConcurrentDrawing(bool on)static
setDefaultValue
Section titled “setDefaultValue”static void RSettings::setDefaultValue(const QString &key, const QVariant &value)static
Sets the variable with the given key and value, overwriting an existing value if overwrite is true (default).
Registers a runtime default for the given key. The default is returned by getValue() and the typed getters instead of the caller’s default value whenever no value is stored for the key. Defaults are not persisted. Used for example by style plugins to adjust UI defaults such as icon sizes.
setFirstStart
Section titled “setFirstStart”static void RSettings::setFirstStart(bool on)static inline
setLaunchPath
Section titled “setLaunchPath”static void RSettings::setLaunchPath(const QString &launchPath)static
setNewVersion
Section titled “setNewVersion”static void RSettings::setNewVersion(bool on)static inline
setNextVersionEnabled
Section titled “setNextVersionEnabled”static void RSettings::setNextVersionEnabled(bool on)static
setNoWrite
Section titled “setNoWrite”static void RSettings::setNoWrite(bool on=true)static
setOriginalArguments
Section titled “setOriginalArguments”static void RSettings::setOriginalArguments(const QStringList &a)static
setPreviousVersion
Section titled “setPreviousVersion”static void RSettings::setPreviousVersion(int pv)static inline
setQuitFlag
Section titled “setQuitFlag”static void RSettings::setQuitFlag()static
setRulerFont
Section titled “setRulerFont”static void RSettings::setRulerFont(const QFont &font)static
setShowCrosshair
Section titled “setShowCrosshair”static void RSettings::setShowCrosshair(bool on)static
setShowLargeCrosshair
Section titled “setShowLargeCrosshair”static void RSettings::setShowLargeCrosshair(bool on)static
setShowLargeOriginAxis
Section titled “setShowLargeOriginAxis”static void RSettings::setShowLargeOriginAxis(bool on)static
setSnapLabelFont
Section titled “setSnapLabelFont”static void RSettings::setSnapLabelFont(const QFont &font)static
setValue
Section titled “setValue”static void RSettings::setValue(const QString &key, const QVariant &value, bool overwrite=true)static
setXDataEnabled
Section titled “setXDataEnabled”static void RSettings::setXDataEnabled(bool on)static
testArgument
Section titled “testArgument”static 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
Section titled “translate”static QString RSettings::translate(const QString &context, const QString &str)static
Translates the given string for the given context.
uninit
Section titled “uninit”static void RSettings::uninit()static
useQml
Section titled “useQml”static bool RSettings::useQml()static
isInitialized
Section titled “isInitialized”static bool RSettings::isInitialized()static private
shortenRecentFiles
Section titled “shortenRecentFiles”static void RSettings::shortenRecentFiles()static private
Purges recent files that exceed the RecentFiles/RecentFilesSize limit.
allowMouseMoveInterruptions
Section titled “allowMouseMoveInterruptions”static int RSettings::allowMouseMoveInterruptions = -1static private
applicationNameOverride
Section titled “applicationNameOverride”static QString RSettings::applicationNameOverridestatic private
applyLineweightToPoints
Section titled “applyLineweightToPoints”static int RSettings::applyLineweightToPoints = -1static private
arcAngleLengthThreshold
Section titled “arcAngleLengthThreshold”static double RSettings::arcAngleLengthThreshold = -1static private
autoScaleLinetypePattern
Section titled “autoScaleLinetypePattern”static int RSettings::autoScaleLinetypePattern = -1static private
byBlockColor
Section titled “byBlockColor”static RColor * RSettings::byBlockColor = NULLstatic private
static QVariantMap RSettings::cachestatic private
cartesianCoordinateSeparator
Section titled “cartesianCoordinateSeparator”static QString RSettings::cartesianCoordinateSeparator = QString()static private
concurrentDrawing
Section titled “concurrentDrawing”static int RSettings::concurrentDrawing = -1static private
crossHairColor
Section titled “crossHairColor”static RColor * RSettings::crossHairColor = NULLstatic private
crossHairColorInactive
Section titled “crossHairColorInactive”static RColor * RSettings::crossHairColorInactive = NULLstatic private
darkGuiBackground
Section titled “darkGuiBackground”static int RSettings::darkGuiBackground = -1static private
darkMode
Section titled “darkMode”static int RSettings::darkMode = -1static private
dashThreshold
Section titled “dashThreshold”static int RSettings::dashThreshold = -1static private
defaults
Section titled “defaults”static QVariantMap RSettings::defaults = initVersionDefaults()static private
devicePixelRatio
Section titled “devicePixelRatio”static double RSettings::devicePixelRatio = -1.0static private
dotLength
Section titled “dotLength”static double RSettings::dotLength = -1static private
endReferencePointColor
Section titled “endReferencePointColor”static RColor * RSettings::endReferencePointColor = NULLstatic private
fadingFactor
Section titled “fadingFactor”static double RSettings::fadingFactor = -1static private
firstStart
Section titled “firstStart”static bool RSettings::firstStart = falsestatic private
gridColor
Section titled “gridColor”static RColor * RSettings::gridColor = NULLstatic private
hideAttributeWithBlock
Section titled “hideAttributeWithBlock”static int RSettings::hideAttributeWithBlock = -1static private
highResolutionGraphicsView
Section titled “highResolutionGraphicsView”static int RSettings::highResolutionGraphicsView = -1static private
ignoreAllReferencePoints
Section titled “ignoreAllReferencePoints”static int RSettings::ignoreAllReferencePoints = -1static private
ignoreBlockReferencePoint
Section titled “ignoreBlockReferencePoint”static int RSettings::ignoreBlockReferencePoint = -1static private
importRecomputedDimBlocks
Section titled “importRecomputedDimBlocks”static int RSettings::importRecomputedDimBlocks = -1static private
infoLabelFont
Section titled “infoLabelFont”static QFont * RSettings::infoLabelFont = NULLstatic private
launchPath
Section titled “launchPath”static QString RSettings::launchPathstatic private
layer0CompatibilityOn
Section titled “layer0CompatibilityOn”static int RSettings::layer0CompatibilityOn = -1static private
limitZoomAndScroll
Section titled “limitZoomAndScroll”static int RSettings::limitZoomAndScroll = -1static private
maxHatchComplexity
Section titled “maxHatchComplexity”static int RSettings::maxHatchComplexity = -1static private
maxHatchTime
Section titled “maxHatchTime”static int RSettings::maxHatchTime = -1static private
maxReferencePointEntities
Section titled “maxReferencePointEntities”static int RSettings::maxReferencePointEntities = -1static private
maxReferencePointEntitiesDisplay
Section titled “maxReferencePointEntitiesDisplay”static int RSettings::maxReferencePointEntitiesDisplay = -1static private
metaGridColor
Section titled “metaGridColor”static RColor * RSettings::metaGridColor = NULLstatic private
minArcAngleStep
Section titled “minArcAngleStep”static double RSettings::minArcAngleStep = -1static private
mouseThreshold
Section titled “mouseThreshold”static int RSettings::mouseThreshold = -1static private
newVersion
Section titled “newVersion”static bool RSettings::newVersion = falsestatic private
nextVersionEnabled
Section titled “nextVersionEnabled”static bool RSettings::nextVersionEnabled = falsestatic private
noWrite
Section titled “noWrite”static bool RSettings::noWrite = falsestatic private
numberLocale
Section titled “numberLocale”static QLocale * RSettings::numberLocale = NULLstatic private
openGLMessages
Section titled “openGLMessages”static QStringList RSettings::openGLMessagesstatic private
originalArguments
Section titled “originalArguments”static QStringList RSettings::originalArgumentsstatic private
originColor
Section titled “originColor”static RColor * RSettings::originColor = NULLstatic private
pickRange
Section titled “pickRange”static int RSettings::pickRange = -1static private
polarCoordinateSeparator
Section titled “polarCoordinateSeparator”static QString RSettings::polarCoordinateSeparator = QString()static private
positionByMousePress
Section titled “positionByMousePress”static int RSettings::positionByMousePress = -1static private
previewEntities
Section titled “previewEntities”static int RSettings::previewEntities = -1static private
previousVersion
Section titled “previousVersion”static int RSettings::previousVersion = 0static private
propertyEditorShowOnRequest
Section titled “propertyEditorShowOnRequest”static int RSettings::propertyEditorShowOnRequest = -1static private
qSettings
Section titled “qSettings”static QSettings * RSettings::qSettings = NULLstatic private
quitFlag
Section titled “quitFlag”static bool RSettings::quitFlag = falsestatic private
recentFiles
Section titled “recentFiles”static QStringList RSettings::recentFilesstatic private
referencePointColor
Section titled “referencePointColor”static RColor * RSettings::referencePointColor = NULLstatic private
referencePointShape
Section titled “referencePointShape”static int RSettings::referencePointShape = -1static private
referencePointSize
Section titled “referencePointSize”static int RSettings::referencePointSize = -1static private
relativeCoordinatePrefix
Section titled “relativeCoordinatePrefix”static QString RSettings::relativeCoordinatePrefix = QString()static private
renderThinPolylines1px
Section titled “renderThinPolylines1px”static int RSettings::renderThinPolylines1px = -1static private
rulerFont
Section titled “rulerFont”static QFont * RSettings::rulerFont = NULLstatic private
screenBasedLineweightScaleFactor
Section titled “screenBasedLineweightScaleFactor”static double RSettings::screenBasedLineweightScaleFactor = -1static private
secondaryReferencePointColor
Section titled “secondaryReferencePointColor”static RColor * RSettings::secondaryReferencePointColor = NULLstatic private
selectBlockWithAttribute
Section titled “selectBlockWithAttribute”static int RSettings::selectBlockWithAttribute = -1static private
selectionColor
Section titled “selectionColor”static RColor * RSettings::selectionColor = NULLstatic private
showCrosshair
Section titled “showCrosshair”static int RSettings::showCrosshair = -1static private
showLargeCrosshair
Section titled “showLargeCrosshair”static int RSettings::showLargeCrosshair = -1static private
showLargeOriginAxis
Section titled “showLargeOriginAxis”static int RSettings::showLargeOriginAxis = -1static private
simpleTextAlignLeft
Section titled “simpleTextAlignLeft”static int RSettings::simpleTextAlignLeft = -1static private
snapLabelFont
Section titled “snapLabelFont”static QFont * RSettings::snapLabelFont = NULLstatic private
snapRange
Section titled “snapRange”static int RSettings::snapRange = -1static private
snapReferencePointColor
Section titled “snapReferencePointColor”static RColor * RSettings::snapReferencePointColor = NULLstatic private
startReferencePointColor
Section titled “startReferencePointColor”static RColor * RSettings::startReferencePointColor = NULLstatic private
statusBarFont
Section titled “statusBarFont”static QFont * RSettings::statusBarFont = NULLstatic private
tertiaryReferencePointColor
Section titled “tertiaryReferencePointColor”static RColor * RSettings::tertiaryReferencePointColor = NULLstatic private
textRenderedAsText
Section titled “textRenderedAsText”static int RSettings::textRenderedAsText = -1static private
themePath
Section titled “themePath”static QString RSettings::themePathstatic private
useSecondarySelectionColor
Section titled “useSecondarySelectionColor”static int RSettings::useSecondarySelectionColor = -1static private
useSolidLineSelection
Section titled “useSolidLineSelection”static int RSettings::useSolidLineSelection = -1static private
xDataEnabled
Section titled “xDataEnabled”static bool RSettings::xDataEnabled = falsestatic private
zeroWeightWeight
Section titled “zeroWeightWeight”static int RSettings::zeroWeightWeight = -1static private