Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CommandsStartStop.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_MIMICS_MODEL_TRAITS_COMMANDSSTARTSTOP_HPP_
2#define IV_SRC_MIMICS_MODEL_TRAITS_COMMANDSSTARTSTOP_HPP_
3
6
7namespace iv::mimics::traits
8{
9
11{
12public:
14
15 bool loadCommandsStartStop(const iv::file::xml::node &nodeStartStop);
16 bool saveCommandsStartStop(iv::file::xml::node &nodeStartStop) const;
17
18 //Controller
20 const std::shared_ptr<std::vector<std::weak_ptr<iv::channels::AbstractChannel>>> &channelsInControl) const;
22 const std::function<void(std::weak_ptr<iv::channels::AbstractChannel> &)> &mapFunction);
23 [[nodiscard]] iv::mimics::Channel getCommandStart() const;
24 [[nodiscard]] iv::mimics::Channel getCommandStop() const;
25
26 // UI
28 void addTraitOptionsMenu(const std::shared_ptr<iv::mimics::MimicControlMenu> &menu,
29 const std::optional<std::function<bool(CDialog *)>> &startStopCommandEvaluation) const;
30
33
34private:
35 struct Sections
36 {
37 static constexpr std::string_view commandStart {"CommandStart"};
38 static constexpr std::string_view commandStop {"CommandStop"};
39 };
40};
41
42}// namespace iv::mimics::traits
43
44#endif//IV_SRC_MIMICS_MODEL_TRAITS_COMMANDSSTARTSTOP_HPP_
Definition AbstractComponentGUI.hpp:30
Definition CDialog.hpp:21
Definition xmlFile.hpp:15
Definition Channel.hpp:12
Definition CommandsStartStop.hpp:11
iv::mimics::Channel m_commandStart
Definition CommandsStartStop.hpp:31
void mapChannelsCommandsStartStop(const std::function< void(std::weak_ptr< iv::channels::AbstractChannel > &)> &mapFunction)
Definition CommandsStartStop.cpp:50
iv::mimics::Channel getCommandStart() const
Definition CommandsStartStop.cpp:57
bool saveCommandsStartStop(iv::file::xml::node &nodeStartStop) const
Definition CommandsStartStop.cpp:27
iv::mimics::Channel m_commandStop
Definition CommandsStartStop.hpp:32
iv::mimics::Channel getCommandStop() const
Definition CommandsStartStop.cpp:62
AbstractComponentGUI * panelEditCommands()
Definition CommandsStartStop.cpp:67
void getChannelsCommandsStartStop(const std::shared_ptr< std::vector< std::weak_ptr< iv::channels::AbstractChannel > > > &channelsInControl) const
Definition CommandsStartStop.cpp:40
void addTraitOptionsMenu(const std::shared_ptr< iv::mimics::MimicControlMenu > &menu, const std::optional< std::function< bool(CDialog *)> > &startStopCommandEvaluation) const
Definition CommandsStartStop.cpp:84
bool loadCommandsStartStop(const iv::file::xml::node &nodeStartStop)
Definition CommandsStartStop.cpp:14
Definition enums.hpp:200
Definition CommandsStartStop.hpp:36
static constexpr std::string_view commandStart
Definition CommandsStartStop.hpp:37
static constexpr std::string_view commandStop
Definition CommandsStartStop.hpp:38