GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
resource_manager Class Reference

#include "resource-manager.h"

Inheritance diagram for resource_manager:
Collaboration diagram for resource_manager:

Public Member Functions

 resource_manager (const resource_manager &)=delete
 
 resource_manager (void)
 
 ~resource_manager ()
 
void combo_encoding (QComboBox *combo, const QString &current=QString())
 
void config_icon_theme (void)
 
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)
 
QStringList get_default_font (void)
 
QString get_default_font_family (void)
 
gui_settingsget_default_settings (void) const
 
QString get_gui_translation_dir (void)
 
gui_settingsget_settings (void) const
 
QString get_settings_directory (void)
 
QString get_settings_file (void)
 
int get_valid_lexer_styles (QsciLexer *lexer, int *styles)
 
QIcon icon (const QString &icon_name, bool octave_only=false, const QString &icon_alt_name=QString())
 
bool is_first_run (void) const
 
resource_manageroperator= (const resource_manager &)=delete
 
void read_lexer_settings (QsciLexer *lexer, gui_settings *settings, int mode=0, int def=0)
 
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 Member Functions

QFont copy_font_attributes (const QFont &attr, const QFont &base) const
 

Private Attributes

gui_settingsm_default_settings
 
QStringList m_icon_fallbacks
 
gui_settingsm_settings
 
QString m_settings_directory
 
QString m_settings_file
 
QList< QTemporaryFile * > m_temporary_files
 

Detailed Description

Definition at line 42 of file resource-manager.h.

Constructor & Destructor Documentation

◆ resource_manager() [1/2]

resource_manager::resource_manager ( void  )

Definition at line 66 of file resource-manager.cc.

References gui_settings::value().

◆ resource_manager() [2/2]

resource_manager::resource_manager ( const resource_manager )
delete

◆ ~resource_manager()

resource_manager::~resource_manager ( void  )

Member Function Documentation

◆ combo_encoding()

void resource_manager::combo_encoding ( QComboBox *  combo,
const QString &  current = QString () 
)

◆ config_icon_theme()

◆ config_translators()

void resource_manager::config_translators ( QTranslator *  qt_tr,
QTranslator *  qsci_tr,
QTranslator *  gui_tr 
)

◆ copy_font_attributes()

QFont resource_manager::copy_font_attributes ( const QFont &  attr,
const QFont &  base 
) const
private

Copys the attributes bold, italic and underline from QFont attr to the font base and returns the result without changing base,

Parameters
attrQFont with the desired attributes
baseQFont with desired family and size

Definition at line 411 of file resource-manager.cc.

Referenced by read_lexer_settings().

◆ create_tmp_file()

QPointer< QTemporaryFile > resource_manager::create_tmp_file ( const QString &  extension = QString (),
const QString &  contents = QString () 
)

◆ get_codecs()

void resource_manager::get_codecs ( QStringList *  codecs)

Definition at line 677 of file resource-manager.cc.

References octave_locale_charset_wrapper().

Referenced by combo_encoding().

◆ get_default_font()

QStringList resource_manager::get_default_font ( void  )

◆ get_default_font_family()

QString resource_manager::get_default_font_family ( void  )

Definition at line 278 of file resource-manager.cc.

References gui_pref::def, Utils::fromStdString(), and global_mono_font().

Referenced by get_default_font(), and reload_settings().

◆ get_default_settings()

gui_settings * resource_manager::get_default_settings ( void  ) const

Definition at line 250 of file resource-manager.cc.

References m_default_settings.

◆ get_gui_translation_dir()

QString resource_manager::get_gui_translation_dir ( void  )

◆ get_settings()

gui_settings * resource_manager::get_settings ( void  ) const

Definition at line 232 of file resource-manager.cc.

References m_settings.

Referenced by documentation::documentation(), documentation_bookmarks::documentation_bookmarks(), dw_main_window::dw_main_window(), file_editor_tab::file_editor_tab(), FileDialog::FileDialog(), files_dock_widget::files_dock_widget(), find_files_dialog::find_files_dialog(), main_window::main_window(), octave_dock_widget::octave_dock_widget(), release_notes::release_notes(), set_path_dialog::set_path_dialog(), settings_dialog::settings_dialog(), terminal_dock_widget::terminal_dock_widget(), workspace_view::workspace_view(), welcome_wizard::accept(), find_files_dialog::browse_folders(), main_window::browse_for_directory(), settings_dialog::button_clicked(), file_editor::call_custom_editor(), file_editor::closeEvent(), octave_qscintilla::comment_string(), main_window::confirm_shutdown(), community_news::construct(), history_dock_widget::construct(), file_editor::construct(), octave_qscintilla::contextmenu_run(), octave_qscintilla::ctx_menu_run_finished(), file_editor_tab::detect_eol_mode(), files_dock_widget::display_directory(), file_editor_tab::do_comment_selected_text(), main_window::do_reset_windows(), variable_editor_stack::do_save(), file_editor_tab::do_save_file(), variable_editor::edit_variable(), file_editor::empty_script(), external_editor_interface::external_editor(), main_window::focus_console_after_command(), settings_dialog::get_dir(), file_editor::handle_enter_debug_mode(), main_window::handle_load_workspace_request(), main_window::handle_octave_ready(), main_window::handle_save_workspace_request(), file_editor::handle_visibility(), workspace_view::header_contextmenu_requested(), files_dock_widget::headercontextmenu_requested(), shortcut_manager::import_export(), shortcut_manager::init(), shortcut_manager::init_data(), file_editor_tab::load_file(), octave_dock_widget::make_widget(), file_editor::mru_menu_update(), file_editor_tab::new_file(), files_dock_widget::popdownmenu_search_dir(), news_reader::process(), qt_interpreter_events::prompt_new_edit_file(), main_window::read_settings(), main_window::request_new_function(), file_editor::request_open_file(), main_window::request_open_file(), main_window::request_reload_settings(), main_window::restore_create_file_setting(), find_dialog::restore_settings(), file_editor_tab::save_file_as(), file_editor::save_session(), find_dialog::save_settings(), documentation::save_settings(), files_dock_widget::save_settings(), find_files_dialog::save_settings(), history_dock_widget::save_settings(), octave_dock_widget::save_settings(), set_path_dialog::save_settings(), workspace_view::save_settings(), shortcut_manager::set_shortcut(), workspace_view::setModel(), shortcut_manager::shortcut(), settings_dialog::show_tab(), files_dock_widget::toggle_header(), workspace_view::toggle_header(), file_editor::toggle_preference(), settings_dialog::update_editor_lexers(), file_editor_tab::update_lexer_settings(), settings_dialog::update_terminal_colors(), settings_dialog::update_varedit_colors(), settings_dialog::update_workspace_colors(), settings_dialog::write_changed_settings(), and main_window::write_settings().

◆ get_settings_directory()

QString resource_manager::get_settings_directory ( void  )

Definition at line 268 of file resource-manager.cc.

References m_settings_directory.

Referenced by set_settings().

◆ get_settings_file()

QString resource_manager::get_settings_file ( void  )

Definition at line 273 of file resource-manager.cc.

References m_settings_file.

Referenced by initial_page::initial_page(), and set_settings().

◆ get_valid_lexer_styles()

int resource_manager::get_valid_lexer_styles ( QsciLexer lexer,
int *  styles 
)

◆ icon()

◆ is_first_run()

bool resource_manager::is_first_run ( void  ) const

Definition at line 541 of file resource-manager.cc.

References m_settings_file.

Referenced by main_window::main_window().

◆ operator=()

resource_manager& resource_manager::operator= ( const resource_manager )
delete

◆ read_lexer_settings()

void resource_manager::read_lexer_settings ( QsciLexer lexer,
gui_settings settings,
int  mode = 0,
int  def = 0 
)

◆ reload_settings()

◆ remove_tmp_file()

void resource_manager::remove_tmp_file ( QPointer< QTemporaryFile >  tmp_file)

◆ set_settings()

void resource_manager::set_settings ( const QString &  file)

Definition at line 495 of file resource-manager.cc.

References get_settings_directory(), get_settings_file(), and m_settings.

Referenced by reload_settings().

◆ update_network_settings()

◆ update_settings_key()

bool resource_manager::update_settings_key ( const QString &  new_key,
const QString &  old_key 
)

Definition at line 527 of file resource-manager.cc.

References m_settings, and gui_settings::value().

Referenced by octave_dock_widget::set_focus_predecessor().

Member Data Documentation

◆ m_default_settings

gui_settings* resource_manager::m_default_settings
private

Definition at line 124 of file resource-manager.h.

Referenced by ~resource_manager(), and get_default_settings().

◆ m_icon_fallbacks

QStringList resource_manager::m_icon_fallbacks
private

Definition at line 128 of file resource-manager.h.

Referenced by config_icon_theme(), and icon().

◆ m_settings

◆ m_settings_directory

QString resource_manager::m_settings_directory
private

Definition at line 118 of file resource-manager.h.

Referenced by get_settings_directory().

◆ m_settings_file

QString resource_manager::m_settings_file
private

Definition at line 120 of file resource-manager.h.

Referenced by get_settings_file(), is_first_run(), and reload_settings().

◆ m_temporary_files

QList<QTemporaryFile *> resource_manager::m_temporary_files
private

Definition at line 126 of file resource-manager.h.

Referenced by ~resource_manager(), create_tmp_file(), and remove_tmp_file().


The documentation for this class was generated from the following files: