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 clearRecentFiles ()
 
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 getApplicationPath ()
 
static double getArcAngleLengthThreshold ()
 
static bool getAutoScaleGrid ()
 
static bool getAutoScaleLinetypePatterns ()
 
static bool getAutoScaleMetaGrid ()
 
static bool getAutoScalePatterns ()
 
static bool getAutoZoomOnLoad ()
 
static bool getBoolValue (const QString &key, bool defaultValue)
 
static int getBuildVersion ()
 
static QString getCacheLocation ()
 
static RColor getColor (const QString &key, const RColor &defaultValue=RDEFAULT_RCOLOR)
 
static bool getColorCorrection ()
 
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 getDefaultStyle ()
 
static QString getDesktopLocation ()
 
static double getDevicePixelRatio ()
 
static QString getDocumentsLocation ()
 
static double getDoubleValue (const QString &key, double defaultValue)
 
static QString getFileName ()
 
static bool getHideAttributeWithBlock ()
 
static bool getHighResolutionGraphicsView ()
 
static QString getHomeLocation ()
 
static QFont getInfoLabelFont ()
 
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 getOriginalArguments ()
 
static QString getOSVersion ()
 
static QString getPath ()
 
static int getPickRange ()
 
static QString getPluginPath ()
 
static QStringList getPluginPaths ()
 
static bool getPositionByMousePress ()
 
static int getPreviewEntities ()
 
static int getPreviousVersion ()
 
static QSettings * getQSettings ()
 
static int getQtVersion ()
 
static QString getQtVersionString ()
 
static QStringList getRecentFiles ()
 
static RColor getReferencePointColor ()
 
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 QFont getStatusBarFont ()
 
static QStringList getStringListValue (const QString &key, const QStringList &defaultValue)
 
static QString getStringValue (const QString &key, const QString &defaultValue)
 
static QString getTempLocation ()
 
static int getTextHeightThreshold ()
 
static bool getUseSecondarySelectionColor ()
 
static bool getUseSolidLineSelection ()
 
static QVariant getValue (const QString &key, const QVariant &defaultValue=RDEFAULT_QVARIANT)
 
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 ()
 
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 bool isXDataEnabled ()
 
static void loadTranslations (const QString &module, const QStringList &dirs=RDEFAULT_QSTRINGLIST)
 
static void removeRecentFile (const QString &fileName)
 
static void removeValue (const QString &key)
 
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 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 QString translate (const QString &context, const QString &str)
 
static void uninit ()
 

Static Private Member Functions

static bool isInitialized ()
 
static void shortenRecentFiles ()
 

Static Private Attributes

static int allowMouseMoveInterruptions = -1
 
static QString applicationNameOverride
 
static double arcAngleLengthThreshold = -1
 
static int autoScaleLinetypePattern = -1
 
static QVariantMap cache
 Copyright (c) 2011-2016 by Andrew Mustun. More...
 
static int concurrentDrawing = -1
 
static int darkGuiBackground = -1
 
static int dashThreshold = -1
 
static bool firstStart = false
 
static int hideAttributeWithBlock = -1
 
static int highResolutionGraphicsView = -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 QLocale * numberLocale = NULL
 
static QStringList originalArguments
 
static int pickRange = -1
 
static int positionByMousePress = -1
 
static int previewEntities = -1
 
static int previousVersion = 0
 
static QSettings * qSettings = NULL
 
static bool quitFlag = false
 
static QStringList recentFiles
 
static RColorreferencePointColor = 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 QFont * statusBarFont = NULL
 
static int textRenderedAsText = -1
 
static int useSecondarySelectionColor = -1
 
static int useSolidLineSelection = -1
 
static bool xDataEnabled = false
 
static int zeroWeightWeight = -1
 

Detailed Description

Scriptable:
This class is available in script environments.

Member Function Documentation

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.

void RSettings::clearRecentFiles ( )
static
QStringList RSettings::getAllKeys ( const QString &  group)
static
bool RSettings::getAllowMouseMoveInterruptions ( )
static
QString RSettings::getAppId ( )
static

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

QString RSettings::getApplicationPath ( )
static
double RSettings::getArcAngleLengthThreshold ( )
static
bool RSettings::getAutoScaleGrid ( )
static
bool RSettings::getAutoScaleLinetypePatterns ( )
static
bool RSettings::getAutoScaleMetaGrid ( )
static
bool RSettings::getAutoScalePatterns ( )
static
bool RSettings::getAutoZoomOnLoad ( )
static
bool RSettings::getBoolValue ( const QString &  key,
bool  defaultValue 
)
static
int RSettings::getBuildVersion ( )
static
QString RSettings::getCacheLocation ( )
static
RColor RSettings::getColor ( const QString &  key,
const RColor defaultValue = RDEFAULT_RCOLOR 
)
static
bool RSettings::getColorCorrection ( )
static
int RSettings::getColorThreshold ( )
static
RColor RSettings::getColorValue ( const QString &  key,
const RColor defaultValue 
)
static
QString RSettings::getCompilerVersion ( )
static
bool RSettings::getConcurrentDrawing ( )
static
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.
int RSettings::getDashThreshold ( )
static
QString RSettings::getDataLocation ( )
static
QString RSettings::getDefaultStyle ( )
static
QString RSettings::getDesktopLocation ( )
static
double RSettings::getDevicePixelRatio ( )
static
QString RSettings::getDocumentsLocation ( )
static
double RSettings::getDoubleValue ( const QString &  key,
double  defaultValue 
)
static
QString RSettings::getFileName ( )
static
bool RSettings::getHideAttributeWithBlock ( )
static
bool RSettings::getHighResolutionGraphicsView ( )
static
QString RSettings::getHomeLocation ( )
static
QFont RSettings::getInfoLabelFont ( )
static
int RSettings::getIntValue ( const QString &  key,
int  defaultValue 
)
static
QString RSettings::getLaunchPath ( )
static
bool RSettings::getLimitZoomAndScroll ( )
static
QString RSettings::getLocale ( )
static
int RSettings::getMajorVersion ( )
static
double RSettings::getMinArcAngleStep ( )
static
int RSettings::getMinorVersion ( )
static
int RSettings::getMouseThreshold ( )
static
QLocale RSettings::getNumberLocale ( )
static
QString RSettings::getNumericalVersionString ( )
static
QStringList RSettings::getOriginalArguments ( )
static
QString RSettings::getOSVersion ( )
static
QString RSettings::getPath ( )
static
Returns
Path where the configuration file is stored.
int RSettings::getPickRange ( )
static
QString RSettings::getPluginPath ( )
static
QStringList RSettings::getPluginPaths ( )
static
Returns
List of all plugin paths for application plugins and add on plugins in the application data location.
bool RSettings::getPositionByMousePress ( )
static
int RSettings::getPreviewEntities ( )
static
static int RSettings::getPreviousVersion ( )
inlinestatic
QSettings * RSettings::getQSettings ( )
static
int RSettings::getQtVersion ( )
static
QString RSettings::getQtVersionString ( )
static
QStringList RSettings::getRecentFiles ( )
static
RColor RSettings::getReferencePointColor ( )
static
QString RSettings::getReleaseDate ( )
static
QString RSettings::getRevisionString ( )
static
int RSettings::getRevisionVersion ( )
static
QFont RSettings::getRulerFont ( )
static
RColor RSettings::getSecondaryReferencePointColor ( )
static
bool RSettings::getSelectBlockWithAttribute ( )
static
RColor RSettings::getSelectionColor ( )
static
bool RSettings::getShowCrosshair ( )
static
bool RSettings::getShowLargeCrosshair ( )
static
bool RSettings::getShowLargeOriginAxis ( )
static
QFont RSettings::getSnapLabelFont ( )
static
int RSettings::getSnapRange ( )
static
QString RSettings::getStandardLocation ( int  sl)
static
QFont RSettings::getStatusBarFont ( )
static
QStringList RSettings::getStringListValue ( const QString &  key,
const QStringList &  defaultValue 
)
static
QString RSettings::getStringValue ( const QString &  key,
const QString &  defaultValue 
)
static
QString RSettings::getTempLocation ( )
static
int RSettings::getTextHeightThreshold ( )
static
bool RSettings::getUseSecondarySelectionColor ( )
static
bool RSettings::getUseSolidLineSelection ( )
static
QVariant RSettings::getValue ( const QString &  key,
const QVariant &  defaultValue = RDEFAULT_QVARIANT 
)
static
QString RSettings::getVersionString ( )
static
int RSettings::getZeroWeightWeight ( )
static
bool RSettings::hasApplicationNameOverride ( )
static
bool RSettings::hasCustomStyleSheet ( )
static
bool RSettings::hasDarkGuiBackground ( )
static
bool RSettings::hasQuitFlag ( )
static
bool RSettings::hasValue ( const QString &  key)
static
void RSettings::initRecentFiles ( )
static
bool RSettings::isDebuggerEnabled ( )
static
bool RSettings::isDeployed ( )
static
static bool RSettings::isFirstStart ( )
inlinestatic
bool RSettings::isGuiEnabled ( )
static
bool RSettings::isInitialized ( )
staticprivate
bool RSettings::isLayer0CompatibilityOn ( )
static
static bool RSettings::isNewVersion ( )
inlinestatic
bool RSettings::isNextVersionEnabled ( )
static
bool RSettings::isQt ( int  majorVersion)
static
bool RSettings::isTextRenderedAsText ( )
static
bool RSettings::isXDataEnabled ( )
static
void RSettings::loadTranslations ( const QString &  module,
const QStringList &  dirs = RDEFAULT_QSTRINGLIST 
)
static
void RSettings::removeRecentFile ( const QString &  fileName)
static
void RSettings::removeValue ( const QString &  key)
static
void RSettings::resetCache ( )
static
void RSettings::setApplicationNameOverride ( const QString &  n)
static

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

QCAD3).

void RSettings::setConcurrentDrawing ( bool  on)
static
static void RSettings::setFirstStart ( bool  on)
inlinestatic
void RSettings::setLaunchPath ( const QString &  launchPath)
static
static void RSettings::setNewVersion ( bool  on)
inlinestatic
void RSettings::setNextVersionEnabled ( bool  on)
static
void RSettings::setOriginalArguments ( const QStringList &  a)
static
static void RSettings::setPreviousVersion ( int  pv)
inlinestatic
void RSettings::setQuitFlag ( )
static
void RSettings::setRulerFont ( const QFont &  font)
static
void RSettings::setShowCrosshair ( bool  on)
static
void RSettings::setShowLargeCrosshair ( bool  on)
static
void RSettings::setShowLargeOriginAxis ( bool  on)
static
void RSettings::setSnapLabelFont ( const QFont &  font)
static
void RSettings::setValue ( const QString &  key,
const QVariant &  value,
bool  overwrite = true 
)
static
void RSettings::setXDataEnabled ( bool  on)
static
void RSettings::shortenRecentFiles ( )
staticprivate
QString RSettings::translate ( const QString &  context,
const QString &  str 
)
static
void RSettings::uninit ( )
static

Member Data Documentation

int RSettings::allowMouseMoveInterruptions = -1
staticprivate
QString RSettings::applicationNameOverride
staticprivate
double RSettings::arcAngleLengthThreshold = -1
staticprivate
int RSettings::autoScaleLinetypePattern = -1
staticprivate
QVariantMap RSettings::cache
staticprivate

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

int RSettings::concurrentDrawing = -1
staticprivate
int RSettings::darkGuiBackground = -1
staticprivate
int RSettings::dashThreshold = -1
staticprivate
bool RSettings::firstStart = false
staticprivate
int RSettings::hideAttributeWithBlock = -1
staticprivate
int RSettings::highResolutionGraphicsView = -1
staticprivate
QFont * RSettings::infoLabelFont = NULL
staticprivate
QString RSettings::launchPath
staticprivate
int RSettings::layer0CompatibilityOn = -1
staticprivate
int RSettings::limitZoomAndScroll = -1
staticprivate
double RSettings::minArcAngleStep = -1
staticprivate
int RSettings::mouseThreshold = -1
staticprivate
bool RSettings::newVersion = false
staticprivate
bool RSettings::nextVersionEnabled = false
staticprivate
QLocale * RSettings::numberLocale = NULL
staticprivate
QStringList RSettings::originalArguments
staticprivate
int RSettings::pickRange = -1
staticprivate
int RSettings::positionByMousePress = -1
staticprivate
int RSettings::previewEntities = -1
staticprivate
int RSettings::previousVersion = 0
staticprivate
QSettings * RSettings::qSettings = NULL
staticprivate
bool RSettings::quitFlag = false
staticprivate
QStringList RSettings::recentFiles
staticprivate
RColor * RSettings::referencePointColor = NULL
staticprivate
QFont * RSettings::rulerFont = NULL
staticprivate
RColor * RSettings::secondaryReferencePointColor = NULL
staticprivate
int RSettings::selectBlockWithAttribute = -1
staticprivate
RColor * RSettings::selectionColor = NULL
staticprivate
int RSettings::showCrosshair = -1
staticprivate
int RSettings::showLargeCrosshair = -1
staticprivate
int RSettings::showLargeOriginAxis = -1
staticprivate
QFont * RSettings::snapLabelFont = NULL
staticprivate
int RSettings::snapRange = -1
staticprivate
QFont * RSettings::statusBarFont = NULL
staticprivate
int RSettings::textRenderedAsText = -1
staticprivate
int RSettings::useSecondarySelectionColor = -1
staticprivate
int RSettings::useSolidLineSelection = -1
staticprivate
bool RSettings::xDataEnabled = false
staticprivate
int RSettings::zeroWeightWeight = -1
staticprivate

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