1#ifndef IV_SRC_MIMICS_MODEL_INDICATORS_TANK_HPP_
2#define IV_SRC_MIMICS_MODEL_INDICATORS_TANK_HPP_
23 void getChannels(
const std::shared_ptr<std::vector<std::weak_ptr<iv::channels::AbstractChannel>>>
24 &channelsInControl)
const override;
25 void mapChannels(
const std::function<
void(std::weak_ptr<iv::channels::AbstractChannel> &)> &mapFunction)
override;
26 [[nodiscard]] std::shared_ptr<iv::mimics::AbstractMimicElement>
clone()
const override;
30 [[nodiscard]] std::optional<iv::mimics::eAlarmState>
getAlarmState()
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;
54 std::weak_ptr<iv::tanks::Tank>
m_tank;
80 std::optional<iv::types::color> colorState,
IGraphics *graphics,
double sizeXFrame,
81 double sizeYFrame,
double sizeY)
const;
85 std::optional<iv::types::color> colorState, uint8_t numDecimals,
double sizeX,
88 std::optional<iv::types::color> colorState,
IGraphics *graphics)
const;
96 static constexpr std::string_view
tankName {
"TankName"};
98 static constexpr std::string_view
showVolume {
"ShowVolume"};
106 static constexpr std::string_view
showScale {
"ShowScale"};
108 static constexpr std::string_view
markType {
"MarkType"};
114 static constexpr std::string
string {};
138 static constexpr std::string_view
scale {
"Scale"};
Definition AbstractComponentGUI.hpp:30
Definition IGraphics.hpp:20
Definition xmlFile.hpp:15
Definition AbstractMimicElement.hpp:21
bool save(iv::file::xml::node &nodeTank) const override
Definition Tank.cpp:125
static constexpr double kPrvRelationXY
Definition Tank.hpp:42
std::shared_ptr< iv::mimics::AbstractMimicElement > clone() const override
Definition Tank.cpp:207
std::weak_ptr< iv::tanks::Tank > m_tank
Definition Tank.hpp:54
iv::types::color m_contentColor
Definition Tank.hpp:69
std::optional< iv::types::color > getColorWorkingState() const override
Retrieves the color representing the current working state of the element.
Definition Tank.cpp:212
std::optional< std::string > getStringWorkingState() const override
Definition Tank.cpp:234
std::unique_ptr< CRectangleGraphics > m_contentGraphic
Definition Tank.hpp:91
iv::types::color m_backgroundColor
Definition Tank.hpp:68
iv::mimics::elements::eMarkType m_markType
Definition Tank.hpp:76
iv::types::padding m_textInfoPadding
Definition Tank.hpp:65
void mapChannels(const std::function< void(std::weak_ptr< iv::channels::AbstractChannel > &)> &mapFunction) override
Processed gets ///.
Definition Tank.cpp:193
eInfoLocation
Definition Tank.hpp:47
bool load(const iv::file::xml::node &nodeTank) override
Definition Tank.cpp:76
bool m_showAlarmLimits
Definition Tank.hpp:75
std::optional< iv::mimics::eAlarmState > getAlarmState() const override
Definition Tank.cpp:244
iv::types::height m_textInfoHeight
Definition Tank.hpp:64
iv::mimics::elements::Tank::eInfoLocation m_locationInfo
Definition Tank.hpp:57
void drawLevelScale(const iv::channels::AnalogAlarmLimits &levelLimits, IGraphics *graphics, std::optional< iv::types::color > colorState, uint8_t numDecimals, double sizeX, double sizeY) const
Definition Tank.cpp:647
void drawLevelLimits(const iv::channels::AnalogAlarmLimits &levelLimits, IGraphics *graphics, double sizeX, double sizeY) const
Definition Tank.cpp:612
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 Tank.cpp:268
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 Tank.cpp:168
void executeCommand(const std::string &strAction) const override
Run actions ///.
Definition Tank.cpp:263
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 Tank.cpp:539
bool m_showVolumeInPercent
Definition Tank.hpp:59
bool m_showVolumeInMetersCubics
Definition Tank.hpp:60
bool m_showVolume
Definition Tank.hpp:58
Tank()
Definition Tank.cpp:24
bool m_showVolumeInLitres
Definition Tank.hpp:61
std::unique_ptr< CDiagram > m_scaleGraphic
Definition Tank.hpp:92
iv::mimics::support::Scale m_scale
Definition Tank.hpp:72
void drawTankInfo(bool hasValue, iv::types::channelValue tankVolumeValue, uint8_t numDecimals, std::optional< iv::types::color > colorState, IGraphics *graphics) const
Definition Tank.cpp:663
std::unique_ptr< CRectangleGraphics > m_containerGraphic
Definition Tank.hpp:90
void addOptionsMenu(const std::shared_ptr< iv::mimics::MimicControlMenu > &menu) override
Definition Tank.cpp:522
bool m_showWeight
Definition Tank.hpp:62
bool m_showSounding
Definition Tank.hpp:63
AbstractComponentGUI * panelEditControl() override
UI methods ///.
Definition Tank.cpp:368
constexpr iv::types::color Blue
Definition color.hpp:23
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
eMarkType
Definition enums.hpp:170
double height
Definition types.hpp:14
double channelValue
Definition types.hpp:67
double padding
Definition types.hpp:16
uint32_t color
Definition types.hpp:12
eLanguage
Definition enums.hpp:37
Definition structs.hpp:33
static constexpr iv::types::color text
Definition Tank.hpp:132
static constexpr std::string locationInfo
Definition Tank.hpp:115
static constexpr bool showScale
Definition Tank.hpp:125
static constexpr bool showVolumeInMeters
Definition Tank.hpp:119
static constexpr bool showVolumeInPercent
Definition Tank.hpp:118
static constexpr auto contentColor
Definition Tank.hpp:129
static constexpr auto backgroundColor
Definition Tank.hpp:128
static constexpr iv::types::height textValueHeight
Definition Tank.hpp:123
static constexpr auto markType
Definition Tank.hpp:127
static constexpr bool showSounding
Definition Tank.hpp:121
static constexpr iv::types::padding textValuePadding
Definition Tank.hpp:124
static constexpr bool showAlarmLimits
Definition Tank.hpp:126
static constexpr bool showWeight
Definition Tank.hpp:122
static constexpr bool showVolume
Definition Tank.hpp:117
static constexpr bool showVolumeInLitres
Definition Tank.hpp:120
static constexpr std::string_view showSounding
Definition Tank.hpp:102
static constexpr std::string_view showVolume
Definition Tank.hpp:98
static constexpr std::string_view showVolumeInPercent
Definition Tank.hpp:99
static constexpr std::string_view tankName
Definition Tank.hpp:96
static constexpr std::string_view showVolumeInMeters
Definition Tank.hpp:100
static constexpr std::string_view showWeight
Definition Tank.hpp:103
static constexpr std::string_view backgroundColor
Definition Tank.hpp:109
static constexpr std::string_view showScale
Definition Tank.hpp:106
static constexpr std::string_view contentColor
Definition Tank.hpp:110
static constexpr std::string_view showVolumeInLitres
Definition Tank.hpp:101
static constexpr std::string_view markType
Definition Tank.hpp:108
static constexpr std::string_view showAlarmLimits
Definition Tank.hpp:107
static constexpr std::string_view locationInfo
Definition Tank.hpp:97
static constexpr std::string_view textValueHeight
Definition Tank.hpp:104
static constexpr std::string_view textValuePadding
Definition Tank.hpp:105
static constexpr std::string_view tankIndicator
Definition Tank.hpp:137
static constexpr std::string_view scale
Definition Tank.hpp:138