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

Public Member Functions

 PlateAction (int index, std::string title, std::string source_name)
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 (int index)
static std::string compose_id (std::string_view prefix, std::string_view title, std::string_view source_key)

Public Attributes

int plate_index
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

◆ PlateAction()

Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::PlateAction::PlateAction ( int index,
std::string title,
std::string source_name )
inline
402 : AppAction(AppActionId{id_for(index)}, std::move(title), kOrcaSourceKey, std::move(source_name)), plate_index(index)
403 {
405 this->group_en = L("Plate");
406 this->group = I18N::translate_utf8(this->group_en);
407 }
#define L(s)
Definition ExtrusionEntity.cpp:25
std::string translate_utf8(const char *s)
Definition I18N.hpp:59
@ Command
Definition ActionRegistry.hpp:25
constexpr const char * kOrcaSourceKey
Definition ActionRegistry.hpp:135
std::string group_en
Definition ActionRegistry.hpp:96
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
static std::string id_for(int index)
Definition ActionRegistry.cpp:399

References Slic3r::GUI::AppAction::AppAction(), Slic3r::GUI::Command, Slic3r::GUI::AppAction::group, Slic3r::GUI::AppAction::group_en, id_for(), Slic3r::GUI::AppAction::kind, Slic3r::GUI::kOrcaSourceKey, L, plate_index, Slic3r::GUI::AppAction::source_name(), Slic3r::GUI::AppAction::title(), 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 & 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}::PlateAction::id_for ( int index)
inlinestatic
399{ return AppAction::compose_id(kPlateGotoPrefix, std::to_string(index), kOrcaSourceKey); }
constexpr const char * kPlateGotoPrefix
Definition ActionRegistry.cpp:268
static std::string compose_id(std::string_view prefix, std::string_view title, std::string_view source_key)
Definition ActionRegistry.hpp:60

References Slic3r::GUI::AppAction::compose_id(), Slic3r::GUI::kOrcaSourceKey, and Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::kPlateGotoPrefix.

Referenced by PlateAction().

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

◆ run()

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

Implements Slic3r::GUI::AppAction.

410 { return NativeCommands::run("plate_goto", std::to_string(plate_index)); }
AppActionRunResult run(const std::string &key, const std::string &param={})
Definition NativeCommands.cpp:668

References plate_index, 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

◆ 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().

◆ plate_index

int Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::PlateAction::plate_index

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

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