Skip to content

RSettings

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

Scriptable: This class is available in script environments.

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 bool isInitialized()
static void shortenRecentFiles()
Purges recent files that exceed the RecentFiles/RecentFilesSize limit.
static int allowMouseMoveInterruptions
static QString applicationNameOverride
static int applyLineweightToPoints
static double arcAngleLengthThreshold
static int autoScaleLinetypePattern
static RColor * byBlockColor
static QVariantMap cache
static QString cartesianCoordinateSeparator
static int concurrentDrawing
static RColor * crossHairColor
static RColor * crossHairColorInactive
static int darkGuiBackground
static int darkMode
static int dashThreshold
static QVariantMap defaults
static double devicePixelRatio
static double dotLength
static RColor * endReferencePointColor
static double fadingFactor
static bool firstStart
static RColor * gridColor
static int hideAttributeWithBlock
static int highResolutionGraphicsView
static int ignoreAllReferencePoints
static int ignoreBlockReferencePoint
static int importRecomputedDimBlocks
static QFont * infoLabelFont
static QString launchPath
static int layer0CompatibilityOn
static int limitZoomAndScroll
static int maxHatchComplexity
static int maxHatchTime
static int maxReferencePointEntities
static int maxReferencePointEntitiesDisplay
static RColor * metaGridColor
static double minArcAngleStep
static int mouseThreshold
static bool newVersion
static bool nextVersionEnabled
static bool noWrite
static QLocale * numberLocale
static QStringList openGLMessages
static QStringList originalArguments
static RColor * originColor
static int pickRange
static QString polarCoordinateSeparator
static int positionByMousePress
static int previewEntities
static int previousVersion
static int propertyEditorShowOnRequest
static QSettings * qSettings
static bool quitFlag
static QStringList recentFiles
static RColor * referencePointColor
static int referencePointShape
static int referencePointSize
static QString relativeCoordinatePrefix
static int renderThinPolylines1px
static QFont * rulerFont
static double screenBasedLineweightScaleFactor
static RColor * secondaryReferencePointColor
static int selectBlockWithAttribute
static RColor * selectionColor
static int showCrosshair
static int showLargeCrosshair
static int showLargeOriginAxis
static int simpleTextAlignLeft
static QFont * snapLabelFont
static int snapRange
static RColor * snapReferencePointColor
static RColor * startReferencePointColor
static QFont * statusBarFont
static RColor * tertiaryReferencePointColor
static int textRenderedAsText
static QString themePath
static int useSecondarySelectionColor
static int useSolidLineSelection
static bool xDataEnabled
static int zeroWeightWeight

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.

static void RSettings::addThumbnail(const QString &fileName, const QImage &thumbnail)

static

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

static

static void RSettings::clearRecentFiles()

static

Clears the list of recent files.

static QStringList RSettings::getAllKeys(const QString &group)

static

Returns: List of all keys stored in the application settings file.

static bool RSettings::getAllowMouseMoveInterruptions()

static

static QString RSettings::getAppId()

static

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

static QString RSettings::getApplicationNameOverride()

static

static QString RSettings::getApplicationPath()

static

Returns: Path where all application resources are stored (‘scripts’, ‘patterns’, ‘ts’, ‘doc’, ‘linetypes’, …)

static bool RSettings::getApplyLineweightToPoints()

static

static double RSettings::getArcAngleLengthThreshold()

static

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”

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”

static bool RSettings::getAutoScaleGrid()

static

static bool RSettings::getAutoScaleLinetypePatterns()

static

static bool RSettings::getAutoScaleMetaGrid()

static

static bool RSettings::getAutoScalePatterns()

static

static bool RSettings::getAutoZoomOnLoad()

static

static bool RSettings::getBoolValue(const QString &key, bool defaultValue)

static

Returns: Value of the given setting as boolean or defaultValue.

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

static

static int RSettings::getBuildVersion()

static

static RColor RSettings::getByBlockColor()

static

static QString RSettings::getCacheLocation()

static

Returns: Standard path for caches.

static QString RSettings::getCartesianCoordinateSeparator()

static

Returns: Cartesian coordinate separator (,).

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.

static RColor RSettings::getColor(const QString &key, const RColor &defaultValue=RDEFAULT_RCOLOR)

static

Returns: Value of the given setting as color or defaultValue.

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

static

static bool RSettings::getColorCorrection()

static

static bool RSettings::getColorCorrectionDisableForPrinting()

static

static int RSettings::getColorThreshold()

static

static RColor RSettings::getColorValue(const QString &key, const RColor &defaultValue)

static

Returns: Value of the given setting as color or defaultValue.

static QString RSettings::getCompilerVersion()

static

Returns: Compiler name and version as human readable string.

static bool RSettings::getConcurrentDrawing()

static

static RColor RSettings::getCrossHairColor()

static

static RColor RSettings::getCrossHairColorInactive()

static

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.

static int RSettings::getDashThreshold()

static

static QString RSettings::getDataLocation()

static

Returns: Standard path for user data.

static QString RSettings::getDefaultPrinterName()

static

static QVariant RSettings::getDefaultValue(const QString &key)

static

static QString RSettings::getDesktopLocation()

static

Returns: Standard path for user desktop files.

static double RSettings::getDevicePixelRatio()

static

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

static QString RSettings::getDocumentsLocation()

static

Returns: Standard path for user documents.

static double RSettings::getDotLength()

static

static double RSettings::getDoubleValue(const QString &key, double defaultValue)

static

Returns: Value of the given setting as double or defaultValue.

static RColor RSettings::getEndReferencePointColor()

static

static double RSettings::getFadingFactor()

static

static QString RSettings::getFileName()

static

Returns: File name of the application settings file (.ini or .conf).

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

static

static RColor RSettings::getGridColor()

static

static bool RSettings::getHideAttributeWithBlock()

static

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.

static QString RSettings::getHomeLocation()

static

Returns: Standard path for user home.

static bool RSettings::getIgnoreAllReferencePoints()

static

Returns: True if dragging reference points should be treated like dragging the whole selection.

static bool RSettings::getIgnoreBlockReferencePoint()

static

Returns: True if dragging the reference points of selected block references should be treated like dragging the whole selection.

static bool RSettings::getImportRecomputedDimBlocks()

static

static QFont RSettings::getInfoLabelFont()

static

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

static

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

static

static int RSettings::getIntValue(const QString &key, int defaultValue)

static

Returns: Value of the given setting as int or defaultValue.

static QString RSettings::getLaunchPath()

static

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

static bool RSettings::getLimitZoomAndScroll()

static

static QString RSettings::getLocale()

static

Returns: Locale to be used for translations (‘en’, ‘de’, ‘de_DE’, …)

static int RSettings::getMajorVersion()

static

static int RSettings::getMaxHatchComplexity()

static

Returns: Maximum complexity for a hatch to render at recommended arc resolution.

static int RSettings::getMaxHatchTime()

static

Returns: Maximum render time for a single hatch in ms.

static int RSettings::getMaxReferencePointEntities()

static

Returns: Max reference points to use.

static int RSettings::getMaxReferencePointEntitiesDisplay()

static

Returns: Max reference points to display.

static RColor RSettings::getMetaGridColor()

static

static double RSettings::getMinArcAngleStep()

static

static int RSettings::getMinorVersion()

static

static int RSettings::getMouseThreshold()

static

static QLocale RSettings::getNumberLocale()

static

static QString RSettings::getNumericalVersionString()

static

Returns: Application version as 01020304 for 1.2.3.4

static QStringList RSettings::getOpenGLMessages()

static

static QStringList RSettings::getOriginalArguments()

static

Returns: List of arguments passed to the application binary.

static RColor RSettings::getOriginColor()

static

static QString RSettings::getOSVersion()

static

Returns: OS name and version as human readable string.

static QString RSettings::getPath()

static

Returns: Path where the configuration file is stored.

static int RSettings::getPickRange()

static

static QString RSettings::getPluginPath()

static

Returns: Path to the application plugins folder.

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).

static QString RSettings::getPluginsLocation()

static

Returns: Path for local plugins, independent of application name set by a plugin.

static QString RSettings::getPolarCoordinateSeparator()

static

Returns: Polar coordinate separator (<).

static bool RSettings::getPositionByMousePress()

static

static int RSettings::getPreviewEntities()

static

static int RSettings::getPreviousVersion()

static inline

static QStringList RSettings::getPrinterNames()

static

static bool RSettings::getPropertyEditorShowOnRequest()

static

Returns: True to show slow properties available on request.

static QSettings * RSettings::getQSettings()

static

Returns: Pointer to underlying QSettings object.

static int RSettings::getQtVersion()

static

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

static QString RSettings::getQtVersionString()

static

Returns: Qt version as human readable string (“1.2.3”).

static QStringList RSettings::getRecentFiles()

static

Returns: List of recent files.

static RColor RSettings::getReferencePointColor()

static

static int RSettings::getReferencePointShape()

static

Returns: Shape of reference points.

static int RSettings::getReferencePointSize()

static

Returns: Size of reference points.

static QString RSettings::getRelativeCoordinatePrefix()

static

Returns: Relative coordinate prefix ().

static QString RSettings::getReleaseDate()

static

static bool RSettings::getRenderThinPolylines1px()

static

Returns: True to render polylines with a very thin global width as 1 px.

static QString RSettings::getRevisionString()

static

Returns: Git revision number, stored in file revision.txt for deployed applications.

static int RSettings::getRevisionVersion()

static

static QFont RSettings::getRulerFont()

static

static QStringList RSettings::getScaleList(const RS::Unit unit)

static

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).

static RColor RSettings::getSecondaryReferencePointColor()

static

static bool RSettings::getSelectBlockWithAttribute()

static

static RColor RSettings::getSelectionColor()

static

static bool RSettings::getShowCrosshair()

static

static bool RSettings::getShowLargeCrosshair()

static

static bool RSettings::getShowLargeOriginAxis()

static

static bool RSettings::getSimpleTextAlignLeft()

static

Returns: True to align left aligned simple text to the reference point exactly.

static QFont RSettings::getSnapLabelFont()

static

static int RSettings::getSnapRange()

static

static RColor RSettings::getSnapReferencePointColor()

static

static QString RSettings::getStandardLocation(int sl)

static

Returns: Standard path for the given standard location.

Parameters:

  • sl: QStandardPaths::StandardLocation or QDesktopServices::StandardLocation

static RColor RSettings::getStartReferencePointColor()

static

static QFont RSettings::getStatusBarFont()

static

static QStringList RSettings::getStringListValue(const QString &key, const QStringList &defaultValue)

static

Returns: Value of the given setting as string list or defaultValue.

static QString RSettings::getStringValue(const QString &key, const QString &defaultValue)

static

Returns: Value of the given setting as string or defaultValue.

static QString RSettings::getTempLocation()

static

Returns: Standard path for temporary files.

static RColor RSettings::getTertiaryReferencePointColor()

static

static int RSettings::getTextHeightThreshold()

static

static QString RSettings::getThemePath()

static

Returns: Path to current theme or empty to use the default theme.

static QString RSettings::getThumbnailFilePath(const QString &fileName)

static

static bool RSettings::getUseSecondarySelectionColor()

static

static bool RSettings::getUseSolidLineSelection()

static

static QVariant RSettings::getValue(const QString &key, const QVariant &defaultValue=RDEFAULT_QVARIANT)

static

Returns: Value of the given setting as variant or defaultValue.

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

static

static QString RSettings::getVersionString()

static

Returns: Application version as human readable string.

static QColor RSettings::getWidgetSelectionColor(const QWidget *w)

static

static int RSettings::getZeroWeightWeight()

static

static bool RSettings::hasApplicationNameOverride()

static

static bool RSettings::hasCustomStyleSheet()

static

Returns: True if a custom stylesheet is present for the whole application. Z.B. a theme is present.

static bool RSettings::hasDarkGuiBackground()

static

static bool RSettings::hasDefaultValue(const QString &key)

static

static bool RSettings::hasQuitFlag()

static

Returns: True if -quit was passed to the application binary.

static bool RSettings::hasValue(const QString &key)

static

Returns: True if the given key is available in the application settings file.

static void RSettings::initRecentFiles()

static

Initializes the recent files list (recentFiles).

static bool RSettings::isDarkMode()

static

Returns: True for macOS or Windows dark mode.

static bool RSettings::isDebuggerEnabled()

static

Returns: True if the script debugger is enabled.

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.

static bool RSettings::isFirstStart()

static inline

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.

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.

static bool RSettings::isLayer0CompatibilityOn()

static

static bool RSettings::isNewVersion()

static inline

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.

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.

static bool RSettings::isTextRenderedAsText()

static

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.

static bool RSettings::isXDataEnabled()

static

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.

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

static

Removes the given file from the list of recent files.

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

static

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

static

Removes the value for the given key.

static void RSettings::resetCache()

static

static void RSettings::resetDarkModeCache()

static inline

static void RSettings::setAllowMouseMoveInterruptionsOverride(bool on)

static

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

static

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

QCAD3).

static void RSettings::setConcurrentDrawing(bool on)

static

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.

static void RSettings::setFirstStart(bool on)

static inline

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

static

static void RSettings::setNewVersion(bool on)

static inline

static void RSettings::setNextVersionEnabled(bool on)

static

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

static

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

static

static void RSettings::setPreviousVersion(int pv)

static inline

static void RSettings::setQuitFlag()

static

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

static

static void RSettings::setShowCrosshair(bool on)

static

static void RSettings::setShowLargeCrosshair(bool on)

static

static void RSettings::setShowLargeOriginAxis(bool on)

static

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

static

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

static

static void RSettings::setXDataEnabled(bool on)

static

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.

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

static

Translates the given string for the given context.

static void RSettings::uninit()

static

static bool RSettings::useQml()

static

static bool RSettings::isInitialized()

static private

static void RSettings::shortenRecentFiles()

static private

Purges recent files that exceed the RecentFiles/RecentFilesSize limit.

static int RSettings::allowMouseMoveInterruptions = -1

static private

static QString RSettings::applicationNameOverride

static private

static int RSettings::applyLineweightToPoints = -1

static private

static double RSettings::arcAngleLengthThreshold = -1

static private

static int RSettings::autoScaleLinetypePattern = -1

static private

static RColor * RSettings::byBlockColor = NULL

static private

static QVariantMap RSettings::cache

static private

static QString RSettings::cartesianCoordinateSeparator = QString()

static private

static int RSettings::concurrentDrawing = -1

static private

static RColor * RSettings::crossHairColor = NULL

static private

static RColor * RSettings::crossHairColorInactive = NULL

static private

static int RSettings::darkGuiBackground = -1

static private

static int RSettings::darkMode = -1

static private

static int RSettings::dashThreshold = -1

static private

static QVariantMap RSettings::defaults = initVersionDefaults()

static private

static double RSettings::devicePixelRatio = -1.0

static private

static double RSettings::dotLength = -1

static private

static RColor * RSettings::endReferencePointColor = NULL

static private

static double RSettings::fadingFactor = -1

static private

static bool RSettings::firstStart = false

static private

static RColor * RSettings::gridColor = NULL

static private

static int RSettings::hideAttributeWithBlock = -1

static private

static int RSettings::highResolutionGraphicsView = -1

static private

static int RSettings::ignoreAllReferencePoints = -1

static private

static int RSettings::ignoreBlockReferencePoint = -1

static private

static int RSettings::importRecomputedDimBlocks = -1

static private

static QFont * RSettings::infoLabelFont = NULL

static private

static QString RSettings::launchPath

static private

static int RSettings::layer0CompatibilityOn = -1

static private

static int RSettings::limitZoomAndScroll = -1

static private

static int RSettings::maxHatchComplexity = -1

static private

static int RSettings::maxHatchTime = -1

static private

static int RSettings::maxReferencePointEntities = -1

static private

static int RSettings::maxReferencePointEntitiesDisplay = -1

static private

static RColor * RSettings::metaGridColor = NULL

static private

static double RSettings::minArcAngleStep = -1

static private

static int RSettings::mouseThreshold = -1

static private

static bool RSettings::newVersion = false

static private

static bool RSettings::nextVersionEnabled = false

static private

static bool RSettings::noWrite = false

static private

static QLocale * RSettings::numberLocale = NULL

static private

static QStringList RSettings::openGLMessages

static private

static QStringList RSettings::originalArguments

static private

static RColor * RSettings::originColor = NULL

static private

static int RSettings::pickRange = -1

static private

static QString RSettings::polarCoordinateSeparator = QString()

static private

static int RSettings::positionByMousePress = -1

static private

static int RSettings::previewEntities = -1

static private

static int RSettings::previousVersion = 0

static private

static int RSettings::propertyEditorShowOnRequest = -1

static private

static QSettings * RSettings::qSettings = NULL

static private

static bool RSettings::quitFlag = false

static private

static QStringList RSettings::recentFiles

static private

static RColor * RSettings::referencePointColor = NULL

static private

static int RSettings::referencePointShape = -1

static private

static int RSettings::referencePointSize = -1

static private

static QString RSettings::relativeCoordinatePrefix = QString()

static private

static int RSettings::renderThinPolylines1px = -1

static private

static QFont * RSettings::rulerFont = NULL

static private

static double RSettings::screenBasedLineweightScaleFactor = -1

static private

static RColor * RSettings::secondaryReferencePointColor = NULL

static private

static int RSettings::selectBlockWithAttribute = -1

static private

static RColor * RSettings::selectionColor = NULL

static private

static int RSettings::showCrosshair = -1

static private

static int RSettings::showLargeCrosshair = -1

static private

static int RSettings::showLargeOriginAxis = -1

static private

static int RSettings::simpleTextAlignLeft = -1

static private

static QFont * RSettings::snapLabelFont = NULL

static private

static int RSettings::snapRange = -1

static private

static RColor * RSettings::snapReferencePointColor = NULL

static private

static RColor * RSettings::startReferencePointColor = NULL

static private

static QFont * RSettings::statusBarFont = NULL

static private

static RColor * RSettings::tertiaryReferencePointColor = NULL

static private

static int RSettings::textRenderedAsText = -1

static private

static QString RSettings::themePath

static private

static int RSettings::useSecondarySelectionColor = -1

static private

static int RSettings::useSolidLineSelection = -1

static private

static bool RSettings::xDataEnabled = false

static private

static int RSettings::zeroWeightWeight = -1

static private