#include "gui-settings.h"
Public Member Functions | |
gui_settings (const gui_settings &)=delete | |
gui_settings (const QString &file_name, QSettings::Format format, QObject *parent=nullptr) | |
gui_settings (QSettings::Format format, QSettings::Scope scope, const QString &organization, const QString &application=QString(), QObject *parent=nullptr) | |
~gui_settings (void)=default | |
QColor | color_value (const gui_pref &pref, int mode=0) const |
QColor | get_color_value (const QVariant &def, int mode=0) const |
gui_settings & | operator= (const gui_settings &)=delete |
QKeySequence | sc_def_value (const sc_pref &pref) const |
QString | sc_value (const sc_pref &pref) const |
void | set_color_value (const gui_pref &pref, const QColor &color, int mode=0) |
QVariant | value (const gui_pref &pref) const |
Definition at line 37 of file gui-settings.h.
|
inline |
Definition at line 43 of file gui-settings.h.
|
inline |
Definition at line 48 of file gui-settings.h.
|
delete |
|
default |
QColor gui_settings::color_value | ( | const gui_pref & | pref, |
int | mode = 0 |
||
) | const |
Reading a color from the gui_settings taking possible color modes into account. The default value for a second color mode mode=1
is deterimined from the standard default value mode=0
by inverting the lightness (see get_color_value())
pref | gui preference (key string, default value); the default value can be given by QColor or QPalette::ColorRole |
mode | Color mode (currently 0 or 1, default is 0) |
Definition at line 69 of file gui-settings.cc.
References gui_pref::def, get_color_value(), gui_pref::key, settings_color_modes_ext(), and value().
QColor gui_settings::get_color_value | ( | const QVariant & | def, |
int | mode = 0 |
||
) | const |
Reading a color from the given QVaraitn def
taking different color modes into account. The default value for a second color mode mode=1
is deterimined from the standard default value mode=0
by inverting the lightness
def | Color default value given by a QVariant of QColor or QPalette::ColorRole |
mode | Color mode (currently 0 or 1, default is 0) |
Definition at line 37 of file gui-settings.cc.
References settings_color_no_change(), and value().
Referenced by color_value().
|
delete |
QKeySequence gui_settings::sc_def_value | ( | const sc_pref & | pref | ) | const |
Definition at line 96 of file gui-settings.cc.
References sc_pref::def, and sc_pref::def_std.
Referenced by sc_value().
QString gui_settings::sc_value | ( | const sc_pref & | pref | ) | const |
Definition at line 87 of file gui-settings.cc.
References sc_pref::key, sc_def_value(), sc_group(), and value().
void gui_settings::set_color_value | ( | const gui_pref & | pref, |
const QColor & | color, | ||
int | mode = 0 |
||
) |
Writing a color to the gui_settings taking possible color modes into account. When mode
is not zero (standard mode), the extension related to the mode is appended to the settings key string
pref | gui preference where the color should be written |
color | QColor to write to the settings |
mode | Color mode (currently 0 or 1, default is 0) |
Definition at line 77 of file gui-settings.cc.
References gui_pref::key, m, and settings_color_modes_ext().
|
inline |
Definition at line 65 of file gui-settings.h.
References gui_pref::def, gui_pref::ignore, and gui_pref::key.
Referenced by resource_manager::resource_manager(), color_value(), resource_manager::combo_encoding(), resource_manager::config_icon_theme(), resource_manager::config_translators(), get_color_value(), find_dialog::restore_settings(), sc_value(), resource_manager::update_network_settings(), and resource_manager::update_settings_key().