#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/ActionRegistry.hpp>
Public Member Functions | |
| ~ActionRegistry () | |
| void | init () |
| void | relocalize_builtins () |
| void | upsert (std::unique_ptr< AppAction > action) |
| void | remove (const std::string &id) |
| const AppAction * | by_id (const std::string &id) const |
| AppActionRunResult | run (const std::string &id, const std::string ¶m={}) |
| bool | set_favourite (const std::string &id, bool on) |
| void | reorder_favourites (const std::vector< std::string > &ids) |
| std::vector< std::string > | favourite_ids () const |
| bool | should_ask (const std::string &id) const |
| void | suppress_ask (const std::string &id) |
| bool | tooltip_expanded () const |
| void | set_tooltip_expanded (bool expanded) |
| nlohmann::json | snapshot () |
| nlohmann::json | tab_options () const |
Static Public Attributes | |
| static constexpr size_t | kFavLimit = 10 |
Private Member Functions | |
| void | seed_state (AppAction &a) const |
| AppAction * | find (const std::string &id) |
| void | load_persisted (nlohmann::json &stats, std::vector< std::string > &favs) const |
| void | materialize_setting_actions () |
| void | materialize_plate_actions () |
| void | materialize_recent_project_actions () |
| void | refresh_source (const std::string &plugin_key, ActionChange change) |
| void | refresh_capability (const std::string &plugin_key, const std::string &capability, ActionChange change) |
| void | refresh_page_capability (const std::string &plugin_key, const std::string &capability, ActionChange change) |
Private Attributes | |
| bool | m_started = false |
| std::unordered_map< std::string, std::shared_ptr< AppAction > > | m_actions |
|
default |
| const AppAction * Slic3r::GUI::ActionRegistry::by_id | ( | const std::string & | id | ) | const |
References m_actions.
Referenced by find(), and Slic3r::GUI::SpeedDialWebDialog::run_action().
| std::vector< std::string > Slic3r::GUI::ActionRegistry::favourite_ids | ( | ) | const |
References Slic3r::GUI::cap_favourites(), and kFavLimit.
Referenced by load_persisted(), seed_state(), set_favourite(), and snapshot().
|
private |
References by_id().
Referenced by run(), and set_favourite().
| void Slic3r::GUI::ActionRegistry::init | ( | ) |
References Slic3r::GUI::Added, Slic3r::GUI::NativeCommands::catalog(), Slic3r::PluginManager::get_plugin_capabilities(), Slic3r::PluginManager::get_plugin_descriptors(), Slic3r::PluginManager::instance(), m_started, Slic3r::GUI::NativeCommands::make_action(), Slic3r::PluginCapabilityId::name, Slic3r::Pages, Slic3r::PluginCapabilityId::plugin_key, refresh_capability(), refresh_page_capability(), refresh_source(), Slic3r::GUI::Removed, Slic3r::Script, Slic3r::PluginManager::subscribe_on_capability_load_callback(), Slic3r::PluginManager::subscribe_on_capability_unload_callback(), Slic3r::PluginManager::subscribe_on_load_callback(), Slic3r::PluginManager::subscribe_on_unload_callback(), Slic3r::PluginCapabilityId::type, and upsert().
|
private |
References favourite_ids().
Referenced by materialize_plate_actions(), materialize_recent_project_actions(), and materialize_setting_actions().
|
private |
References Slic3r::GUI::PartPlate::get_plate_name(), Slic3r::GUI::kOrcaSourceName, L, load_persisted(), m_actions, Slic3r::GUI::plater(), Slic3r::ptFFF, and Slic3r::GUI::I18N::translate_utf8().
Referenced by snapshot().
|
private |
References load_persisted(), and m_actions.
Referenced by snapshot().
|
private |
References Slic3r::GUI::Tab::get_category_icon_map(), Slic3r::GUI::OptionsGroup::get_url(), Slic3r::GUI::into_u8(), Slic3r::GUI::Tab::SettingRowState::label, Slic3r::GUI::Tab::SettingRowState::label_en, load_persisted(), m_actions, Slic3r::GUI::Tab::SettingRowState::multi, Slic3r::GUI::Tab::setting_row_state(), Slic3r::GUI::Tab::translate_category(), Slic3r::GUI::I18N::translate_utf8(), and Slic3r::GUI::Tab::SettingRowState::visible.
Referenced by snapshot().
|
private |
References Slic3r::PluginManager::instance(), remove(), Slic3r::GUI::Removed, and upsert().
Referenced by init().
|
private |
References Slic3r::PluginManager::instance(), remove(), Slic3r::GUI::Removed, and upsert().
Referenced by init().
|
private |
References Slic3r::PluginManager::get_plugin_capabilities(), Slic3r::PluginManager::instance(), m_actions, Slic3r::Pages, remove(), Slic3r::GUI::Removed, Slic3r::Script, and upsert().
Referenced by init().
| void Slic3r::GUI::ActionRegistry::relocalize_builtins | ( | ) |
References Slic3r::GUI::NativeCommands::catalog(), Slic3r::GUI::Command, Slic3r::GUI::kOrcaSourceKey, m_actions, m_started, Slic3r::GUI::NativeCommands::make_action(), remove(), and upsert().
| void Slic3r::GUI::ActionRegistry::remove | ( | const std::string & | id | ) |
References m_actions.
Referenced by refresh_capability(), refresh_page_capability(), refresh_source(), and relocalize_builtins().
| void Slic3r::GUI::ActionRegistry::reorder_favourites | ( | const std::vector< std::string > & | ids | ) |
References Slic3r::GUI::cap_favourites(), and kFavLimit.
| AppActionRunResult Slic3r::GUI::ActionRegistry::run | ( | const std::string & | id, |
| const std::string & | param = {} ) |
References Slic3r::GUI::AppActionRunResult::Busy, find(), Slic3r::GUI::AppActionRunResult::level, and m_actions.
|
private |
References Slic3r::GUI::AppAction::count, Slic3r::GUI::AppAction::favourite, favourite_ids(), Slic3r::GUI::AppAction::id(), and Slic3r::GUI::AppAction::last.
Referenced by upsert().
| bool Slic3r::GUI::ActionRegistry::set_favourite | ( | const std::string & | id, |
| bool | on ) |
References favourite_ids(), find(), and kFavLimit.
| void Slic3r::GUI::ActionRegistry::set_tooltip_expanded | ( | bool | expanded | ) |
| bool Slic3r::GUI::ActionRegistry::should_ask | ( | const std::string & | id | ) | const |
Referenced by Slic3r::GUI::SpeedDialWebDialog::run_action().
| nlohmann::json Slic3r::GUI::ActionRegistry::snapshot | ( | ) |
References Slic3r::GUI::action_json(), favourite_ids(), m_actions, materialize_plate_actions(), materialize_recent_project_actions(), materialize_setting_actions(), and tooltip_expanded().
| void Slic3r::GUI::ActionRegistry::suppress_ask | ( | const std::string & | id | ) |
| nlohmann::json Slic3r::GUI::ActionRegistry::tab_options | ( | ) | const |
References Slic3r::empty(), Notebook::GetPageIcon(), Notebook::GetPageLabel(), Notebook::GetPageName(), L, Slic3r::GUI::MainFrame::m_tabpanel, TAB_ID_MONITOR, TAB_ID_MONITOR_WEB, and TAB_ID_MULTI_DEVICE.
| bool Slic3r::GUI::ActionRegistry::tooltip_expanded | ( | ) | const |
Referenced by snapshot().
| void Slic3r::GUI::ActionRegistry::upsert | ( | std::unique_ptr< AppAction > | action | ) |
References m_actions, and seed_state().
Referenced by init(), refresh_capability(), refresh_page_capability(), refresh_source(), and relocalize_builtins().
|
staticconstexpr |
|
private |
|
private |
Referenced by init(), and relocalize_builtins().