Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
Shaft.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_MIMICS_INDICATORS_SHAFT_HPP_
2#define IV_SRC_MIMICS_INDICATORS_SHAFT_HPP_
3
6
8{
9
10class Shaft final : public iv::mimics::Digital
11{
12public:
13 Shaft();
14 ~Shaft() override = default;
15
16 bool load(const iv::file::xml::node &nodeControlMimic) override;
17 bool save(iv::file::xml::node &nodeControlMimic) const override;
18
19 // Controller
20 [[nodiscard]] std::shared_ptr<iv::mimics::AbstractMimicElement> clone() const override;
21 [[nodiscard]] std::optional<iv::types::color> getColorWorkingState() const override;
22
23 // View
24 void drawSpecific(IGraphics *graphics, std::optional<iv::types::color> colorWorkingState,
25 std::optional<iv::types::color> colorControlState, iv::eLanguage drawingLanguage) override;
26
27 // UI
29
30private:
31 Shaft(const Shaft &other);
32
33 // Draw
34 std::unique_ptr<CRectangleGraphics> m_rectangleOpt {nullptr};
35
36 struct Sections
37 {
38 static constexpr std::string_view shaftIndicator {"ShaftIndicator"};
39 };
53};
54
55}// namespace iv::mimics::elements
56
57#endif//IV_SRC_MIMICS_INDICATORS_SHAFT_HPP_
Definition AbstractComponentGUI.hpp:30
Definition IGraphics.hpp:20
Definition xmlFile.hpp:15
Definition Digital.hpp:15
Definition Shaft.hpp:11
Shaft()
Definition Shaft.cpp:14
bool load(const iv::file::xml::node &nodeControlMimic) override
Definition Shaft.cpp:22
AbstractComponentGUI * panelEditControl() override
UI methods ///.
Definition Shaft.cpp:86
std::shared_ptr< iv::mimics::AbstractMimicElement > clone() const override
Definition Shaft.cpp:36
~Shaft() override=default
bool save(iv::file::xml::node &nodeControlMimic) const override
Definition Shaft.cpp:27
std::optional< iv::types::color > getColorWorkingState() const override
Retrieves the color representing the current working state of the element.
Definition Shaft.cpp:41
std::unique_ptr< CRectangleGraphics > m_rectangleOpt
Definition Shaft.hpp:34
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 Shaft.cpp:62
constexpr iv::types::color SedniElementNotWorkingBlack
Definition color.hpp:338
constexpr iv::types::color SedniElementWorkingGreen
Definition color.hpp:337
constexpr iv::types::color White
Definition color.hpp:222
constexpr iv::types::color SedniElementOfflineBlack
Definition color.hpp:345
constexpr iv::types::color SedniElementUndefined
Definition color.hpp:344
constexpr iv::types::color Gray
Definition color.hpp:91
Definition enums.hpp:95
uint32_t color
Definition types.hpp:12
eLanguage
Definition enums.hpp:37
static constexpr iv::types::color withoutState
Definition Shaft.hpp:45
static constexpr iv::types::color color
Definition Shaft.hpp:44
static constexpr iv::types::color workingStateClose
Definition Shaft.hpp:48
static constexpr iv::types::color workingStateUndefined
Definition Shaft.hpp:49
static constexpr iv::types::color workingStateOpen
Definition Shaft.hpp:47
static constexpr iv::types::color workingStateOffline
Definition Shaft.hpp:50
static constexpr std::string_view shaftIndicator
Definition Shaft.hpp:38