MythTV  master
diseqcsettings.h
Go to the documentation of this file.
1 /*
2  * \file diseqcsettings.h
3  * \brief DVB-S Device Tree Configuration Classes.
4  * \author Copyright (C) 2006, Yeasah Pell
5  */
6 
7 #ifndef DISEQCSETTINGS_H
8 #define DISEQCSETTINGS_H
9 
10 #include "diseqc.h"
11 #include "standardsettings.h"
12 
13 using devid_to_setting_t = QMap<uint, StandardSetting*>;
14 
15 class SwitchTypeSetting;
16 class SwitchPortsSetting;
18 class DeviceDescrSetting;
19 
21 {
22  Q_OBJECT
23 
24  public:
25  bool keyPressEvent(QKeyEvent *event) override; // StandardSetting
27  StandardSetting *parent);
28 
29  signals:
30  void DeleteClicked(void);
31 };
32 
34 {
35  Q_OBJECT
36 
37  public:
38  SwitchConfig(DiSEqCDevSwitch &switch_dev, StandardSetting *parent);
39  void Load(void) override; // StandardSetting
40 
41  public slots:
42  void update(void);
43 
44  private:
49 };
50 
51 class RotorPosMap : public GroupSetting
52 {
53  Q_OBJECT
54 
55  public:
56  explicit RotorPosMap(DiSEqCDevRotor &rotor) :
57  m_rotor(rotor) { }
58 
59  void Load(void) override; // StandardSetting
60  void Save(void) override; // StandardSetting
61 
62  private slots:
63  void valueChanged(StandardSetting *setting);
64 
65  protected:
66  void PopulateList(void);
67 
68  private:
71 };
72 
74 {
75  Q_OBJECT
76 
77  public:
78  void Load() override; // StandardSetting
80 
81  public slots:
82  void SetType(const QString &type);
83 
84  private:
86  RotorPosMap *m_pos {nullptr};
87 };
88 
90 {
91  Q_OBJECT
92 
93  public:
94  SCRConfig(DiSEqCDevSCR &scr, StandardSetting* parent);
95 
96  private:
98 };
99 
100 class LNBTypeSetting;
101 class LNBLOFSwitchSetting;
102 class LNBLOFLowSetting;
103 class LNBLOFHighSetting;
105 class LNBPresetSetting;
106 
108 {
109  Q_OBJECT
110 
111  public:
112  LNBConfig(DiSEqCDevLNB &lnb, StandardSetting *parent);
113  void Load(void) override; // StandardSetting
114 
115  public slots:
116  void SetPreset(const QString &value);
117  void UpdateType(void);
118 
119  private:
121  LNBTypeSetting *m_type {nullptr};
126 };
127 
128 class DeviceTypeSetting;
129 
130 class DeviceTree : public GroupSetting
131 {
132  Q_OBJECT
133 
134  public:
135  explicit DeviceTree(DiSEqCDevTree &tree) :
136  m_tree(tree) { }
137  void DeleteDevice(DeviceTypeSetting *devtype);
138 
139  void Load(void) override; // StandardSetting
140 
141  protected:
142  void PopulateTree(void);
143  void PopulateTree(DiSEqCDevDevice *node,
144  DiSEqCDevDevice *parent = nullptr,
145  uint childnum = 0,
146  GroupSetting *parentSetting = nullptr);
147  void PopulateChildren(DiSEqCDevDevice *node, GroupSetting *parentSetting);
149  DiSEqCDevDevice *parent,
150  uint childnum,
151  GroupSetting *parentSetting);
153  DiSEqCDevDevice *parent,
154  uint childnum);
155  void ValueChanged(const QString &value,
156  DeviceTypeSetting *devtype,
157  DiSEqCDevDevice *parent,
158  uint childnum);
159 
160  private:
162 };
163 
165 {
166  public:
167  DTVDeviceConfigGroup(DiSEqCDevSettings &settings, uint cardid,
168  bool switches_enabled);
169  ~DTVDeviceConfigGroup(void) override = default;
170 
171  protected:
172  void AddNodes(StandardSetting *group, const QString &trigger,
173  DiSEqCDevDevice *node);
174 
175  static void AddChild(StandardSetting *group, const QString &trigger,
176  StandardSetting *setting);
177 
178  private:
183 };
184 
185 #endif // DISEQCSETTINGS_H
DeviceTree
Definition: diseqcsettings.h:131
LNBConfig::m_lofLo
LNBLOFLowSetting * m_lofLo
Definition: diseqcsettings.h:123
DeviceTree::AddDeviceTypeSetting
void AddDeviceTypeSetting(DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum, GroupSetting *parentSetting)
Definition: diseqcsettings.cpp:1114
LNBConfig::m_preset
LNBPresetSetting * m_preset
Definition: diseqcsettings.h:120
RotorConfig::Load
void Load() override
Definition: diseqcsettings.cpp:567
SwitchTypeSetting
Definition: diseqcsettings.cpp:154
DTVDeviceConfigGroup::DTVDeviceConfigGroup
DTVDeviceConfigGroup(DiSEqCDevSettings &settings, uint cardid, bool switches_enabled)
Definition: diseqcsettings.cpp:1357
SCRConfig::m_scr
DiSEqCDevSCR & m_scr
Definition: diseqcsettings.h:97
DiSEqCDevRotor
Rotor class.
Definition: diseqc.h:297
LNBConfig::SetPreset
void SetPreset(const QString &value)
Definition: diseqcsettings.cpp:952
DeviceTree::PopulateChildren
void PopulateChildren(DiSEqCDevDevice *node, GroupSetting *parentSetting)
Definition: diseqcsettings.cpp:1143
SwitchConfig
Definition: diseqcsettings.h:34
DTVDeviceConfigGroup
Definition: diseqcsettings.h:165
diseqc.h
LNBTypeSetting
Definition: diseqcsettings.cpp:764
DTVDeviceConfigGroup::m_devs
devid_to_setting_t m_devs
Definition: diseqcsettings.h:181
LNBConfig::m_lofHi
LNBLOFHighSetting * m_lofHi
Definition: diseqcsettings.h:124
DeviceTree::Load
void Load(void) override
Definition: diseqcsettings.cpp:1011
RotorConfig
Definition: diseqcsettings.h:74
DiseqcConfigBase::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Definition: diseqcsettings.cpp:311
LNBPresetSetting
Definition: diseqcsettings.cpp:730
slots
unsigned int slots[4]
Definition: element.cpp:38
RotorConfig::m_pos
RotorPosMap * m_pos
Definition: diseqcsettings.h:86
SCRConfig::SCRConfig
SCRConfig(DiSEqCDevSCR &scr, StandardSetting *parent)
Definition: diseqcsettings.cpp:660
DiSEqCDevDevice
Represents a node in a DVB-S device network.
Definition: diseqc.h:135
SwitchConfig::m_address
SwitchAddressSetting * m_address
Definition: diseqcsettings.h:48
DiseqcConfigBase::DeleteClicked
void DeleteClicked(void)
DeviceTree::DeleteDevice
void DeleteDevice(DeviceTypeSetting *devtype)
Definition: diseqcsettings.cpp:1017
LNBConfig::Load
void Load(void) override
Definition: diseqcsettings.cpp:946
DeviceTree::DeviceTree
DeviceTree(DiSEqCDevTree &tree)
Definition: diseqcsettings.h:135
SwitchConfig::m_ports
SwitchPortsSetting * m_ports
Definition: diseqcsettings.h:47
RotorPosMap::Save
void Save(void) override
Definition: diseqcsettings.cpp:482
DeviceTree::PopulateTree
void PopulateTree(void)
Definition: diseqcsettings.cpp:1032
DiSEqCDevSettings
DVB-S device settings class.
Definition: diseqc.h:37
RotorConfig::RotorConfig
RotorConfig(DiSEqCDevRotor &rotor, StandardSetting *parent)
Definition: diseqcsettings.cpp:541
RotorPosMap::RotorPosMap
RotorPosMap(DiSEqCDevRotor &rotor)
Definition: diseqcsettings.h:56
DeviceTree::m_tree
DiSEqCDevTree & m_tree
Definition: diseqcsettings.h:161
RotorPosMap
Definition: diseqcsettings.h:52
uint_to_dbl_t
QMap< uint, double > uint_to_dbl_t
Definition: diseqc.h:31
DTVDeviceConfigGroup::AddChild
static void AddChild(StandardSetting *group, const QString &trigger, StandardSetting *setting)
Definition: diseqcsettings.cpp:1427
DeviceTree::ValueChanged
void ValueChanged(const QString &value, DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum)
Definition: diseqcsettings.cpp:1153
DiSEqCDevSCR
Unicable / SCR Class.
Definition: diseqc.h:377
devid_to_setting_t
QMap< uint, StandardSetting * > devid_to_setting_t
Definition: diseqcsettings.h:13
LNBConfig::m_lofSwitch
LNBLOFSwitchSetting * m_lofSwitch
Definition: diseqcsettings.h:122
DiSEqCDevLNB
LNB Class.
Definition: diseqc.h:442
RotorPosMap::Load
void Load(void) override
Definition: diseqcsettings.cpp:476
LNBConfig::UpdateType
void UpdateType(void)
Definition: diseqcsettings.cpp:980
DiseqcConfigBase::CreateByType
static DiseqcConfigBase * CreateByType(DiSEqCDevDevice *dev, StandardSetting *parent)
Definition: diseqcsettings.cpp:1038
uint
unsigned int uint
Definition: compat.h:140
SwitchConfig::update
void update(void)
Definition: diseqcsettings.cpp:283
DeviceDescrSetting
Definition: diseqcsettings.cpp:91
RotorPosMap::PopulateList
void PopulateList(void)
Definition: diseqcsettings.cpp:519
DiseqcConfigBase
Definition: diseqcsettings.h:21
standardsettings.h
SwitchConfig::Load
void Load(void) override
Definition: diseqcsettings.cpp:275
DTVDeviceConfigGroup::m_tree
DiSEqCDevTree m_tree
Definition: diseqcsettings.h:179
SCRConfig
Definition: diseqcsettings.h:90
LNBConfig
Definition: diseqcsettings.h:108
LNBPolarityInvertedSetting
Definition: diseqcsettings.cpp:887
DTVDeviceConfigGroup::AddNodes
void AddNodes(StandardSetting *group, const QString &trigger, DiSEqCDevDevice *node)
Definition: diseqcsettings.cpp:1370
SwitchConfig::m_deviceDescr
DeviceDescrSetting * m_deviceDescr
Definition: diseqcsettings.h:45
LNBConfig::LNBConfig
LNBConfig(DiSEqCDevLNB &lnb, StandardSetting *parent)
Definition: diseqcsettings.cpp:918
SwitchAddressSetting
Definition: diseqcsettings.cpp:201
LNBLOFHighSetting
Definition: diseqcsettings.cpp:859
DeviceTree::ConnectToValueChanged
void ConnectToValueChanged(DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum)
Definition: diseqcsettings.cpp:1127
RotorConfig::SetType
void SetType(const QString &type)
Definition: diseqcsettings.cpp:573
DTVDeviceConfigGroup::~DTVDeviceConfigGroup
~DTVDeviceConfigGroup(void) override=default
DiSEqCDevTree
DVB-S device tree class. Represents a tree of DVB-S devices.
Definition: diseqc.h:75
LNBConfig::m_polInv
LNBPolarityInvertedSetting * m_polInv
Definition: diseqcsettings.h:125
RotorConfig::m_rotor
DiSEqCDevRotor & m_rotor
Definition: diseqcsettings.h:85
LNBConfig::m_type
LNBTypeSetting * m_type
Definition: diseqcsettings.h:121
DTVDeviceConfigGroup::m_switchesEnabled
bool m_switchesEnabled
Definition: diseqcsettings.h:182
StandardSetting
Definition: standardsettings.h:30
SwitchConfig::SwitchConfig
SwitchConfig(DiSEqCDevSwitch &switch_dev, StandardSetting *parent)
Definition: diseqcsettings.cpp:254
SwitchPortsSetting
Definition: diseqcsettings.cpp:228
SwitchConfig::m_type
SwitchTypeSetting * m_type
Definition: diseqcsettings.h:46
RotorPosMap::m_posmap
uint_to_dbl_t m_posmap
Definition: diseqcsettings.h:70
RotorPosMap::valueChanged
void valueChanged(StandardSetting *setting)
Definition: diseqcsettings.cpp:507
DeviceTypeSetting
Definition: diseqcsettings.cpp:41
LNBLOFSwitchSetting
Definition: diseqcsettings.cpp:800
LNBLOFLowSetting
Definition: diseqcsettings.cpp:829
RotorPosMap::m_rotor
DiSEqCDevRotor & m_rotor
Definition: diseqcsettings.h:69
GroupSetting
Definition: standardsettings.h:433
DTVDeviceConfigGroup::m_settings
DiSEqCDevSettings & m_settings
Definition: diseqcsettings.h:180
DiSEqCDevSwitch
Switch class, including tone, legacy and DiSEqC switches.
Definition: diseqc.h:218