OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::AppAction Struct Referenceabstract

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/ActionRegistry.hpp>

Inheritance diagram for Slic3r::GUI::AppAction:
Collaboration diagram for Slic3r::GUI::AppAction:

Public Member Functions

const std::string & id () const
const std::string & title () const
const std::string & source_key () const
const std::string & source_name () const
virtual ~AppAction ()=default
virtual AppActionRunResult run (const std::string &param={}) const =0

Static Public Member Functions

static std::string compose_id (std::string_view prefix, std::string_view title, std::string_view source_key)

Public Attributes

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

Protected Member Functions

 AppAction (std::string_view prefix, std::string title, std::string source_key, std::string source_name)
 AppAction (AppActionId id, std::string title, std::string source_key, std::string source_name)

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

◆ ~AppAction()

virtual Slic3r::GUI::AppAction::~AppAction ( )
virtualdefault

◆ AppAction() [1/2]

Slic3r::GUI::AppAction::AppAction ( std::string_view prefix,
std::string title,
std::string source_key,
std::string source_name )
inlineprotected
113 : m_id(compose_id(prefix, title, source_key))
114 , m_title(std::move(title))
115 , m_source_key(std::move(source_key))
116 , m_source_name(std::move(source_name))
117 {}
const std::string & title() const
Definition ActionRegistry.hpp:53
const std::string & source_name() const
Definition ActionRegistry.hpp:55
const std::string & source_key() const
Definition ActionRegistry.hpp:54
std::string m_id
Definition ActionRegistry.hpp:126
static std::string compose_id(std::string_view prefix, std::string_view title, std::string_view source_key)
Definition ActionRegistry.hpp:60
std::string m_source_key
Definition ActionRegistry.hpp:128
std::string m_title
Definition ActionRegistry.hpp:127
std::string m_source_name
Definition ActionRegistry.hpp:129

References compose_id(), m_id, m_source_key, m_source_name, m_title, source_key(), source_name(), and title().

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

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

◆ AppAction() [2/2]

Slic3r::GUI::AppAction::AppAction ( AppActionId id,
std::string title,
std::string source_key,
std::string source_name )
inlineprotected
122 : m_id(std::move(id.id)), m_title(std::move(title)), m_source_key(std::move(source_key)), m_source_name(std::move(source_name))
123 {}

References id(), m_id, m_source_key, m_source_name, m_title, source_key(), source_name(), and title().

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 )
inlinestatic
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 }

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
inline
52{ return m_id; }

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

◆ source_key()

const std::string & Slic3r::GUI::AppAction::source_key ( ) const
inline
54{ return m_source_key; } // stable source identity

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
inline

◆ title()

Member Data Documentation

◆ count

◆ favourite

◆ full_label

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

◆ full_label_en

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

◆ group

◆ group_en

◆ help_url

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

◆ icon

◆ input

◆ kind

◆ last

◆ m_id

std::string Slic3r::GUI::AppAction::m_id
private

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

◆ m_source_key

std::string Slic3r::GUI::AppAction::m_source_key
private

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

◆ m_source_name

std::string Slic3r::GUI::AppAction::m_source_name
private

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

◆ m_title

std::string Slic3r::GUI::AppAction::m_title
private

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

◆ required_mode

◆ source_en

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

◆ title_en

◆ tooltip

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

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