MythTV  master
standardsettings.cpp
Go to the documentation of this file.
1 #include "standardsettings.h"
2 #include <QApplication>
3 #include <QCoreApplication>
4 #include <QThread>
5 #include <utility>
6 
10 #include "libmythui/mythuibutton.h"
13 #include "libmythui/mythuitext.h"
14 
15 #include "mythcontext.h"
16 
18 {
19  setting->updateButton(this);
20 }
21 
23 {
24  QList<StandardSetting *>::const_iterator i;
25  for (i = m_children.constBegin(); i != m_children.constEnd(); ++i)
26  delete *i;
27  m_children.clear();
28 
29  QMap<QString, QList<StandardSetting *> >::const_iterator iMap;
30  for (iMap = m_targets.constBegin(); iMap != m_targets.constEnd(); ++iMap)
31  {
32  for (i = (*iMap).constBegin(); i != (*iMap).constEnd(); ++i)
33  delete *i;
34  }
35  m_targets.clear();
36 }
37 
39 {
40  auto *item = new MythUIButtonListItemSetting(list, m_label);
41  item->SetData(QVariant::fromValue(this));
42  connect(this, &StandardSetting::ShouldRedraw,
44  updateButton(item);
45  return item;
46 }
47 
48 void StandardSetting::setEnabled(bool enabled)
49 {
50  m_enabled = enabled;
51  emit ShouldRedraw(this);
52 }
53 
54 void StandardSetting::setReadOnly(bool readonly)
55 {
56  m_readonly = readonly;
57  emit ShouldRedraw(this);
58 }
59 
60 void StandardSetting::setVisible(bool visible)
61 {
62  m_visible = visible;
63  emit settingsChanged(this);
64 }
65 
67 {
68  m_parent = parent;
69 }
70 
72 {
73  if (!child)
74  return;
75 
76  m_children.append(child);
77  child->setParent(this);
78 }
79 
81 {
82  m_children.removeAll(child);
83  emit settingsChanged(this);
84 }
85 
86 bool StandardSetting::keyPressEvent(QKeyEvent * /*e*/)
87 {
88  return false;
89 }
90 
97 {
98  item->setVisible(m_visible);
99  item->DisplayState("standard", "widgettype");
100  item->setEnabled(isEnabled());
101  item->SetText(m_label);
102  item->SetText(m_settingValue, "value");
103  item->SetText(getHelpText(), "description");
104  item->setDrawArrow(haveSubSettings());
105 }
106 
107 void StandardSetting::addTargetedChildren(const QString &value,
108  std::initializer_list<StandardSetting *> settings)
109 {
110  m_targets[value].reserve(settings.size());
111  for (auto *setting : qAsConst(settings))
112  {
113  m_targets[value].append(setting);
114  setting->setParent(this);
115  }
116 }
117 void StandardSetting::addTargetedChild(const QString &value,
118  StandardSetting * setting)
119 {
120  m_targets[value].append(setting);
121  setting->setParent(this);
122 }
123 
124 void StandardSetting::removeTargetedChild(const QString &value,
125  StandardSetting *child)
126 {
127  if (m_targets.contains(value))
128  {
129  m_targets[value].removeAll(child);
130  delete child;
131  }
132 }
133 
134 void StandardSetting::clearTargetedSettings(const QString &value)
135 {
136  if (m_targets.contains(value))
137  {
138  for (auto *setting : qAsConst(m_targets[value]))
139  {
140  delete setting;
141  }
142  m_targets[value].clear();
143  }
144 }
145 
146 QList<StandardSetting *> *StandardSetting::getSubSettings()
147 {
148  if (m_targets.contains(m_settingValue) &&
149  !m_targets[m_settingValue].empty())
150  return &m_targets[m_settingValue];
151  return &m_children;
152 }
153 
155 {
156  QList<StandardSetting *> *subSettings = getSubSettings();
157  return subSettings && !subSettings->empty();
158 }
159 
161 {
162  m_children.clear();
163 }
164 
165 void StandardSetting::setValue(int newValue)
166 {
167  setValue(QString::number(newValue));
168 }
169 
170 void StandardSetting::setValue(const QString &newValue)
171 {
172  if (m_settingValue != newValue)
173  {
174  m_settingValue = newValue;
175  m_haveChanged = true;
176 
177  emit valueChanged(newValue);
178  emit valueChanged(this);
179  }
180  emit ShouldRedraw(this);
181 }
182 
187 {
188  if (m_haveChanged)
189  {
190  LOG(VB_GENERAL, LOG_DEBUG,
191  QString("Setting '%1' changed to %2").arg(getLabel(), getValue()));
192  return true;
193  }
194 
195  //we check only the relevant children
196  QList<StandardSetting *> *children = getSubSettings();
197  if (!children)
198  return false;
199 
200  QList<StandardSetting *>::const_iterator i;
201  bool haveChanged = false;
202  for (i = children->constBegin(); !haveChanged && i != children->constEnd();
203  ++i)
204  haveChanged = (*i)->haveChanged();
205 
206  return haveChanged;
207 }
208 
209 void StandardSetting::setChanged(bool changed)
210 {
211  m_haveChanged = changed;
212 }
213 
215 {
216  if (m_storage)
217  m_storage->Load();
218 
219  m_haveChanged = false;
220 
221  QList<StandardSetting *>::const_iterator i;
222  for (i = m_children.constBegin(); i != m_children.constEnd(); ++i)
223  (*i)->Load();
224 
225  QMap<QString, QList<StandardSetting *> >::const_iterator iMap;
226  for (iMap = m_targets.constBegin(); iMap != m_targets.constEnd(); ++iMap)
227  {
228  for (i = (*iMap).constBegin(); i != (*iMap).constEnd(); ++i)
229  (*i)->Load();
230  }
231 }
232 
234 {
235  if (m_storage)
236  m_storage->Save();
237 
238  //we save only the relevant children
239  QList<StandardSetting *> *children = getSubSettings();
240  if (children)
241  {
242  for (auto i = children->constBegin(); i != children->constEnd(); ++i)
243  (*i)->Save();
244  }
245 
246  if (!m_haveChanged)
247  return;
248 
249  m_haveChanged = false;
250  emit ChangeSaved();
251 }
252 
253 void StandardSetting::setName(const QString &name)
254 {
255  m_name = name;
256  if (m_label.isEmpty())
257  setLabel(name);
258 }
259 
261 {
262  if (name == m_name)
263  return this;
264 
265  for (auto *setting : qAsConst(*getSubSettings()))
266  {
267  StandardSetting *s = setting->byName(name);
268  if (s)
269  return s;
270  }
271  return nullptr;
272 }
273 
274 void StandardSetting::MoveToThread(QThread *thread)
275 {
276  moveToThread(thread);
277 
278  QList<StandardSetting *>::const_iterator i;
279  for (i = m_children.constBegin(); i != m_children.constEnd(); ++i)
280  (*i)->MoveToThread(thread);
281 
282  QMap<QString, QList<StandardSetting *> >::const_iterator iMap;
283  for (iMap = m_targets.constBegin(); iMap != m_targets.constEnd(); ++iMap)
284  {
285  for (i = (*iMap).constBegin(); i != (*iMap).constEnd(); ++i)
286  (*i)->MoveToThread(thread);
287  }
288 }
289 
290 /******************************************************************************
291  Group Setting
292 *******************************************************************************/
294 {
295  if (!isEnabled())
296  return;
297 
298  if (isReadOnly())
299  return;
300 
301  auto *dce = new DialogCompletionEvent("leveldown", 0, "", "");
302  QCoreApplication::postEvent(screen, dce);
303 }
304 
306 {
307  item->DisplayState("group", "widgettype");
308  item->setEnabled(isEnabled());
309  item->SetText(m_label);
310  item->SetText(m_settingValue, "value");
311  item->SetText(getHelpText(), "description");
312  item->setDrawArrow(haveSubSettings());
313 }
314 
316 {
317  setLabel(label);
318 }
319 
321 {
322  emit clicked();
323 }
324 
326 {
327  if (getValue() == "0")
328  {
329  // Generate a new, unique ID
330  QString querystr = "INSERT INTO " + m_table +
331  " (" + m_column + ") VALUES (0);";
332 
333  MSqlQuery query(MSqlQuery::InitCon());
334 
335  if (!query.exec(querystr))
336  {
337  MythDB::DBError("inserting row", query);
338  return;
339  }
340  // XXX -- HACK BEGIN:
341  // lastInsertID fails with "QSqlQuery::value: not positioned on a valid
342  // record" if we get a invalid QVariant we workaround the problem by
343  // taking advantage of mysql always incrementing the auto increment
344  // pointer this breaks if someone modifies the auto increment pointer
345  //setValue(query.lastInsertId().toInt());
346 
347  QVariant var = query.lastInsertId();
348 
349 #if QT_VERSION < QT_VERSION_CHECK(6,0,0)
350  auto id = static_cast<QMetaType::Type>(var.type());
351 #else
352  auto id = var.typeId();
353 #endif
354  if (id != QMetaType::UnknownType)
355  setValue(var.toInt());
356  else
357  {
358  querystr = "SELECT MAX(" + m_column + ") FROM " +
359  m_table + ";";
360  if (query.exec(querystr) && query.next())
361  {
362  int lii = query.value(0).toInt();
363  lii = lii ? lii : 1;
364  setValue(lii);
365  }
366  else
367  {
368  LOG(VB_GENERAL, LOG_EMERG,
369  "Can't determine the Id of the last insert "
370  "QSqlQuery.lastInsertId() failed, the workaround "
371  "failed too!");
372  }
373  }
374  // XXX -- HACK END:
375  }
376 }
377 
378 AutoIncrementSetting::AutoIncrementSetting(QString _table, QString _column) :
379  m_table(std::move(_table)), m_column(std::move(_column))
380 {
381  setValue("0");
382 }
383 
384 /******************************************************************************
385  Text Setting
386 *******************************************************************************/
387 
389 {
390  m_passwordEcho = b;
391 }
392 
394 {
395  if (!isEnabled())
396  return;
397 
398  if (isReadOnly())
399  return;
400 
401  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
402 
403  auto *settingdialog =
404  new MythTextInputDialog(popupStack, getLabel(), FilterNone,
406 
407  if (settingdialog->Create())
408  {
409  settingdialog->SetReturnEvent(screen, "editsetting");
410  popupStack->AddScreen(settingdialog);
411  }
412  else
413  delete settingdialog;
414 }
415 
417 {
418  if (m_settingValue != dce->GetResultText())
419  setValue(dce->GetResultText());
420 }
421 
422 
424 {
426  item->DisplayState("textedit", "widgettype");
427 }
428 
429 
430 /******************************************************************************
431  Directory Setting
432 *******************************************************************************/
433 
435 {
436  if (!isEnabled())
437  return;
438 
439  if (isReadOnly())
440  return;
441 
442  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
443 
444  auto *settingdialog = new MythUIFileBrowser(popupStack, m_settingValue);
445  settingdialog->SetTypeFilter(m_typeFilter);
446  settingdialog->SetNameFilter(m_nameFilter);
447 
448  if (settingdialog->Create())
449  {
450  settingdialog->SetReturnEvent(screen, "editsetting");
451  popupStack->AddScreen(settingdialog);
452  }
453  else
454  delete settingdialog;
455 }
456 
458 {
459  if (m_settingValue != dce->GetResultText())
460  setValue(dce->GetResultText());
461 }
462 
464 {
466  item->DisplayState("filebrowser", "widgettype");
467 }
468 
469 
470 /******************************************************************************
471  ComboBoxSetting
472 *******************************************************************************/
474 {
475  m_labels.clear();
476  m_values.clear();
477 }
478 
480 {
481  if (value >= 0 && value < m_values.size())
482  {
484  m_isSet = true;
485  }
486 }
487 
488 int MythUIComboBoxSetting::getValueIndex(const QString &value) const
489 {
490  return m_values.indexOf(value);
491 }
492 
494 {
495  int index = getValueIndex(getValue());
496  return (index >= 0) ? m_labels.at(index) : QString("");
497 }
498 
499 void MythUIComboBoxSetting::addSelection(const QString &label, QString value,
500  bool select)
501 {
502  value = value.isEmpty() ? label : value;
503  m_labels.push_back(label);
504  m_values.push_back(value);
505 
506  if (select || !m_isSet)
507  {
509  if (!m_isSet)
510  m_isSet = true;
511  }
512 }
513 
515 {
516  m_isSet = false;
517  m_labels.clear();
518  m_values.clear();
519 }
520 
522 {
523  item->DisplayState("combobox", "widgettype");
524  item->setEnabled(isEnabled());
525  item->SetText(m_label);
526  int indexValue = m_values.indexOf(m_settingValue);
527  if (indexValue >= 0)
528  item->SetText(m_labels.value(indexValue), "value");
529  else
530  item->SetText(m_settingValue, "value");
531  item->SetText(getHelpText(), "description");
532  item->setDrawArrow(haveSubSettings());
533 }
534 
536 {
537  if (!isEnabled())
538  return;
539 
540  if (isReadOnly())
541  return;
542 
543  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
544 
545  auto *menuPopup = new MythDialogBox(getLabel(), popupStack, "optionmenu");
546 
547  if (menuPopup->Create())
548  {
549  popupStack->AddScreen(menuPopup);
550 
551  //connect(menuPopup, &MythDialogBox::haveResult,
552  //this, qOverload<const QString&>(&MythUIComboBoxSetting::setValue));
553 
554  menuPopup->SetReturnEvent(screen, "editsetting");
555 
556  if (m_rewrite)
557  {
558  menuPopup->AddButtonV(QObject::tr("New entry"),
559  QString("NEWENTRY"),
560  false,
561  m_settingValue == "");
562  }
563  for (int i = 0; i < m_labels.size() && !m_values.empty(); ++i)
564  {
565  QString value = m_values.at(i);
566  menuPopup->AddButtonV(m_labels.at(i),
567  value,
568  false,
569  value == m_settingValue);
570  }
571  }
572  else
573  delete menuPopup;
574 }
575 
576 void MythUIComboBoxSetting::setValue(const QString& newValue)
577 {
578  StandardSetting::setValue(newValue);
579  m_isSet = true;
580 }
581 
583 {
584  if (dce->GetResult() != -1)
585  {
586  if (m_rewrite && dce->GetData().toString() == "NEWENTRY")
587  {
588  MythScreenStack *popupStack =
589  GetMythMainWindow()->GetStack("popup stack");
590 
591  auto *settingdialog =
592  new MythTextInputDialog(popupStack, getLabel(), FilterNone,
593  false, m_settingValue);
594 
595  if (settingdialog->Create())
596  {
597  connect(settingdialog, &MythTextInputDialog::haveResult,
598  this, qOverload<const QString&>(&MythUIComboBoxSetting::setValue));
599  popupStack->AddScreen(settingdialog);
600  }
601  else
602  delete settingdialog;
603  }
604  else if (m_settingValue != dce->GetData().toString())
605  StandardSetting::setValue(dce->GetData().toString());
606  }
607 }
608 
609 void MythUIComboBoxSetting::fillSelectionsFromDir(const QDir &dir, bool absPath)
610 {
611  QFileInfoList entries = dir.entryInfoList();
612  for (const auto& fi : qAsConst(entries))
613  {
614  if (absPath)
615  addSelection( fi.absoluteFilePath() );
616  else
617  addSelection( fi.fileName() );
618  }
619 }
620 
622 {
623  return m_labels.size();
624 }
625 
626 /******************************************************************************
627  SpinBox Setting
628 *******************************************************************************/
630  int step, int pageMultiple,
631  QString special_value_text)
632  : StandardSetting(_storage),
633  m_min(min),
634  m_max(max),
635  m_step(step),
636  m_pageMultiple(pageMultiple),
637  m_specialValueText(std::move(special_value_text))
638 {
639  // We default to 0 unless 0 is out of range.
640  if (m_min > 0 || m_max < 0)
641  m_settingValue = QString::number(m_min);
642 
643  // The settings pages were coded to assume a parameter true/false
644  // meaning allow_single_step. Many pages use this but it was not
645  // implemented. It is difficult to implement using the current
646  // UI widget design. So I have changed it so you can specify
647  // the size of pageup / pagedown increments as an integer instead.
648  // For compatibility with callers still using true to indicate
649  // allowing single step, the code will set the step size as 1 and
650  // the pageup / pagedown as the requested step.
651 
652  if (m_pageMultiple == 1)
653  {
654  m_pageMultiple = step;
655  m_step = 1;
656  }
657  if (m_pageMultiple == 0)
658  {
659  m_pageMultiple = 5;
660  }
661 }
662 
664 {
665  item->DisplayState("spinbox", "widgettype");
666  item->setEnabled(isEnabled());
667  item->SetText(m_label);
668  if (m_settingValue.toInt() == m_min && !m_specialValueText.isEmpty())
669  item->SetText(m_specialValueText, "value");
670  else
671  item->SetText(m_settingValue, "value");
672  item->SetText(getHelpText(), "description");
673  item->setDrawArrow(haveSubSettings());
674 }
675 
677 {
678  return m_settingValue.toInt();
679 }
680 
682 {
683  if (!isEnabled())
684  return;
685 
686  if (isReadOnly())
687  return;
688 
689  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
690 
691  auto *settingdialog = new MythSpinBoxDialog(popupStack, getLabel());
692 
693  if (settingdialog->Create())
694  {
695  settingdialog->SetRange(m_min, m_max, m_step, m_pageMultiple);
696  if (!m_specialValueText.isEmpty())
697  settingdialog->AddSelection(m_specialValueText, m_min);
698  settingdialog->SetValue(m_settingValue);
699  settingdialog->SetReturnEvent(screen, "editsetting");
700  popupStack->AddScreen(settingdialog);
701  }
702  else
703  delete settingdialog;
704 }
705 
707 {
708  if (m_settingValue != dce->GetResultText())
709  setValue(dce->GetResultText());
710 }
711 
712 /******************************************************************************
713  MythUICheckBoxSetting
714 *******************************************************************************/
715 
717  StandardSetting(_storage)
718 {
719 }
720 
721 void MythUICheckBoxSetting::setValue(const QString &value)
722 {
724  if (haveChanged())
725  emit valueChanged(value == "1");
726 }
727 
729 {
730  StandardSetting::setValue(value ? "1" : "0");
731  if (haveChanged())
732  emit valueChanged(value);
733 }
734 
736 {
738  item->DisplayState("checkbox", "widgettype");
739  item->setCheckable(true);
740  item->SetText("", "value");
741  if (m_settingValue == "1")
743  else
745 }
746 
748 {
749  if (!isEnabled())
750  return;
751 
752  if (isReadOnly())
753  return;
754 
755  auto *dce = new DialogCompletionEvent("editsetting", 0, "", "");
756  QCoreApplication::postEvent(screen, dce);
757 }
758 
760 {
761  setValue(!boolValue());
762 }
763 
764 /******************************************************************************
765  Standard setting dialog
766 *******************************************************************************/
767 
769 {
770  if (m_settingsTree)
771  m_settingsTree->deleteLater();
772 }
773 
775 {
776  if (!LoadWindowFromXML("standardsetting-ui.xml", "settingssetup", this))
777  return false;
778 
779  bool error = false;
780  UIUtilE::Assign(this, m_title, "title", &error);
781  UIUtilW::Assign(this, m_groupHelp, "grouphelp", &error);
782  UIUtilE::Assign(this, m_buttonList, "settingslist", &error);
783 
784  UIUtilW::Assign(this, m_selectedSettingHelp, "selectedsettinghelp");
785 
786  if (error)
787  {
788  LOG(VB_GENERAL, LOG_ERR, "Theme elements missing.");
789  return false;
790  }
791 
796 
797  BuildFocusList();
798 
800 
801  return true;
802 }
803 
805 {
806  if (!item)
807  return;
808 
809  auto *setting = item->GetData().value<StandardSetting*>();
810  if (setting && m_selectedSettingHelp)
811  {
812  disconnect(m_selectedSettingHelp);
813  m_selectedSettingHelp->SetText(setting->getHelpText());
815  }
816 }
817 
819 {
820  auto* setting = item->GetData().value<StandardSetting*>();
821  if (setting)
822  setting->edit(this);
823 }
824 
826 {
827  if (event->type() == DialogCompletionEvent::kEventType)
828  {
829  auto *dce = dynamic_cast<DialogCompletionEvent*>(event);
830  if (dce == nullptr)
831  return;
832  QString resultid = dce->GetId();
833 
834  if (resultid == "leveldown")
835  {
836  //a GroupSetting have been clicked
837  LevelDown();
838  }
839  else if (resultid == "editsetting")
840  {
842  if (item)
843  {
844  auto *ss = item->GetData().value<StandardSetting*>();
845  if (ss)
846  ss->resultEdit(dce);
847  }
848  }
849  else if (resultid == "exit")
850  {
851  int buttonnum = dce->GetResult();
852  if (buttonnum == 0)
853  {
854  Save();
856  if (m_settingsTree)
858  }
859  else if (buttonnum == 1)
861  }
862  }
863 }
864 
866 {
867  if (m_settingsTree)
868  {
869  m_settingsTree->Load();
870  m_settingsTree->MoveToThread(QApplication::instance()->thread());
871  }
872 }
873 
875 {
877 }
878 
880 {
881  return m_settingsTree;
882 }
883 
885  StandardSetting *groupSettings, StandardSetting *selectedSetting)
886 {
887  if (!groupSettings)
888  return;
889 
891  {
892  disconnect(m_currentGroupSetting,
893  &StandardSetting::settingsChanged, nullptr, nullptr);
895  }
896 
897  m_currentGroupSetting = groupSettings;
899 
901  if (m_groupHelp)
902  {
904  }
905  updateSettings(selectedSetting);
906  connect(m_currentGroupSetting,
909 }
910 
912 {
913  m_buttonList->Reset();
915  return;
916 
917  QList<StandardSetting *> *settings =
919  if (!settings)
920  return;
921 
922  QList<StandardSetting *>::const_iterator i;
923  MythUIButtonListItem *selectedItem = nullptr;
924  for (i = settings->constBegin(); i != settings->constEnd(); ++i)
925  {
926  if ((*i)->isVisible())
927  {
928  if (selectedSetting == (*i))
929  selectedItem = (*i)->createButton(m_buttonList);
930  else
931  (*i)->createButton(m_buttonList);
932  }
933  }
934  if (selectedItem)
935  m_buttonList->SetItemCurrent(selectedItem);
937 }
938 
940 {
941  if (m_settingsTree)
942  m_settingsTree->Save();
943 }
944 
946 {
948  return;
949 
951  {
954  }
955 }
956 
958 {
960  if (item)
961  {
962  auto *ss = item->GetData().value<StandardSetting*>();
963  if (ss && ss->haveSubSettings() && ss->isEnabled())
965  }
966 }
967 
969 {
971  {
972  QString label = tr("Exit ?");
973 
974  MythScreenStack *popupStack =
975  GetMythMainWindow()->GetStack("popup stack");
976 
977  auto * menuPopup = new MythDialogBox(label, popupStack, "exitmenu");
978 
979  if (menuPopup->Create())
980  {
981  popupStack->AddScreen(menuPopup);
982 
983  menuPopup->SetReturnEvent(this, "exit");
984 
985  menuPopup->AddButton(tr("Save then Exit"));
986  menuPopup->AddButton(tr("Exit without saving changes"));
987  menuPopup->AddButton(tr("Cancel"));
988  }
989  else
990  delete menuPopup;
991  }
992  else
994 }
995 
996 static QKeyEvent selectEvent
997  (QKeyEvent(QEvent::KeyPress,0,Qt::NoModifier,"SELECT"));
998 static QKeyEvent deleteEvent
999  (QKeyEvent(QEvent::KeyPress,0,Qt::NoModifier,"DELETE"));
1000 
1002 {
1003  QStringList actions;
1004 
1005  bool handled = m_buttonList->keyPressEvent(e);
1006  if (handled)
1007  return true;
1008 
1009  handled = GetMythMainWindow()->TranslateKeyPress("Global", e, actions);
1010 
1011  //send the key to the selected Item first
1013  if (item)
1014  {
1015  auto *ss = item->GetData().value<StandardSetting*>();
1016  if (ss)
1017  handled = ss->keyPressEvent(e);
1018  }
1019  if (handled)
1020  return true;
1021 
1022  for (int i = 0; i < actions.size() && !handled; i++)
1023  {
1024  QString action = actions[i];
1025  handled = true;
1026 
1027  if (action == "LEFT")
1028  {
1029  if (m_currentGroupSetting &&
1031  Close();
1032  else
1033  LevelUp();
1034  }
1035  else if (action == "RIGHT")
1036  LevelDown();
1037  else if (action == "EDIT")
1038  {
1040  }
1041  else if (action == "DELETE")
1042  deleteEntry();
1043  else
1044  handled = MythScreenType::keyPressEvent(e);
1045  }
1046 
1047  return handled;
1048 }
1049 
1051 {
1053  if (!item)
1054  return;
1055 
1056  auto *source = item->GetData().value<GroupSetting*>();
1057  if (!source)
1058  return;
1059  // m_title->GetText() for screen title
1060  auto *menu = new MythMenu(source->getLabel(), this, "mainmenu");
1061  menu->AddItem(tr("Edit"), &StandardSettingDialog::editEntry);
1062  if (source->canDelete())
1063  menu->AddItem(tr("Delete"), &StandardSettingDialog::deleteSelected);
1064 
1065  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
1066 
1067  auto *menuPopup = new MythDialogBox(menu, popupStack, "menudialog");
1068  menuPopup->SetReturnEvent(this, "mainmenu");
1069 
1070  if (menuPopup->Create())
1071  popupStack->AddScreen(menuPopup);
1072  else
1073  delete menuPopup;
1074 }
1075 
1077 {
1079 }
1080 
1082 {
1084 }
1085 
1087 {
1089  if (!item)
1090  return;
1091 
1092  auto *source = item->GetData().value<GroupSetting*>();
1093  if (!source)
1094  return;
1095 
1096  if (source->canDelete())
1097  {
1098  QString message = tr("Do you want to delete the '%1' entry?")
1099  .arg(source->getLabel());
1101  }
1102 }
1103 
1105 {
1106  if (ok)
1107  {
1109  if (!item)
1110  return;
1111  auto *source = item->GetData().value<GroupSetting*>();
1112  if (!source)
1113  return;
1114  source->deleteEntry();
1115 // m_settingsTree->removeChild(source);
1116  source->getParent()->removeChild(source);
1117  m_buttonList->RemoveItem(item);
1118  }
1119 
1120 }
MythUISpinBoxSetting::MythUISpinBoxSetting
MythUISpinBoxSetting(Storage *_storage, int min, int max, int step, int pageMultiple=8, QString special_value_text=QString())
Definition: standardsettings.cpp:629
MythScreenType::LoadInBackground
void LoadInBackground(const QString &message="")
Definition: mythscreentype.cpp:286
MSqlQuery::next
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:807
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:128
MythUIComboBoxSetting::clearSelections
void clearSelections()
Definition: standardsettings.cpp:514
MythUITextEditSetting::edit
void edit(MythScreenType *screen) override
Definition: standardsettings.cpp:393
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1587
StandardSetting::haveSubSettings
virtual bool haveSubSettings()
Definition: standardsettings.cpp:154
StandardSetting::setName
virtual void setName(const QString &name)
Definition: standardsettings.cpp:253
MythUICheckBoxSetting::updateButton
void updateButton(MythUIButtonListItem *item) override
This method is called whenever the UI need to reflect a change Reimplement this If you widget need a ...
Definition: standardsettings.cpp:735
StandardSettingDialog::m_currentGroupSetting
StandardSetting * m_currentGroupSetting
Definition: standardsettings.h:515
mythuitext.h
StandardSetting::getLabel
QString getLabel(void) const
Definition: standardsettings.h:35
MythUIComboBoxSetting::fillSelectionsFromDir
void fillSelectionsFromDir(const QDir &dir, bool absPath=true)
Definition: standardsettings.cpp:609
FilterNone
@ FilterNone
Definition: mythuitextedit.h:21
StandardSetting::Close
virtual void Close(void)
Definition: standardsettings.h:77
StandardSetting::setValue
virtual void setValue(const QString &newValue)
Definition: standardsettings.cpp:170
DialogCompletionEvent::GetId
QString GetId()
Definition: mythdialogbox.h:52
error
static void error(const char *str,...)
Definition: vbi.cpp:36
StandardSetting::clearTargetedSettings
void clearTargetedSettings(const QString &value)
Definition: standardsettings.cpp:134
StandardSetting::Open
virtual void Open(void)
Definition: standardsettings.h:76
MythUIButtonListItem::DisplayState
void DisplayState(const QString &state, const QString &name)
Definition: mythuibuttonlist.cpp:3563
StandardSetting::helpTextChanged
void helpTextChanged(const QString &newValue)
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:386
StandardSetting::removeTargetedChild
void removeTargetedChild(const QString &value, StandardSetting *child)
Definition: standardsettings.cpp:124
StandardSettingDialog::m_buttonList
MythUIButtonList * m_buttonList
Definition: standardsettings.h:497
MythUIComboBoxSetting::m_rewrite
bool m_rewrite
Definition: standardsettings.h:254
StandardSettingDialog::m_title
MythUIText * m_title
Definition: standardsettings.h:510
MythUIButtonList::RemoveItem
void RemoveItem(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1485
StandardSetting::m_readonly
bool m_readonly
Definition: standardsettings.h:113
DialogCompletionEvent::kEventType
static Type kEventType
Definition: mythdialogbox.h:57
MSqlQuery::lastInsertId
QVariant lastInsertId()
Return the id of the last inserted row.
Definition: mythdbcon.cpp:912
MythUIButtonList::itemSelected
void itemSelected(MythUIButtonListItem *item)
StandardSetting::m_label
QString m_label
Definition: standardsettings.h:114
StandardSetting::m_settingValue
QString m_settingValue
Definition: standardsettings.h:111
mythdialogbox.h
MSqlQuery::value
QVariant value(int i) const
Definition: mythdbcon.h:205
MythScreenStack
Definition: mythscreenstack.h:16
StandardSettingDialog::GetGroupSettings
GroupSetting * GetGroupSettings(void) const
Definition: standardsettings.cpp:879
MythUITextEditSetting::updateButton
void updateButton(MythUIButtonListItem *item) override
This method is called whenever the UI need to reflect a change Reimplement this If you widget need a ...
Definition: standardsettings.cpp:423
MythUIButtonListItem::FullChecked
@ FullChecked
Definition: mythuibuttonlist.h:48
GroupSetting::updateButton
void updateButton(MythUIButtonListItem *item) override
This method is called whenever the UI need to reflect a change Reimplement this If you widget need a ...
Definition: standardsettings.cpp:305
MSqlQuery::exec
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:608
MythUISpinBoxSetting::m_pageMultiple
int m_pageMultiple
Definition: standardsettings.h:351
MythUIComboBoxSetting::edit
void edit(MythScreenType *screen) override
Definition: standardsettings.cpp:535
StandardSetting::clearSettings
virtual void clearSettings()
Definition: standardsettings.cpp:160
ButtonStandardSetting::edit
void edit(MythScreenType *screen) override
Definition: standardsettings.cpp:320
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
StandardSetting::addTargetedChild
void addTargetedChild(const QString &value, StandardSetting *setting)
Definition: standardsettings.cpp:117
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
StandardSettingDialog::m_selectedSettingHelp
MythUIText * m_selectedSettingHelp
Definition: standardsettings.h:512
StandardSetting::m_name
QString m_name
Definition: standardsettings.h:116
StandardSettingDialog::~StandardSettingDialog
~StandardSettingDialog() override
Definition: standardsettings.cpp:768
MythUIButtonListItem::setVisible
void setVisible(bool flag)
Definition: mythuibuttonlist.h:122
MythUIComboBoxSetting::~MythUIComboBoxSetting
~MythUIComboBoxSetting() override
Definition: standardsettings.cpp:473
MythTextInputDialog::haveResult
void haveResult(QString)
ButtonStandardSetting::ButtonStandardSetting
ButtonStandardSetting(const QString &label)
Definition: standardsettings.cpp:315
StandardSetting::m_haveChanged
bool m_haveChanged
Definition: standardsettings.h:120
StandardSettingDialog::Close
void Close(void) override
Definition: standardsettings.cpp:968
MythUIComboBoxSetting::m_labels
QVector< QString > m_labels
Definition: standardsettings.h:250
StandardSetting::haveChanged
bool haveChanged()
Return true if the setting have changed or any of its children.
Definition: standardsettings.cpp:186
AutoIncrementSetting::m_column
QString m_column
Definition: standardsettings.h:138
StandardSettingDialog::updateSettings
void updateSettings(StandardSetting *selectedSetting=nullptr)
Definition: standardsettings.cpp:911
ButtonStandardSetting::clicked
void clicked()
MythUIButtonListItem::SetText
void SetText(const QString &text, const QString &name="", const QString &state="")
Definition: mythuibuttonlist.cpp:3268
StandardSettingDialog::LevelDown
void LevelDown()
Definition: standardsettings.cpp:957
StandardSetting::m_enabled
bool m_enabled
Definition: standardsettings.h:112
MythUIFileBrowserSetting::m_typeFilter
QDir::Filters m_typeFilter
Definition: standardsettings.h:201
StandardSettingDialog::editEntry
void editEntry(void)
Definition: standardsettings.cpp:1076
MythUIButtonListItem
Definition: mythuibuttonlist.h:41
StandardSetting::setChanged
void setChanged(bool changed)
Definition: standardsettings.cpp:209
StandardSetting::settingsChanged
void settingsChanged(StandardSetting *selectedSetting=nullptr)
StandardSetting::addChild
virtual void addChild(StandardSetting *child)
Definition: standardsettings.cpp:71
StandardSettingDialog::Create
bool Create(void) override
Definition: standardsettings.cpp:774
StandardSettingDialog::setCurrentGroupSetting
void setCurrentGroupSetting(StandardSetting *groupSettings, StandardSetting *selectedSetting=nullptr)
Definition: standardsettings.cpp:884
mythlogging.h
StandardSetting::getSubSettings
virtual QList< StandardSetting * > * getSubSettings()
Definition: standardsettings.cpp:146
StandardSetting::createButton
MythUIButtonListItem * createButton(MythUIButtonList *list)
Definition: standardsettings.cpp:38
MythUIComboBoxSetting::resultEdit
void resultEdit(DialogCompletionEvent *dce) override
Definition: standardsettings.cpp:582
MythUIButtonListItem::setCheckable
void setCheckable(bool flag)
Definition: mythuibuttonlist.cpp:3640
MythUIButtonList::itemClicked
void itemClicked(MythUIButtonListItem *item)
MythMainWindow::TranslateKeyPress
bool TranslateKeyPress(const QString &Context, QKeyEvent *Event, QStringList &Actions, bool AllowJumps=true)
Get a list of actions for a keypress in the given context.
Definition: mythmainwindow.cpp:1104
MythUISpinBoxSetting::m_specialValueText
QString m_specialValueText
Definition: standardsettings.h:352
MythUITextEditSetting::resultEdit
void resultEdit(DialogCompletionEvent *dce) override
Definition: standardsettings.cpp:416
StandardSetting::resultEdit
virtual void resultEdit(DialogCompletionEvent *dce)=0
AutoIncrementSetting::Save
void Save(void) override
Definition: standardsettings.cpp:325
MythUIButtonList::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythuibuttonlist.cpp:2487
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:166
Storage::Load
virtual void Load(void)=0
menu
static MythThemedMenu * menu
Definition: mythtv-setup.cpp:58
MSqlQuery::InitCon
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:540
MythUISpinBoxSetting::updateButton
void updateButton(MythUIButtonListItem *item) override
This method is called whenever the UI need to reflect a change Reimplement this If you widget need a ...
Definition: standardsettings.cpp:663
GroupSetting::deleteEntry
virtual void deleteEntry(void)
Definition: standardsettings.h:449
StandardSetting::getParent
StandardSetting * getParent() const
Definition: standardsettings.h:49
MythDB::DBError
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:227
MythUISpinBoxSetting::intValue
int intValue()
Definition: standardsettings.cpp:676
MythUITextEditSetting::SetPasswordEcho
void SetPasswordEcho(bool b)
Definition: standardsettings.cpp:388
MythUIFileBrowserSetting::updateButton
void updateButton(MythUIButtonListItem *item) override
This method is called whenever the UI need to reflect a change Reimplement this If you widget need a ...
Definition: standardsettings.cpp:463
StandardSetting::Load
virtual void Load(void)
Definition: standardsettings.cpp:214
MythUICheckBoxSetting::valueChanged
void valueChanged(bool)
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:206
MythUICheckBoxSetting::resultEdit
void resultEdit(DialogCompletionEvent *dce) override
Definition: standardsettings.cpp:759
MythUIComboBoxSetting::getValueIndex
int getValueIndex(const QString &value) const
Definition: standardsettings.cpp:488
StandardSetting::Save
virtual void Save(void)
Definition: standardsettings.cpp:233
StandardSettingDialog::Save
void Save()
Definition: standardsettings.cpp:939
MythUIFileBrowserSetting::resultEdit
void resultEdit(DialogCompletionEvent *dce) override
Definition: standardsettings.cpp:457
StandardSetting::m_targets
QMap< QString, QList< StandardSetting * > > m_targets
Definition: standardsettings.h:124
GroupSetting::edit
void edit(MythScreenType *screen) override
Definition: standardsettings.cpp:293
mythuifilebrowser.h
StandardSetting::setReadOnly
virtual void setReadOnly(bool readonly)
Definition: standardsettings.cpp:54
StandardSetting::getValue
virtual QString getValue(void) const
Definition: standardsettings.h:52
MythUISpinBoxSetting::edit
void edit(MythScreenType *screen) override
Definition: standardsettings.cpp:681
MythUICheckBoxSetting::edit
void edit(MythScreenType *screen) override
Definition: standardsettings.cpp:747
MythUIButtonListItem::GetData
QVariant GetData()
Definition: mythuibuttonlist.cpp:3665
StandardSetting::keyPressEvent
virtual bool keyPressEvent(QKeyEvent *event)
Definition: standardsettings.cpp:86
MythUIComboBoxSetting::m_isSet
bool m_isSet
Definition: standardsettings.h:255
MythUISpinBoxSetting::m_min
int m_min
Definition: standardsettings.h:348
StandardSetting::ShouldRedraw
void ShouldRedraw(StandardSetting *setting)
MythUITextEditSetting::m_passwordEcho
bool m_passwordEcho
Definition: standardsettings.h:159
Storage::Save
virtual void Save(void)=0
MythUIFileBrowser
Definition: mythuifilebrowser.h:76
MythUIComboBoxSetting::updateButton
void updateButton(MythUIButtonListItem *item) override
This method is called whenever the UI need to reflect a change Reimplement this If you widget need a ...
Definition: standardsettings.cpp:521
UIUtilDisp::Assign
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
Definition: mythuiutils.h:27
StandardSetting::setLabel
virtual void setLabel(QString str)
Definition: standardsettings.h:34
StandardSettingDialog::m_groupHelp
MythUIText * m_groupHelp
Definition: standardsettings.h:511
standardsettings.h
mythuispinbox.h
StandardSetting::valueChanged
void valueChanged(const QString &newValue)
deleteEvent
static QKeyEvent deleteEvent(QKeyEvent(QEvent::KeyPress, 0, Qt::NoModifier,"DELETE"))
AutoIncrementSetting::AutoIncrementSetting
AutoIncrementSetting(QString _table, QString _column)
Definition: standardsettings.cpp:378
StandardSetting::setEnabled
virtual void setEnabled(bool enabled)
Definition: standardsettings.cpp:48
MythMenu
Definition: mythdialogbox.h:99
MythUIComboBoxSetting::addSelection
void addSelection(const QString &label, QString value=QString(), bool select=false)
Definition: standardsettings.cpp:499
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythscreentype.cpp:404
StandardSettingDialog::customEvent
void customEvent(QEvent *event) override
Definition: standardsettings.cpp:825
GroupSetting::applyChange
virtual void applyChange()
Definition: standardsettings.h:446
StandardSettingDialog::settingSelected
void settingSelected(MythUIButtonListItem *item)
Definition: standardsettings.cpp:804
StandardSettingDialog::Init
void Init(void) override
Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in...
Definition: standardsettings.cpp:874
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:695
StandardSetting::MoveToThread
void MoveToThread(QThread *thread)
Definition: standardsettings.cpp:274
MythUISpinBoxSetting::resultEdit
void resultEdit(DialogCompletionEvent *dce) override
Definition: standardsettings.cpp:706
StandardSetting::edit
virtual void edit(MythScreenType *screen)=0
StandardSetting::byName
StandardSetting * byName(const QString &name)
Definition: standardsettings.cpp:260
StandardSetting::removeChild
virtual void removeChild(StandardSetting *child)
Definition: standardsettings.cpp:80
MythUIButtonListItem::setEnabled
void setEnabled(bool flag)
Definition: mythuibuttonlist.cpp:3655
std
Definition: mythchrono.h:23
StandardSetting::isEnabled
bool isEnabled() const
Definition: standardsettings.h:45
StandardSetting::getHelpText
QString getHelpText(void) const
Definition: standardsettings.h:38
DialogCompletionEvent
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
Definition: mythdialogbox.h:41
StandardSettingDialog::Load
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
Definition: standardsettings.cpp:865
MythUISpinBoxSetting::m_max
int m_max
Definition: standardsettings.h:349
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:132
MythUIFileBrowserSetting::m_nameFilter
QStringList m_nameFilter
Definition: standardsettings.h:204
mythcontext.h
MythUIButtonList::Reset
void Reset() override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuibuttonlist.cpp:116
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:102
StandardSettingDialog::m_settingsTree
GroupSetting * m_settingsTree
Definition: standardsettings.h:514
MythUIButtonList::SetItemCurrent
void SetItemCurrent(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1554
MythUIButtonListItemSetting
Definition: standardsettings.h:17
build_compdb.action
action
Definition: build_compdb.py:9
MythUICheckBoxSetting::MythUICheckBoxSetting
MythUICheckBoxSetting(Storage *_storage=nullptr)
Definition: standardsettings.cpp:716
StandardSetting::ChangeSaved
void ChangeSaved()
MythUIButtonListItem::setDrawArrow
void setDrawArrow(bool flag)
Definition: mythuibuttonlist.cpp:3645
StandardSetting::m_parent
StandardSetting * m_parent
Definition: standardsettings.h:122
MythUIButtonListItemSetting::ShouldUpdate
void ShouldUpdate(StandardSetting *setting)
Definition: standardsettings.cpp:17
StandardSetting::~StandardSetting
~StandardSetting() override
Definition: standardsettings.cpp:22
StandardSetting::m_visible
bool m_visible
Definition: standardsettings.h:117
mythuibutton.h
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &Stackname)
Definition: mythmainwindow.cpp:320
StandardSetting::setVisible
void setVisible(bool visible)
Definition: standardsettings.cpp:60
StandardSetting
Definition: standardsettings.h:29
StandardSettingDialog::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: standardsettings.cpp:1001
StandardSettingDialog::LevelUp
void LevelUp()
Definition: standardsettings.cpp:945
DialogCompletionEvent::GetResult
int GetResult() const
Definition: mythdialogbox.h:53
MythTextInputDialog
Dialog prompting the user to enter a text string.
Definition: mythdialogbox.h:314
StandardSettingDialog::settingClicked
void settingClicked(MythUIButtonListItem *item)
Definition: standardsettings.cpp:818
StandardSetting::setParent
void setParent(StandardSetting *parent)
Definition: standardsettings.cpp:66
StandardSettingDialog::deleteEntry
void deleteEntry(void)
Definition: standardsettings.cpp:1086
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition: mythuibuttonlist.h:191
MythSpinBoxDialog
Dialog prompting the user to enter a number using a spin box.
Definition: mythdialogbox.h:355
StandardSetting::addTargetedChildren
void addTargetedChildren(const QString &value, std::initializer_list< StandardSetting * > settings)
Definition: standardsettings.cpp:107
StandardSetting::updateButton
virtual void updateButton(MythUIButtonListItem *item)
This method is called whenever the UI need to reflect a change Reimplement this If you widget need a ...
Definition: standardsettings.cpp:96
mythmainwindow.h
MythUIComboBoxSetting::getValueLabel
QString getValueLabel(void) const
Definition: standardsettings.cpp:493
MythUICheckBoxSetting::setValue
void setValue(const QString &newValue) override
Definition: standardsettings.cpp:721
StandardSettingDialog::deleteEntryConfirmed
void deleteEntryConfirmed(bool ok)
Definition: standardsettings.cpp:1104
Storage
Definition: mythstorage.h:23
StandardSetting::m_children
QList< StandardSetting * > m_children
Definition: standardsettings.h:123
MythUIButtonListItem::setChecked
void setChecked(CheckState state)
Definition: mythuibuttonlist.cpp:3629
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:50
MythUIFileBrowserSetting::edit
void edit(MythScreenType *screen) override
Definition: standardsettings.cpp:434
ShowOkPopup
MythConfirmationDialog * ShowOkPopup(const QString &message, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
Definition: mythdialogbox.cpp:563
selectEvent
static QKeyEvent selectEvent(QKeyEvent(QEvent::KeyPress, 0, Qt::NoModifier,"SELECT"))
StandardSetting::m_storage
Storage * m_storage
Definition: standardsettings.h:121
StandardSetting::isReadOnly
bool isReadOnly() const
Definition: standardsettings.h:46
MythUIComboBoxSetting::setValue
void setValue(int value) override
Definition: standardsettings.cpp:479
MythUIComboBoxSetting::m_values
QVector< QString > m_values
Definition: standardsettings.h:251
AutoIncrementSetting::m_table
QString m_table
Definition: standardsettings.h:137
StandardSettingDialog::deleteSelected
void deleteSelected(void)
Definition: standardsettings.cpp:1081
StandardSettingDialog::ShowMenu
void ShowMenu(void) override
Definition: standardsettings.cpp:1050
MythUIComboBoxSetting::size
virtual int size(void) const
Definition: standardsettings.cpp:621
GroupSetting
Definition: standardsettings.h:435
MythUISpinBoxSetting::m_step
int m_step
Definition: standardsettings.h:350
MythUIButtonListItem::NotChecked
@ NotChecked
Definition: mythuibuttonlist.h:46
DialogCompletionEvent::GetData
QVariant GetData()
Definition: mythdialogbox.h:55
DialogCompletionEvent::GetResultText
QString GetResultText()
Definition: mythdialogbox.h:54
MythUICheckBoxSetting::boolValue
bool boolValue()
Definition: standardsettings.h:403