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(const QString &/*value*/);
43  void update(void);
44 
45  private:
50 };
51 
52 class RotorPosMap : public GroupSetting
53 {
54  Q_OBJECT
55 
56  public:
57  explicit RotorPosMap(DiSEqCDevRotor &rotor) :
58  m_rotor(rotor) { }
59 
60  void Load(void) override; // StandardSetting
61  void Save(void) override; // StandardSetting
62 
63  private slots:
64  void newValue(StandardSetting *setting);
65 
66  protected:
67  void PopulateList(void);
68 
69  private:
72 };
73 
75 {
76  Q_OBJECT
77 
78  public:
79  void Load() override; // StandardSetting
81 
82  public slots:
83  void SetType(const QString &type);
84 
85  private:
87  RotorPosMap *m_pos {nullptr};
88 };
89 
91 {
92  Q_OBJECT
93 
94  public:
95  SCRConfig(DiSEqCDevSCR &scr, StandardSetting* parent);
96 
97  private:
99 };
100 
101 class LNBTypeSetting;
102 class LNBLOFSwitchSetting;
103 class LNBLOFLowSetting;
104 class LNBLOFHighSetting;
106 class LNBPresetSetting;
107 
109 {
110  Q_OBJECT
111 
112  public:
113  LNBConfig(DiSEqCDevLNB &lnb, StandardSetting *parent);
114  void Load(void) override; // StandardSetting
115 
116  public slots:
117  void SetPreset(const QString &value);
118  void UpdateType(const QString &value);
119  void UpdateType(void);
120 
121  private:
123  LNBTypeSetting *m_type {nullptr};
128 };
129 
130 class DeviceTypeSetting;
131 
132 class DeviceTree : public GroupSetting
133 {
134  Q_OBJECT
135 
136  public:
137  explicit DeviceTree(DiSEqCDevTree &tree) :
138  m_tree(tree) { }
139  void DeleteDevice(DeviceTypeSetting *devtype);
140 
141  void Load(void) override; // StandardSetting
142 
143  protected:
144  void PopulateTree(void);
145  void PopulateTree(DiSEqCDevDevice *node,
146  DiSEqCDevDevice *parent = nullptr,
147  uint childnum = 0,
148  GroupSetting *parentSetting = nullptr);
149  void PopulateChildren(DiSEqCDevDevice *node, GroupSetting *parentSetting);
151  DiSEqCDevDevice *parent,
152  uint childnum,
153  GroupSetting *parentSetting);
155  DiSEqCDevDevice *parent,
156  uint childnum);
157  void ValueChanged(const QString &value,
158  DeviceTypeSetting *devtype,
159  DiSEqCDevDevice *parent,
160  uint childnum);
161 
162  private:
164 };
165 
167 {
168  public:
169  DTVDeviceConfigGroup(DiSEqCDevSettings &settings, uint cardid,
170  bool switches_enabled);
171  ~DTVDeviceConfigGroup(void) override = default;
172 
173  protected:
174  void AddNodes(StandardSetting *group, const QString &trigger,
175  DiSEqCDevDevice *node);
176 
177  static void AddChild(StandardSetting *group, const QString &trigger,
178  StandardSetting *setting);
179 
180  private:
185 };
186 
187 #endif // DISEQCSETTINGS_H
DeviceTree
Definition: diseqcsettings.h:132
LNBConfig::m_lofLo
LNBLOFLowSetting * m_lofLo
Definition: diseqcsettings.h:125
DeviceTree::AddDeviceTypeSetting
void AddDeviceTypeSetting(DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum, GroupSetting *parentSetting)
Definition: diseqcsettings.cpp:1119
LNBConfig::m_preset
LNBPresetSetting * m_preset
Definition: diseqcsettings.h:122
RotorConfig::Load
void Load() override
Definition: diseqcsettings.cpp:568
SwitchTypeSetting
Definition: diseqcsettings.cpp:153
DTVDeviceConfigGroup::DTVDeviceConfigGroup
DTVDeviceConfigGroup(DiSEqCDevSettings &settings, uint cardid, bool switches_enabled)
Definition: diseqcsettings.cpp:1361
SCRConfig::m_scr
DiSEqCDevSCR & m_scr
Definition: diseqcsettings.h:98
DiSEqCDevRotor
Rotor class.
Definition: diseqc.h:302
LNBConfig::SetPreset
void SetPreset(const QString &value)
Definition: diseqcsettings.cpp:953
DeviceTree::PopulateChildren
void PopulateChildren(DiSEqCDevDevice *node, GroupSetting *parentSetting)
Definition: diseqcsettings.cpp:1148
SwitchConfig
Definition: diseqcsettings.h:33
DTVDeviceConfigGroup
Definition: diseqcsettings.h:166
diseqc.h
LNBTypeSetting
Definition: diseqcsettings.cpp:764
DTVDeviceConfigGroup::m_devs
devid_to_setting_t m_devs
Definition: diseqcsettings.h:183
LNBConfig::m_lofHi
LNBLOFHighSetting * m_lofHi
Definition: diseqcsettings.h:126
DeviceTree::Load
void Load(void) override
Definition: diseqcsettings.cpp:1016
RotorConfig
Definition: diseqcsettings.h:74
DiseqcConfigBase::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Definition: diseqcsettings.cpp:316
LNBPresetSetting
Definition: diseqcsettings.cpp:730
RotorConfig::m_pos
RotorPosMap * m_pos
Definition: diseqcsettings.h:87
SCRConfig::SCRConfig
SCRConfig(DiSEqCDevSCR &scr, StandardSetting *parent)
Definition: diseqcsettings.cpp:661
DiSEqCDevDevice
Represents a node in a DVB-S device network.
Definition: diseqc.h:139
SwitchConfig::m_address
SwitchAddressSetting * m_address
Definition: diseqcsettings.h:49
DiseqcConfigBase::DeleteClicked
void DeleteClicked(void)
DeviceTree::DeleteDevice
void DeleteDevice(DeviceTypeSetting *devtype)
Definition: diseqcsettings.cpp:1022
LNBConfig::Load
void Load(void) override
Definition: diseqcsettings.cpp:947
DeviceTree::DeviceTree
DeviceTree(DiSEqCDevTree &tree)
Definition: diseqcsettings.h:137
SwitchConfig::m_ports
SwitchPortsSetting * m_ports
Definition: diseqcsettings.h:48
RotorPosMap::Save
void Save(void) override
Definition: diseqcsettings.cpp:483
DeviceTree::PopulateTree
void PopulateTree(void)
Definition: diseqcsettings.cpp:1037
DiSEqCDevSettings
DVB-S device settings class.
Definition: diseqc.h:36
RotorConfig::RotorConfig
RotorConfig(DiSEqCDevRotor &rotor, StandardSetting *parent)
Definition: diseqcsettings.cpp:542
RotorPosMap::RotorPosMap
RotorPosMap(DiSEqCDevRotor &rotor)
Definition: diseqcsettings.h:57
DeviceTree::m_tree
DiSEqCDevTree & m_tree
Definition: diseqcsettings.h:163
RotorPosMap
Definition: diseqcsettings.h:52
uint_to_dbl_t
QMap< uint, double > uint_to_dbl_t
Definition: diseqc.h:30
DTVDeviceConfigGroup::AddChild
static void AddChild(StandardSetting *group, const QString &trigger, StandardSetting *setting)
Definition: diseqcsettings.cpp:1431
DeviceTree::ValueChanged
void ValueChanged(const QString &value, DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum)
Definition: diseqcsettings.cpp:1158
DiSEqCDevSCR
Unicable / SCR Class.
Definition: diseqc.h:382
devid_to_setting_t
QMap< uint, StandardSetting * > devid_to_setting_t
Definition: diseqcsettings.h:13
LNBConfig::m_lofSwitch
LNBLOFSwitchSetting * m_lofSwitch
Definition: diseqcsettings.h:124
DiSEqCDevLNB
LNB Class.
Definition: diseqc.h:446
RotorPosMap::Load
void Load(void) override
Definition: diseqcsettings.cpp:477
LNBConfig::UpdateType
void UpdateType(void)
Definition: diseqcsettings.cpp:981
DiseqcConfigBase::CreateByType
static DiseqcConfigBase * CreateByType(DiSEqCDevDevice *dev, StandardSetting *parent)
Definition: diseqcsettings.cpp:1043
uint
unsigned int uint
Definition: compat.h:141
SwitchConfig::update
void update(void)
Definition: diseqcsettings.cpp:283
DeviceDescrSetting
Definition: diseqcsettings.cpp:90
RotorPosMap::PopulateList
void PopulateList(void)
Definition: diseqcsettings.cpp:520
DiseqcConfigBase
Definition: diseqcsettings.h:20
standardsettings.h
SwitchConfig::Load
void Load(void) override
Definition: diseqcsettings.cpp:275
DTVDeviceConfigGroup::m_tree
DiSEqCDevTree m_tree
Definition: diseqcsettings.h:181
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:1374
SwitchConfig::m_deviceDescr
DeviceDescrSetting * m_deviceDescr
Definition: diseqcsettings.h:46
LNBConfig::LNBConfig
LNBConfig(DiSEqCDevLNB &lnb, StandardSetting *parent)
Definition: diseqcsettings.cpp:919
SwitchAddressSetting
Definition: diseqcsettings.cpp:200
LNBLOFHighSetting
Definition: diseqcsettings.cpp:859
DeviceTree::ConnectToValueChanged
void ConnectToValueChanged(DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum)
Definition: diseqcsettings.cpp:1132
RotorConfig::SetType
void SetType(const QString &type)
Definition: diseqcsettings.cpp:574
DTVDeviceConfigGroup::~DTVDeviceConfigGroup
~DTVDeviceConfigGroup(void) override=default
DiSEqCDevTree
DVB-S device tree class. Represents a tree of DVB-S devices.
Definition: diseqc.h:74
LNBConfig::m_polInv
LNBPolarityInvertedSetting * m_polInv
Definition: diseqcsettings.h:127
RotorConfig::m_rotor
DiSEqCDevRotor & m_rotor
Definition: diseqcsettings.h:86
LNBConfig::m_type
LNBTypeSetting * m_type
Definition: diseqcsettings.h:123
DTVDeviceConfigGroup::m_switchesEnabled
bool m_switchesEnabled
Definition: diseqcsettings.h:184
StandardSetting
Definition: standardsettings.h:29
SwitchConfig::SwitchConfig
SwitchConfig(DiSEqCDevSwitch &switch_dev, StandardSetting *parent)
Definition: diseqcsettings.cpp:254
SwitchPortsSetting
Definition: diseqcsettings.cpp:227
RotorPosMap::newValue
void newValue(StandardSetting *setting)
Definition: diseqcsettings.cpp:508
SwitchConfig::m_type
SwitchTypeSetting * m_type
Definition: diseqcsettings.h:47
RotorPosMap::m_posmap
uint_to_dbl_t m_posmap
Definition: diseqcsettings.h:71
DeviceTypeSetting
Definition: diseqcsettings.cpp:40
LNBLOFSwitchSetting
Definition: diseqcsettings.cpp:800
LNBLOFLowSetting
Definition: diseqcsettings.cpp:829
RotorPosMap::m_rotor
DiSEqCDevRotor & m_rotor
Definition: diseqcsettings.h:70
GroupSetting
Definition: standardsettings.h:435
DTVDeviceConfigGroup::m_settings
DiSEqCDevSettings & m_settings
Definition: diseqcsettings.h:182
DiSEqCDevSwitch
Switch class, including tone, legacy and DiSEqC switches.
Definition: diseqc.h:223