![]() |
Prusa Slicer 2.6.0
|
#include <src/libslic3r/AppConfig.hpp>
Collaboration diagram for Slic3r::AppConfig:Public Types | |
| enum class | EAppMode : unsigned char { Editor , GCodeViewer } |
| typedef std::map< std::string, std::map< std::string, std::set< std::string > > > | VendorMap |
Public Member Functions | |
| AppConfig (EAppMode mode) | |
| void | reset () |
| void | set_defaults () |
| std::string | load () |
| std::string | load (const std::string &path) |
| void | save () |
| bool | dirty () const |
| bool | get (const std::string §ion, const std::string &key, std::string &value) const |
| std::string | get (const std::string §ion, const std::string &key) const |
| bool | get_bool (const std::string §ion, const std::string &key) const |
| std::string | get (const std::string &key) const |
| bool | get_bool (const std::string &key) const |
| bool | set (const std::string §ion, const std::string &key, const std::string &value) |
| bool | set (const std::string &key, const std::string &value) |
| bool | has (const std::string §ion, const std::string &key) const |
| bool | has (const std::string &key) const |
| bool | erase (const std::string §ion, const std::string &key) |
| bool | has_section (const std::string §ion) const |
| const std::map< std::string, std::string > & | get_section (const std::string §ion) const |
| bool | set_section (const std::string §ion, std::map< std::string, std::string > data) |
| bool | clear_section (const std::string §ion) |
| bool | get_variant (const std::string &vendor, const std::string &model, const std::string &variant) const |
| bool | set_variant (const std::string &vendor, const std::string &model, const std::string &variant, bool enable) |
| bool | set_vendors (const AppConfig &from) |
| bool | set_vendors (const VendorMap &vendors) |
| bool | set_vendors (VendorMap &&vendors) |
| const VendorMap & | vendors () const |
| std::string | get_last_dir () const |
| bool | update_config_dir (const std::string &dir) |
| bool | update_skein_dir (const std::string &dir) |
| std::string | get_last_output_dir (const std::string &alt, const bool removable=false) const |
| bool | update_last_output_dir (const std::string &dir, const bool removable=false) |
| void | reset_selections () |
| std::string | config_path () const |
| bool | legacy_datadir () const |
| void | set_legacy_datadir (bool value) |
| std::string | version_check_url () const |
| std::string | index_archive_url () const |
| std::string | profile_folder_url () const |
| Semver | orig_version () const |
| bool | exists () const |
| std::vector< std::string > | get_recent_projects () const |
| bool | set_recent_projects (const std::vector< std::string > &recent_projects) |
| bool | set_mouse_device (const std::string &name, double translation_speed, double translation_deadzone, float rotation_speed, float rotation_deadzone, double zoom_speed, bool swap_yz) |
| std::vector< std::string > | get_mouse_device_names () const |
| bool | get_mouse_device_translation_speed (const std::string &name, double &speed) const |
| bool | get_mouse_device_translation_deadzone (const std::string &name, double &deadzone) const |
| bool | get_mouse_device_rotation_speed (const std::string &name, float &speed) const |
| bool | get_mouse_device_rotation_deadzone (const std::string &name, float &deadzone) const |
| bool | get_mouse_device_zoom_speed (const std::string &name, double &speed) const |
| bool | get_mouse_device_swap_yz (const std::string &name, bool &swap) const |
Static Public Attributes | |
| static const std::string | SECTION_FILAMENTS = "filaments" |
| static const std::string | SECTION_MATERIALS = "sla_materials" |
| static const std::string | SECTION_EMBOSS_STYLE = "font" |
Private Member Functions | |
| template<typename T > | |
| bool | get_3dmouse_device_numeric_value (const std::string &device_name, const char *parameter_name, T &out) const |
Private Attributes | |
| EAppMode | m_mode { EAppMode::Editor } |
| std::map< std::string, std::map< std::string, std::string > > | m_storage |
| VendorMap | m_vendors |
| bool | m_dirty |
| Semver | m_orig_version |
| bool | m_legacy_datadir |
| typedef std::map<std::string, std::map<std::string, std::set<std::string> > > Slic3r::AppConfig::VendorMap |
|
strong |
| Enumerator | |
|---|---|
| Editor | |
| GCodeViewer | |
|
inlineexplicit |
| bool Slic3r::AppConfig::clear_section | ( | const std::string & | section | ) |
References m_dirty, and m_storage.
Referenced by Slic3r::PresetBundle::export_selections(), Slic3r::GUI::Config::Snapshot::export_selections(), and Slic3r::GUI::EmbossStylesSerializable::store_styles().
Here is the caller graph for this function:| std::string Slic3r::AppConfig::config_path | ( | ) | const |
References Slic3r::data_dir(), Editor, GCODEVIEWER_APP_KEY, and m_mode.
Referenced by Slic3r::GUI::GUI_App::check_older_app_config(), exists(), Slic3r::GUI::GUI_App::init_app_config(), load(), and save().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References m_dirty.
Referenced by Slic3r::GUI::GUI_App::window_pos_save().
Here is the caller graph for this function:References m_dirty, and m_storage.
Referenced by set_defaults().
Here is the caller graph for this function:| bool Slic3r::AppConfig::exists | ( | ) | const |
References config_path().
Referenced by Slic3r::GUI::GUI_App::init_app_config().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References get().
Here is the call graph for this function:
|
inline |
References m_storage.
Referenced by Slic3r::GUI::PageUpdate::PageUpdate(), Slic3r::GUI::PrintHostSendDialog::PrintHostSendDialog(), Slic3r::GUI::GUI_App::add_config_menu(), get(), get(), get_bool(), get_bool(), Slic3r::GUI::GUI_App::get_mode(), Slic3r::GUI::OptionsGroup::get_url(), index_archive_url(), Slic3r::DoubleSlider::Control::is_lower_thumb_editable(), Slic3r::GUI::Config::SnapshotDB::is_on_snapshot(), load(), Slic3r::GUI::GUI_App::load_language(), Slic3r::GUI::ConfigWizard::priv::load_pages(), Slic3r::PresetBundle::load_selections(), Slic3r::GUI::GUI_App::on_init_inner(), Slic3r::GUI::GUI_App::on_version_read(), Slic3r::GUI::GUI_App::open_browser_with_warning_dialog(), profile_folder_url(), Slic3r::GUI::GUI_App::recreate_GUI(), Slic3r::GUI::PageMaterials::reload_presets(), set_defaults(), Slic3r::PresetUpdater::priv::set_download_prefs(), Slic3r::GUI::GUI_App::show_downloader_registration_dialog(), Slic3r::GUI::GUI_App::start_download(), Slic3r::GUI::Config::SnapshotDB::take_snapshot(), Slic3r::GUI::GUI_App::toolbar_icon_scale(), Slic3r::GUI::GUI_App::update_ui_colours_from_appconfig(), version_check_url(), and Slic3r::GUI::GUI_App::window_pos_restore().
Here is the caller graph for this function:
|
inlineprivate |
References m_storage, and Slic3r::string_to_double_decimal_point().
Referenced by get_mouse_device_rotation_deadzone(), get_mouse_device_rotation_speed(), get_mouse_device_swap_yz(), get_mouse_device_translation_deadzone(), get_mouse_device_translation_speed(), and get_mouse_device_zoom_speed().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
|
inline |
References get().
Referenced by Slic3r::GUI::PageDownloader::PageDownloader(), Slic3r::GUI::PageUpdate::PageUpdate(), Slic3r::GUI::GUI_App::config_wizard_startup(), Slic3r::GUI::GUI_Run(), Slic3r::GUI::DownloaderUtils::Worker::on_finish(), Slic3r::GUI::GUI_App::on_init_inner(), Slic3r::GUI::OG_CustomCtrl::OnMotion(), Slic3r::GUI::GUI_App::open_browser_with_warning_dialog(), Slic3r::GUI::GUI_App::open_preferences(), Slic3r::GUI::GUI_App::post_init(), Slic3r::GUI::GCodeViewer::refresh_render_paths(), Slic3r::GUI::OG_CustomCtrl::CtrlLine::render(), Slic3r::PresetUpdater::priv::set_download_prefs(), Slic3r::Preset::set_visible_from_appconfig(), Slic3r::GUI::PreferencesDialog::show(), Slic3r::GUI::GUI_App::tabs_as_menu(), Slic3r::Moonraker::upload(), Slic3r::OctoPrint::upload_inner_with_host(), Slic3r::PrusaLink::upload_inner_with_host(), and Slic3r::GUI::GUI_App::window_pos_restore().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Slic3r::AppConfig::get_last_dir | ( | ) | const |
References m_storage.
Referenced by get_last_output_dir(), Slic3r::GUI::GUI_App::import_model(), Slic3r::GUI::GUI_App::import_zip(), Slic3r::GUI::GUI_App::load_gcode(), and Slic3r::GUI::GUI_App::load_project().
Here is the caller graph for this function:| std::string Slic3r::AppConfig::get_last_output_dir | ( | const std::string & | alt, |
| const bool | removable = false |
||
| ) | const |
References get_last_dir(), Slic3r::is_shapes_dir(), and m_storage.
Referenced by Slic3r::GUI::Plater::export_gcode().
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< std::string > Slic3r::AppConfig::get_mouse_device_names | ( | ) | const |
References m_storage.
Referenced by Slic3r::GUI::Mouse3DController::load_config().
Here is the caller graph for this function:
|
inline |
References get_3dmouse_device_numeric_value().
Referenced by Slic3r::GUI::Mouse3DController::load_config().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References get_3dmouse_device_numeric_value().
Referenced by Slic3r::GUI::Mouse3DController::load_config().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References get_3dmouse_device_numeric_value().
Referenced by Slic3r::GUI::Mouse3DController::load_config().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References get_3dmouse_device_numeric_value().
Referenced by Slic3r::GUI::Mouse3DController::load_config().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References get_3dmouse_device_numeric_value().
Referenced by Slic3r::GUI::Mouse3DController::load_config().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References get_3dmouse_device_numeric_value().
Referenced by Slic3r::GUI::Mouse3DController::load_config().
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< std::string > Slic3r::AppConfig::get_recent_projects | ( | ) | const |
References m_storage.
|
inline |
References m_storage.
Referenced by Slic3r::GUI::ConfigWizard::priv::apply_config(), Slic3r::GUI::EmbossStylesSerializable::load_style_index(), Slic3r::GUI::EmbossStylesSerializable::load_styles(), Slic3r::GUI::ConfigWizard::priv::load_vendors(), and Slic3r::Preset::set_visible_from_appconfig().
Here is the caller graph for this function:| bool Slic3r::AppConfig::get_variant | ( | const std::string & | vendor, |
| const std::string & | model, | ||
| const std::string & | variant | ||
| ) | const |
References m_vendors.
Referenced by Slic3r::GUI::PrinterPicker::PrinterPicker(), set_variant(), and Slic3r::Preset::set_visible_from_appconfig().
Here is the caller graph for this function:
|
inline |
References has().
Here is the call graph for this function:References m_storage.
Referenced by Slic3r::GUI::PageDownloader::PageDownloader(), Slic3r::GUI::GUI_App::dark_mode(), Slic3r::GUI::GUI_App::get_mode(), has(), Slic3r::PresetBundle::load_selections(), Slic3r::GUI::GUI_App::on_init_inner(), Slic3r::GUI::GUI_App::recreate_GUI(), Slic3r::GUI::Config::SnapshotDB::take_snapshot(), Slic3r::GUI::PageMaterials::update_lists(), Slic3r::GUI::GUI_App::update_ui_colours_from_appconfig(), and Slic3r::GUI::GUI_App::window_pos_restore().
Here is the caller graph for this function:
|
inline |
References m_storage.
Referenced by Slic3r::GUI::ConfigWizard::priv::apply_config(), Slic3r::PresetBundle::load_installed_filaments(), Slic3r::PresetBundle::load_installed_sla_materials(), Slic3r::GUI::EmbossStylesSerializable::load_style_index(), Slic3r::GUI::EmbossStylesSerializable::load_styles(), Slic3r::GUI::ConfigWizard::priv::load_vendors(), Slic3r::Preset::set_visible_from_appconfig(), and Slic3r::GUI::EmbossStylesSerializable::store_styles().
Here is the caller graph for this function:| std::string Slic3r::AppConfig::index_archive_url | ( | ) | const |
References get(), and Slic3r::INDEX_ARCHIVE_URL.
Here is the call graph for this function:
|
inline |
References m_legacy_datadir.
Referenced by Slic3r::GUI::ConfigWizard::priv::load_vendors(), and Slic3r::PresetUpdater::priv::set_download_prefs().
Here is the caller graph for this function:| std::string Slic3r::AppConfig::load | ( | ) |
References config_path(), and load().
Referenced by Slic3r::GUI::GUI_App::check_older_app_config(), Slic3r::GUI::GUI_App::init_app_config(), and load().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Slic3r::AppConfig::load | ( | const std::string & | path | ) |
References Slic3r::copy_file(), Editor, error, Slic3r::format(), get(), m_dirty, m_legacy_datadir, m_mode, m_orig_version, m_storage, m_vendors, Slic3r::MODEL_PREFIX, Slic3r::Semver::parse(), reset(), set_defaults(), Slic3r::Semver::set_metadata(), Slic3r::SUCCESS, Slic3r::unescape_strings_cstyle(), and Slic3r::VENDOR_PREFIX.
Here is the call graph for this function:
|
inline |
References m_orig_version.
Referenced by Slic3r::GUI::GUI_App::check_updates(), Slic3r::GUI::GUI_App::on_init_inner(), and Slic3r::GUI::GUI_App::run_wizard().
Here is the caller graph for this function:| std::string Slic3r::AppConfig::profile_folder_url | ( | ) | const |
References get(), and Slic3r::PROFILE_FOLDER_URL.
Here is the call graph for this function:| void Slic3r::AppConfig::reset | ( | ) |
References Slic3r::Semver::invalid(), m_dirty, m_legacy_datadir, m_orig_version, m_storage, m_vendors, and set_defaults().
Referenced by AppConfig(), and load().
Here is the call graph for this function:
Here is the caller graph for this function:| void Slic3r::AppConfig::reset_selections | ( | ) |
| void Slic3r::AppConfig::save | ( | ) |
References config_path(), Slic3r::copy_file(), Editor, error, Slic3r::escape_strings_cstyle(), Slic3r::get_current_pid(), Slic3r::header_gcodeviewer_generated(), Slic3r::header_slic3r_generated(), Slic3r::is_main_thread_active(), m_dirty, m_mode, m_storage, m_vendors, Slic3r::MODEL_PREFIX, Slic3r::rename_file(), Slic3r::SUCCESS, and Slic3r::VENDOR_PREFIX.
Referenced by Slic3r::GUI::GUI_App::on_init_inner(), Slic3r::GUI::GUI_App::window_pos_restore(), and Slic3r::GUI::GUI_App::window_pos_save().
Here is the call graph for this function:
Here is the caller graph for this function:References set().
Here is the call graph for this function:
|
inline |
References m_dirty, and m_storage.
Referenced by Slic3r::GUI::GUI_App::add_config_menu(), Slic3r::GUI::GUI_App::app_updater(), Slic3r::GUI::ConfigWizard::priv::apply_config(), Slic3r::GUI::PreferencesDialog::build(), Slic3r::GUI::GUI_App::check_older_app_config(), Slic3r::GUI::PrintHostSendDialog::EndModal(), Slic3r::PresetBundle::export_selections(), Slic3r::GUI::Config::Snapshot::export_selections(), Slic3r::GUI::Config::SnapshotDB::is_on_snapshot(), Slic3r::PresetBundle::load_installed_filaments(), Slic3r::PresetBundle::load_installed_sla_materials(), Slic3r::GUI::DownloaderUtils::Worker::on_finish(), Slic3r::GUI::GUI_App::on_init_inner(), Slic3r::GUI::GUI_App::on_version_read(), Slic3r::GUI::GUI_App::open_browser_with_warning_dialog(), Slic3r::GUI::GUI_App::post_init(), Slic3r::GUI::GUI_App::save_mode(), Slic3r::GUI::Plater::priv::save_project_if_dirty(), Slic3r::GUI::GUI_App::select_language(), Slic3r::GUI::PageMode::serialize_mode(), set(), Slic3r::GUI::GUI_App::set_auto_toolbar_icon_scale(), set_defaults(), Slic3r::GUI::GUI_App::set_label_clr_modified(), Slic3r::GUI::GUI_App::set_label_clr_sys(), Slic3r::GUI::GUI_App::set_mode_palette(), Slic3r::GUI::GUI_App::show_downloader_registration_dialog(), Slic3r::GUI::Plater::priv::undo_redo_to(), update_config_dir(), update_last_output_dir(), Slic3r::GUI::PageMaterials::update_lists(), update_skein_dir(), Slic3r::GUI::GUI_App::window_pos_restore(), and Slic3r::GUI::GUI_App::window_pos_save().
Here is the caller graph for this function:| void Slic3r::AppConfig::set_defaults | ( | ) |
References Editor, Slic3r::empty(), erase(), get(), m_mode, and set().
Referenced by load(), and reset().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References m_legacy_datadir.
Referenced by Slic3r::GUI::ConfigWizard::run().
Here is the caller graph for this function:| bool Slic3r::AppConfig::set_mouse_device | ( | const std::string & | name, |
| double | translation_speed, | ||
| double | translation_deadzone, | ||
| float | rotation_speed, | ||
| float | rotation_deadzone, | ||
| double | zoom_speed, | ||
| bool | swap_yz | ||
| ) |
References Slic3r::float_to_string_decimal_point(), m_dirty, and m_storage.
Referenced by Slic3r::GUI::Mouse3DController::save_config().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Slic3r::AppConfig::set_recent_projects | ( | const std::vector< std::string > & | recent_projects | ) |
| bool Slic3r::AppConfig::set_section | ( | const std::string & | section, |
| std::map< std::string, std::string > | data | ||
| ) |
References m_dirty, and m_storage.
Referenced by Slic3r::GUI::ConfigWizard::priv::apply_config(), Slic3r::GUI::EmbossStylesSerializable::store_style(), and Slic3r::GUI::EmbossStylesSerializable::store_style_index().
Here is the caller graph for this function:| bool Slic3r::AppConfig::set_variant | ( | const std::string & | vendor, |
| const std::string & | model, | ||
| const std::string & | variant, | ||
| bool | enable | ||
| ) |
References get_variant(), m_dirty, and m_vendors.
Referenced by Slic3r::GUI::PagePrinters::PagePrinters().
Here is the call graph for this function:
Here is the caller graph for this function:References set_vendors(), and vendors().
Referenced by Slic3r::GUI::ConfigWizard::priv::apply_config(), Slic3r::GUI::Config::Snapshot::export_vendor_configs(), Slic3r::GUI::ConfigWizard::priv::load_vendors(), and set_vendors().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Slic3r::AppConfig::set_vendors | ( | VendorMap && | vendors | ) |
| bool Slic3r::AppConfig::update_config_dir | ( | const std::string & | dir | ) |
| bool Slic3r::AppConfig::update_last_output_dir | ( | const std::string & | dir, |
| const bool | removable = false |
||
| ) |
References set().
Referenced by Slic3r::GUI::Plater::export_gcode().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Slic3r::AppConfig::update_skein_dir | ( | const std::string & | dir | ) |
References Slic3r::is_shapes_dir(), and set().
Here is the call graph for this function:References m_vendors.
Referenced by Slic3r::GUI::PageVendors::PageVendors(), Slic3r::GUI::ConfigWizard::priv::apply_config(), Slic3r::GUI::Config::Snapshot::equal_to_active(), set_vendors(), set_vendors(), set_vendors(), and Slic3r::GUI::Config::SnapshotDB::take_snapshot().
Here is the caller graph for this function:| std::string Slic3r::AppConfig::version_check_url | ( | ) | const |
References get(), and Slic3r::VERSION_CHECK_URL.
Referenced by Slic3r::GUI::GUI_App::app_version_check(), and Slic3r::PresetUpdater::priv::set_download_prefs().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Referenced by clear_section(), dirty(), erase(), load(), reset(), reset_selections(), save(), set(), set_mouse_device(), set_recent_projects(), set_section(), set_variant(), set_vendors(), and set_vendors().
|
private |
Referenced by legacy_datadir(), load(), reset(), and set_legacy_datadir().
|
private |
Referenced by config_path(), load(), save(), and set_defaults().
|
private |
Referenced by load(), orig_version(), and reset().
|
private |
Referenced by clear_section(), erase(), get(), get_3dmouse_device_numeric_value(), get_last_dir(), get_last_output_dir(), get_mouse_device_names(), get_recent_projects(), get_section(), has(), has_section(), load(), reset(), reset_selections(), save(), set(), set_mouse_device(), set_recent_projects(), and set_section().
|
private |
Referenced by get_variant(), load(), reset(), save(), set_variant(), set_vendors(), set_vendors(), and vendors().
|
static |
|
static |
Referenced by Slic3r::GUI::Materials::appconfig_section(), Slic3r::GUI::ConfigWizard::priv::apply_config(), Slic3r::GUI::ConfigWizard::priv::check_and_install_missing_materials(), Slic3r::PresetBundle::load_installed_filaments(), Slic3r::GUI::ConfigWizard::priv::load_vendors(), Slic3r::Preset::set_visible_from_appconfig(), and Slic3r::GUI::ConfigWizard::priv::update_presets_in_config().
|
static |
Referenced by Slic3r::GUI::Materials::appconfig_section(), Slic3r::GUI::ConfigWizard::priv::apply_config(), Slic3r::GUI::ConfigWizard::priv::check_and_install_missing_materials(), Slic3r::PresetBundle::load_installed_sla_materials(), Slic3r::GUI::ConfigWizard::priv::load_vendors(), and Slic3r::Preset::set_visible_from_appconfig().