Go to the documentation of this file.
22 gc->setLabel(
"Latitude");
24 DeviceTree::tr(
"The Cartesian latitude for your location. "
25 "Use negative numbers for southern coordinates."));
32 gc->setLabel(
"Longitude");
34 DeviceTree::tr(
"The Cartesian longitude for your location. "
35 "Use negative numbers for western coordinates."));
46 setLabel(DeviceTree::tr(
"Device Type"));
48 QString::number((
uint) 0xFFFF));
97 setLabel(DeviceTree::tr(
"Description"));
98 QString
help = DeviceTree::tr(
99 "Optional descriptive name for this device, to "
100 "make it easier to configure settings later.");
128 setLabel(DeviceTree::tr(
"Repeat Count"));
129 QString
help = DeviceTree::tr(
130 "Number of repeat (command with repeat flag ON) or resend (the same command) DiSEqC commands. "
131 "If value is higher than 10, command will be resend N-10 times. "
132 "If value is lower than 10, command will be repeated N times. "
133 "Repeat useful for unreliable DiSEqC equipment; resend useful when unreliable DiSEqC equipment has broken/unsupported repeat flag support.");
160 setLabel(DeviceTree::tr(
"Switch Type"));
161 setHelpText(DeviceTree::tr(
"Select the type of switch from the list."));
170 QString::number((
uint)
173 QString::number((
uint)
207 setLabel(DeviceTree::tr(
"Address of switch"));
208 setHelpText(DeviceTree::tr(
"The DiSEqC address of the switch."));
234 setLabel(DeviceTree::tr(
"Number of ports"));
235 setHelpText(DeviceTree::tr(
"The number of ports this switch has."));
257 setLabel(DeviceTree::tr(
"Switch Configuration"));
323 auto isdelete = [](
const QString &
action) {
return action ==
"DELETE"; };
324 if (std::any_of(actions.cbegin(), actions.cend(), isdelete))
341 setLabel(DeviceTree::tr(
"Rotor Type"));
342 setHelpText(DeviceTree::tr(
"Select the type of rotor from the list."));
345 addSelection(DeviceTree::tr(
"DiSEqC 1.3 (GotoX/USALS)"),
372 setLabel(DeviceTree::tr(
"Rotor Low Speed (deg/sec)"));
373 QString
help = DeviceTree::tr(
374 "To allow the approximate monitoring of rotor movement, enter "
375 "the rated angular speed of the rotor when powered at 13V.");
402 setLabel(DeviceTree::tr(
"Rotor High Speed (deg/sec)"));
403 QString
help = DeviceTree::tr(
404 "To allow the approximate monitoring of rotor movement, enter "
405 "the rated angular speed of the rotor when powered at 18V.");
431 str = QString::number(angle) +
432 DeviceTree::tr(
"E",
"Eastern Hemisphere");
436 str = QString::number(-angle) +
437 DeviceTree::tr(
"W",
"Western Hemisphere");
454 static double AngleToFloat(
const QString &angle,
bool translated =
true)
456 if (angle.length() < 2)
460 QChar postfix = angle.at(angle.length() - 1);
461 if (postfix.isLetter())
463 pos = angle.left(angle.length() - 1).toDouble();
465 (postfix.toUpper() ==
466 DeviceTree::tr(
"W",
"Western Hemisphere").at(0))) ||
467 (!translated && (postfix.toUpper() ==
'W')))
473 pos = angle.toDouble();
503 item->SetText(DeviceTree::tr(
"None"),
"value");
512 if (posEdit ==
nullptr)
514 QString value = posEdit->
getValue();
524 for (
uint pos = 1; pos < num_pos; pos++)
526 uint_to_dbl_t::const_iterator it =
m_posmap.constFind(pos);
546 setLabel(DeviceTree::tr(
"Rotor Configuration"));
589 setLabel(DeviceTree::tr(
"Userband"));
591 "Unicable userband ID (0-7). The Unicable userband channels "
592 "are often numbered starting at 1 but MythTV starts at 0."));
617 setLabel(DeviceTree::tr(
"Frequency (MHz)"));
618 setHelpText(DeviceTree::tr(
"Unicable userband frequency (usually 1210, 1420, 1680 and 2040 MHz)"));
643 setLabel(DeviceTree::tr(
"PIN code"));
644 setHelpText(DeviceTree::tr(
"Unicable PIN code (-1 disabled, 0 - 255)"));
666 setLabel(DeviceTree::tr(
"Unicable Configuration"));
682 uint _lof_hi = 0,
bool _pol_inv =
false) :
696 static const std::array<const lnb_preset,7>
lnb_presets
700 lnb_preset(QT_TRANSLATE_NOOP(
"DeviceTree",
"Universal (Europe)"),
702 11700000, 9750000, 10600000),
703 lnb_preset(QT_TRANSLATE_NOOP(
"DeviceTree",
"Single (Europe)"),
705 lnb_preset(QT_TRANSLATE_NOOP(
"DeviceTree",
"Circular (N. America)"),
707 lnb_preset(QT_TRANSLATE_NOOP(
"DeviceTree",
"Linear (N. America)"),
709 lnb_preset(QT_TRANSLATE_NOOP(
"DeviceTree",
"C Band"),
711 lnb_preset(QT_TRANSLATE_NOOP(
"DeviceTree",
"DishPro Bandstacked"),
738 setLabel(DeviceTree::tr(
"LNB Preset"));
739 QString
help = DeviceTree::tr(
740 "Select the LNB preset from the list, or choose "
741 "'Custom' and set the advanced settings below.");
748 addSelection(DeviceTree::tr(
"Custom"), QString::number(i));
772 setLabel(DeviceTree::tr(
"LNB Type"));
773 setHelpText(DeviceTree::tr(
"Select the type of LNB from the list."));
778 kTypeVoltageControl));
779 addSelection(DeviceTree::tr(
"Universal (Voltage & Tone)"),
781 kTypeVoltageAndToneControl));
808 setLabel(DeviceTree::tr(
"LNB LOF Switch (MHz)"));
809 QString
help = DeviceTree::tr(
810 "This defines at what frequency the LNB will do a "
811 "switch from high to low setting, and vice versa.");
837 setLabel(DeviceTree::tr(
"LNB LOF Low (MHz)"));
838 QString
help = DeviceTree::tr(
839 "This defines the offset the frequency coming "
840 "from the LNB will be in low setting. For bandstacked "
841 "LNBs this is the vertical/right polarization band.");
867 setLabel(DeviceTree::tr(
"LNB LOF High (MHz)"));
868 QString
help = DeviceTree::tr(
869 "This defines the offset the frequency coming from "
870 "the LNB will be in high setting. For bandstacked "
871 "LNBs this is the horizontal/left polarization band.");
896 setLabel(DeviceTree::tr(
"LNB Reversed"));
897 QString
help = DeviceTree::tr(
898 "This defines whether the signal reaching the LNB "
899 "is reversed from normal polarization. This happens "
900 "to circular signals bouncing twice on a toroidal "
924 setLabel(DeviceTree::tr(
"LNB Configuration"));
958 uint index = value.toUInt();
963 if (preset.
m_name.isEmpty())
1099 devtype->SetDevice(node);
1107 devtype->addChild(setting);
1139 auto slot = [devtype, parent, childnum,
this](
const QString &value)
1155 for (
uint ch = 0; ch < num_ch; ch++)
1179 else if (parent->
SetChild(childnum, dev))
1206 setHelpText(DeviceTree::tr(
"Choose a port to use for this switch."));
1209 for (
uint ch = 0; ch < num_children; ch++)
1211 QString val = QString(
"%1").arg(ch);
1212 QString descr = DeviceTree::tr(
"Port %1").arg(ch+1);
1246 setHelpText(DeviceTree::tr(
"Choose a satellite position."));
1288 "Locates the satellite you wish to point to "
1289 "with the longitude along the Clarke Belt of "
1290 "the satellite [-180..180] and its hemisphere.");
1338 setHelpText(DeviceTree::tr(
"Unicable satellite position (A/B)"));
1366 m_settings(settings), m_switchesEnabled(switches_enabled)
1368 setLabel(DeviceTree::tr(
"DTV Device Configuration"));
1416 for (
uint i = 0; i < num_ch; i++)
1430 for (
uint i = 0; i < num_ch; i++)
1437 if (!trigger.isEmpty())
LNBLOFLowSetting * m_lofLo
void AddDeviceTypeSetting(DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum, GroupSetting *parentSetting)
LNBPresetSetting * m_preset
virtual uint GetChildCount(void) const
Retrieves the proper number of children for this node.
SCRPINSetting(DiSEqCDevSCR &scr)
DTVDeviceConfigGroup(DiSEqCDevSettings &settings, uint cardid, bool switches_enabled)
DiSEqCDevSettings & m_settings
uint GetLOFLow(void) const
double GetValue(uint devid) const
Retrieves a value from this configuration chain by device id.
virtual void setValue(const QString &newValue)
void SetLOFHigh(uint lof_hi)
dvbdev_rotor_t GetType(void) const
void SetPreset(const QString &value)
void PopulateChildren(DiSEqCDevDevice *node, GroupSetting *parentSetting)
static GlobalTextEditSetting * DiSEqCLatitude(void)
static double AngleToEdit(double angle, QString &hemi)
DiSEqCDevDevice * GetDevice()
void SetUserBand(uint userband)
static const std::array< const lnb_preset, 7 > lnb_presets
dvbdev_lnb_t GetType(void) const
devid_to_setting_t m_devs
void SetValue(uint devid, double value)
Sets a value for this configuration chain by device id.
LNBLOFHighSetting * m_lofHi
QString GetDescription(void) const
RotorLoSpeedSetting(DiSEqCDevRotor &rotor)
DiSEqCDevSettings & m_settings
void SetLOFSwitch(uint lof_switch)
void updateButton(MythUIButtonListItem *item) override
This method is called whenever the UI need to reflect a change Reimplement this If you widget need a ...
bool keyPressEvent(QKeyEvent *event) override
void SetPosMap(const uint_to_dbl_t &posmap)
DiSEqCDevSwitch & m_switch
virtual void clearSettings()
SCRConfig(DiSEqCDevSCR &scr, StandardSetting *parent)
void addTargetedChild(const QString &value, StandardSetting *setting)
Represents a node in a DVB-S device network.
LNBLOFSwitchSetting(DiSEqCDevLNB &lnb)
virtual bool SetChild(uint, DiSEqCDevDevice *)
Changes the nth child of this node.
SwitchAddressSetting * m_address
DiSEqCDevDevice * m_device
void DeleteDevice(DeviceTypeSetting *devtype)
void SetFrequency(uint freq)
DiSEqCDevDevice * GetParent(void) const
SwitchPortsSetting * m_ports
static GlobalTextEditSetting * DiSEqCLongitude(void)
DVB-S device settings class.
void setChanged(bool changed)
RotorPosTextEdit(const QString &label, uint id, const QString &value)
dvbdev_t GetDeviceType(void) const
void settingsChanged(StandardSetting *selectedSetting=nullptr)
virtual void addChild(StandardSetting *child)
void SetHiSpeed(double speed)
uint GetRepeatCount(void) const
RotorConfig(DiSEqCDevRotor &rotor, StandardSetting *parent)
uint GetFrequency(void) const
void SetType(dvbdev_lnb_t type)
LNBPolarityInvertedSetting(DiSEqCDevLNB &lnb)
bool IsPolarityInverted(void) const
DiSEqCDevDevice & m_device
DiSEqCDevLNB::dvbdev_lnb_t m_type
LNBTypeSetting(DiSEqCDevLNB &lnb)
uint GetAddress(void) const
static uint FindPreset(const DiSEqCDevLNB &lnb)
LNBLOFHighSetting(DiSEqCDevLNB &lnb)
DeviceDescrSetting(DiSEqCDevDevice &device)
QMap< uint, double > uint_to_dbl_t
static void AddChild(StandardSetting *group, const QString &trigger, StandardSetting *setting)
DiSEqCDevSwitch & m_switch
void ValueChanged(const QString &value, DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum)
virtual void setHelpText(const QString &str)
RotorSetting(DiSEqCDevDevice &node, DiSEqCDevSettings &settings)
SCRUserBandSetting(DiSEqCDevSCR &scr)
USALSRotorSetting(DiSEqCDevDevice &node, DiSEqCDevSettings &settings)
bool Load(const QString &device)
Loads the device tree from the database.
DeviceRepeatSetting(DiSEqCDevDevice &device)
int getValueIndex(const QString &value) const
TransTextEditSetting * m_numeric
LNBLOFSwitchSetting * m_lofSwitch
void SetRoot(DiSEqCDevDevice *root)
Changes the root node of the tree.
DiSEqCDevSwitch & m_switch
virtual DiSEqCDevDevice * GetChild(uint)
Retrieves the nth child of this node.
virtual QString getValue(void) const
void SetPolarityInverted(bool inv)
TransMythUIComboBoxSetting * m_hemisphere
static DiseqcConfigBase * CreateByType(DiSEqCDevDevice *dev, StandardSetting *parent)
uint_to_dbl_t GetPosMap(void) const
SCRFrequencySetting(DiSEqCDevSCR &scr)
uint GetUserBand(void) const
DiSEqCDevDevice * Root(void)
Retrieves the root node in the tree.
uint GetOrdinal(void) const
static DiSEqCDevDevice * CreateByType(DiSEqCDevTree &tree, dvbdev_t type, uint dev_id=0)
SCRPositionSetting(DiSEqCDevDevice &node, DiSEqCDevSettings &settings)
uint GetLOFSwitch(void) const
RotorHiSpeedSetting(DiSEqCDevRotor &rotor)
uint GetLOFHigh(void) const
virtual void setLabel(QString str)
void SetRepeatCount(uint repeat)
void valueChanged(const QString &newValue)
dvbdev_switch_t GetType(void) const
virtual void setEnabled(bool enabled)
void addSelection(const QString &label, QString value=QString(), bool select=false)
DiSEqCDevDevice & m_device
void SetNumPorts(uint num_ports)
SwitchTypeSetting(DiSEqCDevSwitch &switch_dev)
void AddNodes(StandardSetting *group, const QString &trigger, DiSEqCDevDevice *node)
void SetAddress(uint address)
DeviceDescrSetting * m_deviceDescr
RotorTypeSetting(DiSEqCDevRotor &rotor)
LNBConfig(DiSEqCDevLNB &lnb, StandardSetting *parent)
static QString SCRPositionToString(dvbdev_pos_t pos)
lnb_preset(QString _name, DiSEqCDevLNB::dvbdev_lnb_t _type, uint _lof_sw=0, uint _lof_lo=0, uint _lof_hi=0, bool _pol_inv=false)
SwitchPortsSetting(DiSEqCDevSwitch &switch_dev)
void SetType(dvbdev_switch_t type)
void ConnectToValueChanged(DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum)
DiSEqCDevSettings & m_settings
void SetType(const QString &type)
MythMainWindow * GetMythMainWindow(void)
void updateButton(MythUIButtonListItem *item) override
This method is called whenever the UI need to reflect a change Reimplement this If you widget need a ...
static double AngleToFloat(const QString &angle, bool translated=true)
LNBPolarityInvertedSetting * m_polInv
SwitchAddressSetting(DiSEqCDevSwitch &switch_dev)
void SetLoSpeed(double speed)
void SetDescription(const QString &desc)
SwitchConfig(DiSEqCDevSwitch &switch_dev, StandardSetting *parent)
static QString AngleToString(double angle)
double GetHiSpeed(void) const
void newValue(StandardSetting *setting)
uint GetDeviceID(void) const
static const iso6937table * d
@ kTypeVoltageAndToneControl
void SetDevice(DiSEqCDevDevice *dev)
DiSEqCDevSettings & m_settings
SwitchTypeSetting * m_type
double GetLoSpeed(void) const
void setValue(const QString &newValue) override
void SetType(dvbdev_rotor_t type)
void setValue(int value) override
SwitchSetting(DiSEqCDevDevice &node, DiSEqCDevSettings &settings)
DiSEqCDevSettings & m_settings
void SetLOFLow(uint lof_lo)
LNBPresetSetting(DiSEqCDevLNB &lnb)
uint GetNumPorts(void) const
Switch class, including tone, legacy and DiSEqC switches.
LNBLOFLowSetting(DiSEqCDevLNB &lnb)