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 typedef QMap<uint, StandardSetting*> devid_to_setting_t;
14 
15 class SwitchTypeSetting;
16 class SwitchPortsSetting;
18 class DeviceDescrSetting;
19 
21 {
22  Q_OBJECT
23 
24  public:
25  bool keyPressEvent(QKeyEvent *) 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 
58  void Load(void) override; // StandardSetting
59  void Save(void) override; // StandardSetting
60 
61  private slots:
63 
64  protected:
65  void PopulateList(void);
66 
67  private:
70 };
71 
73 {
74  Q_OBJECT
75 
76  public:
77  void Load() override; // StandardSetting
79 
80  public slots:
81  void SetType(const QString &type);
82 
83  private:
86 };
87 
89 {
90  Q_OBJECT
91 
92  public:
93  SCRConfig(DiSEqCDevSCR &scr, StandardSetting* parent);
94 
95  private:
97 };
98 
99 class LNBTypeSetting;
100 class LNBLOFSwitchSetting;
101 class LNBLOFLowSetting;
102 class LNBLOFHighSetting;
104 class LNBPresetSetting;
105 
107 {
108  Q_OBJECT
109 
110  public:
111  LNBConfig(DiSEqCDevLNB &lnb, StandardSetting *parent);
112  void Load(void) override; // StandardSetting
113 
114  public slots:
115  void SetPreset(const QString &value);
116  void UpdateType(void);
117 
118  private:
125 };
126 
127 class DeviceTypeSetting;
128 
129 class DeviceTree : public GroupSetting
130 {
131  Q_OBJECT
132 
133  public:
134  explicit DeviceTree(DiSEqCDevTree &tree);
135  void DeleteDevice(DeviceTypeSetting *devtype);
136 
137  void Load(void) override; // StandardSetting
138 
139  protected:
140  void PopulateTree(void);
141  void PopulateTree(DiSEqCDevDevice *node,
142  DiSEqCDevDevice *parent = nullptr,
143  uint childnum = 0,
144  GroupSetting *parentSetting = nullptr);
145  void PopulateChildren(DiSEqCDevDevice *node, GroupSetting *parentSetting);
147  DiSEqCDevDevice *parent,
148  uint childnum,
149  GroupSetting *parentSetting);
151  DiSEqCDevDevice *parent,
152  uint childnum);
153  void ValueChanged(const QString &value,
154  DeviceTypeSetting *devtype,
155  DiSEqCDevDevice *parent,
156  uint childnum);
157 
158  private:
160 };
161 
163 {
164  public:
165  DTVDeviceConfigGroup(DiSEqCDevSettings &settings, uint cardid,
166  bool switches_enabled);
167  ~DTVDeviceConfigGroup(void) = default;
168 
169  protected:
170  void AddNodes(StandardSetting *group, const QString &trigger,
171  DiSEqCDevDevice *node);
172 
173  void AddChild(StandardSetting *group, const QString &trigger,
174  StandardSetting *setting);
175 
176  private:
181 };
182 
183 #endif // _DISEQCSETTINGS_H_
184 
DTVDeviceConfigGroup(DiSEqCDevSettings &settings, uint cardid, bool switches_enabled)
LNBConfig(DiSEqCDevLNB &lnb, StandardSetting *parent)
LNBLOFLowSetting * m_lof_lo
unsigned int slots[4]
Definition: element.c:38
DVB-S device settings class.
Definition: diseqc.h:35
LNBPresetSetting * m_preset
RotorPosMap * m_pos
LNBLOFSwitchSetting * m_lof_switch
DiSEqCDevSCR & m_scr
void update(void)
QMap< uint, StandardSetting * > devid_to_setting_t
void ConnectToValueChanged(DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum)
unsigned int uint
Definition: compat.h:140
void valueChanged(StandardSetting *)
RotorConfig(DiSEqCDevRotor &rotor, StandardSetting *parent)
void Save(void) override
void UpdateType(void)
LNBLOFHighSetting * m_lof_hi
SwitchConfig(DiSEqCDevSwitch &switch_dev, StandardSetting *parent)
bool keyPressEvent(QKeyEvent *) override
devid_to_setting_t m_devs
Represents a node in a DVB-S device network.
Definition: diseqc.h:133
QMap< uint, double > uint_to_dbl_t
Definition: diseqc.h:28
SwitchTypeSetting * m_type
void DeleteClicked(void)
RotorPosMap(DiSEqCDevRotor &rotor)
void Load(void) override
void AddNodes(StandardSetting *group, const QString &trigger, DiSEqCDevDevice *node)
Rotor class.
Definition: diseqc.h:292
SwitchPortsSetting * m_ports
void AddChild(StandardSetting *group, const QString &trigger, StandardSetting *setting)
void SetPreset(const QString &value)
~DTVDeviceConfigGroup(void)=default
LNBPolarityInvertedSetting * m_pol_inv
void Load(void) override
void AddDeviceTypeSetting(DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum, GroupSetting *parentSetting)
void PopulateList(void)
DiSEqCDevRotor & m_rotor
static DiseqcConfigBase * CreateByType(DiSEqCDevDevice *dev, StandardSetting *parent)
Unicable / SCR Class.
Definition: diseqc.h:371
void DeleteDevice(DeviceTypeSetting *devtype)
void PopulateChildren(DiSEqCDevDevice *node, GroupSetting *parentSetting)
SwitchAddressSetting * m_address
LNB Class.
Definition: diseqc.h:435
void PopulateTree(void)
uint_to_dbl_t m_posmap
DiSEqCDevRotor & m_rotor
void Load(void) override
void Load() override
void SetType(const QString &type)
LNBTypeSetting * m_type
DiSEqCDevTree m_tree
DeviceDescrSetting * m_deviceDescr
DVB-S device tree class.
Definition: diseqc.h:73
Switch class, including tone, legacy and DiSEqC switches.
Definition: diseqc.h:214
DiSEqCDevSettings & m_settings
SCRConfig(DiSEqCDevSCR &scr, StandardSetting *parent)
void ValueChanged(const QString &value, DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum)
DiSEqCDevTree & m_tree
DeviceTree(DiSEqCDevTree &tree)
void Load(void) override