ColorThemeWorker¶
-
class
ColorThemeWorker
: public QObject¶ The ColorThemeWorker class is a singletone that provides API for working with color themes.
Public Functions
-
~ColorThemeWorker
()¶
-
QString
copy
(const QString &srcThemeName, const QString ©ThemeName) 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 successful.
-
QStringList
customThemes
() const¶ Returns list of all custom themes.
Public Members
-
const QStringList
rizinSpecificOptions
= Core()->cmdj("ecj").object().keys()¶ rizinSpecificOptions is list of all available Rizin-only color options.
Public Static Functions
-
ColorThemeWorker &
instance
()¶
Public Static Attributes
-
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.
-
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.
-