1#ifndef IV_SRC_MIMICS_CONTROLS_COMMAND_HPP_
2#define IV_SRC_MIMICS_CONTROLS_COMMAND_HPP_
8#include "model/structs.hpp"
27 void getChannels(
const std::shared_ptr<std::vector<std::weak_ptr<iv::channels::AbstractChannel>>>
28 &channelsInControl)
const override;
29 void mapChannels(
const std::function<
void(std::weak_ptr<iv::channels::AbstractChannel> &)> &mapFunction)
override;
31 [[nodiscard]] std::shared_ptr<iv::mimics::AbstractMimicElement>
clone()
const override;
35 std::optional<iv::types::color> colorControlState,
iv::eLanguage drawingLanguage)
override;
39 void addOptionsMenu(
const std::shared_ptr<iv::mimics::MimicControlMenu> &menu)
override;
63 static constexpr std::string_view
textHeight {
"TextHeight"};
70 static constexpr std::string
string {};
80 static constexpr std::string_view
command {
"CommandChannel"};
82 static constexpr std::string_view
tripReset {
"TripReset"};
83 static constexpr std::string_view
messages {
"Messages"};
84 static constexpr std::string_view
message {
"Message"};
87 static constexpr std::string_view
hasPassword {
"HasPassword"};
Definition AbstractComponentGUI.hpp:30
Definition IGraphics.hpp:20
Definition xmlFile.hpp:15
Definition AbstractMimicElement.hpp:21
Definition Channel.hpp:12
Definition Command.hpp:16
iv::types::height m_textHeight
Definition Command.hpp:57
bool save(iv::file::xml::node &nodeControlMimic) const override
Definition Command.cpp:75
void drawSpecific(IGraphics *graphics, std::optional< iv::types::color > colorWorkingState, std::optional< iv::types::color > colorControlState, iv::eLanguage drawingLanguage) override
Draws the specific abstract element shape.
Definition Command.cpp:170
void executeCommand(const std::string &strAction) const override
Run actions ///.
Definition Command.cpp:160
bool load(const iv::file::xml::node &nodeControlMimic) override
Definition Command.cpp:42
bool m_hasConfirmation
Definition Command.hpp:50
iv::mimics::Channel m_command
Definition Command.hpp:44
Command()
Definition Command.cpp:20
iv::mimics::Channel m_closeChannel
Definition Command.hpp:45
void getChannels(const std::shared_ptr< std::vector< std::weak_ptr< iv::channels::AbstractChannel > > > &channelsInControl) const override
AƱade los canales que el MimicElement tiene enlazado.
Definition Command.cpp:141
void mapChannels(const std::function< void(std::weak_ptr< iv::channels::AbstractChannel > &)> &mapFunction) override
Processed gets ///.
Definition Command.cpp:153
iv::types::color m_messageColor
Definition Command.hpp:47
~Command() override=default
bool m_hasPassword
Definition Command.hpp:54
AbstractComponentGUI * panelEditControl() override
UI methods ///.
Definition Command.cpp:210
std::unique_ptr< CDrawText > m_drawText
Definition Command.hpp:59
iv::model::LocalizedText m_message
Definition Command.hpp:48
std::shared_ptr< iv::mimics::AbstractMimicElement > clone() const override
Definition Command.cpp:165
iv::types::color m_confirmationMessageColor
Definition Command.hpp:51
void updateEnabledLanguages(const std::set< iv::eLanguage > &enabledLanguages) override
Definition Command.cpp:105
void addOptionsMenu(const std::shared_ptr< iv::mimics::MimicControlMenu > &menu) override
Definition Command.cpp:302
iv::model::LocalizedText m_confirmationMessage
Definition Command.hpp:52
std::unique_ptr< CRectangleGraphics > m_rectangleOpt
Definition Command.hpp:58
Definition TripReset.hpp:12
constexpr iv::types::color White
Definition color.hpp:222
constexpr iv::types::color Red
Definition color.hpp:179
double height
Definition types.hpp:14
uint32_t color
Definition types.hpp:12
eLanguage
Definition enums.hpp:37
Definition Command.hpp:92
static constexpr iv::types::color text
Definition Command.hpp:93
Definition Command.hpp:90
Definition Command.hpp:69
static constexpr iv::types::height textHeight
Definition Command.hpp:71
static constexpr iv::types::color confirmationMessageColor
Definition Command.hpp:74
static constexpr bool hasConfirmation
Definition Command.hpp:73
static constexpr iv::types::color messageColor
Definition Command.hpp:72
static constexpr bool hasPassword
Definition Command.hpp:75
Definition Command.hpp:62
static constexpr std::string_view hasConfirmation
Definition Command.hpp:65
static constexpr std::string_view confirmationMessageColor
Definition Command.hpp:66
static constexpr std::string_view textHeight
Definition Command.hpp:63
static constexpr std::string_view messageColor
Definition Command.hpp:64
Definition Command.hpp:78
static constexpr std::string_view confirmationMessage
Definition Command.hpp:86
static constexpr std::string_view commandControl
Definition Command.hpp:79
static constexpr std::string_view hasPassword
Definition Command.hpp:87
static constexpr std::string_view tripReset
Definition Command.hpp:82
static constexpr std::string_view command
Definition Command.hpp:80
static constexpr std::string_view message
Definition Command.hpp:84
static constexpr std::string_view confirmationMessages
Definition Command.hpp:85
static constexpr std::string_view messages
Definition Command.hpp:83
static constexpr std::string_view closeChannel
Definition Command.hpp:81
Definition structs.hpp:29