Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CommandsOpCl.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_MIMICS_MODEL_TRAITS_COMMANDSOPCL_HPP_
2#define IV_SRC_MIMICS_MODEL_TRAITS_COMMANDSOPCL_HPP_
3
6#include "mimics/structs.hpp"
7
8namespace iv::mimics::traits
9{
10
12{
13public:
15
16 bool loadCommandsOpCl(const iv::file::xml::node &nodeStartStop);
17 bool saveCommandsOpCl(iv::file::xml::node &nodeStartStop) const;
18
19 //Controller
21 const std::shared_ptr<std::vector<std::weak_ptr<iv::channels::AbstractChannel>>> &channelsInControl) const;
22 void
23 mapChannelsCommandsOpCl(const std::function<void(std::weak_ptr<iv::channels::AbstractChannel> &)> &mapFunction);
24
25 // UI
27 void addTraitOptionsMenu(const std::shared_ptr<iv::mimics::MimicControlMenu> &menu,
28 const std::optional<std::function<bool(CDialog *)>> &commandEvaluation,
29 bool swapColors = false) const;
30
33
34private:
35 struct Sections
36 {
37 static constexpr std::string_view commandOpen {"CommandOpen"};
38 static constexpr std::string_view commandClose {"CommandClose"};
39 };
40};
41
42}// namespace iv::mimics::traits
43
44#endif//IV_SRC_MIMICS_MODEL_TRAITS_COMMANDSOPCL_HPP_
Definition AbstractComponentGUI.hpp:30
Definition CDialog.hpp:21
Definition xmlFile.hpp:15
Definition Channel.hpp:12
Definition CommandsOpCl.hpp:12
void mapChannelsCommandsOpCl(const std::function< void(std::weak_ptr< iv::channels::AbstractChannel > &)> &mapFunction)
Definition CommandsOpCl.cpp:49
void getChannelsCommandsOpCl(const std::shared_ptr< std::vector< std::weak_ptr< iv::channels::AbstractChannel > > > &channelsInControl) const
Definition CommandsOpCl.cpp:39
bool loadCommandsOpCl(const iv::file::xml::node &nodeStartStop)
Definition CommandsOpCl.cpp:13
iv::mimics::Channel m_commandClose
Definition CommandsOpCl.hpp:32
iv::mimics::Channel m_commandOpen
Definition CommandsOpCl.hpp:31
void addTraitOptionsMenu(const std::shared_ptr< iv::mimics::MimicControlMenu > &menu, const std::optional< std::function< bool(CDialog *)> > &commandEvaluation, bool swapColors=false) const
Definition CommandsOpCl.cpp:73
bool saveCommandsOpCl(iv::file::xml::node &nodeStartStop) const
Definition CommandsOpCl.cpp:26
AbstractComponentGUI * panelEditCommands()
Definition CommandsOpCl.cpp:56
Definition enums.hpp:200
Definition CommandsOpCl.hpp:36
static constexpr std::string_view commandOpen
Definition CommandsOpCl.hpp:37
static constexpr std::string_view commandClose
Definition CommandsOpCl.hpp:38