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

Public Member Functions

AppActionRunResult run (const std::string &param) const override
 CommandAction (const NativeCommand &c)
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 compose_id (std::string_view prefix, std::string_view title, std::string_view source_key)

Public Attributes

std::string command_key
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

◆ CommandAction()

Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::CommandAction::CommandAction ( const NativeCommand & c)
inlineexplicit
147 , command_key(c.key)
148 {
150 this->group = I18N::translate_utf8(c.group);
151 this->title_en = c.title;
152 this->group_en = c.group;
153 this->input = c.input;
154 this->icon = c.icon;
155 }
std::string translate_utf8(const char *s)
Definition I18N.hpp:59
constexpr const char * kCommandPrefix
Definition NativeCommands.cpp:133
@ Command
Definition ActionRegistry.hpp:25
constexpr const char * kOrcaSourceKey
Definition ActionRegistry.hpp:135
constexpr const char * kOrcaSourceName
Definition ActionRegistry.hpp:136
std::string group_en
Definition ActionRegistry.hpp:96
std::string input
Definition ActionRegistry.hpp:79
std::string group
Definition ActionRegistry.hpp:76
AppActionKind kind
Definition ActionRegistry.hpp:75
std::string title_en
Definition ActionRegistry.hpp:95
AppAction(std::string_view prefix, std::string title, std::string source_key, std::string source_name)
Definition ActionRegistry.hpp:112
std::string icon
Definition ActionRegistry.hpp:82
static std::string compose_id(std::string_view prefix, std::string_view title, std::string_view source_key)
Definition ActionRegistry.hpp:60
std::string command_key
Definition NativeCommands.cpp:140

References Slic3r::GUI::AppAction::AppAction(), Slic3r::GUI::Command, command_key, Slic3r::GUI::AppAction::compose_id(), Slic3r::GUI::AppAction::group, Slic3r::GUI::NativeCommand::group, Slic3r::GUI::AppAction::group_en, Slic3r::GUI::AppAction::icon, Slic3r::GUI::NativeCommand::icon, Slic3r::GUI::AppAction::input, Slic3r::GUI::NativeCommand::input, Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::kCommandPrefix, Slic3r::GUI::AppAction::kind, Slic3r::GUI::kOrcaSourceKey, Slic3r::GUI::kOrcaSourceName, Slic3r::GUI::AppAction::title(), Slic3r::GUI::NativeCommand::title, Slic3r::GUI::AppAction::title_en, and Slic3r::GUI::I18N::translate_utf8().

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 & title() const
Definition ActionRegistry.hpp:53
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:

◆ run()

AppActionRunResult Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::CommandAction::run ( const std::string & param) const
inlineoverridevirtual

Implements Slic3r::GUI::AppAction.

142{ return NativeCommands::run(command_key, param); }
AppActionRunResult run(const std::string &key, const std::string &param={})
Definition NativeCommands.cpp:668

References command_key, and Slic3r::GUI::NativeCommands::run().

Here is the call graph for this function:

◆ 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

◆ command_key

std::string Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::CommandAction::command_key

Referenced by CommandAction(), 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().

◆ 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

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