#include "resource-manager.h"
Public Member Functions | |
resource_manager (const resource_manager &)=delete | |
resource_manager (void) | |
~resource_manager () | |
void | combo_encoding (QComboBox *combo, const QString ¤t=QString()) |
void | config_translators (QTranslator *qt_tr, QTranslator *qsci_tr, QTranslator *gui_tr) |
QPointer< QTemporaryFile > | create_tmp_file (const QString &extension=QString(), const QString &contents=QString()) |
void | get_codecs (QStringList *codecs) |
QString | get_default_font_family (void) |
gui_settings * | get_default_settings (void) const |
QString | get_gui_translation_dir (void) |
gui_settings * | get_settings (void) const |
QString | get_settings_directory (void) |
QString | get_settings_file (void) |
QIcon | icon (const QString &icon_name, bool fallback=true) |
bool | is_first_run (void) const |
resource_manager & | operator= (const resource_manager &)=delete |
void | reload_settings (void) |
void | remove_tmp_file (QPointer< QTemporaryFile > tmp_file) |
void | set_settings (const QString &file) |
void | update_network_settings (void) |
bool | update_settings_key (const QString &new_key, const QString &old_key) |
Private Attributes | |
gui_settings * | m_default_settings |
gui_settings * | m_settings |
QString | m_settings_directory |
QString | m_settings_file |
QList< QTemporaryFile * > | m_temporary_files |
Definition at line 39 of file resource-manager.h.
octave::resource_manager::resource_manager | ( | void | ) |
Definition at line 79 of file resource-manager.cc.
References m_default_settings, m_settings_directory, m_settings_file, and octave::gui_settings::value().
|
delete |
octave::resource_manager::~resource_manager | ( | void | ) |
Definition at line 133 of file resource-manager.cc.
References m_default_settings, m_settings, m_temporary_files, and remove_tmp_file().
void octave::resource_manager::combo_encoding | ( | QComboBox * | combo, |
const QString & | current = QString () |
||
) |
Definition at line 446 of file resource-manager.cc.
References gui_pref::def, ed_default_enc(), get_codecs(), m_settings, octave_locale_charset_wrapper(), and octave::gui_settings::value().
Referenced by octave::settings_dialog::settings_dialog(), and octave::file_editor_tab::handle_decode_warning_answer().
void octave::resource_manager::config_translators | ( | QTranslator * | qt_tr, |
QTranslator * | qsci_tr, | ||
QTranslator * | gui_tr | ||
) |
Definition at line 151 of file resource-manager.cc.
References gui_pref::def, get_gui_translation_dir(), global_language(), gui_pref::key, m_settings, and octave::gui_settings::value().
Referenced by octave::base_qobject::config_translators().
QPointer< QTemporaryFile > octave::resource_manager::create_tmp_file | ( | const QString & | extension = QString () , |
const QString & | contents = QString () |
||
) |
Definition at line 505 of file resource-manager.cc.
References m_temporary_files.
Referenced by octave::octave_qscintilla::contextmenu_run().
void octave::resource_manager::get_codecs | ( | QStringList * | codecs | ) |
Definition at line 425 of file resource-manager.cc.
References octave_locale_charset_wrapper().
Referenced by combo_encoding().
QString octave::resource_manager::get_default_font_family | ( | void | ) |
Definition at line 219 of file resource-manager.cc.
References gui_pref::def, QtHandles::Utils::fromStdString(), octave::sys::env::getenv(), global_font_family, and global_mono_font().
Referenced by reload_settings().
gui_settings * octave::resource_manager::get_default_settings | ( | void | ) | const |
Definition at line 204 of file resource-manager.cc.
References m_default_settings.
QString octave::resource_manager::get_gui_translation_dir | ( | void | ) |
Definition at line 142 of file resource-manager.cc.
References QtHandles::Utils::fromStdString(), octave::sys::env::getenv(), and octave::config::oct_locale_dir().
Referenced by octave::settings_dialog::settings_dialog(), and config_translators().
gui_settings * octave::resource_manager::get_settings | ( | void | ) | const |
Definition at line 199 of file resource-manager.cc.
References m_settings.
Referenced by octave::documentation::documentation(), octave::dw_main_window::dw_main_window(), octave::file_editor_tab::file_editor_tab(), octave::FileDialog::FileDialog(), octave::files_dock_widget::files_dock_widget(), octave::find_files_dialog::find_files_dialog(), octave::main_window::main_window(), octave::octave_dock_widget::octave_dock_widget(), octave::set_path_dialog::set_path_dialog(), octave::settings_dialog::settings_dialog(), octave::terminal_dock_widget::terminal_dock_widget(), octave::workspace_view::workspace_view(), octave::welcome_wizard::accept(), octave::find_files_dialog::browse_folders(), octave::main_window::browse_for_directory(), annotation_dialog::button_clicked(), octave::file_editor::call_custom_editor(), octave::file_editor::closeEvent(), octave::octave_qscintilla::comment_string(), octave::main_window::confirm_shutdown(), octave::history_dock_widget::construct(), octave::file_editor::construct(), octave::octave_qscintilla::contextmenu_run(), octave::octave_qscintilla::ctx_menu_run_finished(), octave::file_editor_tab::detect_eol_mode(), octave::files_dock_widget::display_directory(), octave::file_editor_tab::do_comment_selected_text(), octave::main_window::do_reset_windows(), octave::variable_editor::edit_variable(), octave::file_editor::empty_script(), octave::external_editor_interface::external_editor(), octave::main_window::focus_console_after_command(), octave::settings_dialog::get_dir(), octave::file_editor::handle_enter_debug_mode(), octave::main_window::handle_load_workspace_request(), octave::main_window::handle_octave_ready(), octave::main_window::handle_save_workspace_request(), octave::file_editor::handle_visibility(), octave::workspace_view::header_contextmenu_requested(), octave::files_dock_widget::headercontextmenu_requested(), octave::shortcut_manager::import_export(), annotation_dialog::init(), octave::shortcut_manager::init(), octave::shortcut_manager::init_data(), octave::main_window::load_and_display_community_news(), octave::octave_dock_widget::make_widget(), octave::file_editor::mru_menu_update(), octave::file_editor_tab::new_file(), octave::files_dock_widget::popdownmenu_search_dir(), octave::news_reader::process(), octave::main_window::read_settings(), octave::main_window::request_new_function(), octave::file_editor::request_open_file(), octave::main_window::request_open_file(), octave::main_window::request_reload_settings(), octave::main_window::restore_create_file_setting(), octave::find_dialog::restore_settings(), octave::variable_editor_stack::save(), octave::file_editor_tab::save_file_as(), octave::file_editor::save_session(), octave::find_dialog::save_settings(), octave::files_dock_widget::save_settings(), octave::find_files_dialog::save_settings(), octave::history_dock_widget::save_settings(), octave::octave_dock_widget::save_settings(), octave::set_path_dialog::save_settings(), octave::workspace_view::save_settings(), octave::shortcut_manager::set_shortcut(), octave::workspace_view::setModel(), octave::shortcut_manager::shortcut(), octave::settings_dialog::show_tab(), octave::files_dock_widget::toggle_header(), octave::workspace_view::toggle_header(), octave::file_editor::toggle_preference(), octave::file_editor_tab::update_lexer_settings(), octave::settings_dialog::write_changed_settings(), and octave::main_window::write_settings().
QString octave::resource_manager::get_settings_directory | ( | void | ) |
Definition at line 209 of file resource-manager.cc.
References m_settings_directory.
Referenced by set_settings().
QString octave::resource_manager::get_settings_file | ( | void | ) |
Definition at line 214 of file resource-manager.cc.
References m_settings_file.
Referenced by octave::initial_page::initial_page(), and set_settings().
QIcon octave::resource_manager::icon | ( | const QString & | icon_name, |
bool | fallback = true |
||
) |
Definition at line 409 of file resource-manager.cc.
References global_icon_theme(), m_settings, and octave::gui_settings::value().
Referenced by octave::documentation::documentation(), octave::dw_main_window::dw_main_window(), octave::files_dock_widget::files_dock_widget(), octave::find_files_dialog::find_files_dialog(), octave::variable_editor_view::add_edit_actions(), octave::variable_dock_widget::change_floating(), octave::variable_dock_widget::change_fullscreen(), QTerminal::construct(), octave::file_editor::construct(), octave::main_window::construct_debug_menu_item(), octave::main_window::construct_edit_menu(), octave::main_window::construct_file_menu(), octave::main_window::construct_new_menu(), octave::documentation::construct_tool_bar(), octave::main_window::construct_tool_bar(), octave::variable_editor::construct_tool_bar(), octave::files_dock_widget::contextmenu_requested(), octave::history_dock_widget::ctxMenu(), QtHandles::ToolBarButton< T >::get_icon(), octave::file_editor::handle_file_name_changed(), and QtHandles::Canvas::make_cursor().
bool octave::resource_manager::is_first_run | ( | void | ) | const |
Definition at line 367 of file resource-manager.cc.
References m_settings_file.
Referenced by octave::main_window::main_window().
|
delete |
void octave::resource_manager::reload_settings | ( | void | ) |
Definition at line 265 of file resource-manager.cc.
References octave::default_qt_settings_file(), QtHandles::Utils::fromStdString(), get_default_font_family(), octave::sys::env::getenv(), global_mono_font(), gui_pref::key, m_settings, m_settings_directory, m_settings_file, and set_settings().
Referenced by octave::cli_qobject::cli_qobject(), octave::main_window::main_window(), and octave::welcome_wizard::accept().
void octave::resource_manager::remove_tmp_file | ( | QPointer< QTemporaryFile > | tmp_file | ) |
Definition at line 532 of file resource-manager.cc.
References m_temporary_files.
Referenced by ~resource_manager(), and octave::octave_qscintilla::ctx_menu_run_finished().
void octave::resource_manager::set_settings | ( | const QString & | file | ) |
Definition at line 330 of file resource-manager.cc.
References get_settings_directory(), get_settings_file(), and m_settings.
Referenced by reload_settings().
void octave::resource_manager::update_network_settings | ( | void | ) |
Definition at line 372 of file resource-manager.cc.
References gui_pref::def, global_proxy_host(), global_proxy_pass(), global_proxy_port(), global_proxy_type(), global_proxy_user(), global_use_proxy(), gui_pref::key, m_settings, and octave::gui_settings::value().
Referenced by octave::main_window::main_window(), and octave::main_window::notice_settings().
bool octave::resource_manager::update_settings_key | ( | const QString & | new_key, |
const QString & | old_key | ||
) |
Definition at line 353 of file resource-manager.cc.
References m_settings, and octave::gui_settings::value().
Referenced by octave::octave_dock_widget::set_focus_predecessor().
|
private |
Definition at line 102 of file resource-manager.h.
Referenced by resource_manager(), ~resource_manager(), and get_default_settings().
|
private |
Definition at line 100 of file resource-manager.h.
Referenced by ~resource_manager(), combo_encoding(), config_translators(), get_settings(), icon(), reload_settings(), set_settings(), update_network_settings(), and update_settings_key().
|
private |
Definition at line 96 of file resource-manager.h.
Referenced by resource_manager(), get_settings_directory(), and reload_settings().
|
private |
Definition at line 98 of file resource-manager.h.
Referenced by resource_manager(), get_settings_file(), is_first_run(), and reload_settings().
|
private |
Definition at line 104 of file resource-manager.h.
Referenced by ~resource_manager(), create_tmp_file(), and remove_tmp_file().