Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
Automatic.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_MIMICS_SUPPORT_AUTOMATIC_HPP_
2#define IV_SRC_MIMICS_SUPPORT_AUTOMATIC_HPP_
3
5#include "mimics/structs.hpp"
7
9{
10
12{
13 enum class eAutomaticState
14 {
16 Manual,
18 };
19
20public:
21 Automatic();
22
23 bool load(const iv::file::xml::node &nodeAutomatic);
24 bool save(iv::file::xml::node &nodeAutomatic) const;
25
26 //Controller
27 void getChannels(
28 const std::shared_ptr<std::vector<std::weak_ptr<iv::channels::AbstractChannel>>> &channelsInControl) const;
29 void mapChannels(const std::function<void(std::weak_ptr<iv::channels::AbstractChannel> &)> &mapFunction);
30
31 // Processed UI Gets
32 std::string_view getIconState() const;
33
34 // UI
36
38
40
44
47
48private:
49 [[nodiscard]] eAutomaticState getAutomaticState() const;
50
51 struct Keys
52 {
53 static constexpr std::string_view withAutomatic {"WithAutomatic"};
54 static constexpr std::string_view hasManualFeedback {"HasManualFeedback"};
55 };
57 {
58 static constexpr bool withAutomatic {false};
59 static constexpr bool hasManualFeedback {false};
60 };
61 struct Sections
62 {
63 static constexpr std::string_view hideCommandsSettings {"HideCommandsSettings"};
64 static constexpr std::string_view automaticCommand {"AutomaticCommand"};
65 static constexpr std::string_view manualCommand {"ManualCommand"};
66 static constexpr std::string_view automaticFeedback {"AutomaticFeedback"};
67 static constexpr std::string_view manualFeedback {"ManualFeedback"};
68 };
69};
70
71}// namespace iv::mimics::support
72
73#endif//IV_SRC_MIMICS_SUPPORT_AUTOMATIC_HPP_
Definition AbstractComponentGUI.hpp:30
Definition xmlFile.hpp:15
Definition Channel.hpp:12
Definition Automatic.hpp:12
iv::mimics::Channel m_automaticCommand
Definition Automatic.hpp:41
bool m_withAutomatic
Definition Automatic.hpp:37
iv::mimics::Channel m_manualFeedback
Definition Automatic.hpp:46
iv::mimics::Channel m_manualCommand
Definition Automatic.hpp:42
bool m_hasManualFeedback
Definition Automatic.hpp:45
void getChannels(const std::shared_ptr< std::vector< std::weak_ptr< iv::channels::AbstractChannel > > > &channelsInControl) const
Definition Automatic.cpp:66
void mapChannels(const std::function< void(std::weak_ptr< iv::channels::AbstractChannel > &)> &mapFunction)
Definition Automatic.cpp:88
std::string_view getIconState() const
Definition Automatic.cpp:103
bool save(iv::file::xml::node &nodeAutomatic) const
Definition Automatic.cpp:42
Automatic()
Definition Automatic.cpp:12
eAutomaticState
Definition Automatic.hpp:14
AbstractComponentGUI * panelEditAutomatic()
Definition Automatic.cpp:116
iv::mimics::Channel m_automaticFeedback
Definition Automatic.hpp:43
bool load(const iv::file::xml::node &nodeAutomatic)
Definition Automatic.cpp:18
eAutomaticState getAutomaticState() const
Definition Automatic.cpp:154
iv::mimics::HideCommandsSettings m_hideCommandsSettings
Definition Automatic.hpp:39
Definition Attempt.cpp:9
Definition structs.hpp:147
static constexpr bool withAutomatic
Definition Automatic.hpp:58
static constexpr bool hasManualFeedback
Definition Automatic.hpp:59
Definition Automatic.hpp:52
static constexpr std::string_view hasManualFeedback
Definition Automatic.hpp:54
static constexpr std::string_view withAutomatic
Definition Automatic.hpp:53
Definition Automatic.hpp:62
static constexpr std::string_view automaticFeedback
Definition Automatic.hpp:66
static constexpr std::string_view manualFeedback
Definition Automatic.hpp:67
static constexpr std::string_view hideCommandsSettings
Definition Automatic.hpp:63
static constexpr std::string_view manualCommand
Definition Automatic.hpp:65
static constexpr std::string_view automaticCommand
Definition Automatic.hpp:64