Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
LogicRectangle.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_LOGIC_COMPONENTS_LOGICRECTANGLE_HPP_
2#define IV_SRC_LOGIC_COMPONENTS_LOGICRECTANGLE_HPP_
3
7
9{
10
12{
13public:
15 LogicRectangle(AbstractCanvasItem::TId id, iv::logic::eLogicsElementType logicsElementType, const std::string &name);
16 ~LogicRectangle() override = default;
17 explicit LogicRectangle(const AbstractLogicsElement &other) = delete;
18 explicit LogicRectangle(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]] iv::types::Size getSize() const;
24 void setSize(iv::types::Size size);
25
26 [[nodiscard]] std::optional<iv::types::Size> getDefaultSize() const override;
27
28private:
29 struct Sections
30 {
31 static constexpr std::string_view logicRectangle {"LogicRectangle"};
32 };
33 struct Keys
34 {
35 static constexpr std::string_view width {"Width"};
36 static constexpr std::string_view height {"Height"};
37 };
39 {
40 static constexpr iv::types::Size size {50, 50};
41 };
42
44};
45
46}// namespace iv::logic::component
47
48#endif//IV_SRC_LOGIC_COMPONENTS_LOGICRECTANGLE_HPP_
uint32_t TId
Definition AbstractCanvasItem.hpp:47
Definition AbstractLogicsElement.hpp:15
Definition xmlFile.hpp:15
Definition LogicRectangle.hpp:12
LogicRectangle(AbstractLogicsElement &&other)=delete
LogicRectangle()
Definition LogicRectangle.cpp:5
iv::types::Size m_size
Definition LogicRectangle.hpp:43
void setSize(iv::types::Size size)
Definition LogicRectangle.cpp:42
iv::types::Size getSize() const
Definition LogicRectangle.cpp:37
iv::file::xml::node read(const iv::file::xml::node &node) override
Definition LogicRectangle.cpp:15
LogicRectangle(const AbstractLogicsElement &other)=delete
std::optional< iv::types::Size > getDefaultSize() const override
Definition LogicRectangle.cpp:47
iv::file::xml::node save(iv::file::xml::node &node) const override
Definition LogicRectangle.cpp:26
Definition LogicRectangle.cpp:4
eLogicsElementType
Definition enums.hpp:8
static constexpr iv::types::Size size
Definition LogicRectangle.hpp:40
Definition LogicRectangle.hpp:34
static constexpr std::string_view width
Definition LogicRectangle.hpp:35
static constexpr std::string_view height
Definition LogicRectangle.hpp:36
Definition LogicRectangle.hpp:30
static constexpr std::string_view logicRectangle
Definition LogicRectangle.hpp:31
Definition types.hpp:151