ColorThemeWorker

class ColorThemeWorker

The ColorThemeWorker class is a singletone that provides API for working with color themes.

Public Functions

virtual ~ColorThemeWorker()
QString copy(const QString &srcThemeName, const QString &copyThemeName) const

Copies srcThemeName with name copyThemeName.

Return
“” on success or error message.
Parameters
  • srcThemeName -

    Name of theme to be copied.

  • copyThemeName -

    Name of copy.

QString save(const QJsonDocument &theme, const QString &themeName) const

Saves theme as themeName theme.

Return
“” on success or error message.
Parameters
  • theme -

    Theme to be saved.

  • themeName -

    Name of theme to save.

bool isCustomTheme(const QString &themeName) const

Returns whether or not themeName theme is custom (created by user or imported) or not.

Parameters
  • themeName -

    Name of theme to check.

bool isThemeExist(const QString &name) const

Returns whether or not name theme already exists.

Return
true if theme exists, false - if not.

QJsonDocument getTheme(const QString &themeName) const

Returns theme as Json where key is option name and value is array of 3 Ints (Red, Green, Blue).

Parameters
  • themeName -

    Theme to get.

QString deleteTheme(const QString &themeName) const

Deletes theme named themeName.

Return
“” on success or error message.
Parameters
  • themeName -

    Name of theme to be removed.

QString importTheme(const QString &file) const

Imports theme from file.

Return
“” on success or error message.

QString renameTheme(const QString &themeName, const QString &newName) const

Renames theme from themeName to newName.

Return
“” on success or error message.

bool isFileTheme(const QString &filePath, bool *ok) const

Returns whether or not file at filePath is a color theme.

Return
true if given file is color theme and ok == true, otherwise returns false.
Parameters
  • filePath -

    Path to file to check.

  • ok -

    Output parameter. Indicates wheter or not check was successfull.

QStringList customThemes() const

Returns list of all custom themes.

Public Members

const QStringList radare2SpecificOptions

radare2SpecificOptions is list of all available radare2-only color options.

Public Static Functions

static ColorThemeWorker &instance()

Public Static Attributes

const QStringList cutterSpecificOptions

cutterSpecificOptions is list of all available Cutter-only color options.

const QStringList radare2UnusedOptions

radare2UnusedOptions is a list of all radare2 options that Cutter does not use.