00001
00002
00003
00004
00005
00006
00007 #ifndef _DISEQCSETTINGS_H_
00008 #define _DISEQCSETTINGS_H_
00009
00010 #include "diseqc.h"
00011 #include "settings.h"
00012
00013 typedef QMap<uint, Setting*> devid_to_setting_t;
00014
00015 class SwitchTypeSetting;
00016 class SwitchPortsSetting;
00017
00018 class SwitchConfig : public QObject, public ConfigurationWizard
00019 {
00020 Q_OBJECT
00021
00022 public:
00023 SwitchConfig(DiSEqCDevSwitch &switch_dev);
00024
00025 public slots:
00026 void update(void);
00027
00028 private:
00029 SwitchTypeSetting *m_type;
00030 SwitchPortsSetting *m_ports;
00031 };
00032
00033 class RotorPosMap : public ListBoxSetting, public Storage
00034 {
00035 Q_OBJECT
00036
00037 public:
00038 RotorPosMap(DiSEqCDevRotor &rotor);
00039
00040 virtual void load(void);
00041 virtual void save(void);
00042 virtual void save(QString ) {}
00043
00044 public slots:
00045 void edit(void);
00046 void del(void);
00047
00048 protected:
00049 void PopulateList(void);
00050
00051 private:
00052 DiSEqCDevRotor &m_rotor;
00053 uint_to_dbl_t m_posmap;
00054 };
00055
00056 class RotorConfig : public QObject, public ConfigurationWizard
00057 {
00058 Q_OBJECT
00059
00060 public:
00061 RotorConfig(DiSEqCDevRotor &rotor);
00062
00063 public slots:
00064 void SetType(const QString &type);
00065 void RunRotorPositionsDialog(void);
00066
00067 private:
00068 DiSEqCDevRotor &m_rotor;
00069 TransButtonSetting *m_pos;
00070 };
00071
00072 class LNBTypeSetting;
00073 class LNBLOFSwitchSetting;
00074 class LNBLOFLowSetting;
00075 class LNBLOFHighSetting;
00076 class LNBPolarityInvertedSetting;
00077
00078 class LNBConfig : public QObject, public ConfigurationWizard
00079 {
00080 Q_OBJECT
00081
00082 public:
00083 LNBConfig(DiSEqCDevLNB &lnb);
00084
00085 public slots:
00086 void SetPreset(const QString &value);
00087 void UpdateType(void);
00088
00089 private:
00090 LNBTypeSetting *m_type;
00091 LNBLOFSwitchSetting *m_lof_switch;
00092 LNBLOFLowSetting *m_lof_lo;
00093 LNBLOFHighSetting *m_lof_hi;
00094 LNBPolarityInvertedSetting *m_pol_inv;
00095 };
00096
00097 class DeviceTree : public ListBoxSetting, public Storage
00098 {
00099 Q_OBJECT
00100
00101 public:
00102 DeviceTree(DiSEqCDevTree &tree);
00103
00104 virtual void load(void);
00105 virtual void save(void);
00106 virtual void save(QString ) { }
00107
00108 protected:
00109 bool EditNodeDialog(uint nodeid);
00110 void CreateRootNodeDialog(void);
00111 void CreateNewNodeDialog(uint parentid, uint child_num);
00112
00113 bool RunTypeDialog(DiSEqCDevDevice::dvbdev_t &type);
00114 void PopulateTree(void);
00115 void PopulateTree(DiSEqCDevDevice *node,
00116 DiSEqCDevDevice *parent = NULL,
00117 uint childnum = 0,
00118 uint depth = 0);
00119
00120 public slots:
00121 void edit(void);
00122 void del(void);
00123
00124 private:
00125 DiSEqCDevTree &m_tree;
00126 };
00127
00128 class DTVDeviceTreeWizard : public ConfigurationDialog
00129 {
00130 public:
00131 DTVDeviceTreeWizard(DiSEqCDevTree &tree);
00132
00133 virtual DialogCode exec(void);
00134 };
00135
00136 class DTVDeviceConfigGroup : public VerticalConfigurationGroup
00137 {
00138 public:
00139 DTVDeviceConfigGroup(DiSEqCDevSettings &settings, uint cardid,
00140 bool switches_enabled);
00141 ~DTVDeviceConfigGroup(void);
00142
00143 protected:
00144 void AddNodes(ConfigurationGroup *group, const QString &trigger,
00145 DiSEqCDevDevice *node);
00146
00147 void AddChild(ConfigurationGroup *group, const QString &trigger,
00148 Setting *setting);
00149
00150 private:
00151 DiSEqCDevTree m_tree;
00152 DiSEqCDevSettings &m_settings;
00153 devid_to_setting_t m_devs;
00154 bool m_switches_enabled;
00155 };
00156
00157 #endif // _DISEQCSETTINGS_H_
00158