Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CPanelLogicsEditSelectedChannel.hpp
Go to the documentation of this file.
1#ifndef LIBS_PANELS_CPANELLOGICSEDITSELECTEDCHANNEL_HPP_
2#define LIBS_PANELS_CPANELLOGICSEDITSELECTEDCHANNEL_HPP_
3
5#include "core/enums.hpp"
6
7#include <bits/stdint-uintn.h>
8#include <cstddef>
9#include <memory>
10#include <utility>
11
13class CComboBox;
14class CEdit;
16
18{
19public:
20 // IMPORTANT NOTE: TUnitChannelComboBox exist already in class 'CUnitsRestrictions'
21 // using uint16_t, but it needs to be redefined here using uint32_t,
22 // since this type is required to use it with CComboBox.
23 typedef std::pair<uint32_t, uint32_t> TUnitChannelComboBox;// <unitID, channelID>
24
25 explicit CPanelLogicsEditSelectedChannel(const CUnitsRestrictions::TUnitChannel &currentUnitChannel);
31
33
34 [[nodiscard]] uint32_t getUnitSelected(uint32_t option) const;
35 [[nodiscard]] uint32_t getChannelSelected(uint32_t option) const;
36
37 //these methods should be private, but they need to be accessible from within classes CPrvListenerSelect*:
39 void populateChannelComboBox(bool selectedUnitChanged);
40
43
44 [[nodiscard]] const std::string &getCurrentDescription() const;
45 [[nodiscard]] const std::string &getCurrentTag() const;
46 uint16_t getCurrentUnit() const;
47 [[nodiscard]] uint16_t getCurrentChannel() const;
48
49 [[nodiscard]] const TUnitChannelComboBox &getSelectedUnitChannel() const;
50
52 void setCurrentUnit(uint16_t unit);
53 void setCurrentChannel(uint16_t channel);
54
55private:
57 std::string m_currentTag;
59
65
66 TUnitChannelComboBox m_unitChannelComboBox;// This will hold the user selected unit and channel
67};
68
69#endif /* LIBS_PANELS_CPANELLOGICSEDITSELECTEDCHANNEL_HPP_ */
Definition AbstractComponentGUI.hpp:30
Definition CComboBox.hpp:48
Definition CEdit.hpp:40
Definition CMoveChannelRestrictions.hpp:9
Definition CPanelLogicsEditSelectedChannel.hpp:18
void populateChannelComboBox(bool selectedUnitChanged)
Definition CPanelLogicsEditSelectedChannel.cpp:220
size_t getCurrentChannelPopulationSize()
Definition CPanelLogicsEditSelectedChannel.cpp:250
const std::string & getCurrentDescription() const
Definition CPanelLogicsEditSelectedChannel.cpp:262
CPanelLogicsEditSelectedChannel & operator=(const CPanelLogicsEditSelectedChannel &other)=delete
CUnitsRestrictions::TUnitChannel m_currentUnitChannel
Definition CPanelLogicsEditSelectedChannel.hpp:56
CComboBox * m_comboBoxUnit
Definition CPanelLogicsEditSelectedChannel.hpp:60
void setCurrentTagAndDescription()
Definition CPanelLogicsEditSelectedChannel.cpp:288
std::string m_currentDescription
Definition CPanelLogicsEditSelectedChannel.hpp:58
CPanelLogicsEditSelectedChannel(CPanelLogicsEditSelectedChannel &&other)=delete
const std::string & getCurrentTag() const
Definition CPanelLogicsEditSelectedChannel.cpp:267
void setCurrentChannel(uint16_t channel)
Definition CPanelLogicsEditSelectedChannel.cpp:313
CPanelLogicsEditSelectedChannel & operator=(CPanelLogicsEditSelectedChannel &&other)=delete
std::pair< uint32_t, uint32_t > TUnitChannelComboBox
Definition CPanelLogicsEditSelectedChannel.hpp:23
CPanelLogicsEditSelectedChannel(const CUnitsRestrictions::TUnitChannel &currentUnitChannel)
Definition CPanelLogicsEditSelectedChannel.cpp:106
uint16_t getCurrentUnit() const
Definition CPanelLogicsEditSelectedChannel.cpp:272
iv::eLanguage m_activeLanguage
Definition CPanelLogicsEditSelectedChannel.hpp:64
uint32_t getUnitSelected(uint32_t option) const
Definition CPanelLogicsEditSelectedChannel.cpp:183
AbstractComponentGUI * buildPanel()
Definition CPanelLogicsEditSelectedChannel.cpp:125
CEdit * m_editTag
Definition CPanelLogicsEditSelectedChannel.hpp:62
void populateUnitComboBox()
Definition CPanelLogicsEditSelectedChannel.cpp:195
CComboBox * m_comboBoxChannel
Definition CPanelLogicsEditSelectedChannel.hpp:61
const TUnitChannelComboBox & getSelectedUnitChannel() const
Definition CPanelLogicsEditSelectedChannel.cpp:283
CPanelLogicsEditSelectedChannel(const CPanelLogicsEditSelectedChannel &other)=delete
size_t getCurrentUnitPopulationSize()
Definition CPanelLogicsEditSelectedChannel.cpp:256
void setCurrentUnit(uint16_t unit)
Definition CPanelLogicsEditSelectedChannel.cpp:308
std::string m_currentTag
Definition CPanelLogicsEditSelectedChannel.hpp:57
uint16_t getCurrentChannel() const
Definition CPanelLogicsEditSelectedChannel.cpp:277
CEdit * m_editDescription
Definition CPanelLogicsEditSelectedChannel.hpp:63
TUnitChannelComboBox m_unitChannelComboBox
Definition CPanelLogicsEditSelectedChannel.hpp:66
uint32_t getChannelSelected(uint32_t option) const
Definition CPanelLogicsEditSelectedChannel.cpp:189
std::pair< iv::types::unitId, iv::types::channelOrder > TUnitChannel
Definition CUnitsRestrictions.hpp:18
eLanguage
Definition enums.hpp:37