22 DeviceTree::tr(
"The Cartesian latitude for your location. "
23 "Use negative numbers for southern "
24 "and western coordinates."));
33 DeviceTree::tr(
"The Cartesian longitude for your location. "
34 "Use negative numbers for southern "
35 "and western coordinates."));
47 setLabel(DeviceTree::tr(
"Device Type"));
68 virtual void Save(QString ) { }
82 setLabel(DeviceTree::tr(
"Description"));
83 QString
help = DeviceTree::tr(
84 "Optional descriptive name for this device, to "
85 "make it easier to configure settings later.");
99 virtual void Save(QString ) { }
114 setLabel(DeviceTree::tr(
"Repeat Count"));
115 QString
help = DeviceTree::tr(
116 "Number of times to repeat DiSEqC commands sent to this device. "
117 "Larger values may help with less reliable devices.");
131 virtual void Save(QString ) { }
145 setLabel(DeviceTree::tr(
"Switch Type"));
146 setHelpText(DeviceTree::tr(
"Select the type of switch from the list."));
155 QString::number((
uint)
158 QString::number((
uint)
179 virtual void Save(QString ) { }
193 setLabel(DeviceTree::tr(
"Address of switch"));
194 setHelpText(DeviceTree::tr(
"The DiSEqC address of the switch."));
220 setLabel(DeviceTree::tr(
"Number of ports"));
221 setHelpText(DeviceTree::tr(
"The number of ports this switch has."));
234 virtual void Save(QString ) { }
246 group->
setLabel(DeviceTree::tr(
"Switch Configuration"));
257 connect(
m_type, SIGNAL(valueChanged(
const QString&)),
258 this, SLOT(
update(
void)));
299 setLabel(DeviceTree::tr(
"Rotor Type"));
300 setHelpText(DeviceTree::tr(
"Select the type of rotor from the list."));
303 addSelection(DeviceTree::tr(
"DiSEqC 1.3 (GotoX/USALS)"),
317 virtual void Save(QString ) { }
331 setLabel(DeviceTree::tr(
"Rotor Low Speed (deg/sec)"));
332 QString
help = DeviceTree::tr(
333 "To allow the approximate monitoring of rotor movement, enter "
334 "the rated angular speed of the rotor when powered at 13V.");
348 virtual void Save(QString ) { }
362 setLabel(DeviceTree::tr(
"Rotor High Speed (deg/sec)"));
363 QString
help = DeviceTree::tr(
364 "To allow the approximate monitoring of rotor movement, enter "
365 "the rated angular speed of the rotor when powered at 18V.");
379 virtual void Save(QString ) { }
389 QString str = QString::null;
391 str = QString::number(angle) +
392 DeviceTree::tr(
"E",
"Eastern Hemisphere");
394 str = QString::number(-angle) +
395 DeviceTree::tr(
"W",
"Western Hemisphere");
411 static double AngleToFloat(
const QString &angle,
bool translated =
true)
413 if (angle.length() < 2)
417 QChar postfix = angle.at(angle.length() - 1);
418 if (postfix.isLetter())
420 pos = angle.left(angle.length() - 1).toDouble();
422 (postfix.toUpper() ==
423 DeviceTree::tr(
"W",
"Western Hemisphere")[0])) ||
424 (!translated && (postfix.toUpper() ==
'W')))
430 pos = angle.toDouble();
461 DeviceTree::tr(
"Position Index %1").arg(
id),
462 DeviceTree::tr(
"Orbital Position"), angle))
481 for (
uint pos = 1; pos < num_pos; pos++)
483 uint_to_dbl_t::const_iterator it =
m_posmap.find(pos);
484 QString posval = DeviceTree::tr(
"None");
488 addSelection(DeviceTree::tr(
"Position #%1 (%2)").arg(pos).arg(posval),
489 QString::number(pos));
501 setLabel(DeviceTree::tr(
"Rotor Position Map"));
520 group->
setLabel(DeviceTree::tr(
"Rotor Configuration"));
529 connect(rtype, SIGNAL(valueChanged(
const QString&)),
530 this, SLOT(
SetType(
const QString&)));
537 connect(
m_pos, SIGNAL(pressed(
void)),
571 uint _lof_hi = 0,
bool _pol_inv =
false) :
588 lnb_preset(DeviceTree::tr(
"Universal (Europe)"),
590 11700000, 9750000, 10600000),
593 lnb_preset(DeviceTree::tr(
"Circular (N. America)"),
595 lnb_preset(DeviceTree::tr(
"Linear (N. America)"),
599 lnb_preset(DeviceTree::tr(
"DishPro Bandstacked"),
607 for (i = 0; !lnb_presets[i].
name.isEmpty(); i++)
626 setLabel(DeviceTree::tr(
"LNB Preset"));
627 QString
help = DeviceTree::tr(
628 "Select the LNB preset from the list, or choose "
629 "'Custom' and set the advanced settings below.");
633 for (; !lnb_presets[i].
name.isEmpty(); i++)
635 addSelection(DeviceTree::tr(
"Custom"), QString::number(i));
662 setLabel(DeviceTree::tr(
"LNB Type"));
663 setHelpText(DeviceTree::tr(
"Select the type of LNB from the list."));
668 kTypeVoltageControl));
669 addSelection(DeviceTree::tr(
"Universal (Voltage & Tone)"),
671 kTypeVoltageAndToneControl));
686 virtual void Save(QString ) { }
699 setLabel(DeviceTree::tr(
"LNB LOF Switch (MHz)"));
700 QString
help = DeviceTree::tr(
701 "This defines at what frequency the LNB will do a "
702 "switch from high to low setting, and vice versa.");
716 virtual void Save(QString ) { }
729 setLabel(DeviceTree::tr(
"LNB LOF Low (MHz)"));
730 QString
help = DeviceTree::tr(
731 "This defines the offset the frequency coming "
732 "from the LNB will be in low setting. For bandstacked "
733 "LNBs this is the vertical/right polarization band.");
747 virtual void Save(QString ) { }
760 setLabel(DeviceTree::tr(
"LNB LOF High (MHz)"));
761 QString
help = DeviceTree::tr(
762 "This defines the offset the frequency coming from "
763 "the LNB will be in high setting. For bandstacked "
764 "LNBs this is the horizontal/left polarization band.");
778 virtual void Save(QString ) { }
790 setLabel(DeviceTree::tr(
"LNB Reversed"));
791 QString
help = DeviceTree::tr(
792 "This defines whether the signal reaching the LNB "
793 "is reversed from normal polarization. This happens "
794 "to circular signals bouncing twice on a toroidal "
809 virtual void Save(QString ) { }
821 group->
setLabel(DeviceTree::tr(
"LNB Configuration"));
836 connect(
m_type, SIGNAL(valueChanged(
const QString&)),
838 connect(preset, SIGNAL(valueChanged(
const QString&)),
839 this, SLOT(
SetPreset(
const QString&)));
846 if (index >= (
sizeof(lnb_presets) /
sizeof(
lnb_preset)))
850 if (preset.
name.isEmpty())
858 QString::number((
uint)preset.
type)));
924 LOG(VB_GENERAL, LOG_ERR, QString(
"DeviceTree::EditNodeDialog(%1) "
925 "-- device not found").arg(nodeid));
929 bool changed =
false;
978 popup->
addLabel(tr(
"Select Type of Device"));
987 connect(list, SIGNAL(
accepted(
int)),
988 popup, SLOT( AcceptItem(
int)));
1031 if (parent->
SetChild(child_num, dev))
1047 if (
id.indexOf(
':') == -1)
1053 QStringList
vals =
id.split(
':');
1054 if (vals[0].isEmpty())
1066 if (
id.indexOf(
':') == -1)
1068 uint nodeid =
id.toUInt();
1099 indent.fill(
' ', 8 * depth);
1103 QString
id = QString::number(node->
GetDeviceID());
1106 for (
uint ch = 0; ch < num_ch; ch++)
1114 id +=
":" + QString::number(childnum);
1124 setLabel(DeviceTree::tr(
"DiSEqC Device Tree"));
1143 setHelpText(DeviceTree::tr(
"Choose a port to use for this switch."));
1146 for (
uint ch = 0; ch < num_children; ch++)
1148 QString val = QString(
"%1").arg(ch);
1149 QString descr = DeviceTree::tr(
"Port %1").arg(ch+1);
1184 setHelpText(DeviceTree::tr(
"Choose a satellite position."));
1195 uint_to_dbl_t::const_iterator it;
1229 "Locates the satellite you wish to point to "
1230 "with the longitude along the Clarke Belt of "
1231 "the satellite [-180..180] and its hemisphere.");
1247 QString hemi = QString::null;
1274 m_settings(settings), m_switches_enabled(switches_enabled)
1276 setLabel(DeviceTree::tr(
"DTV Device Configuration"));
1329 false, useframe,
true,
true,
false,
false,
true, zerospace);
1334 for (
uint i = 0; i < num_ch; i++)
1350 AddChild(cgrp, QString::null, setting);
1351 for (
uint i = 0; i < num_ch; i++)
1363 if (grp && !trigger.isEmpty())
1392 "SELECT cardid, dvb_diseqc_type "
1394 "WHERE dvb_diseqc_type IS NOT NULL AND "
1395 " diseqcid IS NULL");
1403 "SELECT cardinputid, diseqc_port, diseqc_pos, "
1404 " lnb_lof_switch, lnb_lof_hi, lnb_lof_lo "
1406 "WHERE cardinput.cardid = :CARDID");
1408 while (cquery.
next())
1556 LOG(VB_GENERAL, LOG_ERR,
"Unknown DiSEqC device type " +
1557 QString(
"%1 ignoring card %2").arg(type).arg(cardid));
1568 for (
uint i = 0; i < add_lnbs; i++)
1592 while (iquery.
next())
1594 uint inputid = iquery.
value(0).toUInt();
1596 double pos = iquery.
value(2).toDouble();