Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
LogicText.hpp
Go to the documentation of this file.
1#ifndef IV_LOGIC_COMPONENTS_LOGICTEXT_HPP
2#define IV_LOGIC_COMPONENTS_LOGICTEXT_HPP
3
7
9{
10
11class LogicText final : public AbstractLogicsElement
12{
13public:
14 LogicText();
15 LogicText(AbstractCanvasItem::TId id, iv::logic::eLogicsElementType logicsElementType, const std::string &name);
16 ~LogicText() override = default;
17 explicit LogicText(const AbstractLogicsElement &other) = delete;
18 explicit LogicText(AbstractLogicsElement &&other) = delete;
19
20 iv::file::xml::node read(const iv::file::xml::node &node) override;
21 iv::file::xml::node save(iv::file::xml::node &node) const override;
22
23 [[nodiscard]] std::string getMainText() const override;
24 [[nodiscard]] std::string getDescriptiveText() const override;
25
26 void setText(const std::string &text);
27 std::string maxText() const override;
28
29private:
30 struct Sections
31 {
32 static constexpr std::string_view logicText {"LogicText"};
33 };
34 struct Keys
35 {
36 static constexpr std::string_view text {"Text"};
37 };
39 {
40 static constexpr std::string text {"EMPTY TEXT"};
41 };
42
44};
45
46}// namespace iv::logic::component
47
48#endif//IV_LOGIC_COMPONENTS_LOGICTEXT_HPP
uint32_t TId
Definition AbstractCanvasItem.hpp:47
Definition AbstractLogicsElement.hpp:15
Definition xmlFile.hpp:15
Definition LogicText.hpp:12
std::string maxText() const override
Definition LogicText.cpp:50
void setText(const std::string &text)
Definition LogicText.cpp:45
LogicText(const AbstractLogicsElement &other)=delete
iv::file::xml::node read(const iv::file::xml::node &node) override
Definition LogicText.cpp:15
LogicText()
Definition LogicText.cpp:6
std::string m_text
Definition LogicText.hpp:43
iv::file::xml::node save(iv::file::xml::node &node) const override
Definition LogicText.cpp:25
std::string getDescriptiveText() const override
Definition LogicText.cpp:40
LogicText(AbstractLogicsElement &&other)=delete
std::string getMainText() const override
Definition LogicText.cpp:35
~LogicText() override=default
Definition LogicRectangle.cpp:4
eLogicsElementType
Definition enums.hpp:8
static constexpr std::string text
Definition LogicText.hpp:40
Definition LogicText.hpp:35
static constexpr std::string_view text
Definition LogicText.hpp:36
static constexpr std::string_view logicText
Definition LogicText.hpp:32