1#ifndef IV_SRC_MIMICS_INDICATORS_LEVELBAR_HPP_
2#define IV_SRC_MIMICS_INDICATORS_LEVELBAR_HPP_
25 void getChannels(
const std::shared_ptr<std::vector<std::weak_ptr<iv::channels::AbstractChannel>>>
26 &channelsInControl)
const override;
27 void mapChannels(
const std::function<
void(std::weak_ptr<iv::channels::AbstractChannel> &)> &mapFunction)
override;
28 [[nodiscard]] std::shared_ptr<iv::mimics::AbstractMimicElement>
clone()
const override;
30 [[nodiscard]] std::optional<iv::mimics::eAlarmState>
getAlarmState()
const override;
37 std::optional<iv::types::color> colorControlState,
iv::eLanguage drawingLanguage)
override;
49 std::optional<iv::types::color> colorState,
IGraphics *graphics,
double sizeXFrame,
50 double sizeYFrame,
double sizeY)
const;
54 std::optional<iv::types::color> colorState, uint8_t numDecimals,
double sizeX,
86 static constexpr std::string_view
valueType {
"ValueType"};
88 static constexpr std::string_view
markType {
"MarkType"};
89 static constexpr std::string_view
showScale {
"ShowScale"};
91 static constexpr std::string_view
scaleColor {
"ScaleColor"};
99 static constexpr std::string
string {};
106 static constexpr std::string
markType {
"ShortLine"};
122 static constexpr std::string_view
levelBal {
"LevelBar"};
123 static constexpr std::string_view
scale {
"Scale"};
124 static constexpr std::string_view
channel {
"LevelChannel"};
Definition AbstractComponentGUI.hpp:30
Definition IGraphics.hpp:20
Definition xmlFile.hpp:15
Definition AbstractMimicElement.hpp:21
Definition Channel.hpp:12
Definition LevelBar.hpp:16
std::optional< iv::mimics::eAlarmState > getAlarmState() const override
Definition LevelBar.cpp:161
iv::types::color m_backgroundColor
Definition LevelBar.hpp:62
bool save(iv::file::xml::node &nodeControlMimic) const override
Definition LevelBar.cpp:117
iv::types::color m_foregroundColor
Definition LevelBar.hpp:63
iv::types::height m_textValueHeight
Definition LevelBar.hpp:65
void drawLevelValue(bool hasValue, iv::types::channelValue value, std::optional< iv::types::color > colorState, IGraphics *graphics) const
Definition LevelBar.cpp:530
void executeCommand(const std::string &strAction) const override
Run actions ///.
Definition LevelBar.cpp:205
void drawLevelBar(iv::types::channelValue value, const iv::channels::AnalogAlarmLimits &levelLimits, std::optional< iv::types::color > colorState, IGraphics *graphics, double sizeXFrame, double sizeYFrame, double sizeY) const
Definition LevelBar.cpp:406
void drawLevelScale(const iv::channels::AnalogAlarmLimits &levelLimits, IGraphics *graphics, std::optional< iv::types::color > colorState, uint8_t numDecimals, double sizeX, double sizeY) const
Definition LevelBar.cpp:514
bool m_showAlarmLimits
Definition LevelBar.hpp:69
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 LevelBar.cpp:144
iv::mimics::elements::eMarkType m_markType
Definition LevelBar.hpp:70
std::unique_ptr< CDiagram > m_scaleGraphic
Definition LevelBar.hpp:78
~LevelBar() override=default
std::unique_ptr< CRectangleGraphics > m_contentGraphic
Definition LevelBar.hpp:77
std::shared_ptr< iv::mimics::AbstractMimicElement > clone() const override
Definition LevelBar.cpp:156
iv::mimics::elements::eValueType m_valueType
Definition LevelBar.hpp:66
iv::mimics::support::Scale m_scale
Definition LevelBar.hpp:73
std::unique_ptr< CRectangleGraphics > m_containerGraphic
Definition LevelBar.hpp:76
iv::mimics::Channel m_channel
Definition LevelBar.hpp:59
static constexpr double kPrvRelationXY
Definition LevelBar.hpp:43
AbstractComponentGUI * panelEditControl() override
UI methods ///.
Definition LevelBar.cpp:295
void mapChannels(const std::function< void(std::weak_ptr< iv::channels::AbstractChannel > &)> &mapFunction) override
Processed gets ///.
Definition LevelBar.cpp:151
std::optional< std::string > getStringWorkingState() const override
Definition LevelBar.cpp:195
LevelBar()
Definition LevelBar.cpp:27
bool m_showTextValue
Definition LevelBar.hpp:64
std::optional< iv::types::color > getColorWorkingState() const override
Retrieves the color representing the current working state of the element.
Definition LevelBar.cpp:177
void drawLevelLimits(const iv::channels::AnalogAlarmLimits &levelLimits, IGraphics *graphics, double sizeX, double sizeY) const
Definition LevelBar.cpp:479
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 LevelBar.cpp:210
bool load(const iv::file::xml::node &nodeControlMimic) override
Definition LevelBar.cpp:60
constexpr iv::types::color White
Definition color.hpp:222
constexpr iv::types::color ControlAnalogicWarning
Definition color.hpp:425
constexpr iv::types::color ControlAnalogicAlarm
Definition color.hpp:424
constexpr iv::types::color LevelAnalogTankLine
Definition color.hpp:465
constexpr iv::types::color DarkGray
Definition color.hpp:59
eScalePosition
Definition enums.hpp:177
eMarkType
Definition enums.hpp:170
eValueType
Definition enums.hpp:183
double height
Definition types.hpp:14
double channelValue
Definition types.hpp:67
double width
Definition types.hpp:23
uint32_t color
Definition types.hpp:12
eLanguage
Definition enums.hpp:37
Definition structs.hpp:33
Definition LevelBar.hpp:116
static constexpr iv::types::color text
Definition LevelBar.hpp:117
Definition LevelBar.hpp:98
static constexpr iv::types::height scaleTextHeight
Definition LevelBar.hpp:108
static constexpr iv::types::color foregroundColor
Definition LevelBar.hpp:101
static constexpr bool showAlarmLimits
Definition LevelBar.hpp:105
static constexpr iv::types::height textValueHeight
Definition LevelBar.hpp:103
static constexpr iv::types::color scaleColor
Definition LevelBar.hpp:109
static constexpr std::string valueType
Definition LevelBar.hpp:104
static constexpr iv::types::width scaleLineWidth
Definition LevelBar.hpp:114
static constexpr uint8_t divisionsNumber
Definition LevelBar.hpp:112
static constexpr iv::mimics::elements::eScalePosition scalePosition
Definition LevelBar.hpp:110
static constexpr std::string markType
Definition LevelBar.hpp:106
static constexpr iv::types::color backgroundColor
Definition LevelBar.hpp:100
static constexpr uint8_t subdivisionsNumber
Definition LevelBar.hpp:113
static constexpr bool showTextValue
Definition LevelBar.hpp:102
static constexpr bool showScale
Definition LevelBar.hpp:107
Definition LevelBar.hpp:81
static constexpr std::string_view scaleTextHeight
Definition LevelBar.hpp:90
static constexpr std::string_view scalePosition
Definition LevelBar.hpp:92
static constexpr std::string_view textValueHeight
Definition LevelBar.hpp:85
static constexpr std::string_view showAlarmLimits
Definition LevelBar.hpp:87
static constexpr std::string_view valueType
Definition LevelBar.hpp:86
static constexpr std::string_view scaleColor
Definition LevelBar.hpp:91
static constexpr std::string_view showScale
Definition LevelBar.hpp:89
static constexpr std::string_view divisionsNumber
Definition LevelBar.hpp:93
static constexpr std::string_view scaleLineWidth
Definition LevelBar.hpp:95
static constexpr std::string_view showTextValue
Definition LevelBar.hpp:84
static constexpr std::string_view backgroundColor
Definition LevelBar.hpp:82
static constexpr std::string_view foregroundColor
Definition LevelBar.hpp:83
static constexpr std::string_view markType
Definition LevelBar.hpp:88
static constexpr std::string_view subdivisionsNumber
Definition LevelBar.hpp:94
Definition LevelBar.hpp:121
static constexpr std::string_view channel
Definition LevelBar.hpp:124
static constexpr std::string_view scale
Definition LevelBar.hpp:123
static constexpr std::string_view levelBal
Definition LevelBar.hpp:122