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"
12
13using devid_to_setting_t = QMap<uint, StandardSetting*>;
14
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
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:
96
97 private:
99};
100
101class LNBTypeSetting;
103class LNBLOFLowSetting;
106class LNBPresetSetting;
107
109{
110 Q_OBJECT
111
112 public:
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:
128};
129
131
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:
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
DiSEqCDevTree m_tree
devid_to_setting_t m_devs
DTVDeviceConfigGroup(DiSEqCDevSettings &settings, uint cardid, bool switches_enabled)
static void AddChild(StandardSetting *group, const QString &trigger, StandardSetting *setting)
void AddNodes(StandardSetting *group, const QString &trigger, DiSEqCDevDevice *node)
~DTVDeviceConfigGroup(void) override=default
DiSEqCDevSettings & m_settings
DiSEqCDevTree & m_tree
void ValueChanged(const QString &value, DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum)
void DeleteDevice(DeviceTypeSetting *devtype)
void Load(void) override
void AddDeviceTypeSetting(DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum, GroupSetting *parentSetting)
DeviceTree(DiSEqCDevTree &tree)
void PopulateTree(void)
void PopulateChildren(DiSEqCDevDevice *node, GroupSetting *parentSetting)
void ConnectToValueChanged(DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum)
Represents a node in a DVB-S device network.
Definition: diseqc.h:140
LNB Class.
Definition: diseqc.h:447
Rotor class.
Definition: diseqc.h:303
Unicable / SCR Class.
Definition: diseqc.h:383
DVB-S device settings class.
Definition: diseqc.h:37
Switch class, including tone, legacy and DiSEqC switches.
Definition: diseqc.h:224
DVB-S device tree class.
Definition: diseqc.h:75
static DiseqcConfigBase * CreateByType(DiSEqCDevDevice *dev, StandardSetting *parent)
void DeleteClicked(void)
bool keyPressEvent(QKeyEvent *event) override
void UpdateType(void)
void SetPreset(const QString &value)
LNBPolarityInvertedSetting * m_polInv
LNBPresetSetting * m_preset
LNBTypeSetting * m_type
void Load(void) override
LNBLOFSwitchSetting * m_lofSwitch
LNBConfig(DiSEqCDevLNB &lnb, StandardSetting *parent)
LNBLOFLowSetting * m_lofLo
LNBLOFHighSetting * m_lofHi
RotorPosMap * m_pos
void Load() override
RotorConfig(DiSEqCDevRotor &rotor, StandardSetting *parent)
void SetType(const QString &type)
DiSEqCDevRotor & m_rotor
void PopulateList(void)
void Save(void) override
void newValue(StandardSetting *setting)
RotorPosMap(DiSEqCDevRotor &rotor)
void Load(void) override
DiSEqCDevRotor & m_rotor
uint_to_dbl_t m_posmap
SCRConfig(DiSEqCDevSCR &scr, StandardSetting *parent)
DiSEqCDevSCR & m_scr
DeviceDescrSetting * m_deviceDescr
SwitchConfig(DiSEqCDevSwitch &switch_dev, StandardSetting *parent)
SwitchAddressSetting * m_address
void Load(void) override
void update(void)
SwitchPortsSetting * m_ports
SwitchTypeSetting * m_type
QMap< uint, double > uint_to_dbl_t
Definition: diseqc.h:30
QMap< uint, StandardSetting * > devid_to_setting_t
unsigned int uint
Definition: freesurround.h:24