ColorThemeWorker
class ColorThemeWorker : public QObject
The ColorThemeWorker class is a singletone that provides API for working with color themes.
Public Functions
inline virtual ~ColorThemeWorker()
QString copy(const QString &srcThemeName, const QString ©ThemeName) const
Copies srcThemeName with name copyThemeName.
Parameters
srcThemeName – Name of theme to be copied.
copyThemeName – Name of copy.
Returns
“” on success or error message.
QString save(const QJsonDocument &theme, const QString &themeName) const
Saves theme as themeName theme.
Parameters
theme – Theme to be saved.
themeName – Name of theme to save.
Returns
“” on success or error message.
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.
Returns
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.
Parameters
themeName – Name of theme to be removed.
Returns
“” on success or error message.
QString importTheme(const QString &file) const
Imports theme from file.
Returns
“” on success or error message.
QString renameTheme(const QString &themeName, const QString &newName) const
Renames theme from themeName to newName.
Returns
“” on success or error message.
bool isFileTheme(const QString &filePath, bool *ok) const
Returns whether or not file at filePath is a color theme.
Parameters
filePath – Path to file to check.
ok – Output parameter. Indicates wheter or not check was successful.
Returns
true if given file is color theme and ok == true, otherwise returns false.
QStringList customThemes() const
Returns list of all custom themes.
inline QString getStandardThemesPath()
inline QString getCustomThemesPath()
const QStringList &getRizinSpecificOptions()
Public Static Functions
- static inline ColorThemeWorker &instance()
Public Static Attributes
static const QStringList cutterSpecificOptions = {“wordHighlight”, “lineHighlight”, “gui.main”, “gui.imports”, “highlightPC”, “gui.navbar.err”, “gui.navbar.seek”, “gui.navbar.pc”, “gui.navbar.sym”, “gui.dataoffset”, “gui.navbar.code”, “gui.navbar.empty”, “angui.navbar.str”, “gui.disass_selected”, “gui.breakpoint_background”, “gui.overview.node”, “gui.overview.fill”, “gui.overview.border”, “gui.border”, “gui.background”, “gui.alt_background”, “gui.disass_selected”}
cutterSpecificOptions is list of all available Cutter-only color options.
static const QStringList rizinUnusedOptions = {“linehl”, “wordhl”, “graph.box”, “graph.box2”, “graph.box3”, “graph.box4”, “graph.current”, “graph.box2”, “widget_sel”, “widget_bg”, “label”, “ai.write”, “invalid”, “ai.seq”, “args”, “ai.read”, “ai.exec”, “ai.ascii”, “prompt”, “graph.traced”}
rizinUnusedOptions is a list of all Rizin options that Cutter does not use.