class Configuration : public 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


language – - a string represents the name of a locale language


true on success

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)
inline int getInterfaceTheme()
const CutterInterfaceTheme *getCurrentTheme()
QSyntaxHighlighter *createSyntaxHighlighter(QTextDocument *document)
QString getRecentFolder()
void setRecentFolder(const QString &dir)
void setNewFileLastClicked(int lastClicked)

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



int getNewFileLastClicked()
QString getLogoFile()
void resetToDefaultAsmOptions()
inline QString getColorTheme() const
void setColorTheme(const QString &theme)
void adjustColorThemeDarkness()

Change current color theme if it doesn’t much native theme’s darkness.

int colorThemeDarkness(const QString &colorTheme) const
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 Rizin 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 Rizin or settings, depending on the key.

Configuration::setConfig Set Rizin 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.

QString getSelectedDecompiler()

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

void setSelectedDecompiler(const QString &id)
bool getDecompilerAutoRefreshEnabled()
void setDecompilerAutoRefreshEnabled(bool enabled)
void enableDecompilerAnnotationHighlighter(bool useDecompilerHighlighter)
bool isDecompilerAnnotationHighlighterEnabled()
inline int getGraphBlockMaxChars() const
inline void setGraphBlockMaxChars(int ch)
inline int getGraphMinFontSize() const
inline void setGraphMinFontSize(int sz)
inline bool getGraphPreview()

Get the boolean setting for preview in Graph.


True if preview checkbox is checked, false otherwise

inline void setGraphPreview(bool checked)

Set the boolean setting for preview in Graph.


checked – is a boolean that represents the preview checkbox

bool getBitmapTransparentState()

Getters and setters for the transaparent option state and scale factor for bitmap graph exports.

double getBitmapExportScaleFactor()
void setBitmapTransparentState(bool inputValueGraph)
void setBitmapExportScaleFactor(double inputValueGraph)
void setGraphSpacing(QPoint blockSpacing, QPoint edgeSpacing)
QPoint getGraphBlockSpacing()
QPoint getGraphEdgeSpacing()
bool getGraphBlockEntryOffset()

Gets whether the entry offset of each block has to be displayed or not.


true if the entry offset has to be displayed, false otherwise

void setGraphBlockEntryOffset(bool enabled)

Enable or disable the displaying of the entry offset in each graph block.


enabled – set this to true for displaying the entry offset in each graph block, false otherwise

void setOutputRedirectionEnabled(bool enabled)

Enable or disable Cutter output redirection. Output redirection state can only be changed early during Cutter initialization. Changing it later will have no effect.


enabled – set this to false for disabling output redirection

bool getOutputRedirectionEnabled() const
void setPreviewValue(bool checked)
bool getPreviewValue() const
void setShowVarTooltips(bool enabled)

Show tooltips for known values of registers, variables, and memory when debugging.

bool getShowVarTooltips() const
QStringList getRecentFiles() const

Recently opened binaries, as shown in NewFileDialog.

void setRecentFiles(const QStringList &list)
QStringList getRecentProjects() const

Recently opened projects, as shown in NewFileDialog.

void setRecentProjects(const QStringList &list)
void addRecentProject(QString file)
QString getFunctionsWidgetLayout()

Get the layout of the Functions widget.


The layout.

void setFunctionsWidgetLayout(const QString &layout)

Set the layout of the Functions widget.


layout – The layout of the Functions widget, either horizontal or vertical.

Public Slots

void refreshFont()


void fontsUpdated()
void colorsUpdated()
void interfaceThemeChanged()

Public Static Functions

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

Public Static Attributes

static const QHash<QString, ColorFlags> relevantThemes = {{"ayu", DarkFlag}, {"basic", DarkFlag}, {"behelit", DarkFlag}, {"bold", DarkFlag}, {"bright", DarkFlag}, {"consonance", DarkFlag}, {"darkda", DarkFlag}, {"defragger", DarkFlag}, {"focus", DarkFlag}, {"gentoo", DarkFlag}, {"lima", DarkFlag}, {"monokai", DarkFlag}, {"ogray", DarkFlag}, {"onedark", DarkFlag}, {"pink", DarkFlag}, {"rasta", DarkFlag}, {"sepia", DarkFlag}, {"smyck", DarkFlag}, {"solarized", DarkFlag}, {"twilight", DarkFlag}, {"white2", DarkFlag}, {"xvilka", DarkFlag}, {"zenburn", DarkFlag}, {"cga", LightFlag}, {"cutter", LightFlag}, {"dark", LightFlag}, {"gb", LightFlag}, {"matrix", LightFlag}, {"tango", LightFlag}, {"white", LightFlag}}
static const QHash<QString, QHash<ColorFlags, QColor>> cutterOptionColors