class Configuration

Inherits from QObject

Public Functions

void loadInitial()
void resetAll()
bool getAutoUpdateEnabled() const
void setAutoUpdateEnabled(bool au)
QLocale getCurrLocale() const

get the current Locale set in Cutter’s user configuration

a QLocale object describes user’s current locale

void setLocale(const QLocale &l)

sets Cutter’s locale

  • l: - a QLocale object describes the locate to configure

bool setLocaleByName(const QString &language)

set Cutter’s interface language by a given locale name

true on success
  • language: - a string represents the name of a locale language

QStringList getAvailableTranslations()

this function will gather and return available translation for Cutter

a list of all available translations

const QFont getBaseFont() const

Gets the configured font set by the font selection box.

the configured font

const QFont getFont() const

Gets the configured font with the point size adjusted by the configured zoom level (minimum of 10%)

the configured font size adjusted by zoom level

void setFont(const QFont &font)
qreal getZoomFactor() const
void setZoomFactor(qreal zoom)
bool windowColorIsDark()
void setLastThemeOf(const CutterInterfaceTheme &currInterfaceTheme, const QString &theme)
QString getLastThemeOf(const CutterInterfaceTheme &currInterfaceTheme) const
void setInterfaceTheme(int theme)
int getInterfaceTheme()
const CutterInterfaceTheme *getCurrentTheme()
QSyntaxHighlighter *createSyntaxHighlighter(QTextDocument *document)
QString getDirProjects()
void setDirProjects(const QString &dir)
QString getRecentFolder()
void setRecentFolder(const QString &dir)
void setNewFileLastClicked(int lastClicked)

Configuration::setFilesTabLastClicked Set the new file dialog last clicked tab.

  • lastClicked:

int getNewFileLastClicked()
QString getLogoFile()
void resetToDefaultAsmOptions()
int getGraphBlockMaxChars() const
void setGraphBlockMaxChars(int ch)
QString getColorTheme() const
void setColorTheme(const QString &theme)
void setColor(const QString &name, const QColor &color)

Configuration::setColor sets the local Cutter configuration color.

  • name: Color Name
  • color: The color you want to set

const QColor getColor(const QString &name) const
QVariant getConfigVar(const QString &key)

Get the value of a config var either from r2 or settings, depending on the key.

bool getConfigBool(const QString &key)
int getConfigInt(const QString &key)
QString getConfigString(const QString &key)
void setConfig(const QString &key, const QVariant &value)

Set the value of a config var either to r2 or settings, depending on the key.

Configuration::setConfig Set radare2 configuration value (e.g. “asm.lines”)

  • key:
  • value:

bool isFirstExecution()

check if this is the first time Cutter’s is executed on this computer

true if this is first execution; otherwise returns false.

QStringList getTranslationsDirectories() const

Get list of available translation directories (depends on configuration and OS)

list of directories

QString getSelectedDecompiler()

id of the last selected decompiler (see CutterCore::getDecompilerById)

void setSelectedDecompiler(const QString &id)
bool getDecompilerAutoRefreshEnabled()
void setDecompilerAutoRefreshEnabled(bool enabled)


signal Configuration::fontsUpdated
signal Configuration::colorsUpdated
signal Configuration::interfaceThemeChanged

Public Static Functions

const QList<CutterInterfaceTheme> &cutterInterfaceThemesList()
Configuration *instance()
bool nativeWindowIsDark()

Public Static Attributes

const QHash<QString, ColorFlags> relevantThemes = { { "ayu", DarkFlag }, { "consonance", DarkFlag }, { "darkda", DarkFlag }, { "onedark", DarkFlag }, { "solarized", DarkFlag }, { "zenburn", DarkFlag }, { "cutter", LightFlag }, { "dark", LightFlag }, { "matrix", LightFlag }, { "tango", LightFlag }, { "white", LightFlag } }
const QHash<QString, QHash<ColorFlags, QColor>> cutterOptionColors