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