OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::SettingAction Struct Reference
Inheritance diagram for Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::SettingAction:
Collaboration diagram for Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::SettingAction:

Public Member Functions

 SettingAction (std::string opt_key_in, Preset::Type type_in, std::string title, std::string group, std::wstring category_in, std::string source_name, ConfigOptionMode mode_in)
AppActionRunResult run (const std::string &) const override
const std::string & id () const
const std::string & title () const
const std::string & source_key () const
const std::string & source_name () const

Static Public Member Functions

static std::string id_for (const std::string &opt_key, Preset::Type type)
static std::string compose_id (std::string_view prefix, std::string_view title, std::string_view source_key)

Public Attributes

std::string opt_key
Preset::Type type
std::wstring category
bool favourite = false
int count = 0
long long last = 0
AppActionKind kind = AppActionKind::Plugin
std::string group
std::string input
std::string icon
ConfigOptionMode required_mode = comSimple
std::string tooltip
std::string full_label
std::string title_en
std::string group_en
std::string source_en
std::string full_label_en
std::string help_url

Private Attributes

std::string m_id
std::string m_title
std::string m_source_key
std::string m_source_name

Detailed Description

Constructor & Destructor Documentation

◆ SettingAction()

Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::SettingAction::SettingAction ( std::string opt_key_in,
Preset::Type type_in,
std::string title,
std::string group,
std::wstring category_in,
std::string source_name,
ConfigOptionMode mode_in )
inline
349 : AppAction(AppActionId{id_for(opt_key_in, type_in)}, std::move(title), kOrcaSourceKey, std::move(source_name))
350 , opt_key(std::move(opt_key_in))
351 , type(type_in)
352 , category(std::move(category_in))
353 {
354 // A setting is a single-phase command: activating it jumps the sidebar to the option
355 // (like the sidebar's own settings search), then the dial closes. run() performs the jump.
357 this->group = std::move(group);
358 this->required_mode = mode_in;
359 }
@ Command
Definition ActionRegistry.hpp:25
constexpr const char * kOrcaSourceKey
Definition ActionRegistry.hpp:135
std::string group
Definition ActionRegistry.hpp:76
AppActionKind kind
Definition ActionRegistry.hpp:75
const std::string & title() const
Definition ActionRegistry.hpp:53
const std::string & source_name() const
Definition ActionRegistry.hpp:55
AppAction(std::string_view prefix, std::string title, std::string source_key, std::string source_name)
Definition ActionRegistry.hpp:112
ConfigOptionMode required_mode
Definition ActionRegistry.hpp:85
Preset::Type type
Definition ActionRegistry.cpp:336
std::string opt_key
Definition ActionRegistry.cpp:335
static std::string id_for(const std::string &opt_key, Preset::Type type)
Definition ActionRegistry.cpp:339
std::wstring category
Definition ActionRegistry.cpp:337

References Slic3r::GUI::AppAction::AppAction(), category, Slic3r::GUI::Command, Slic3r::GUI::AppAction::group, id_for(), Slic3r::GUI::AppAction::kind, Slic3r::GUI::kOrcaSourceKey, opt_key, Slic3r::GUI::AppAction::required_mode, Slic3r::GUI::AppAction::source_name(), Slic3r::GUI::AppAction::title(), and type.

Here is the call graph for this function:

Member Function Documentation

◆ compose_id()

std::string Slic3r::GUI::AppAction::compose_id ( std::string_view prefix,
std::string_view title,
std::string_view source_key )
inlinestaticinherited
61 {
62 std::string out;
63 out.reserve(prefix.size() + title.size() + source_key.size() + 2);
64 out.append(prefix).append(1, ':').append(title).append(1, ':').append(source_key);
65 return out;
66 }
const std::string & source_key() const
Definition ActionRegistry.hpp:54

References source_key(), and title().

Referenced by AppAction(), Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::CommandAction::CommandAction(), Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::PlateAction::id_for(), Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::PluginPageAction::id_for(), Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::PluginScriptAction::id_for(), and Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::RecentProjectAction::id_for().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ id()

const std::string & Slic3r::GUI::AppAction::id ( ) const
inlineinherited
52{ return m_id; }
std::string m_id
Definition ActionRegistry.hpp:126

References m_id.

Referenced by AppAction(), Slic3r::GUI::action_json(), and Slic3r::GUI::ActionRegistry::seed_state().

Here is the caller graph for this function:

◆ id_for()

std::string Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::SettingAction::id_for ( const std::string & opt_key,
Preset::Type type )
inlinestatic
340 { return std::string(kSettingPrefix) + ":" + opt_key + ":" + std::to_string(int(type)); }
constexpr const char * kSettingPrefix
Definition ActionRegistry.cpp:267

References Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::kSettingPrefix, opt_key, and type.

Referenced by SettingAction().

Here is the caller graph for this function:

◆ run()

AppActionRunResult Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::SettingAction::run ( const std::string & ) const
inlineoverridevirtual

Implements Slic3r::GUI::AppAction.

362 {
363 wxGetApp().sidebar().jump_to_option(opt_key, type, category);
365 }
@ Success
Definition ActionRegistry.hpp:31

References category, opt_key, Slic3r::GUI::AppActionRunResult::Success, and type.

◆ source_key()

const std::string & Slic3r::GUI::AppAction::source_key ( ) const
inlineinherited
54{ return m_source_key; } // stable source identity
std::string m_source_key
Definition ActionRegistry.hpp:128

References m_source_key.

Referenced by AppAction(), AppAction(), and compose_id().

Here is the caller graph for this function:

◆ source_name()

const std::string & Slic3r::GUI::AppAction::source_name ( ) const
inlineinherited

◆ title()

const std::string & Slic3r::GUI::AppAction::title ( ) const
inlineinherited

Member Data Documentation

◆ category

std::wstring Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::SettingAction::category

Referenced by SettingAction(), and run().

◆ count

int Slic3r::GUI::AppAction::count = 0
inherited

◆ favourite

bool Slic3r::GUI::AppAction::favourite = false
inherited

◆ full_label

std::string Slic3r::GUI::AppAction::full_label
inherited

◆ full_label_en

std::string Slic3r::GUI::AppAction::full_label_en
inherited

◆ group

◆ group_en

◆ help_url

std::string Slic3r::GUI::AppAction::help_url
inherited

◆ icon

std::string Slic3r::GUI::AppAction::icon
inherited

◆ input

std::string Slic3r::GUI::AppAction::input
inherited

◆ kind

◆ last

long long Slic3r::GUI::AppAction::last = 0
inherited

◆ m_id

std::string Slic3r::GUI::AppAction::m_id
privateinherited

Referenced by AppAction(), AppAction(), and id().

◆ m_source_key

std::string Slic3r::GUI::AppAction::m_source_key
privateinherited

Referenced by AppAction(), AppAction(), and source_key().

◆ m_source_name

std::string Slic3r::GUI::AppAction::m_source_name
privateinherited

Referenced by AppAction(), AppAction(), and source_name().

◆ m_title

std::string Slic3r::GUI::AppAction::m_title
privateinherited

Referenced by AppAction(), AppAction(), and title().

◆ opt_key

std::string Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::SettingAction::opt_key

Referenced by SettingAction(), id_for(), and run().

◆ required_mode

◆ source_en

std::string Slic3r::GUI::AppAction::source_en
inherited

◆ title_en

std::string Slic3r::GUI::AppAction::title_en
inherited

◆ tooltip

std::string Slic3r::GUI::AppAction::tooltip
inherited

◆ type

Preset::Type Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::SettingAction::type

Referenced by SettingAction(), id_for(), and run().


The documentation for this struct was generated from the following file: