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  foreach(const QString &action, 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  str = QString::number(angle) +
429  DeviceTree::tr("E", "Eastern Hemisphere");
430  else /* if (angle < 0.0) */
431  str = QString::number(-angle) +
432  DeviceTree::tr("W", "Western Hemisphere");
433  return str;
434 }
435 
436 static double AngleToEdit(double angle, QString &hemi)
437 {
438  if (angle > 0.0)
439  {
440  hemi = "E";
441  return angle;
442  }
443 
444  hemi = "W";
445  return -angle;
446 }
447 
448 static double AngleToFloat(const QString &angle, bool translated = true)
449 {
450  if (angle.length() < 2)
451  return 0.0;
452 
453  double pos;
454  QChar postfix = angle.at(angle.length() - 1);
455  if (postfix.isLetter())
456  {
457  pos = angle.left(angle.length() - 1).toDouble();
458  if ((translated &&
459  (postfix.toUpper() ==
460  DeviceTree::tr("W", "Western Hemisphere")[0])) ||
461  (!translated && (postfix.toUpper() == 'W')))
462  {
463  pos = -pos;
464  }
465  }
466  else
467  pos = angle.toDouble();
468 
469  return pos;
470 }
471 
473 {
475  PopulateList();
476 }
477 
479 {
481 }
482 
484 {
485 public:
486  RotorPosTextEdit(const QString &label, uint id, const QString &value) :
487  m_id(id)
488  {
489  setLabel(label);
490  setValue(value);
491  }
492 
493  void updateButton(MythUIButtonListItem *item) override // MythUITextEditSetting
494  {
496  if (getValue().isEmpty())
497  item->SetText(DeviceTree::tr("None"), "value");
498  }
499 
501 };
502 
504 {
505  auto *posEdit = dynamic_cast<RotorPosTextEdit*>(setting);
506  if (posEdit == nullptr)
507  return;
508  QString value = posEdit->getValue();
509  if (value.isEmpty())
510  m_posmap.erase(m_posmap.find(posEdit->m_id));
511  else
512  m_posmap[posEdit->m_id] = AngleToFloat(posEdit->getValue());
513 }
514 
516 {
517  uint num_pos = 64;
518  for (uint pos = 1; pos < num_pos; pos++)
519  {
520  uint_to_dbl_t::const_iterator it = m_posmap.find(pos);
521  QString posval;
522  if (it != m_posmap.end())
523  posval = AngleToString(*it);
524 
525  auto *posEdit =
526  new RotorPosTextEdit(DeviceTree::tr("Position #%1").arg(pos),
527  pos,
528  posval);
529  connect(posEdit, SIGNAL(valueChanged(StandardSetting*)),
530  SLOT(valueChanged(StandardSetting*)));
531  addChild(posEdit);
532  }
533 }
534 
536 
538  : m_rotor(rotor)
539 {
540  setLabel(DeviceTree::tr("Rotor Configuration"));
541  setValue(rotor.GetDescription());
542 
543  parent = this;
544  parent->addChild(new DeviceDescrSetting(rotor));
545  parent->addChild(new DeviceRepeatSetting(rotor));
546 
547  auto *rtype = new RotorTypeSetting(rotor);
548  connect(rtype, SIGNAL(valueChanged(const QString&)),
549  this, SLOT( SetType( const QString&)));
550  parent->addChild(rtype);
551 
552  m_pos = new RotorPosMap(rotor);
553  m_pos->setLabel(DeviceTree::tr("Positions"));
554  m_pos->setHelpText(DeviceTree::tr("Rotor position setup."));
555  parent->addChild(m_pos);
556 
557  parent->addChild(new RotorLoSpeedSetting(rotor));
558  parent->addChild(new RotorHiSpeedSetting(rotor));
559  parent->addChild(DiSEqCLatitude());
560  parent->addChild(DiSEqCLongitude());
561 }
562 
564 {
567 }
568 
569 void RotorConfig::SetType(const QString &type)
570 {
572  rtype = (DiSEqCDevRotor::dvbdev_rotor_t) type.toUInt();
574 }
575 
577 
579 {
580  public:
582  TransMythUISpinBoxSetting(0, 8, 1), m_scr(scr)
583  {
584  setLabel(DeviceTree::tr("Userband"));
585  setHelpText(DeviceTree::tr("Unicable userband ID (0-7) or sometimes (1-8)"));
586  }
587 
588  void Load(void) override // StandardSetting
589  {
591  setChanged(false);
592  }
593 
594  void Save(void) override // StandardSetting
595  {
597  }
598 
599  private:
601 };
602 
604 
606 {
607  public:
608  explicit SCRFrequencySetting(DiSEqCDevSCR &scr) : m_scr(scr)
609  {
610  setLabel(DeviceTree::tr("Frequency (MHz)"));
611  setHelpText(DeviceTree::tr("Unicable userband frequency (usually 1210, 1420, 1680 and 2040 MHz)"));
612  }
613 
614  void Load(void) override // StandardSetting
615  {
616  setValue(QString::number(m_scr.GetFrequency()));
617  setChanged(false);
618  }
619 
620  void Save(void) override // StandardSetting
621  {
622  m_scr.SetFrequency(getValue().toUInt());
623  }
624 
625  private:
627 };
628 
630 
632 {
633  public:
634  explicit SCRPINSetting(DiSEqCDevSCR &scr) : m_scr(scr)
635  {
636  setLabel(DeviceTree::tr("PIN code"));
637  setHelpText(DeviceTree::tr("Unicable PIN code (-1 disabled, 0 - 255)"));
638  }
639 
640  void Load(void) override // StandardSetting
641  {
642  setValue(QString::number(m_scr.GetPIN()));
643  setChanged(false);
644  }
645 
646  void Save(void) override // StandardSetting
647  {
648  m_scr.SetPIN(getValue().toInt());
649  }
650 
651  private:
653 };
654 
656 
658 {
659  setLabel(DeviceTree::tr("Unicable Configuration"));
660 
661  parent = this;
662  parent->addChild(new SCRUserBandSetting(scr));
663  parent->addChild(new SCRFrequencySetting(scr));
664  parent->addChild(new SCRPINSetting(scr));
665  parent->addChild(new DeviceRepeatSetting(scr));
666 }
667 
669 
671 {
672  public:
674  uint _lof_sw = 0, uint _lof_lo = 0,
675  uint _lof_hi = 0, bool _pol_inv = false) :
676  m_name(std::move(_name)), m_type(_type),
677  m_lofSw(_lof_sw), m_lofLo(_lof_lo),
678  m_lofHi(_lof_hi), m_polInv(_pol_inv) {}
679 
680  public:
681  QString m_name;
686  bool m_polInv;
687 };
688 
690 {
691 
692  /* description, type, LOF switch, LOF low, LOF high, inverted polarity */
693  lnb_preset(QT_TRANSLATE_NOOP("DeviceTree", "Universal (Europe)"),
695  11700000, 9750000, 10600000),
696  lnb_preset(QT_TRANSLATE_NOOP("DeviceTree", "Single (Europe)"),
698  lnb_preset(QT_TRANSLATE_NOOP("DeviceTree", "Circular (N. America)"),
699  DiSEqCDevLNB::kTypeVoltageControl, 0, 11250000),
700  lnb_preset(QT_TRANSLATE_NOOP("DeviceTree", "Linear (N. America)"),
701  DiSEqCDevLNB::kTypeVoltageControl, 0, 10750000),
702  lnb_preset(QT_TRANSLATE_NOOP("DeviceTree", "C Band"),
704  lnb_preset(QT_TRANSLATE_NOOP("DeviceTree", "DishPro Bandstacked"),
705  DiSEqCDevLNB::kTypeBandstacked, 0, 11250000, 14350000),
707 };
708 
709 static uint FindPreset(const DiSEqCDevLNB &lnb)
710 {
711  uint i;
712  for (i = 0; !lnb_presets[i].m_name.isEmpty(); i++)
713  {
714  if (lnb_presets[i].m_type == lnb.GetType() &&
715  lnb_presets[i].m_lofSw == lnb.GetLOFSwitch() &&
716  lnb_presets[i].m_lofLo == lnb.GetLOFLow() &&
717  lnb_presets[i].m_lofHi == lnb.GetLOFHigh() &&
719  {
720  break;
721  }
722  }
723  return i;
724 }
725 
727 {
728  public:
729  explicit LNBPresetSetting(DiSEqCDevLNB &lnb) : m_lnb(lnb)
730  {
731  setLabel(DeviceTree::tr("LNB Preset"));
732  QString help = DeviceTree::tr(
733  "Select the LNB preset from the list, or choose "
734  "'Custom' and set the advanced settings below.");
735  setHelpText(help);
736 
737  uint i = 0;
738  for (; !lnb_presets[i].m_name.isEmpty(); i++)
739  addSelection(DeviceTree::tr( lnb_presets[i].m_name.toUtf8() ),
740  QString::number(i));
741  addSelection(DeviceTree::tr("Custom"), QString::number(i));
742  }
743 
744  void Load(void) override // StandardSetting
745  {
747  setChanged(false);
748  }
749 
750  void Save(void) override // StandardSetting
751  {
752  }
753 
754  private:
756 };
757 
759 
761 {
762  public:
763  explicit LNBTypeSetting(DiSEqCDevLNB &lnb) : m_lnb(lnb)
764  {
765  setLabel(DeviceTree::tr("LNB Type"));
766  setHelpText(DeviceTree::tr("Select the type of LNB from the list."));
767  addSelection(DeviceTree::tr("Legacy (Fixed)"),
768  QString::number((uint) DiSEqCDevLNB::kTypeFixed));
769  addSelection(DeviceTree::tr("Standard (Voltage)"),
770  QString::number((uint) DiSEqCDevLNB::
771  kTypeVoltageControl));
772  addSelection(DeviceTree::tr("Universal (Voltage & Tone)"),
773  QString::number((uint) DiSEqCDevLNB::
774  kTypeVoltageAndToneControl));
775  addSelection(DeviceTree::tr("Bandstacked"),
776  QString::number((uint) DiSEqCDevLNB::kTypeBandstacked));
777  }
778 
779  void Load(void) override // StandardSetting
780  {
781  setValue(getValueIndex(QString::number((uint) m_lnb.GetType())));
782  setChanged(false);
783  }
784 
785  void Save(void) override // StandardSetting
786  {
788  }
789 
790  private:
792 };
793 
795 
797 {
798  public:
799  explicit LNBLOFSwitchSetting(DiSEqCDevLNB &lnb) : m_lnb(lnb)
800  {
801  setLabel(DeviceTree::tr("LNB LOF Switch (MHz)"));
802  QString help = DeviceTree::tr(
803  "This defines at what frequency the LNB will do a "
804  "switch from high to low setting, and vice versa.");
805  setHelpText(help);
806  }
807 
808  void Load(void) override // StandardSetting
809  {
810  setValue(QString::number(m_lnb.GetLOFSwitch() / 1000));
811  setChanged(false);
812  }
813 
814  void Save(void) override // StandardSetting
815  {
816  m_lnb.SetLOFSwitch(getValue().toUInt() * 1000);
817  }
818 
819  private:
821 };
822 
824 
826 {
827  public:
828  explicit LNBLOFLowSetting(DiSEqCDevLNB &lnb) : m_lnb(lnb)
829  {
830  setLabel(DeviceTree::tr("LNB LOF Low (MHz)"));
831  QString help = DeviceTree::tr(
832  "This defines the offset the frequency coming "
833  "from the LNB will be in low setting. For bandstacked "
834  "LNBs this is the vertical/right polarization band.");
835  setHelpText(help);
836  }
837 
838  void Load(void) override // StandardSetting
839  {
840  setValue(QString::number(m_lnb.GetLOFLow() / 1000));
841  setChanged(false);
842  }
843 
844  void Save(void) override // StandardSetting
845  {
846  m_lnb.SetLOFLow(getValue().toUInt() * 1000);
847  }
848 
849  private:
851 };
852 
854 
856 {
857  public:
858  explicit LNBLOFHighSetting(DiSEqCDevLNB &lnb) : m_lnb(lnb)
859  {
860  setLabel(DeviceTree::tr("LNB LOF High (MHz)"));
861  QString help = DeviceTree::tr(
862  "This defines the offset the frequency coming from "
863  "the LNB will be in high setting. For bandstacked "
864  "LNBs this is the horizontal/left polarization band.");
865  setHelpText(help);
866  }
867 
868  void Load(void) override // StandardSetting
869  {
870  setValue(QString::number(m_lnb.GetLOFHigh() / 1000));
871  setChanged(false);
872  }
873 
874  void Save(void) override // StandardSetting
875  {
876  m_lnb.SetLOFHigh(getValue().toUInt() * 1000);
877  }
878 
879  private:
881 };
882 
884 {
885  public:
887  m_lnb(lnb)
888  {
889  setLabel(DeviceTree::tr("LNB Reversed"));
890  QString help = DeviceTree::tr(
891  "This defines whether the signal reaching the LNB "
892  "is reversed from normal polarization. This happens "
893  "to circular signals bouncing twice on a toroidal "
894  "dish.");
895  setHelpText(help);
896  }
897 
898  void Load(void) override // StandardSetting
899  {
901  setChanged(false);
902  }
903 
904  void Save(void) override // StandardSetting
905  {
907  }
908 
909  private:
911 };
912 
914 
916 {
917  setLabel(DeviceTree::tr("LNB Configuration"));
918  setValue(lnb.GetDescription());
919 
920  parent = this;
921  auto *deviceDescr = new DeviceDescrSetting(lnb);
922  parent->addChild(deviceDescr);
923  m_preset = new LNBPresetSetting(lnb);
924  parent->addChild(m_preset);
925  m_type = new LNBTypeSetting(lnb);
926  parent->addChild(m_type);
927  m_lofSwitch = new LNBLOFSwitchSetting(lnb);
928  parent->addChild(m_lofSwitch);
929  m_lofLo = new LNBLOFLowSetting(lnb);
930  parent->addChild(m_lofLo);
931  m_lofHi = new LNBLOFHighSetting(lnb);
932  parent->addChild(m_lofHi);
934  parent->addChild(m_polInv);
935  connect(m_type, SIGNAL(valueChanged(const QString&)),
936  this, SLOT( UpdateType( void)));
937  connect(m_preset, SIGNAL(valueChanged(const QString&)),
938  this, SLOT( SetPreset( const QString&)));
939  connect(deviceDescr, SIGNAL(valueChanged(const QString&)),
940  SLOT(setValue(const QString&)));
941 }
942 
943 void LNBConfig::Load(void)
944 {
947 }
948 
949 void LNBConfig::SetPreset(const QString &value)
950 {
951  uint index = value.toUInt();
952  if (index >= (sizeof(lnb_presets) / sizeof(lnb_preset)))
953  return;
954 
955  lnb_preset &preset = lnb_presets[index];
956  if (preset.m_name.isEmpty())
957  {
958  m_type->setEnabled(true);
959  UpdateType();
960  }
961  else
962  {
964  QString::number((uint)preset.m_type)));
965  m_lofSwitch->setValue(QString::number(preset.m_lofSw / 1000));
966  m_lofLo->setValue(QString::number(preset.m_lofLo / 1000));
967  m_lofHi->setValue(QString::number(preset.m_lofHi / 1000));
968  m_polInv->setValue(preset.m_polInv);
969  m_type->setEnabled(false);
970  m_lofSwitch->setEnabled(false);
971  m_lofHi->setEnabled(false);
972  m_lofLo->setEnabled(false);
973  m_polInv->setEnabled(false);
974  }
975 }
976 
978 {
979  if (!m_type->isEnabled())
980  return;
981 
982  switch ((DiSEqCDevLNB::dvbdev_lnb_t) m_type->getValue().toUInt())
983  {
986  m_lofSwitch->setEnabled(false);
987  m_lofHi->setEnabled(false);
988  m_lofLo->setEnabled(true);
989  m_polInv->setEnabled(true);
990  break;
992  m_lofSwitch->setEnabled(true);
993  m_lofHi->setEnabled(true);
994  m_lofLo->setEnabled(true);
995  m_polInv->setEnabled(true);
996  break;
998  m_lofSwitch->setEnabled(false);
999  m_lofHi->setEnabled(true);
1000  m_lofLo->setEnabled(true);
1001  m_polInv->setEnabled(true);
1002  break;
1003  }
1004 }
1005 
1007 
1009 {
1010  PopulateTree();
1012 }
1013 
1015 {
1016  DiSEqCDevDevice *dev = devtype->GetDevice();
1017  if (dev)
1018  {
1019  DiSEqCDevDevice *parent = dev->GetParent();
1020  if (parent)
1021  parent->SetChild(dev->GetOrdinal(), nullptr);
1022  else
1023  m_tree.SetRoot(nullptr);
1024  }
1025 
1026  devtype->DeleteDevice();
1027 }
1028 
1030 {
1031  clearSettings();
1033 }
1034 
1036  StandardSetting *parent)
1037 {
1038  DiseqcConfigBase *setting = nullptr;
1039  switch (dev->GetDeviceType())
1040  {
1042  {
1043  auto *sw = dynamic_cast<DiSEqCDevSwitch*>(dev);
1044  if (sw)
1045  setting = new SwitchConfig(*sw, parent);
1046  }
1047  break;
1048 
1050  {
1051  auto *rotor = dynamic_cast<DiSEqCDevRotor*>(dev);
1052  if (rotor)
1053  setting = new RotorConfig(*rotor, parent);
1054  }
1055  break;
1056 
1058  {
1059  auto *scr = dynamic_cast<DiSEqCDevSCR*>(dev);
1060  if (scr)
1061  setting = new SCRConfig(*scr, parent);
1062  }
1063  break;
1064 
1066  {
1067  auto *lnb = dynamic_cast<DiSEqCDevLNB*>(dev);
1068  if (lnb)
1069  setting = new LNBConfig(*lnb, parent);
1070  }
1071  break;
1072 
1073  default:
1074  break;
1075  }
1076 
1077  return setting;
1078 }
1079 
1081  DiSEqCDevDevice *parent,
1082  uint childnum,
1083  GroupSetting *parentSetting)
1084 {
1085  if (node)
1086  {
1087  auto *devtype = new DeviceTypeSetting();
1088  devtype->SetDevice(node);
1089  devtype->Load();
1091  devtype);
1092 
1093  if (setting)
1094  {
1095  setting->Load();
1096  devtype->addChild(setting);
1097  PopulateChildren(node, setting);
1098 
1099  AddDeviceTypeSetting(devtype, parent, childnum, parentSetting);
1100  }
1101  else
1102  delete devtype;
1103  }
1104  else
1105  {
1106  auto *devtype = new DeviceTypeSetting();
1107  AddDeviceTypeSetting(devtype, parent, childnum, parentSetting);
1108  }
1109 }
1110 
1112  DiSEqCDevDevice *parent,
1113  uint childnum,
1114  GroupSetting *parentSetting)
1115 {
1116  if (parentSetting)
1117  parentSetting->addChild(devtype);
1118  else // Root node
1119  addChild(devtype);
1120 
1121  ConnectToValueChanged(devtype, parent, childnum);
1122 }
1123 
1125  DiSEqCDevDevice *parent,
1126  uint childnum)
1127 {
1128  auto slot = [devtype, parent, childnum, this](const QString &value)
1129  {
1130  ValueChanged(value, devtype, parent, childnum);
1131  };
1132 
1133  connect(devtype,
1134  static_cast<void (StandardSetting::*)(const QString&)>(
1136  this,
1137  slot);
1138 }
1139 
1141  GroupSetting *parentSetting)
1142 {
1143  uint num_ch = node->GetChildCount();
1144  for (uint ch = 0; ch < num_ch; ch++)
1145  {
1146  PopulateTree(node->GetChild(ch), node, ch, parentSetting);
1147  }
1148 }
1149 
1150 void DeviceTree::ValueChanged(const QString &value,
1151  DeviceTypeSetting *devtype,
1152  DiSEqCDevDevice *parent,
1153  uint childnum)
1154 {
1155  // Remove old setting from m_tree
1156  DeleteDevice(devtype);
1157 
1158  const auto type = static_cast<DiSEqCDevDevice::dvbdev_t>(value.toUInt());
1159 
1161  if (dev)
1162  {
1163  if (!parent)
1164  {
1165  m_tree.SetRoot(dev);
1166  PopulateTree();
1167  }
1168  else if (parent->SetChild(childnum, dev))
1169  {
1170  DiseqcConfigBase *newConfig =
1171  DiseqcConfigBase::CreateByType(dev, devtype);
1172  newConfig->Load();
1173 
1174  PopulateChildren(dev, newConfig);
1175 
1176  devtype->addChild(newConfig);
1177  devtype->SetDevice(dev);
1178  }
1179  else
1180  delete dev;
1181  }
1182 
1183  emit settingsChanged(this);
1184 }
1185 
1187 
1189 {
1190  public:
1192  : m_node(node), m_settings(settings)
1193  {
1194  setLabel(node.GetDescription());
1195  setHelpText(DeviceTree::tr("Choose a port to use for this switch."));
1196 
1197  uint num_children = node.GetChildCount();
1198  for (uint ch = 0; ch < num_children; ch++)
1199  {
1200  QString val = QString("%1").arg(ch);
1201  QString descr = DeviceTree::tr("Port %1").arg(ch+1);
1202  DiSEqCDevDevice *child = node.GetChild(ch);
1203  if (child)
1204  descr += QString(" (%2)").arg(child->GetDescription());
1205  addSelection(descr, val);
1206  }
1207  }
1208 
1209  void Load(void) override // StandardSetting
1210  {
1211  double value = m_settings.GetValue(m_node.GetDeviceID());
1212  setValue((uint)value);
1213  setChanged(false);
1214  }
1215 
1216  void Save(void) override // StandardSetting
1217  {
1218  m_settings.SetValue(m_node.GetDeviceID(), getValue().toDouble());
1219  }
1220 
1221  private:
1224 };
1225 
1227 
1229 {
1230  public:
1232  : m_node(node), m_settings(settings)
1233  {
1234  setLabel(node.GetDescription());
1235  setHelpText(DeviceTree::tr("Choose a satellite position."));
1236 
1237  auto *rotor = dynamic_cast<DiSEqCDevRotor*>(&m_node);
1238  if (rotor)
1239  m_posmap = rotor->GetPosMap();
1240  }
1241 
1242  void Load(void) override // StandardSetting
1243  {
1244  clearSelections();
1245 
1246  uint_to_dbl_t::const_iterator it;
1247  for (it = m_posmap.begin(); it != m_posmap.end(); ++it)
1248  addSelection(AngleToString(*it), QString::number(*it));
1249 
1250  double angle = m_settings.GetValue(m_node.GetDeviceID());
1251  setValue(getValueIndex(QString::number(angle)));
1252  setChanged(false);
1253  }
1254 
1255  void Save(void) override // StandardSetting
1256  {
1257  m_settings.SetValue(m_node.GetDeviceID(), getValue().toDouble());
1258  }
1259 
1260  private:
1264 };
1265 
1267 
1269 {
1270  public:
1273  m_hemisphere(new TransMythUIComboBoxSetting(/*false*/)),
1274  m_node(node), m_settings(settings)
1275  {
1276  QString help =
1277  DeviceTree::tr(
1278  "Locates the satellite you wish to point to "
1279  "with the longitude along the Clarke Belt of "
1280  "the satellite [-180..180] and its hemisphere.");
1281 
1282  m_numeric->setLabel(DeviceTree::tr("Longitude (degrees)"));
1284  m_hemisphere->setLabel(DeviceTree::tr("Hemisphere"));
1285  m_hemisphere->addSelection(DeviceTree::tr("Eastern"), "E", false);
1286  m_hemisphere->addSelection(DeviceTree::tr("Western"), "W", true);
1288 
1291 
1292  addChild(new RotorConfig(static_cast<DiSEqCDevRotor&>(m_node), this));
1293  }
1294 
1295  void Load(void) override // StandardSetting
1296  {
1297  double val = m_settings.GetValue(m_node.GetDeviceID());
1298  QString hemi;
1299  double eval = AngleToEdit(val, hemi);
1300  m_numeric->setValue(QString::number(eval));
1303  }
1304 
1305  void Save(void) override // StandardSetting
1306  {
1307  QString val = QString::number(m_numeric->getValue().toDouble());
1308  val += m_hemisphere->getValue();
1310  }
1311 
1312  private:
1317 };
1318 
1320 
1322 {
1323  public:
1325  : m_node(node), m_settings(settings)
1326  {
1327  setLabel("Position");
1328  setHelpText(DeviceTree::tr("Unicable satellite position (A/B)"));
1330  QString::number((uint)DiSEqCDevSCR::kTypeScrPosA), true);
1332  QString::number((uint)DiSEqCDevSCR::kTypeScrPosB), false);
1333  }
1334 
1335  void Load(void) override // StandardSetting
1336  {
1337  double value = m_settings.GetValue(m_node.GetDeviceID());
1338  setValue(getValueIndex(QString::number((uint)value)));
1339  setChanged(false);
1340  }
1341 
1342  void Save(void) override // StandardSetting
1343  {
1344  m_settings.SetValue(m_node.GetDeviceID(), getValue().toDouble());
1345  }
1346 
1347  private:
1350 };
1351 
1353 
1355  DiSEqCDevSettings &settings, uint cardid, bool switches_enabled) :
1356  m_settings(settings), m_switchesEnabled(switches_enabled)
1357 {
1358  setLabel(DeviceTree::tr("DTV Device Configuration"));
1359 
1360  // load
1361  m_tree.Load(cardid);
1362 
1363  // initial UI setup
1364  AddNodes(this, QString(), m_tree.Root());
1365 }
1366 
1368  StandardSetting *group, const QString &trigger, DiSEqCDevDevice *node)
1369 {
1370  if (!node)
1371  return;
1372 
1373  StandardSetting *setting = nullptr;
1374  switch (node->GetDeviceType())
1375  {
1377  setting = new SwitchSetting(*node, m_settings);
1378  setting->setEnabled(m_switchesEnabled);
1379  break;
1381  {
1382  auto *rotor = dynamic_cast<DiSEqCDevRotor*>(node);
1383  if (rotor && (rotor->GetType() == DiSEqCDevRotor::kTypeDiSEqC_1_2))
1384  setting = new RotorSetting(*node, m_settings);
1385  else
1386  setting = new USALSRotorSetting(*node, m_settings);
1387  break;
1388  }
1390  {
1391  setting = new SCRPositionSetting(*node, m_settings);
1392  break;
1393  }
1394  default:
1395  break;
1396  }
1397 
1398  if (!setting)
1399  return;
1400 
1401  m_devs[node->GetDeviceID()] = setting;
1402 
1403  uint num_ch = node->GetChildCount();
1405  {
1406  for (uint i = 0; i < num_ch; i++)
1407  AddNodes(setting, QString::number(i), node->GetChild(i));
1408 
1409  AddChild(group, trigger, setting);
1410  return;
1411  }
1412 
1413  if (!num_ch)
1414  {
1415  AddChild(group, trigger, setting);
1416  return;
1417  }
1418 
1419  AddChild(group, trigger, setting);
1420  for (uint i = 0; i < num_ch; i++)
1421  AddNodes(group, trigger, node->GetChild(i));
1422 }
1423 
1425  StandardSetting *group, const QString &trigger, StandardSetting *setting)
1426 {
1427  if (!trigger.isEmpty())
1428  group->addTargetedChild(trigger, setting);
1429  else
1430  group->addChild(setting);
1431 }
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
DiSEqCDevRotor & m_rotor
LNBLOFSwitchSetting * m_lofSwitch
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
LNBLOFHighSetting * m_lofHi
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
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)
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)
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
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
LNBLOFLowSetting * m_lofLo
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)
static void AddChild(StandardSetting *group, const QString &trigger, StandardSetting *setting)
virtual void setEnabled(bool enabled)
uint GetLOFSwitch(void) const
Definition: diseqc.h:465
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: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
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
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:170
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: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)
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: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)
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: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)
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)
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