MythTV  master
diseqcsettings.cpp
Go to the documentation of this file.
1 /*
2  * \file diseqcsettings.cpp
3  * \brief DVB-S Device Tree Configuration Classes.
4  * \author Copyright (C) 2006, Yeasah Pell
5  */
6 
7 // Std C headers
8 #include <cmath>
9 
10 // MythTV headers
11 #include "mythdbcon.h"
12 #include "mythlogging.h"
13 #include "diseqcsettings.h"
14 
15 /* Lat/Long items relocated from videosource.cpp */
16 
18 {
19  GlobalTextEditSetting *gc = new GlobalTextEditSetting("latitude");
20  gc->setLabel("Latitude");
21  gc->setHelpText(
22  DeviceTree::tr("The Cartesian latitude for your location. "
23  "Use negative numbers for southern coordinates."));
24  return gc;
25 }
26 
28 {
29  GlobalTextEditSetting *gc = new GlobalTextEditSetting("longitude");
30  gc->setLabel("Longitude");
31  gc->setHelpText(
32  DeviceTree::tr("The Cartesian longitude for your location. "
33  "Use negative numbers for western coordinates."));
34  return gc;
35 }
36 
38 
40 {
41  public:
43  {
44  setLabel(DeviceTree::tr("Device Type"));
45  addSelection(DeviceTree::tr("Unconnected"),
46  QString::number((uint) 0xFFFF));
47  addSelection(DeviceTree::tr("Switch"),
48  QString::number((uint) DiSEqCDevDevice::kTypeSwitch));
49  addSelection(DeviceTree::tr("Rotor"),
50  QString::number((uint) DiSEqCDevDevice::kTypeRotor));
51  addSelection(DeviceTree::tr("Unicable"),
52  QString::number((uint) DiSEqCDevDevice::kTypeSCR));
53  addSelection(DeviceTree::tr("LNB"),
54  QString::number((uint) DiSEqCDevDevice::kTypeLNB));
55  }
56 
57  void Load(void) override // StandardSetting
58  {
59  if (m_device)
60  {
61  QString tmp = QString::number((uint) m_device->GetDeviceType());
63  }
64  setChanged(false);
65  }
66 
68  {
69  m_device = dev;
70  }
71 
72  void DeleteDevice()
73  {
74  SetDevice(nullptr);
75  clearSettings();
76  }
77 
79  {
80  return m_device;
81  }
82 
83  private:
85 };
86 
88 
90 {
91  public:
92  explicit DeviceDescrSetting(DiSEqCDevDevice &device) :
93  m_device(device)
94  {
95  setLabel(DeviceTree::tr("Description"));
96  QString help = DeviceTree::tr(
97  "Optional descriptive name for this device, to "
98  "make it easier to configure settings later.");
100  }
101 
102  void Load(void) override // StandardSetting
103  {
105  setChanged(false);
106  }
107 
108  void Save(void) override // StandardSetting
109  {
111  }
112 
113  private:
115 };
116 
117 
119 
121 {
122  public:
124  TransMythUISpinBoxSetting(0, 15, 1), m_device(device)
125  {
126  setLabel(DeviceTree::tr("Repeat Count"));
127  QString help = DeviceTree::tr(
128  "Number of repeat (command with repeat flag ON) or resend (the same command) DiSEqC commands. "
129  "If value is higher than 10, command will be resend N-10 times. "
130  "If value is lower than 10, command will be repeated N times. "
131  "Repeat useful for unreliable DiSEqC equipment; resend useful when unreliable DiSEqC equipment has broken/unsupported repeat flag support.");
132  setHelpText(help);
133  }
134 
135  void Load(void) override // StandardSetting
136  {
138  setChanged(false);
139  }
140 
141  void Save(void) override // StandardSetting
142  {
143  m_device.SetRepeatCount(getValue().toUInt());
144  }
145 
146  private:
148 };
149 
151 
153 {
154  public:
155  explicit SwitchTypeSetting(DiSEqCDevSwitch &switch_dev) :
156  m_switch(switch_dev)
157  {
158  setLabel(DeviceTree::tr("Switch Type"));
159  setHelpText(DeviceTree::tr("Select the type of switch from the list."));
160 
161  addSelection(DeviceTree::tr("Tone"),
162  QString::number((uint) DiSEqCDevSwitch::kTypeTone));
163  addSelection(DeviceTree::tr("Voltage"),
164  QString::number((uint) DiSEqCDevSwitch::kTypeVoltage));
165  addSelection(DeviceTree::tr("Mini DiSEqC"),
166  QString::number((uint) DiSEqCDevSwitch::kTypeMiniDiSEqC));
167  addSelection(DeviceTree::tr("DiSEqC"),
168  QString::number((uint)
170  addSelection(DeviceTree::tr("DiSEqC (Uncommitted)"),
171  QString::number((uint)
173  addSelection(DeviceTree::tr("Legacy SW21"),
174  QString::number((uint) DiSEqCDevSwitch::kTypeLegacySW21));
175  addSelection(DeviceTree::tr("Legacy SW42"),
176  QString::number((uint) DiSEqCDevSwitch::kTypeLegacySW42));
177  addSelection(DeviceTree::tr("Legacy SW64"),
178  QString::number((uint) DiSEqCDevSwitch::kTypeLegacySW64));
179  }
180 
181  void Load(void) override // StandardSetting
182  {
183  setValue(getValueIndex(QString::number((uint) m_switch.GetType())));
184  setChanged(false);
185  }
186 
187  void Save(void) override // StandardSetting
188  {
190  getValue().toUInt());
191  }
192 
193  private:
195 };
196 
198 
200 {
201  public:
202  explicit SwitchAddressSetting(DiSEqCDevSwitch &switch_dev) :
203  m_switch(switch_dev)
204  {
205  setLabel(DeviceTree::tr("Address of switch"));
206  setHelpText(DeviceTree::tr("The DiSEqC address of the switch."));
207  }
208 
209  void Load(void) override // StandardSetting
210  {
211  setValue(QString("0x%1").arg(m_switch.GetAddress(), 0, 16));
212  setChanged(false);
213  }
214 
215  void Save(void) override // StandardSetting
216  {
217  m_switch.SetAddress(getValue().toUInt(nullptr, 16));
218  }
219 
220  private:
222 };
223 
225 
227 {
228  public:
229  explicit SwitchPortsSetting(DiSEqCDevSwitch &switch_dev) :
230  m_switch(switch_dev)
231  {
232  setLabel(DeviceTree::tr("Number of ports"));
233  setHelpText(DeviceTree::tr("The number of ports this switch has."));
234  }
235 
236  void Load(void) override // StandardSetting
237  {
238  setValue(QString::number(m_switch.GetNumPorts()));
239  setChanged(false);
240  }
241 
242  void Save(void) override // StandardSetting
243  {
244  m_switch.SetNumPorts(getValue().toUInt());
245  }
246 
247  private:
249 };
250 
252 
254 {
255  setLabel(DeviceTree::tr("Switch Configuration"));
256 
257  parent = this;
258  m_deviceDescr = new DeviceDescrSetting(switch_dev);
259  parent->addChild(m_deviceDescr);
260  parent->addChild(new DeviceRepeatSetting(switch_dev));
261  m_type = new SwitchTypeSetting(switch_dev);
262  parent->addChild(m_type);
263  m_address = new SwitchAddressSetting(switch_dev);
264  parent->addChild(m_address);
265  m_ports = new SwitchPortsSetting(switch_dev);
266  parent->addChild(m_ports);
267 
268  connect(m_type, SIGNAL(valueChanged(const QString&)),
269  this, SLOT( update(void)));
270  connect(m_deviceDescr, SIGNAL(valueChanged(const QString&)),
271  SLOT(setValue(const QString&)));
272 }
273 
275 {
278  update();
279  setChanged(false);
280 }
281 
283 {
284  switch ((DiSEqCDevSwitch::dvbdev_switch_t) m_type->getValue().toUInt())
285  {
291  m_address->setValue(QString("0x10"));
292  m_address->setEnabled(false);
293  m_ports->setValue("2");
294  m_ports->setEnabled(false);
295  break;
297  m_address->setValue(QString("0x10"));
298  m_address->setEnabled(false);
299  m_ports->setValue("3");
300  m_ports->setEnabled(false);
301  break;
304  m_address->setEnabled(true);
305  m_ports->setEnabled(true);
306  break;
307  }
308 }
309 
311 {
312  QStringList actions;
313  if (GetMythMainWindow()->TranslateKeyPress("Global", e, actions))
314  return true;
315 
316  bool handled = false;
317  foreach(const QString &action, actions)
318  {
319  if (action == "DELETE")
320  {
321  handled = true;
322  emit DeleteClicked();
323  break;
324  }
325  }
326 
327  return handled;
328 }
329 
331 
333 {
334  public:
335  explicit RotorTypeSetting(DiSEqCDevRotor &rotor) :
336  m_rotor(rotor)
337  {
338  setLabel(DeviceTree::tr("Rotor Type"));
339  setHelpText(DeviceTree::tr("Select the type of rotor from the list."));
340  addSelection(DeviceTree::tr("DiSEqC 1.2"),
341  QString::number((uint) DiSEqCDevRotor::kTypeDiSEqC_1_2));
342  addSelection(DeviceTree::tr("DiSEqC 1.3 (GotoX/USALS)"),
343  QString::number((uint) DiSEqCDevRotor::kTypeDiSEqC_1_3));
344  }
345 
346  void Load(void) override // StandardSetting
347  {
348  setValue(getValueIndex(QString::number((uint)m_rotor.GetType())));
349  setChanged(false);
350  }
351 
352  void Save(void) override // StandardSetting
353  {
355  }
356 
357  private:
359 };
360 
362 
364 {
365  public:
367  m_rotor(rotor)
368  {
369  setLabel(DeviceTree::tr("Rotor Low Speed (deg/sec)"));
370  QString help = DeviceTree::tr(
371  "To allow the approximate monitoring of rotor movement, enter "
372  "the rated angular speed of the rotor when powered at 13V.");
373  setHelpText(help);
374  }
375 
376  void Load(void) override // StandardSetting
377  {
378  setValue(QString::number(m_rotor.GetLoSpeed()));
379  setChanged(false);
380  }
381 
382  void Save(void) override // StandardSetting
383  {
384  m_rotor.SetLoSpeed(getValue().toDouble());
385  }
386 
387  private:
389 };
390 
392 
394 {
395  public:
397  m_rotor(rotor)
398  {
399  setLabel(DeviceTree::tr("Rotor High Speed (deg/sec)"));
400  QString help = DeviceTree::tr(
401  "To allow the approximate monitoring of rotor movement, enter "
402  "the rated angular speed of the rotor when powered at 18V.");
403  setHelpText(help);
404  }
405 
406  void Load(void) override // StandardSetting
407  {
408  setValue(QString::number(m_rotor.GetHiSpeed()));
409  setChanged(false);
410  }
411 
412  void Save(void) override // StandardSetting
413  {
414  m_rotor.SetHiSpeed(getValue().toDouble());
415  }
416 
417  private:
419 };
420 
422 
423 static QString AngleToString(double angle)
424 {
425  QString str;
426  if (angle >= 0.0)
427  str = QString::number(angle) +
428  DeviceTree::tr("E", "Eastern Hemisphere");
429  else /* if (angle < 0.0) */
430  str = QString::number(-angle) +
431  DeviceTree::tr("W", "Western Hemisphere");
432  return str;
433 }
434 
435 static double AngleToEdit(double angle, QString &hemi)
436 {
437  if (angle > 0.0)
438  {
439  hemi = "E";
440  return angle;
441  }
442 
443  hemi = "W";
444  return -angle;
445 }
446 
447 static double AngleToFloat(const QString &angle, bool translated = true)
448 {
449  if (angle.length() < 2)
450  return 0.0;
451 
452  double pos;
453  QChar postfix = angle.at(angle.length() - 1);
454  if (postfix.isLetter())
455  {
456  pos = angle.left(angle.length() - 1).toDouble();
457  if ((translated &&
458  (postfix.toUpper() ==
459  DeviceTree::tr("W", "Western Hemisphere")[0])) ||
460  (!translated && (postfix.toUpper() == 'W')))
461  {
462  pos = -pos;
463  }
464  }
465  else
466  pos = angle.toDouble();
467 
468  return pos;
469 }
470 
472 {
474  PopulateList();
475 }
476 
478 {
480 }
481 
483 {
484 public:
485  RotorPosTextEdit(const QString &label, uint id, const QString &value) :
486  m_id(id)
487  {
488  setLabel(label);
489  setValue(value);
490  }
491 
492  void updateButton(MythUIButtonListItem *item) override // MythUITextEditSetting
493  {
495  if (getValue().isEmpty())
496  item->SetText(DeviceTree::tr("None"), "value");
497  }
498 
500 };
501 
503 {
504  RotorPosTextEdit *posEdit = static_cast<RotorPosTextEdit*>(setting);
505  QString value = posEdit->getValue();
506  if (value.isEmpty())
507  m_posmap.erase(m_posmap.find(posEdit->m_id));
508  else
509  m_posmap[posEdit->m_id] = AngleToFloat(posEdit->getValue());
510 }
511 
513 {
514  uint num_pos = 64;
515  for (uint pos = 1; pos < num_pos; pos++)
516  {
517  uint_to_dbl_t::const_iterator it = m_posmap.find(pos);
518  QString posval;
519  if (it != m_posmap.end())
520  posval = AngleToString(*it);
521 
522  RotorPosTextEdit *posEdit =
523  new RotorPosTextEdit(DeviceTree::tr("Position #%1").arg(pos),
524  pos,
525  posval);
526  connect(posEdit, SIGNAL(valueChanged(StandardSetting*)),
527  SLOT(valueChanged(StandardSetting*)));
528  addChild(posEdit);
529  }
530 }
531 
533 
535  : m_rotor(rotor)
536 {
537  setLabel(DeviceTree::tr("Rotor Configuration"));
538  setValue(rotor.GetDescription());
539 
540  parent = this;
541  parent->addChild(new DeviceDescrSetting(rotor));
542  parent->addChild(new DeviceRepeatSetting(rotor));
543 
544  RotorTypeSetting *rtype = new RotorTypeSetting(rotor);
545  connect(rtype, SIGNAL(valueChanged(const QString&)),
546  this, SLOT( SetType( const QString&)));
547  parent->addChild(rtype);
548 
549  m_pos = new RotorPosMap(rotor);
550  m_pos->setLabel(DeviceTree::tr("Positions"));
551  m_pos->setHelpText(DeviceTree::tr("Rotor position setup."));
552  parent->addChild(m_pos);
553 
554  parent->addChild(new RotorLoSpeedSetting(rotor));
555  parent->addChild(new RotorHiSpeedSetting(rotor));
556  parent->addChild(DiSEqCLatitude());
557  parent->addChild(DiSEqCLongitude());
558 }
559 
561 {
564 }
565 
566 void RotorConfig::SetType(const QString &type)
567 {
569  rtype = (DiSEqCDevRotor::dvbdev_rotor_t) type.toUInt();
571 }
572 
574 
576 {
577  public:
579  TransMythUISpinBoxSetting(0, 8, 1), m_scr(scr)
580  {
581  setLabel(DeviceTree::tr("Userband"));
582  setHelpText(DeviceTree::tr("Unicable userband ID (0-7) or sometimes (1-8)"));
583  }
584 
585  void Load(void) override // StandardSetting
586  {
588  setChanged(false);
589  }
590 
591  void Save(void) override // StandardSetting
592  {
594  }
595 
596  private:
598 };
599 
601 
603 {
604  public:
605  explicit SCRFrequencySetting(DiSEqCDevSCR &scr) : m_scr(scr)
606  {
607  setLabel(DeviceTree::tr("Frequency (MHz)"));
608  setHelpText(DeviceTree::tr("Unicable userband frequency (usually 1210, 1420, 1680 and 2040 MHz)"));
609  }
610 
611  void Load(void) override // StandardSetting
612  {
613  setValue(QString::number(m_scr.GetFrequency()));
614  setChanged(false);
615  }
616 
617  void Save(void) override // StandardSetting
618  {
619  m_scr.SetFrequency(getValue().toUInt());
620  }
621 
622  private:
624 };
625 
627 
629 {
630  public:
631  explicit SCRPINSetting(DiSEqCDevSCR &scr) : m_scr(scr)
632  {
633  setLabel(DeviceTree::tr("PIN code"));
634  setHelpText(DeviceTree::tr("Unicable PIN code (-1 disabled, 0 - 255)"));
635  }
636 
637  void Load(void) override // StandardSetting
638  {
639  setValue(QString::number(m_scr.GetPIN()));
640  setChanged(false);
641  }
642 
643  void Save(void) override // StandardSetting
644  {
645  m_scr.SetPIN(getValue().toInt());
646  }
647 
648  private:
650 };
651 
653 
655 {
656  setLabel(DeviceTree::tr("Unicable Configuration"));
657 
658  parent = this;
659  parent->addChild(new SCRUserBandSetting(scr));
660  parent->addChild(new SCRFrequencySetting(scr));
661  parent->addChild(new SCRPINSetting(scr));
662  parent->addChild(new DeviceRepeatSetting(scr));
663 }
664 
666 
668 {
669  public:
670  lnb_preset(const QString &_name, DiSEqCDevLNB::dvbdev_lnb_t _type,
671  uint _lof_sw = 0, uint _lof_lo = 0,
672  uint _lof_hi = 0, bool _pol_inv = false) :
673  name(_name), type(_type),
674  lof_sw(_lof_sw), lof_lo(_lof_lo),
675  lof_hi(_lof_hi), pol_inv(_pol_inv) {}
676 
677  public:
678  QString name;
683  bool pol_inv;
684 };
685 
687 {
688 
689  /* description, type, LOF switch, LOF low, LOF high, inverted polarity */
690  lnb_preset(QT_TRANSLATE_NOOP("DeviceTree", "Universal (Europe)"),
692  11700000, 9750000, 10600000),
693  lnb_preset(QT_TRANSLATE_NOOP("DeviceTree", "Single (Europe)"),
695  lnb_preset(QT_TRANSLATE_NOOP("DeviceTree", "Circular (N. America)"),
696  DiSEqCDevLNB::kTypeVoltageControl, 0, 11250000),
697  lnb_preset(QT_TRANSLATE_NOOP("DeviceTree", "Linear (N. America)"),
698  DiSEqCDevLNB::kTypeVoltageControl, 0, 10750000),
699  lnb_preset(QT_TRANSLATE_NOOP("DeviceTree", "C Band"),
701  lnb_preset(QT_TRANSLATE_NOOP("DeviceTree", "DishPro Bandstacked"),
702  DiSEqCDevLNB::kTypeBandstacked, 0, 11250000, 14350000),
704 };
705 
706 static uint FindPreset(const DiSEqCDevLNB &lnb)
707 {
708  uint i;
709  for (i = 0; !lnb_presets[i].name.isEmpty(); i++)
710  {
711  if (lnb_presets[i].type == lnb.GetType() &&
712  lnb_presets[i].lof_sw == lnb.GetLOFSwitch() &&
713  lnb_presets[i].lof_lo == lnb.GetLOFLow() &&
714  lnb_presets[i].lof_hi == lnb.GetLOFHigh() &&
716  {
717  break;
718  }
719  }
720  return i;
721 }
722 
724 {
725  public:
726  explicit LNBPresetSetting(DiSEqCDevLNB &lnb) : m_lnb(lnb)
727  {
728  setLabel(DeviceTree::tr("LNB Preset"));
729  QString help = DeviceTree::tr(
730  "Select the LNB preset from the list, or choose "
731  "'Custom' and set the advanced settings below.");
732  setHelpText(help);
733 
734  uint i = 0;
735  for (; !lnb_presets[i].name.isEmpty(); i++)
736  addSelection(DeviceTree::tr( lnb_presets[i].name.toUtf8() ),
737  QString::number(i));
738  addSelection(DeviceTree::tr("Custom"), QString::number(i));
739  }
740 
741  void Load(void) override // StandardSetting
742  {
744  setChanged(false);
745  }
746 
747  void Save(void) override // StandardSetting
748  {
749  }
750 
751  private:
753 };
754 
756 
758 {
759  public:
760  explicit LNBTypeSetting(DiSEqCDevLNB &lnb) : m_lnb(lnb)
761  {
762  setLabel(DeviceTree::tr("LNB Type"));
763  setHelpText(DeviceTree::tr("Select the type of LNB from the list."));
764  addSelection(DeviceTree::tr("Legacy (Fixed)"),
765  QString::number((uint) DiSEqCDevLNB::kTypeFixed));
766  addSelection(DeviceTree::tr("Standard (Voltage)"),
767  QString::number((uint) DiSEqCDevLNB::
768  kTypeVoltageControl));
769  addSelection(DeviceTree::tr("Universal (Voltage & Tone)"),
770  QString::number((uint) DiSEqCDevLNB::
771  kTypeVoltageAndToneControl));
772  addSelection(DeviceTree::tr("Bandstacked"),
773  QString::number((uint) DiSEqCDevLNB::kTypeBandstacked));
774  }
775 
776  void Load(void) override // StandardSetting
777  {
778  setValue(getValueIndex(QString::number((uint) m_lnb.GetType())));
779  setChanged(false);
780  }
781 
782  void Save(void) override // StandardSetting
783  {
785  }
786 
787  private:
789 };
790 
792 
794 {
795  public:
796  explicit LNBLOFSwitchSetting(DiSEqCDevLNB &lnb) : m_lnb(lnb)
797  {
798  setLabel(DeviceTree::tr("LNB LOF Switch (MHz)"));
799  QString help = DeviceTree::tr(
800  "This defines at what frequency the LNB will do a "
801  "switch from high to low setting, and vice versa.");
802  setHelpText(help);
803  }
804 
805  void Load(void) override // StandardSetting
806  {
807  setValue(QString::number(m_lnb.GetLOFSwitch() / 1000));
808  setChanged(false);
809  }
810 
811  void Save(void) override // StandardSetting
812  {
813  m_lnb.SetLOFSwitch(getValue().toUInt() * 1000);
814  }
815 
816  private:
818 };
819 
821 
823 {
824  public:
825  explicit LNBLOFLowSetting(DiSEqCDevLNB &lnb) : m_lnb(lnb)
826  {
827  setLabel(DeviceTree::tr("LNB LOF Low (MHz)"));
828  QString help = DeviceTree::tr(
829  "This defines the offset the frequency coming "
830  "from the LNB will be in low setting. For bandstacked "
831  "LNBs this is the vertical/right polarization band.");
832  setHelpText(help);
833  }
834 
835  void Load(void) override // StandardSetting
836  {
837  setValue(QString::number(m_lnb.GetLOFLow() / 1000));
838  setChanged(false);
839  }
840 
841  void Save(void) override // StandardSetting
842  {
843  m_lnb.SetLOFLow(getValue().toUInt() * 1000);
844  }
845 
846  private:
848 };
849 
851 
853 {
854  public:
855  explicit LNBLOFHighSetting(DiSEqCDevLNB &lnb) : m_lnb(lnb)
856  {
857  setLabel(DeviceTree::tr("LNB LOF High (MHz)"));
858  QString help = DeviceTree::tr(
859  "This defines the offset the frequency coming from "
860  "the LNB will be in high setting. For bandstacked "
861  "LNBs this is the horizontal/left polarization band.");
862  setHelpText(help);
863  }
864 
865  void Load(void) override // StandardSetting
866  {
867  setValue(QString::number(m_lnb.GetLOFHigh() / 1000));
868  setChanged(false);
869  }
870 
871  void Save(void) override // StandardSetting
872  {
873  m_lnb.SetLOFHigh(getValue().toUInt() * 1000);
874  }
875 
876  private:
878 };
879 
881 {
882  public:
884  m_lnb(lnb)
885  {
886  setLabel(DeviceTree::tr("LNB Reversed"));
887  QString help = DeviceTree::tr(
888  "This defines whether the signal reaching the LNB "
889  "is reversed from normal polarization. This happens "
890  "to circular signals bouncing twice on a toroidal "
891  "dish.");
892  setHelpText(help);
893  }
894 
895  void Load(void) override // StandardSetting
896  {
898  setChanged(false);
899  }
900 
901  void Save(void) override // StandardSetting
902  {
904  }
905 
906  private:
908 };
909 
911 
913 {
914  setLabel(DeviceTree::tr("LNB Configuration"));
915  setValue(lnb.GetDescription());
916 
917  parent = this;
918  DeviceDescrSetting *deviceDescr = new DeviceDescrSetting(lnb);
919  parent->addChild(deviceDescr);
920  m_preset = new LNBPresetSetting(lnb);
921  parent->addChild(m_preset);
922  m_type = new LNBTypeSetting(lnb);
923  parent->addChild(m_type);
925  parent->addChild(m_lof_switch);
926  m_lof_lo = new LNBLOFLowSetting(lnb);
927  parent->addChild(m_lof_lo);
928  m_lof_hi = new LNBLOFHighSetting(lnb);
929  parent->addChild(m_lof_hi);
931  parent->addChild(m_pol_inv);
932  connect(m_type, SIGNAL(valueChanged(const QString&)),
933  this, SLOT( UpdateType( void)));
934  connect(m_preset, SIGNAL(valueChanged(const QString&)),
935  this, SLOT( SetPreset( const QString&)));
936  connect(deviceDescr, SIGNAL(valueChanged(const QString&)),
937  SLOT(setValue(const QString&)));
938 }
939 
940 void LNBConfig::Load(void)
941 {
944 }
945 
946 void LNBConfig::SetPreset(const QString &value)
947 {
948  uint index = value.toUInt();
949  if (index >= (sizeof(lnb_presets) / sizeof(lnb_preset)))
950  return;
951 
952  lnb_preset &preset = lnb_presets[index];
953  if (preset.name.isEmpty())
954  {
955  m_type->setEnabled(true);
956  UpdateType();
957  }
958  else
959  {
961  QString::number((uint)preset.type)));
962  m_lof_switch->setValue(QString::number(preset.lof_sw / 1000));
963  m_lof_lo->setValue(QString::number(preset.lof_lo / 1000));
964  m_lof_hi->setValue(QString::number(preset.lof_hi / 1000));
965  m_pol_inv->setValue(preset.pol_inv);
966  m_type->setEnabled(false);
967  m_lof_switch->setEnabled(false);
968  m_lof_hi->setEnabled(false);
969  m_lof_lo->setEnabled(false);
970  m_pol_inv->setEnabled(false);
971  }
972 }
973 
975 {
976  if (!m_type->isEnabled())
977  return;
978 
979  switch ((DiSEqCDevLNB::dvbdev_lnb_t) m_type->getValue().toUInt())
980  {
983  m_lof_switch->setEnabled(false);
984  m_lof_hi->setEnabled(false);
985  m_lof_lo->setEnabled(true);
986  m_pol_inv->setEnabled(true);
987  break;
989  m_lof_switch->setEnabled(true);
990  m_lof_hi->setEnabled(true);
991  m_lof_lo->setEnabled(true);
992  m_pol_inv->setEnabled(true);
993  break;
995  m_lof_switch->setEnabled(false);
996  m_lof_hi->setEnabled(true);
997  m_lof_lo->setEnabled(true);
998  m_pol_inv->setEnabled(true);
999  break;
1000  }
1001 }
1002 
1004 
1006 {
1007  PopulateTree();
1009 }
1010 
1012 {
1013  DiSEqCDevDevice *dev = devtype->GetDevice();
1014  if (dev)
1015  {
1016  DiSEqCDevDevice *parent = dev->GetParent();
1017  if (parent)
1018  parent->SetChild(dev->GetOrdinal(), nullptr);
1019  else
1020  m_tree.SetRoot(nullptr);
1021  }
1022 
1023  devtype->DeleteDevice();
1024 }
1025 
1027 {
1028  clearSettings();
1030 }
1031 
1033  StandardSetting *parent)
1034 {
1035  DiseqcConfigBase *setting = nullptr;
1036  switch (dev->GetDeviceType())
1037  {
1039  {
1040  DiSEqCDevSwitch *sw = dynamic_cast<DiSEqCDevSwitch*>(dev);
1041  if (sw)
1042  setting = new SwitchConfig(*sw, parent);
1043  }
1044  break;
1045 
1047  {
1048  DiSEqCDevRotor *rotor = dynamic_cast<DiSEqCDevRotor*>(dev);
1049  if (rotor)
1050  setting = new RotorConfig(*rotor, parent);
1051  }
1052  break;
1053 
1055  {
1056  DiSEqCDevSCR *scr = dynamic_cast<DiSEqCDevSCR*>(dev);
1057  if (scr)
1058  setting = new SCRConfig(*scr, parent);
1059  }
1060  break;
1061 
1063  {
1064  DiSEqCDevLNB *lnb = dynamic_cast<DiSEqCDevLNB*>(dev);
1065  if (lnb)
1066  setting = new LNBConfig(*lnb, parent);
1067  }
1068  break;
1069 
1070  default:
1071  break;
1072  }
1073 
1074  return setting;
1075 }
1076 
1078  DiSEqCDevDevice *parent,
1079  uint childnum,
1080  GroupSetting *parentSetting)
1081 {
1082  if (node)
1083  {
1084  DeviceTypeSetting *devtype = new DeviceTypeSetting();
1085  devtype->SetDevice(node);
1086  devtype->Load();
1088  devtype);
1089 
1090  if (setting)
1091  {
1092  setting->Load();
1093  devtype->addChild(setting);
1094  PopulateChildren(node, setting);
1095 
1096  AddDeviceTypeSetting(devtype, parent, childnum, parentSetting);
1097  }
1098  else
1099  delete devtype;
1100  }
1101  else
1102  {
1103  DeviceTypeSetting *devtype = new DeviceTypeSetting();
1104  AddDeviceTypeSetting(devtype, parent, childnum, parentSetting);
1105  }
1106 }
1107 
1109  DiSEqCDevDevice *parent,
1110  uint childnum,
1111  GroupSetting *parentSetting)
1112 {
1113  if (parentSetting)
1114  parentSetting->addChild(devtype);
1115  else // Root node
1116  addChild(devtype);
1117 
1118  ConnectToValueChanged(devtype, parent, childnum);
1119 }
1120 
1122  DiSEqCDevDevice *parent,
1123  uint childnum)
1124 {
1125  auto slot = [devtype, parent, childnum, this](const QString &value)
1126  {
1127  ValueChanged(value, devtype, parent, childnum);
1128  };
1129 
1130  connect(devtype,
1131  static_cast<void (StandardSetting::*)(const QString&)>(
1133  this,
1134  slot);
1135 }
1136 
1138  GroupSetting *parentSetting)
1139 {
1140  uint num_ch = node->GetChildCount();
1141  for (uint ch = 0; ch < num_ch; ch++)
1142  {
1143  PopulateTree(node->GetChild(ch), node, ch, parentSetting);
1144  }
1145 }
1146 
1147 void DeviceTree::ValueChanged(const QString &value,
1148  DeviceTypeSetting *devtype,
1149  DiSEqCDevDevice *parent,
1150  uint childnum)
1151 {
1152  // Remove old setting from m_tree
1153  DeleteDevice(devtype);
1154 
1156  static_cast<DiSEqCDevDevice::dvbdev_t>(value.toUInt());
1157 
1159  if (dev)
1160  {
1161  if (!parent)
1162  {
1163  m_tree.SetRoot(dev);
1164  PopulateTree();
1165  }
1166  else if (parent->SetChild(childnum, dev))
1167  {
1168  DiseqcConfigBase *newConfig =
1169  DiseqcConfigBase::CreateByType(dev, devtype);
1170  newConfig->Load();
1171 
1172  PopulateChildren(dev, newConfig);
1173 
1174  devtype->addChild(newConfig);
1175  devtype->SetDevice(dev);
1176  }
1177  else
1178  delete dev;
1179  }
1180 
1181  emit settingsChanged(this);
1182 }
1183 
1185 
1187 {
1188  public:
1190  : m_node(node), m_settings(settings)
1191  {
1192  setLabel(node.GetDescription());
1193  setHelpText(DeviceTree::tr("Choose a port to use for this switch."));
1194 
1195  uint num_children = node.GetChildCount();
1196  for (uint ch = 0; ch < num_children; ch++)
1197  {
1198  QString val = QString("%1").arg(ch);
1199  QString descr = DeviceTree::tr("Port %1").arg(ch+1);
1200  DiSEqCDevDevice *child = node.GetChild(ch);
1201  if (child)
1202  descr += QString(" (%2)").arg(child->GetDescription());
1203  addSelection(descr, val);
1204  }
1205  }
1206 
1207  void Load(void) override // StandardSetting
1208  {
1209  double value = m_settings.GetValue(m_node.GetDeviceID());
1210  setValue((uint)value);
1211  setChanged(false);
1212  }
1213 
1214  void Save(void) override // StandardSetting
1215  {
1216  m_settings.SetValue(m_node.GetDeviceID(), getValue().toDouble());
1217  }
1218 
1219  private:
1222 };
1223 
1225 
1227 {
1228  public:
1230  : m_node(node), m_settings(settings)
1231  {
1232  setLabel(node.GetDescription());
1233  setHelpText(DeviceTree::tr("Choose a satellite position."));
1234 
1235  DiSEqCDevRotor *rotor = dynamic_cast<DiSEqCDevRotor*>(&m_node);
1236  if (rotor)
1237  m_posmap = rotor->GetPosMap();
1238  }
1239 
1240  void Load(void) override // StandardSetting
1241  {
1242  clearSelections();
1243 
1244  uint_to_dbl_t::const_iterator it;
1245  for (it = m_posmap.begin(); it != m_posmap.end(); ++it)
1246  addSelection(AngleToString(*it), QString::number(*it));
1247 
1248  double angle = m_settings.GetValue(m_node.GetDeviceID());
1249  setValue(getValueIndex(QString::number(angle)));
1250  setChanged(false);
1251  }
1252 
1253  void Save(void) override // StandardSetting
1254  {
1255  m_settings.SetValue(m_node.GetDeviceID(), getValue().toDouble());
1256  }
1257 
1258  private:
1262 };
1263 
1265 
1267 {
1268  public:
1271  hemisphere(new TransMythUIComboBoxSetting(/*false*/)),
1272  m_node(node), m_settings(settings)
1273  {
1274  QString help =
1275  DeviceTree::tr(
1276  "Locates the satellite you wish to point to "
1277  "with the longitude along the Clarke Belt of "
1278  "the satellite [-180..180] and its hemisphere.");
1279 
1280  numeric->setLabel(DeviceTree::tr("Longitude (degrees)"));
1282  hemisphere->setLabel(DeviceTree::tr("Hemisphere"));
1283  hemisphere->addSelection(DeviceTree::tr("Eastern"), "E", false);
1284  hemisphere->addSelection(DeviceTree::tr("Western"), "W", true);
1286 
1287  addChild(numeric);
1289 
1290  addChild(new RotorConfig(static_cast<DiSEqCDevRotor&>(node), this));
1291  }
1292 
1293  void Load(void) override // StandardSetting
1294  {
1295  double val = m_settings.GetValue(m_node.GetDeviceID());
1296  QString hemi;
1297  double eval = AngleToEdit(val, hemi);
1298  numeric->setValue(QString::number(eval));
1301  }
1302 
1303  void Save(void) override // StandardSetting
1304  {
1305  QString val = QString::number(numeric->getValue().toDouble());
1306  val += hemisphere->getValue();
1308  }
1309 
1310  private:
1315 };
1316 
1318 
1320 {
1321  public:
1323  : m_node(node), m_settings(settings)
1324  {
1325  setLabel("Position");
1326  setHelpText(DeviceTree::tr("Unicable satellite position (A/B)"));
1328  QString::number((uint)DiSEqCDevSCR::kTypeScrPosA), true);
1330  QString::number((uint)DiSEqCDevSCR::kTypeScrPosB), false);
1331  }
1332 
1333  void Load(void) override // StandardSetting
1334  {
1335  double value = m_settings.GetValue(m_node.GetDeviceID());
1336  setValue(getValueIndex(QString::number((uint)value)));
1337  setChanged(false);
1338  }
1339 
1340  void Save(void) override // StandardSetting
1341  {
1342  m_settings.SetValue(m_node.GetDeviceID(), getValue().toDouble());
1343  }
1344 
1345  private:
1348 };
1349 
1351 
1353  DiSEqCDevSettings &settings, uint cardid, bool switches_enabled) :
1354  m_settings(settings), m_switches_enabled(switches_enabled)
1355 {
1356  setLabel(DeviceTree::tr("DTV Device Configuration"));
1357 
1358  // load
1359  m_tree.Load(cardid);
1360 
1361  // initial UI setup
1362  AddNodes(this, QString(), m_tree.Root());
1363 }
1364 
1366  StandardSetting *group, const QString &trigger, DiSEqCDevDevice *node)
1367 {
1368  if (!node)
1369  return;
1370 
1371  StandardSetting *setting = nullptr;
1372  switch (node->GetDeviceType())
1373  {
1375  setting = new SwitchSetting(*node, m_settings);
1376  setting->setEnabled(m_switches_enabled);
1377  break;
1379  {
1380  DiSEqCDevRotor *rotor = dynamic_cast<DiSEqCDevRotor*>(node);
1381  if (rotor && (rotor->GetType() == DiSEqCDevRotor::kTypeDiSEqC_1_2))
1382  setting = new RotorSetting(*node, m_settings);
1383  else
1384  setting = new USALSRotorSetting(*node, m_settings);
1385  break;
1386  }
1388  {
1389  setting = new SCRPositionSetting(*node, m_settings);
1390  break;
1391  }
1392  default:
1393  break;
1394  }
1395 
1396  if (!setting)
1397  return;
1398 
1399  m_devs[node->GetDeviceID()] = setting;
1400 
1401  uint num_ch = node->GetChildCount();
1403  {
1404  for (uint i = 0; i < num_ch; i++)
1405  AddNodes(setting, QString::number(i), node->GetChild(i));
1406 
1407  AddChild(group, trigger, setting);
1408  return;
1409  }
1410 
1411  if (!num_ch)
1412  {
1413  AddChild(group, trigger, setting);
1414  return;
1415  }
1416 
1417  AddChild(group, trigger, setting);
1418  for (uint i = 0; i < num_ch; i++)
1419  AddNodes(group, trigger, node->GetChild(i));
1420 }
1421 
1423  StandardSetting *group, const QString &trigger, StandardSetting *setting)
1424 {
1425  if (!trigger.isEmpty())
1426  group->addTargetedChild(trigger, setting);
1427  else
1428  group->addChild(setting);
1429 }
uint GetUserBand(void) const
Definition: diseqc.h:399
DiSEqCDevDevice & m_node
void SetDevice(DiSEqCDevDevice *dev)
DTVDeviceConfigGroup(DiSEqCDevSettings &settings, uint cardid, bool switches_enabled)
LNBConfig(DiSEqCDevLNB &lnb, StandardSetting *parent)
void Load(void) override
LNBLOFLowSetting * m_lof_lo
DiSEqCDevRotor & m_rotor
void SetPolarityInverted(bool inv)
Definition: diseqc.h:461
void Load(void) override
void Save(void) override
DVB-S device settings class.
Definition: diseqc.h:35
DiSEqCDevDevice * Root(void)
Retrieves the root node in the tree.
Definition: diseqc.h:92
void Load(void) override
void SetNumPorts(uint num_ports)
Definition: diseqc.cpp:1357
void Save(void) override
DiSEqCDevSCR & m_scr
void Save(void) override
void Load(void) override
LNBPresetSetting * m_preset
uint GetDeviceID(void) const
Definition: diseqc.h:163
void SetDescription(const QString &desc)
Definition: diseqc.h:157
virtual void clearSettings()
void SetAddress(uint address)
Definition: diseqc.h:240
void Load(void) override
void Load(void) override
RotorHiSpeedSetting(DiSEqCDevRotor &rotor)
RotorPosMap * m_pos
DiSEqCDevLNB & m_lnb
LNBLOFSwitchSetting * m_lof_switch
DiSEqCDevDevice & m_node
void Load(void) override
void Save(void) override
RotorTypeSetting(DiSEqCDevRotor &rotor)
void settingsChanged(StandardSetting *selectedSetting=nullptr)
void SetPIN(int pin)
Definition: diseqc.h:395
DiSEqCDevSettings & m_settings
virtual void Load(void)
static QString SCRPositionToString(dvbdev_pos_t pos)
Definition: diseqc.h:418
uint_to_dbl_t m_posmap
void addSelection(const QString &label, QString value=QString(), bool select=false)
virtual DiSEqCDevDevice * GetChild(uint)
Retrieves the nth child of this node.
Definition: diseqc.h:181
void Save(void) override
void SetUserBand(uint userband)
Definition: diseqc.h:393
virtual void setHelpText(const QString &str)
void SetLOFHigh(uint lof_hi)
Definition: diseqc.h:459
void Save(void) override
void SetValue(uint devid, double value)
Sets a value for this configuration chain by device id.
Definition: diseqc.cpp:222
double GetValue(uint devid) const
Retrieves a value from this configuration chain by device id.
Definition: diseqc.cpp:207
void update(void)
SwitchAddressSetting(DiSEqCDevSwitch &switch_dev)
void setChanged(bool changed)
LNBLOFHighSetting(DiSEqCDevLNB &lnb)
void Load(void) override
void Save(void) override
void ConnectToValueChanged(DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum)
unsigned int uint
Definition: compat.h:140
void Load(void) override
void updateButton(MythUIButtonListItem *item) override
This method is called whenever the UI need to reflect a change Reimplement this If you widget need a ...
void valueChanged(StandardSetting *)
SwitchSetting(DiSEqCDevDevice &node, DiSEqCDevSettings &settings)
RotorConfig(DiSEqCDevRotor &rotor, StandardSetting *parent)
int getValueIndex(const QString &value) const
void Load(void) override
void SetPosMap(const uint_to_dbl_t &posmap)
Definition: diseqc.cpp:2022
void Save(void) override
virtual bool SetChild(uint, DiSEqCDevDevice *)
Changes the nth child of this node.
Definition: diseqc.h:159
void UpdateType(void)
TransMythUIComboBoxSetting * hemisphere
LNBLOFHighSetting * m_lof_hi
DiSEqCDevDevice * GetDevice()
static guint32 * tmp
Definition: goom_core.c:35
SwitchConfig(DiSEqCDevSwitch &switch_dev, StandardSetting *parent)
void SetLOFSwitch(uint lof_switch)
Definition: diseqc.h:458
uint GetRepeatCount(void) const
Definition: diseqc.h:169
DiSEqCDevLNB & m_lnb
DiSEqCDevDevice * m_device
DiSEqCDevSettings & m_settings
dvbdev_t GetDeviceType(void) const
Definition: diseqc.h:162
virtual QString getValue(void) const
DiSEqCDevSCR & m_scr
USALSRotorSetting(DiSEqCDevDevice &node, DiSEqCDevSettings &settings)
bool keyPressEvent(QKeyEvent *) override
RotorSetting(DiSEqCDevDevice &node, DiSEqCDevSettings &settings)
devid_to_setting_t m_devs
SCRUserBandSetting(DiSEqCDevSCR &scr)
uint GetOrdinal(void) const
Definition: diseqc.h:167
DiSEqCDevLNB & m_lnb
Represents a node in a DVB-S device network.
Definition: diseqc.h:133
QMap< uint, double > uint_to_dbl_t
Definition: diseqc.h:28
SCRPositionSetting(DiSEqCDevDevice &node, DiSEqCDevSettings &settings)
void updateButton(MythUIButtonListItem *item) override
This method is called whenever the UI need to reflect a change Reimplement this If you widget need a ...
void Save(void) override
SwitchTypeSetting * m_type
void SetHiSpeed(double speed)
Definition: diseqc.h:310
void Save(void) override
void Load(void) override
DiSEqCDevSwitch & m_switch
static GlobalTextEditSetting * DiSEqCLatitude(void)
void setValue(int value) override
void DeleteClicked(void)
void SetLOFLow(uint lof_lo)
Definition: diseqc.h:460
static QString AngleToString(double angle)
void Load(void) override
virtual void setLabel(QString str)
double GetLoSpeed(void) const
Definition: diseqc.h:317
void SetRoot(DiSEqCDevDevice *root)
Changes the root node of the tree.
Definition: diseqc.cpp:639
void Load(void) override
RotorLoSpeedSetting(DiSEqCDevRotor &rotor)
void Load(void) override
void AddNodes(StandardSetting *group, const QString &trigger, DiSEqCDevDevice *node)
static uint FindPreset(const DiSEqCDevLNB &lnb)
static lnb_preset lnb_presets[]
uint GetLOFHigh(void) const
Definition: diseqc.h:466
void SetRepeatCount(uint repeat)
Definition: diseqc.h:158
void Save(void) override
void Save(void) override
Rotor class.
Definition: diseqc.h:293
void Load(void) override
DiSEqCDevSwitch & m_switch
double GetHiSpeed(void) const
Definition: diseqc.h:318
SCRFrequencySetting(DiSEqCDevSCR &scr)
SwitchPortsSetting * m_ports
LNBPresetSetting(DiSEqCDevLNB &lnb)
void AddChild(StandardSetting *group, const QString &trigger, StandardSetting *setting)
virtual void setEnabled(bool enabled)
uint GetLOFSwitch(void) const
Definition: diseqc.h:465
void Save(void) override
void Load(void) override
const char * name
Definition: ParseText.cpp:328
DeviceRepeatSetting(DiSEqCDevDevice &device)
dvbdev_switch_t GetType(void) const
Definition: diseqc.h:245
void Load(void) override
bool isEnabled() const
void SetPreset(const QString &value)
DiSEqCDevRotor & m_rotor
uint_to_dbl_t GetPosMap(void) const
Definition: diseqc.cpp:2012
virtual void addChild(StandardSetting *child)
uint GetLOFLow(void) const
Definition: diseqc.h:467
bool Load(const QString &device)
Loads the device tree from the database.
Definition: diseqc.cpp:315
LNBPolarityInvertedSetting * m_pol_inv
MythMainWindow * GetMythMainWindow(void)
void Load(void) override
dvbdev_lnb_t GetType(void) const
Definition: diseqc.h:464
dvbdev_rotor_t GetType(void) const
Definition: diseqc.h:316
DiSEqCDevSettings & m_settings
void AddDeviceTypeSetting(DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum, GroupSetting *parentSetting)
static double AngleToFloat(const QString &angle, bool translated=true)
void Save(void) override
DiSEqCDevDevice & m_device
DiSEqCDevLNB & m_lnb
DeviceDescrSetting(DiSEqCDevDevice &device)
void Save(void) override
void Load(void) override
void Load(void) override
void PopulateList(void)
DiSEqCDevSwitch & m_switch
void Save(void) override
DiSEqCDevRotor & m_rotor
virtual uint GetChildCount(void) const
Retrieves the proper number of children for this node.
Definition: diseqc.h:170
static DiseqcConfigBase * CreateByType(DiSEqCDevDevice *dev, StandardSetting *parent)
DiSEqCDevLNB::dvbdev_lnb_t type
void Save(void) override
static GlobalTextEditSetting * DiSEqCLongitude(void)
LNBPolarityInvertedSetting(DiSEqCDevLNB &lnb)
DiSEqCDevLNB & m_lnb
Unicable / SCR Class.
Definition: diseqc.h:373
uint GetNumPorts(void) const
Definition: diseqc.h:247
LNBLOFSwitchSetting(DiSEqCDevLNB &lnb)
void DeleteDevice(DeviceTypeSetting *devtype)
void PopulateChildren(DiSEqCDevDevice *node, GroupSetting *parentSetting)
SwitchAddressSetting * m_address
QString GetDescription(void) const
Definition: diseqc.h:168
DiSEqCDevDevice * GetParent(void) const
Definition: diseqc.h:166
SwitchPortsSetting(DiSEqCDevSwitch &switch_dev)
void SetFrequency(uint freq)
Definition: diseqc.h:394
void Save(void) override
LNB Class.
Definition: diseqc.h:438
LNBTypeSetting(DiSEqCDevLNB &lnb)
void PopulateTree(void)
void SetType(dvbdev_switch_t type)
Definition: diseqc.h:239
void Load(void) override
uint GetAddress(void) const
Definition: diseqc.h:246
void setValue(const QString &) override
bool IsPolarityInverted(void) const
Definition: diseqc.h:468
RotorPosTextEdit(const QString &label, uint id, const QString &value)
uint_to_dbl_t m_posmap
DiSEqCDevDevice & m_device
DiSEqCDevRotor & m_rotor
void Load(void) override
DiSEqCDevRotor & m_rotor
int GetPIN(void) const
Definition: diseqc.h:401
void Load(void) override
static DiSEqCDevDevice * CreateByType(DiSEqCDevTree &tree, dvbdev_t type, uint dev_id=0)
Definition: diseqc.cpp:944
SwitchTypeSetting(DiSEqCDevSwitch &switch_dev)
void Load() override
static double AngleToEdit(double angle, QString &hemi)
TransTextEditSetting * numeric
void SetType(const QString &type)
LNBTypeSetting * m_type
void SetType(dvbdev_rotor_t type)
Definition: diseqc.h:308
void SetType(dvbdev_lnb_t type)
Definition: diseqc.h:457
SCRPINSetting(DiSEqCDevSCR &scr)
lnb_preset(const QString &_name, DiSEqCDevLNB::dvbdev_lnb_t _type, uint _lof_sw=0, uint _lof_lo=0, uint _lof_hi=0, bool _pol_inv=false)
DiSEqCDevTree m_tree
LNBLOFLowSetting(DiSEqCDevLNB &lnb)
DeviceDescrSetting * m_deviceDescr
void Load(void) override
void addTargetedChild(const QString &value, StandardSetting *setting)
void Save(void) override
void Save(void) override
virtual void setValue(const QString &newValue)
void Save(void) override
DiSEqCDevDevice & m_node
Switch class, including tone, legacy and DiSEqC switches.
Definition: diseqc.h:215
DiSEqCDevSettings & m_settings
SCRConfig(DiSEqCDevSCR &scr, StandardSetting *parent)
void ValueChanged(const QString &value, DeviceTypeSetting *devtype, DiSEqCDevDevice *parent, uint childnum)
uint GetFrequency(void) const
Definition: diseqc.h:400
DiSEqCDevTree & m_tree
void Load(void) override
void Save(void) override
DiSEqCDevSCR & m_scr
DiSEqCDevSettings & m_settings
void Load(void) override
void valueChanged(const QString &)
DiSEqCDevDevice & m_node
void SetLoSpeed(double speed)
Definition: diseqc.h:309