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 
7 #include <mythcontext.h>
8 #include <mythmainwindow.h>
9 #include <mythdialogbox.h>
10 #include <mythuispinbox.h>
11 #include <mythuitext.h>
12 #include <mythuibutton.h>
13 #include <mythuifilebrowser.h>
14 #include "mythlogging.h"
15 
17 {
18  setting->updateButton(this);
19 }
20 
22 {
23  QList<StandardSetting *>::const_iterator i;
24  for (i = m_children.constBegin(); i != m_children.constEnd(); ++i)
25  delete *i;
26  m_children.clear();
27 
28  QMap<QString, QList<StandardSetting *> >::const_iterator iMap;
29  for (iMap = m_targets.constBegin(); iMap != m_targets.constEnd(); ++iMap)
30  {
31  for (i = (*iMap).constBegin(); i != (*iMap).constEnd(); ++i)
32  delete *i;
33  }
34  m_targets.clear();
35 }
36 
38 {
39  auto *item = new MythUIButtonListItemSetting(list, m_label);
40  item->SetData(QVariant::fromValue(this));
41  connect(this, &StandardSetting::ShouldRedraw,
43  updateButton(item);
44  return item;
45 }
46 
47 void StandardSetting::setEnabled(bool enabled)
48 {
49  m_enabled = enabled;
50  emit ShouldRedraw(this);
51 }
52 
53 void StandardSetting::setReadOnly(bool readonly)
54 {
55  m_readonly = readonly;
56  emit ShouldRedraw(this);
57 }
58 
59 void StandardSetting::setVisible(bool visible)
60 {
61  m_visible = visible;
62  emit settingsChanged(this);
63 }
64 
66 {
67  m_parent = parent;
68 }
69 
71 {
72  if (!child)
73  return;
74 
75  m_children.append(child);
76  child->setParent(this);
77 }
78 
80 {
81  m_children.removeAll(child);
82  emit settingsChanged(this);
83 }
84 
85 bool StandardSetting::keyPressEvent(QKeyEvent * /*e*/)
86 {
87  return false;
88 }
89 
96 {
97  item->setVisible(m_visible);
98  item->DisplayState("standard", "widgettype");
99  item->setEnabled(isEnabled());
100  item->SetText(m_label);
101  item->SetText(m_settingValue, "value");
102  item->SetText(getHelpText(), "description");
103  item->setDrawArrow(haveSubSettings());
104 }
105 
106 void StandardSetting::addTargetedChildren(const QString &value,
107  std::initializer_list<StandardSetting *> settings)
108 {
109  m_targets[value].reserve(settings.size());
110  for (auto *setting : qAsConst(settings))
111  {
112  m_targets[value].append(setting);
113  setting->setParent(this);
114  }
115 }
116 void StandardSetting::addTargetedChild(const QString &value,
117  StandardSetting * setting)
118 {
119  m_targets[value].append(setting);
120  setting->setParent(this);
121 }
122 
123 void StandardSetting::removeTargetedChild(const QString &value,
124  StandardSetting *child)
125 {
126  if (m_targets.contains(value))
127  {
128  m_targets[value].removeAll(child);
129  delete child;
130  }
131 }
132 
133 void StandardSetting::clearTargetedSettings(const QString &value)
134 {
135  if (m_targets.contains(value))
136  {
137  for (auto *setting : qAsConst(m_targets[value]))
138  {
139  delete setting;
140  }
141  m_targets[value].clear();
142  }
143 }
144 
145 QList<StandardSetting *> *StandardSetting::getSubSettings()
146 {
147  if (m_targets.contains(m_settingValue) &&
148  !m_targets[m_settingValue].empty())
149  return &m_targets[m_settingValue];
150  return &m_children;
151 }
152 
154 {
155  QList<StandardSetting *> *subSettings = getSubSettings();
156  return subSettings && !subSettings->empty();
157 }
158 
160 {
161  m_children.clear();
162 }
163 
164 void StandardSetting::setValue(int newValue)
165 {
166  setValue(QString::number(newValue));
167 }
168 
169 void StandardSetting::setValue(const QString &newValue)
170 {
171  if (m_settingValue != newValue)
172  {
173  m_settingValue = newValue;
174  m_haveChanged = true;
175 
176  emit valueChanged(newValue);
177  emit valueChanged(this);
178  }
179  emit ShouldRedraw(this);
180 }
181 
186 {
187  if (m_haveChanged)
188  {
189  LOG(VB_GENERAL, LOG_DEBUG,
190  QString("Setting '%1' changed to %2").arg(getLabel())
191  .arg(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 (var.type())
350  setValue(var.toInt());
351  else
352  {
353  querystr = "SELECT MAX(" + m_column + ") FROM " +
354  m_table + ";";
355  if (query.exec(querystr) && query.next())
356  {
357  int lii = query.value(0).toInt();
358  lii = lii ? lii : 1;
359  setValue(lii);
360  }
361  else
362  {
363  LOG(VB_GENERAL, LOG_EMERG,
364  "Can't determine the Id of the last insert "
365  "QSqlQuery.lastInsertId() failed, the workaround "
366  "failed too!");
367  }
368  }
369  // XXX -- HACK END:
370  }
371 }
372 
373 AutoIncrementSetting::AutoIncrementSetting(QString _table, QString _column) :
374  m_table(std::move(_table)), m_column(std::move(_column))
375 {
376  setValue("0");
377 }
378 
379 /******************************************************************************
380  Text Setting
381 *******************************************************************************/
382 
384 {
385  m_passwordEcho = b;
386 }
387 
389 {
390  if (!isEnabled())
391  return;
392 
393  if (isReadOnly())
394  return;
395 
396  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
397 
398  auto *settingdialog =
399  new MythTextInputDialog(popupStack, getLabel(), FilterNone,
401 
402  if (settingdialog->Create())
403  {
404  settingdialog->SetReturnEvent(screen, "editsetting");
405  popupStack->AddScreen(settingdialog);
406  }
407  else
408  delete settingdialog;
409 }
410 
412 {
413  if (m_settingValue != dce->GetResultText())
414  setValue(dce->GetResultText());
415 }
416 
417 
419 {
421  item->DisplayState("textedit", "widgettype");
422 }
423 
424 
425 /******************************************************************************
426  Directory Setting
427 *******************************************************************************/
428 
430 {
431  if (!isEnabled())
432  return;
433 
434  if (isReadOnly())
435  return;
436 
437  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
438 
439  auto *settingdialog = new MythUIFileBrowser(popupStack, m_settingValue);
440  settingdialog->SetTypeFilter(m_typeFilter);
441  settingdialog->SetNameFilter(m_nameFilter);
442 
443  if (settingdialog->Create())
444  {
445  settingdialog->SetReturnEvent(screen, "editsetting");
446  popupStack->AddScreen(settingdialog);
447  }
448  else
449  delete settingdialog;
450 }
451 
453 {
454  if (m_settingValue != dce->GetResultText())
455  setValue(dce->GetResultText());
456 }
457 
459 {
461  item->DisplayState("filebrowser", "widgettype");
462 }
463 
464 
465 /******************************************************************************
466  ComboBoxSetting
467 *******************************************************************************/
469 {
470  m_labels.clear();
471  m_values.clear();
472 }
473 
475 {
476  if (value >= 0 && value < m_values.size())
477  {
479  m_isSet = true;
480  }
481 }
482 
483 int MythUIComboBoxSetting::getValueIndex(const QString &value) const
484 {
485  return m_values.indexOf(value);
486 }
487 
489 {
490  int index = getValueIndex(getValue());
491  return (index >= 0) ? m_labels.at(index) : QString("");
492 }
493 
494 void MythUIComboBoxSetting::addSelection(const QString &label, QString value,
495  bool select)
496 {
497  value = value.isEmpty() ? label : value;
498  m_labels.push_back(label);
499  m_values.push_back(value);
500 
501  if (select || !m_isSet)
502  {
504  if (!m_isSet)
505  m_isSet = true;
506  }
507 }
508 
510 {
511  m_isSet = false;
512  m_labels.clear();
513  m_values.clear();
514 }
515 
517 {
518  item->DisplayState("combobox", "widgettype");
519  item->setEnabled(isEnabled());
520  item->SetText(m_label);
521  int indexValue = m_values.indexOf(m_settingValue);
522  if (indexValue >= 0)
523  item->SetText(m_labels.value(indexValue), "value");
524  else
525  item->SetText(m_settingValue, "value");
526  item->SetText(getHelpText(), "description");
527  item->setDrawArrow(haveSubSettings());
528 }
529 
531 {
532  if (!isEnabled())
533  return;
534 
535  if (isReadOnly())
536  return;
537 
538  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
539 
540  auto *menuPopup = new MythDialogBox(getLabel(), popupStack, "optionmenu");
541 
542  if (menuPopup->Create())
543  {
544  popupStack->AddScreen(menuPopup);
545 
546  //connect(menuPopup, &MythDialogBox::haveResult,
547  //this, qOverload<const QString&>(&MythUIComboBoxSetting::setValue));
548 
549  menuPopup->SetReturnEvent(screen, "editsetting");
550 
551  if (m_rewrite)
552  {
553  menuPopup->AddButtonV(QObject::tr("New entry"),
554  QString("NEWENTRY"),
555  false,
556  m_settingValue == "");
557  }
558  for (int i = 0; i < m_labels.size() && !m_values.empty(); ++i)
559  {
560  QString value = m_values.at(i);
561  menuPopup->AddButtonV(m_labels.at(i),
562  value,
563  false,
564  value == m_settingValue);
565  }
566  }
567  else
568  delete menuPopup;
569 }
570 
571 void MythUIComboBoxSetting::setValue(const QString& newValue)
572 {
573  StandardSetting::setValue(newValue);
574  m_isSet = true;
575 }
576 
578 {
579  if (dce->GetResult() != -1)
580  {
581  if (m_rewrite && dce->GetData().toString() == "NEWENTRY")
582  {
583  MythScreenStack *popupStack =
584  GetMythMainWindow()->GetStack("popup stack");
585 
586  auto *settingdialog =
587  new MythTextInputDialog(popupStack, getLabel(), FilterNone,
588  false, m_settingValue);
589 
590  if (settingdialog->Create())
591  {
592  connect(settingdialog, &MythTextInputDialog::haveResult,
593  this, qOverload<const QString&>(&MythUIComboBoxSetting::setValue));
594  popupStack->AddScreen(settingdialog);
595  }
596  else
597  delete settingdialog;
598  }
599  else if (m_settingValue != dce->GetData().toString())
600  StandardSetting::setValue(dce->GetData().toString());
601  }
602 }
603 
604 void MythUIComboBoxSetting::fillSelectionsFromDir(const QDir &dir, bool absPath)
605 {
606  QFileInfoList entries = dir.entryInfoList();
607  for (const auto& fi : qAsConst(entries))
608  {
609  if (absPath)
610  addSelection( fi.absoluteFilePath() );
611  else
612  addSelection( fi.fileName() );
613  }
614 }
615 
617 {
618  return m_labels.size();
619 }
620 
621 /******************************************************************************
622  SpinBox Setting
623 *******************************************************************************/
625  int step, int pageMultiple,
626  QString special_value_text)
627  : StandardSetting(_storage),
628  m_min(min),
629  m_max(max),
630  m_step(step),
631  m_pageMultiple(pageMultiple),
632  m_specialValueText(std::move(special_value_text))
633 {
634  // We default to 0 unless 0 is out of range.
635  if (m_min > 0 || m_max < 0)
636  m_settingValue = QString::number(m_min);
637 
638  // The settings pages were coded to assume a parameter true/false
639  // meaning allow_single_step. Many pages use this but it was not
640  // implemented. It is difficult to implement using the current
641  // UI widget design. So I have changed it so you can specify
642  // the size of pageup / pagedown increments as an integer instead.
643  // For compatibility with callers still using true to indicate
644  // allowing single step, the code will set the step size as 1 and
645  // the pageup / pagedown as the requested step.
646 
647  if (m_pageMultiple == 1)
648  {
649  m_pageMultiple = step;
650  m_step = 1;
651  }
652  if (m_pageMultiple == 0)
653  {
654  m_pageMultiple = 5;
655  }
656 }
657 
659 {
660  item->DisplayState("spinbox", "widgettype");
661  item->setEnabled(isEnabled());
662  item->SetText(m_label);
663  if (m_settingValue.toInt() == m_min && !m_specialValueText.isEmpty())
664  item->SetText(m_specialValueText, "value");
665  else
666  item->SetText(m_settingValue, "value");
667  item->SetText(getHelpText(), "description");
668  item->setDrawArrow(haveSubSettings());
669 }
670 
672 {
673  return m_settingValue.toInt();
674 }
675 
677 {
678  if (!isEnabled())
679  return;
680 
681  if (isReadOnly())
682  return;
683 
684  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
685 
686  auto *settingdialog = new MythSpinBoxDialog(popupStack, getLabel());
687 
688  if (settingdialog->Create())
689  {
690  settingdialog->SetRange(m_min, m_max, m_step, m_pageMultiple);
691  if (!m_specialValueText.isEmpty())
692  settingdialog->AddSelection(m_specialValueText, m_min);
693  settingdialog->SetValue(m_settingValue);
694  settingdialog->SetReturnEvent(screen, "editsetting");
695  popupStack->AddScreen(settingdialog);
696  }
697  else
698  delete settingdialog;
699 }
700 
702 {
703  if (m_settingValue != dce->GetResultText())
704  setValue(dce->GetResultText());
705 }
706 
707 /******************************************************************************
708  MythUICheckBoxSetting
709 *******************************************************************************/
710 
712  StandardSetting(_storage)
713 {
714 }
715 
716 void MythUICheckBoxSetting::setValue(const QString &value)
717 {
719  if (haveChanged())
720  emit valueChanged(value == "1");
721 }
722 
724 {
725  StandardSetting::setValue(value ? "1" : "0");
726  if (haveChanged())
727  emit valueChanged(value);
728 }
729 
731 {
733  item->DisplayState("checkbox", "widgettype");
734  item->setCheckable(true);
735  item->SetText("", "value");
736  if (m_settingValue == "1")
738  else
740 }
741 
743 {
744  if (!isEnabled())
745  return;
746 
747  if (isReadOnly())
748  return;
749 
750  auto *dce = new DialogCompletionEvent("editsetting", 0, "", "");
751  QCoreApplication::postEvent(screen, dce);
752 }
753 
755 {
756  setValue(!boolValue());
757 }
758 
759 /******************************************************************************
760  Standard setting dialog
761 *******************************************************************************/
762 
764 {
765  if (m_settingsTree)
766  m_settingsTree->deleteLater();
767 }
768 
770 {
771  if (!LoadWindowFromXML("standardsetting-ui.xml", "settingssetup", this))
772  return false;
773 
774  bool error = false;
775  UIUtilE::Assign(this, m_title, "title", &error);
776  UIUtilW::Assign(this, m_groupHelp, "grouphelp", &error);
777  UIUtilE::Assign(this, m_buttonList, "settingslist", &error);
778 
779  UIUtilW::Assign(this, m_selectedSettingHelp, "selectedsettinghelp");
780 
781  if (error)
782  {
783  LOG(VB_GENERAL, LOG_ERR, "Theme elements missing.");
784  return false;
785  }
786 
791 
792  BuildFocusList();
793 
795 
796  return true;
797 }
798 
800 {
801  if (!item)
802  return;
803 
804  auto *setting = item->GetData().value<StandardSetting*>();
805  if (setting && m_selectedSettingHelp)
806  {
807  disconnect(m_selectedSettingHelp);
808  m_selectedSettingHelp->SetText(setting->getHelpText());
810  }
811 }
812 
814 {
815  auto* setting = item->GetData().value<StandardSetting*>();
816  if (setting)
817  setting->edit(this);
818 }
819 
821 {
822  if (event->type() == DialogCompletionEvent::kEventType)
823  {
824  auto *dce = dynamic_cast<DialogCompletionEvent*>(event);
825  if (dce == nullptr)
826  return;
827  QString resultid = dce->GetId();
828 
829  if (resultid == "leveldown")
830  {
831  //a GroupSetting have been clicked
832  LevelDown();
833  }
834  else if (resultid == "editsetting")
835  {
837  if (item)
838  {
839  auto *ss = item->GetData().value<StandardSetting*>();
840  if (ss)
841  ss->resultEdit(dce);
842  }
843  }
844  else if (resultid == "exit")
845  {
846  int buttonnum = dce->GetResult();
847  if (buttonnum == 0)
848  {
849  Save();
851  if (m_settingsTree)
853  }
854  else if (buttonnum == 1)
856  }
857  }
858 }
859 
861 {
862  if (m_settingsTree)
863  {
864  m_settingsTree->Load();
865  m_settingsTree->MoveToThread(QApplication::instance()->thread());
866  }
867 }
868 
870 {
872 }
873 
875 {
876  return m_settingsTree;
877 }
878 
880  StandardSetting *groupSettings, StandardSetting *selectedSetting)
881 {
882  if (!groupSettings)
883  return;
884 
886  {
887  disconnect(m_currentGroupSetting,
888  &StandardSetting::settingsChanged, nullptr, nullptr);
890  }
891 
892  m_currentGroupSetting = groupSettings;
894 
896  if (m_groupHelp)
897  {
899  }
900  updateSettings(selectedSetting);
901  connect(m_currentGroupSetting,
904 }
905 
907 {
908  m_buttonList->Reset();
910  return;
911 
912  QList<StandardSetting *> *settings =
914  if (!settings)
915  return;
916 
917  QList<StandardSetting *>::const_iterator i;
918  MythUIButtonListItem *selectedItem = nullptr;
919  for (i = settings->constBegin(); i != settings->constEnd(); ++i)
920  {
921  if ((*i)->isVisible())
922  {
923  if (selectedSetting == (*i))
924  selectedItem = (*i)->createButton(m_buttonList);
925  else
926  (*i)->createButton(m_buttonList);
927  }
928  }
929  if (selectedItem)
930  m_buttonList->SetItemCurrent(selectedItem);
932 }
933 
935 {
936  if (m_settingsTree)
937  m_settingsTree->Save();
938 }
939 
941 {
943  return;
944 
946  {
949  }
950 }
951 
953 {
955  if (item)
956  {
957  auto *ss = item->GetData().value<StandardSetting*>();
958  if (ss && ss->haveSubSettings() && ss->isEnabled())
960  }
961 }
962 
964 {
966  {
967  QString label = tr("Exit ?");
968 
969  MythScreenStack *popupStack =
970  GetMythMainWindow()->GetStack("popup stack");
971 
972  auto * menuPopup = new MythDialogBox(label, popupStack, "exitmenu");
973 
974  if (menuPopup->Create())
975  {
976  popupStack->AddScreen(menuPopup);
977 
978  menuPopup->SetReturnEvent(this, "exit");
979 
980  menuPopup->AddButton(tr("Save then Exit"));
981  menuPopup->AddButton(tr("Exit without saving changes"));
982  menuPopup->AddButton(tr("Cancel"));
983  }
984  else
985  delete menuPopup;
986  }
987  else
989 }
990 
991 static QKeyEvent selectEvent
992  (QKeyEvent(QEvent::KeyPress,0,Qt::NoModifier,"SELECT"));
993 static QKeyEvent deleteEvent
994  (QKeyEvent(QEvent::KeyPress,0,Qt::NoModifier,"DELETE"));
995 
997 {
998  QStringList actions;
999 
1000  bool handled = m_buttonList->keyPressEvent(e);
1001  if (handled)
1002  return true;
1003 
1004  handled = GetMythMainWindow()->TranslateKeyPress("Global", e, actions);
1005 
1006  //send the key to the selected Item first
1008  if (item)
1009  {
1010  auto *ss = item->GetData().value<StandardSetting*>();
1011  if (ss)
1012  handled = ss->keyPressEvent(e);
1013  }
1014  if (handled)
1015  return true;
1016 
1017  for (int i = 0; i < actions.size() && !handled; i++)
1018  {
1019  QString action = actions[i];
1020  handled = true;
1021 
1022  if (action == "LEFT")
1023  {
1024  if (m_currentGroupSetting &&
1026  Close();
1027  else
1028  LevelUp();
1029  }
1030  else if (action == "RIGHT")
1031  LevelDown();
1032  else if (action == "EDIT")
1033  {
1035  }
1036  else if (action == "DELETE")
1037  deleteEntry();
1038  else
1039  handled = MythScreenType::keyPressEvent(e);
1040  }
1041 
1042  return handled;
1043 }
1044 
1046 {
1048  if (!item)
1049  return;
1050 
1051  auto *source = item->GetData().value<GroupSetting*>();
1052  if (!source)
1053  return;
1054  // m_title->GetText() for screen title
1055  auto *menu = new MythMenu(source->getLabel(), this, "mainmenu");
1056  menu->AddItem(tr("Edit"), &StandardSettingDialog::editEntry);
1057  if (source->canDelete())
1058  menu->AddItem(tr("Delete"), &StandardSettingDialog::deleteSelected);
1059 
1060  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
1061 
1062  auto *menuPopup = new MythDialogBox(menu, popupStack, "menudialog");
1063  menuPopup->SetReturnEvent(this, "mainmenu");
1064 
1065  if (menuPopup->Create())
1066  popupStack->AddScreen(menuPopup);
1067  else
1068  delete menuPopup;
1069 }
1070 
1072 {
1074 }
1075 
1077 {
1079 }
1080 
1082 {
1084  if (!item)
1085  return;
1086 
1087  auto *source = item->GetData().value<GroupSetting*>();
1088  if (!source)
1089  return;
1090 
1091  if (source->canDelete())
1092  {
1093  QString message = tr("Do you want to delete the '%1' entry?")
1094  .arg(source->getLabel());
1096  }
1097 }
1098 
1100 {
1101  if (ok)
1102  {
1104  if (!item)
1105  return;
1106  auto *source = item->GetData().value<GroupSetting*>();
1107  if (!source)
1108  return;
1109  source->deleteEntry();
1110 // m_settingsTree->removeChild(source);
1111  source->getParent()->removeChild(source);
1112  m_buttonList->RemoveItem(item);
1113  }
1114 
1115 }
MythUISpinBoxSetting::MythUISpinBoxSetting
MythUISpinBoxSetting(Storage *_storage, int min, int max, int step, int pageMultiple=8, QString special_value_text=QString())
Definition: standardsettings.cpp:624
MythScreenType::LoadInBackground
void LoadInBackground(const QString &message="")
Definition: mythscreentype.cpp:285
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:124
MythUIComboBoxSetting::clearSelections
void clearSelections()
Definition: standardsettings.cpp:509
MythUITextEditSetting::edit
void edit(MythScreenType *screen) override
Definition: standardsettings.cpp:388
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1590
StandardSetting::haveSubSettings
virtual bool haveSubSettings()
Definition: standardsettings.cpp:153
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:730
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:604
FilterNone
@ FilterNone
Definition: mythuitextedit.h:19
StandardSetting::Close
virtual void Close(void)
Definition: standardsettings.h:77
StandardSetting::setValue
virtual void setValue(const QString &newValue)
Definition: standardsettings.cpp:169
DialogCompletionEvent::GetId
QString GetId()
Definition: mythdialogbox.h:52
error
static void error(const char *str,...)
Definition: vbi.cpp:42
StandardSetting::clearTargetedSettings
void clearTargetedSettings(const QString &value)
Definition: standardsettings.cpp:133
StandardSetting::Open
virtual void Open(void)
Definition: standardsettings.h:76
MythUIButtonListItem::DisplayState
void DisplayState(const QString &state, const QString &name)
Definition: mythuibuttonlist.cpp:3501
StandardSetting::helpTextChanged
void helpTextChanged(const QString &newValue)
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:385
StandardSetting::removeTargetedChild
void removeTargetedChild(const QString &value, StandardSetting *child)
Definition: standardsettings.cpp:123
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:1488
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:197
MythScreenStack
Definition: mythscreenstack.h:16
StandardSettingDialog::GetGroupSettings
GroupSetting * GetGroupSettings(void) const
Definition: standardsettings.cpp:874
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:418
MythUIButtonListItem::FullChecked
@ FullChecked
Definition: mythuibuttonlist.h:34
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:604
MythUISpinBoxSetting::m_pageMultiple
int m_pageMultiple
Definition: standardsettings.h:351
MythUIComboBoxSetting::edit
void edit(MythScreenType *screen) override
Definition: standardsettings.cpp:530
StandardSetting::clearSettings
virtual void clearSettings()
Definition: standardsettings.cpp:159
ButtonStandardSetting::edit
void edit(MythScreenType *screen) override
Definition: standardsettings.cpp:320
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
StandardSetting::addTargetedChild
void addTargetedChild(const QString &value, StandardSetting *setting)
Definition: standardsettings.cpp:116
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:44
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:763
MythUIButtonListItem::setVisible
void setVisible(bool flag)
Definition: mythuibuttonlist.h:100
MythUIComboBoxSetting::~MythUIComboBoxSetting
~MythUIComboBoxSetting() override
Definition: standardsettings.cpp:468
MythTextInputDialog::haveResult
void haveResult(QString)
ButtonStandardSetting::ButtonStandardSetting
ButtonStandardSetting(const QString &label)
Definition: standardsettings.cpp:315
menu
static MythThemedMenu * menu
Definition: mythtv/programs/mythtv-setup/main.cpp:53
StandardSetting::m_haveChanged
bool m_haveChanged
Definition: standardsettings.h:120
StandardSettingDialog::Close
void Close(void) override
Definition: standardsettings.cpp:963
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:185
AutoIncrementSetting::m_column
QString m_column
Definition: standardsettings.h:138
StandardSettingDialog::updateSettings
void updateSettings(StandardSetting *selectedSetting=nullptr)
Definition: standardsettings.cpp:906
ButtonStandardSetting::clicked
void clicked()
MythUIButtonListItem::SetText
void SetText(const QString &text, const QString &name="", const QString &state="")
Definition: mythuibuttonlist.cpp:3266
StandardSettingDialog::LevelDown
void LevelDown()
Definition: standardsettings.cpp:952
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:1071
MythUIButtonListItem
Definition: mythuibuttonlist.h:27
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:70
StandardSettingDialog::Create
bool Create(void) override
Definition: standardsettings.cpp:769
StandardSettingDialog::setCurrentGroupSetting
void setCurrentGroupSetting(StandardSetting *groupSettings, StandardSetting *selectedSetting=nullptr)
Definition: standardsettings.cpp:879
mythlogging.h
StandardSetting::getSubSettings
virtual QList< StandardSetting * > * getSubSettings()
Definition: standardsettings.cpp:145
StandardSetting::createButton
MythUIButtonListItem * createButton(MythUIButtonList *list)
Definition: standardsettings.cpp:37
MythUIComboBoxSetting::resultEdit
void resultEdit(DialogCompletionEvent *dce) override
Definition: standardsettings.cpp:577
MythUIButtonListItem::setCheckable
void setCheckable(bool flag)
Definition: mythuibuttonlist.cpp:3557
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:1116
MythUISpinBoxSetting::m_specialValueText
QString m_specialValueText
Definition: standardsettings.h:352
MythUITextEditSetting::resultEdit
void resultEdit(DialogCompletionEvent *dce) override
Definition: standardsettings.cpp:411
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:2490
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:166
Storage::Load
virtual void Load(void)=0
MSqlQuery::InitCon
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:536
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:658
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:194
MythUISpinBoxSetting::intValue
int intValue()
Definition: standardsettings.cpp:671
MythUITextEditSetting::SetPasswordEcho
void SetPasswordEcho(bool b)
Definition: standardsettings.cpp:383
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:458
StandardSetting::Load
virtual void Load(void)
Definition: standardsettings.cpp:214
MythUICheckBoxSetting::valueChanged
void valueChanged(bool)
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:205
MythUICheckBoxSetting::resultEdit
void resultEdit(DialogCompletionEvent *dce) override
Definition: standardsettings.cpp:754
MythUIComboBoxSetting::getValueIndex
int getValueIndex(const QString &value) const
Definition: standardsettings.cpp:483
StandardSetting::Save
virtual void Save(void)
Definition: standardsettings.cpp:233
StandardSettingDialog::Save
void Save()
Definition: standardsettings.cpp:934
MythUIFileBrowserSetting::resultEdit
void resultEdit(DialogCompletionEvent *dce) override
Definition: standardsettings.cpp:452
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:53
StandardSetting::getValue
virtual QString getValue(void) const
Definition: standardsettings.h:52
MythUISpinBoxSetting::edit
void edit(MythScreenType *screen) override
Definition: standardsettings.cpp:676
MythUICheckBoxSetting::edit
void edit(MythScreenType *screen) override
Definition: standardsettings.cpp:742
MythUIButtonListItem::GetData
QVariant GetData()
Definition: mythuibuttonlist.cpp:3582
StandardSetting::keyPressEvent
virtual bool keyPressEvent(QKeyEvent *event)
Definition: standardsettings.cpp:85
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:516
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:373
StandardSetting::setEnabled
virtual void setEnabled(bool enabled)
Definition: standardsettings.cpp:47
MythMenu
Definition: mythdialogbox.h:99
MythUIComboBoxSetting::addSelection
void addSelection(const QString &label, QString value=QString(), bool select=false)
Definition: standardsettings.cpp:494
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythscreentype.cpp:397
StandardSettingDialog::customEvent
void customEvent(QEvent *event) override
Definition: standardsettings.cpp:820
GroupSetting::applyChange
virtual void applyChange()
Definition: standardsettings.h:446
StandardSettingDialog::settingSelected
void settingSelected(MythUIButtonListItem *item)
Definition: standardsettings.cpp:799
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:869
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:692
StandardSetting::MoveToThread
void MoveToThread(QThread *thread)
Definition: standardsettings.cpp:274
MythUISpinBoxSetting::resultEdit
void resultEdit(DialogCompletionEvent *dce) override
Definition: standardsettings.cpp:701
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:79
MythUIButtonListItem::setEnabled
void setEnabled(bool flag)
Definition: mythuibuttonlist.cpp:3572
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:860
MythUISpinBoxSetting::m_max
int m_max
Definition: standardsettings.h:349
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:133
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:114
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:104
StandardSettingDialog::m_settingsTree
GroupSetting * m_settingsTree
Definition: standardsettings.h:514
MythUIButtonList::SetItemCurrent
void SetItemCurrent(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1557
MythUIButtonListItemSetting
Definition: standardsettings.h:17
build_compdb.action
action
Definition: build_compdb.py:9
MythUICheckBoxSetting::MythUICheckBoxSetting
MythUICheckBoxSetting(Storage *_storage=nullptr)
Definition: standardsettings.cpp:711
StandardSetting::ChangeSaved
void ChangeSaved()
MythUIButtonListItem::setDrawArrow
void setDrawArrow(bool flag)
Definition: mythuibuttonlist.cpp:3562
StandardSetting::m_parent
StandardSetting * m_parent
Definition: standardsettings.h:122
MythUIButtonListItemSetting::ShouldUpdate
void ShouldUpdate(StandardSetting *setting)
Definition: standardsettings.cpp:16
StandardSetting::~StandardSetting
~StandardSetting() override
Definition: standardsettings.cpp:21
StandardSetting::m_visible
bool m_visible
Definition: standardsettings.h:117
mythuibutton.h
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &Stackname)
Definition: mythmainwindow.cpp:322
StandardSetting::setVisible
void setVisible(bool visible)
Definition: standardsettings.cpp:59
StandardSetting
Definition: standardsettings.h:29
StandardSettingDialog::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: standardsettings.cpp:996
StandardSettingDialog::LevelUp
void LevelUp()
Definition: standardsettings.cpp:940
DialogCompletionEvent::GetResult
int GetResult() const
Definition: mythdialogbox.h:53
MythTextInputDialog
Dialog prompting the user to enter a text string.
Definition: mythdialogbox.h:313
StandardSettingDialog::settingClicked
void settingClicked(MythUIButtonListItem *item)
Definition: standardsettings.cpp:813
StandardSetting::setParent
void setParent(StandardSetting *parent)
Definition: standardsettings.cpp:65
StandardSettingDialog::deleteEntry
void deleteEntry(void)
Definition: standardsettings.cpp:1081
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition: mythuibuttonlist.h:151
MythSpinBoxDialog
Dialog prompting the user to enter a number using a spin box.
Definition: mythdialogbox.h:354
StandardSetting::addTargetedChildren
void addTargetedChildren(const QString &value, std::initializer_list< StandardSetting * > settings)
Definition: standardsettings.cpp:106
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:95
mythmainwindow.h
MythUIComboBoxSetting::getValueLabel
QString getValueLabel(void) const
Definition: standardsettings.cpp:488
MythUICheckBoxSetting::setValue
void setValue(const QString &newValue) override
Definition: standardsettings.cpp:716
StandardSettingDialog::deleteEntryConfirmed
void deleteEntryConfirmed(bool ok)
Definition: standardsettings.cpp:1099
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:3546
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:50
MythUIFileBrowserSetting::edit
void edit(MythScreenType *screen) override
Definition: standardsettings.cpp:429
ShowOkPopup
MythConfirmationDialog * ShowOkPopup(const QString &message, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
Definition: mythdialogbox.cpp:558
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:474
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:1076
StandardSettingDialog::ShowMenu
void ShowMenu(void) override
Definition: standardsettings.cpp:1045
MythUIComboBoxSetting::size
virtual int size(void) const
Definition: standardsettings.cpp:616
GroupSetting
Definition: standardsettings.h:435
MythUISpinBoxSetting::m_step
int m_step
Definition: standardsettings.h:350
MythUIButtonListItem::NotChecked
@ NotChecked
Definition: mythuibuttonlist.h:32
DialogCompletionEvent::GetData
QVariant GetData()
Definition: mythdialogbox.h:55
DialogCompletionEvent::GetResultText
QString GetResultText()
Definition: mythdialogbox.h:54
MythUICheckBoxSetting::boolValue
bool boolValue()
Definition: standardsettings.h:403