MythTV  master
mythdialogbox.cpp
Go to the documentation of this file.
1 
2 #include "mythdialogbox.h"
3 
4 #include <QCoreApplication>
5 #include <QDate>
6 #include <QDateTime>
7 #include <QFileInfo>
8 #include <QString>
9 #include <QStringList>
10 #include <QTime>
11 #include <utility>
12 
13 #include "mythlogging.h"
14 #include "mythdate.h"
15 
16 #include "mythmainwindow.h"
17 #include "mythfontproperties.h"
18 #include "mythuiutils.h"
19 #include "mythuitext.h"
20 #include "mythuiimage.h"
21 #include "mythuibuttonlist.h"
22 #include "mythuibutton.h"
23 #include "mythuistatetype.h"
24 #include "mythuispinbox.h"
25 #include "mythgesture.h"
26 
28  (QEvent::Type) QEvent::registerEventType();
29 
30 // Force this class to have a vtable so that dynamic_cast works.
31 // NOLINTNEXTLINE(modernize-use-equals-default)
33 {
34 }
35 
36 MythMenu::MythMenu(QString text, QObject *retobject, QString resultid) :
37  m_text(std::move(text)), m_resultid(std::move(resultid)), m_retObject(retobject)
38 {
39  Init();
40 }
41 
42 MythMenu::MythMenu(QString title, QString text, QObject *retobject, QString resultid) :
43  m_title(std::move(title)), m_text(std::move(text)), m_resultid(std::move(resultid)),
44  m_retObject(retobject)
45 {
46  Init();
47 }
48 
50 {
51  while (!m_menuItems.isEmpty())
52  {
53  MythMenuItem *item = m_menuItems.takeFirst();
54 
55  delete item->m_subMenu;
56  delete item;
57  }
58 }
59 
60 void MythMenu::AddItemV(const QString &title, QVariant data, MythMenu *subMenu, bool selected, bool checked)
61 {
62  auto *item = new MythMenuItem(title, checked, subMenu);
63  item->SetData(std::move(data));
64  AddItem(item, selected, subMenu);
65 }
66 
67 // For non-class, static class, or lambda functions.
68 void MythMenu::AddItem(const QString &title, const MythUICallbackNMF &slot,
69  MythMenu *subMenu, bool selected, bool checked)
70 {
71  auto *item = new MythMenuItem(title, slot, checked, subMenu);
72  AddItem(item, selected, subMenu);
73 }
74 
75 void MythMenu::AddItem(MythMenuItem *item, bool selected, MythMenu *subMenu)
76 {
77  m_menuItems.append(item);
78 
79  if (selected)
80  m_selectedItem = m_menuItems.indexOf(item);
81 
82  if (subMenu)
83  subMenu->SetParent(this);
84 }
85 
86 void MythMenu::SetSelectedByTitle(const QString& title)
87 {
88  for (auto *item : qAsConst(m_menuItems))
89  {
90  if (!item)
91  continue;
92 
93  if (item->m_text == title)
94  {
95  m_selectedItem = m_menuItems.indexOf(item);
96  break;
97  }
98  }
99 }
100 
101 void MythMenu::SetSelectedByData(const QVariant& data)
102 {
103  for (auto *item : qAsConst(m_menuItems))
104  {
105  if (!item)
106  continue;
107 
108  if (item->m_data == data)
109  {
110  m_selectedItem = m_menuItems.indexOf(item);
111  break;
112  }
113  }
114 }
115 
117 
119 {
120  if (m_menu)
121  {
122  delete m_menu;
123  m_menu = nullptr;
124  }
125 }
126 
128 {
129  QString windowName = (m_fullscreen ? "MythDialogBox" : "MythPopupBox");
130 
131  if (m_osdDialog)
132  {
133  if (!XMLParseBase::LoadWindowFromXML("osd.xml", windowName, this))
134  return false;
135  }
136  else if (!CopyWindowFromBase(windowName, this))
137  return false;
138 
139  bool err = false;
140  UIUtilW::Assign(this, m_titlearea, "title");
141  UIUtilE::Assign(this, m_textarea, "messagearea", &err);
142  UIUtilE::Assign(this, m_buttonList, "list", &err);
143 
144  if (err)
145  {
146  LOG(VB_GENERAL, LOG_ERR, QString("Cannot load screen '%1'")
147  .arg(windowName));
148  return false;
149  }
150 
151  if (m_titlearea)
154 
155  BuildFocusList();
156 
157  if (m_menu)
158  updateMenu();
159 
161  this, &MythDialogBox::Select);
162 
163  return true;
164 }
165 
167 {
168  m_menu = menu;
170  updateMenu();
171 }
172 
174 {
175  if (!m_buttonList)
176  {
177  LOG(VB_GENERAL, LOG_ERR, "UpdateMenu() called before we have a button list to update!");
178  return;
179  }
180 
181  if (!m_currentMenu)
182  return;
183 
184  if (m_titlearea)
186 
188 
189  m_buttonList->Reset();
190 
191  for (int x = 0; x < m_currentMenu->m_menuItems.count(); x++)
192  {
193  MythMenuItem *menuItem = m_currentMenu->m_menuItems.at(x);
194  auto *button = new MythUIButtonListItem(m_buttonList, menuItem->m_text);
195  button->SetData(QVariant::fromValue(menuItem));
196  button->setDrawArrow((menuItem->m_subMenu != nullptr));
197 
198  if (m_currentMenu->m_selectedItem == x)
199  m_buttonList->SetItemCurrent(button);
200  }
201  // GetVisibleCount here makes sure that the dialog size is
202  // calculated correctly
205 }
206 
208 {
209  if (!item)
210  return;
211 
212  if (m_currentMenu)
213  {
214  auto *menuItem = item->GetData().value< MythMenuItem * >();
215  if (menuItem == nullptr)
216  return;
217  if (menuItem->m_subMenu)
218  {
220  m_currentMenu = menuItem->m_subMenu;
221  updateMenu();
222  return;
223  }
224 
225  if (menuItem->m_useSlot)
226  {
227  const char *slot = menuItem->m_data.value < const char * >();
228  if (slot)
229  {
230  connect(this, SIGNAL(Selected()), m_currentMenu->m_retObject, slot,
231  Qt::QueuedConnection);
232  emit Selected();
233  }
234  else if (menuItem->m_data.value<MythUICallbackNMF>())
235  {
237  menuItem->m_data.value<MythUICallbackNMF>(),
238  Qt::QueuedConnection);
239  emit Selected();
240  }
241  else if (menuItem->m_data.value<MythUICallbackMF>())
242  {
244  menuItem->m_data.value<MythUICallbackMF>(),
245  Qt::QueuedConnection);
246  emit Selected();
247  }
248  else if (menuItem->m_data.value<MythUICallbackMFc>())
249  {
251  menuItem->m_data.value<MythUICallbackMFc>(),
252  Qt::QueuedConnection);
253  emit Selected();
254  }
255  }
256 
257  SendEvent(m_buttonList->GetItemPos(item), item->GetText(), menuItem->m_data);
258  }
259  else
260  {
261  if (m_useSlots)
262  {
263  const char *slot = item->GetData().value<const char *>();
264  if (slot)
265  {
266  connect(this, SIGNAL(Selected()), m_retObject, slot,
267  Qt::QueuedConnection);
268  emit Selected();
269  }
270  else if (item->GetData().value<MythUICallbackNMF>())
271  {
272  connect(this, &MythDialogBox::Selected, m_retObject,
273  item->GetData().value<MythUICallbackNMF>(),
274  Qt::QueuedConnection);
275  emit Selected();
276  }
277  else if (item->GetData().value<MythUICallbackMF>())
278  {
279  connect(this, &MythDialogBox::Selected, m_retObject,
280  item->GetData().value<MythUICallbackMF>(),
281  Qt::QueuedConnection);
282  emit Selected();
283  }
284  else if (item->GetData().value<MythUICallbackMFc>())
285  {
286  connect(this, &MythDialogBox::Selected, m_retObject,
287  item->GetData().value<MythUICallbackMFc>(),
288  Qt::QueuedConnection);
289  emit Selected();
290  }
291  }
292 
293  SendEvent(m_buttonList->GetItemPos(item), item->GetText(), item->GetData());
294  }
295 
296  if (m_screenStack)
297  m_screenStack->PopScreen(nullptr, false);
298 }
299 
300 void MythDialogBox::SetReturnEvent(QObject *retobject,
301  const QString &resultid)
302 {
303  m_retObject = retobject;
304  m_id = resultid;
305 }
306 
307 void MythDialogBox::SetBackAction(const QString &text, QVariant data)
308 {
309  m_backtext = text;
310  m_backdata = std::move(data);
311 }
312 
313 void MythDialogBox::SetExitAction(const QString &text, QVariant data)
314 {
315  m_exittext = text;
316  m_exitdata = std::move(data);
317 }
318 
319 void MythDialogBox::SetText(const QString &text)
320 {
321  if (m_textarea)
322  m_textarea->SetText(text);
323 }
324 
325 void MythDialogBox::AddButtonV(const QString &title, QVariant data, bool newMenu,
326  bool setCurrent)
327 {
328  auto *button = new MythUIButtonListItem(m_buttonList, title);
329  button->SetData(std::move(data));
330  button->setDrawArrow(newMenu);
331 
332  if (setCurrent)
333  m_buttonList->SetItemCurrent(button);
334  // GetVisibleCount here makes sure that the dialog size is
335  // calculated correctly
337 }
338 
339 bool MythDialogBox::keyPressEvent(QKeyEvent *event)
340 {
341  if (GetFocusWidget()->keyPressEvent(event))
342  return true;
343 
344  bool handled = false;
345  QStringList actions;
346  handled = GetMythMainWindow()->TranslateKeyPress("qt", event, actions);
347 
348  for (int i = 0; i < actions.size() && !handled; i++)
349  {
350  QString action = actions[i];
351  handled = true;
352 
353  if (action == "ESCAPE")
354  {
356  if (m_exitdata == 0 && m_exittext.isEmpty())
357  Close();
358  }
359  else if ((action == "LEFT" &&
361  (action == "UP" &&
363  {
365  {
367  updateMenu();
368  return true;
369  }
370 
372  Close();
373  }
374  else if (action == "MENU")
375  {
376  SendEvent(-2);
377  Close();
378  }
379  else if ((action == "RIGHT" &&
381  (action == "DOWN" &&
383  {
385  }
386  else
387  handled = false;
388  }
389 
390  if (!handled && MythScreenType::keyPressEvent(event))
391  handled = true;
392 
393  return handled;
394 }
395 
397 {
398  bool handled = false;
399  if (event->GetGesture() == MythGestureEvent::Click)
400  {
401  switch (event->GetButton())
402  {
403  case Qt::RightButton:
404  SendEvent(-2);
405  Close();
406  handled = true;
407  break;
408  default :
409  break;
410  }
411 
412  }
413 
414  if (!handled && MythScreenType::gestureEvent(event))
415  handled = true;
416 
417  return handled;
418 }
419 
420 void MythDialogBox::SendEvent(int res, const QString& text, const QVariant& data)
421 {
422  if (m_currentMenu)
423  {
424  emit Closed(m_currentMenu->m_resultid, res);
425 
427  return;
428 
429  auto *dce = new DialogCompletionEvent(m_currentMenu->m_resultid, res, text, data);
430  QCoreApplication::postEvent(m_currentMenu->m_retObject, dce);
431  }
432  else
433  {
434  emit Closed(m_id, res);
435 
436  if (!m_retObject)
437  return;
438 
439  auto *dce = new DialogCompletionEvent(m_id, res, text, data);
440  QCoreApplication::postEvent(m_retObject, dce);
441  }
442 }
443 
445 
447 {
448  if (!CopyWindowFromBase("MythConfirmationDialog", this))
449  return false;
450 
451  MythUIButton *okButton = nullptr;
452  MythUIButton *cancelButton = nullptr;
453 
454  bool err = false;
455  UIUtilE::Assign(this, m_messageText, "message", &err);
456  UIUtilE::Assign(this, okButton, "ok", &err);
457  UIUtilE::Assign(this, cancelButton, "cancel", &err);
458 
459  if (err)
460  {
461  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'MythConfirmationDialog'");
462  return false;
463  }
464 
465  if (m_showCancel)
466  {
467  connect(cancelButton, &MythUIButton::Clicked, this, &MythConfirmationDialog::Cancel);
468  }
469  else
470  cancelButton->SetVisible(false);
471 
472  connect(okButton, &MythUIButton::Clicked, this, &MythConfirmationDialog::Confirm);
473 
475 
476  BuildFocusList();
477 
478  if (m_showCancel)
479  SetFocusWidget(cancelButton);
480  else
481  SetFocusWidget(okButton);
482 
483  return true;
484 }
485 
487 {
488  if (GetFocusWidget()->keyPressEvent(event))
489  return true;
490 
491  bool handled = false;
492  QStringList actions;
493  handled = GetMythMainWindow()->TranslateKeyPress("qt", event, actions);
494 
495  for (int i = 0; i < actions.size() && !handled; i++)
496  {
497  QString action = actions[i];
498  handled = true;
499 
500  if (action == "ESCAPE")
501  sendResult(false);
502  else
503  handled = false;
504  }
505 
506  if (!handled && MythScreenType::keyPressEvent(event))
507  handled = true;
508 
509  return handled;
510 }
511 
512 void MythConfirmationDialog::SetMessage(const QString &message)
513 {
514  m_message = message;
515  if (m_messageText)
517 }
518 
520  const QString &resultid)
521 {
522  m_retObject = retobject;
523  m_id = resultid;
524 }
525 
527 {
528  sendResult(true);
529 }
530 
532 {
533  sendResult(false);
534 }
535 
537 {
538  emit haveResult(ok);
539 
540  if (m_retObject)
541  {
542  int res = 0;
543  if (ok)
544  res = 1;
545 
546  auto *dce = new DialogCompletionEvent(m_id, res, "", m_resultData);
547  QCoreApplication::postEvent(m_retObject, dce);
548  m_retObject = nullptr;
549  }
550 
551  Close();
552 }
553 
557 MythConfirmationDialog *ShowOkPopup(const QString &message, bool showCancel)
558 {
559  QString LOC = "ShowOkPopup('" + message + "') - ";
560  MythScreenStack *stk = nullptr;
561 
563 
564  if (win)
565  stk = win->GetStack("popup stack");
566  else
567  {
568  LOG(VB_GENERAL, LOG_ERR, LOC + "no main window?");
569  return nullptr;
570  }
571 
572  if (!stk)
573  {
574  LOG(VB_GENERAL, LOG_ERR, LOC + "no popup stack? "
575  "Is there a MythThemeBase?");
576  return nullptr;
577  }
578 
579  auto *pop = new MythConfirmationDialog(stk, message, showCancel);
580  if (pop->Create())
581  {
582  stk->AddScreen(pop);
583  }
584  else
585  {
586  delete pop;
587  pop = nullptr;
588  LOG(VB_GENERAL, LOG_ERR, LOC + "Couldn't Create() Dialog");
589  }
590 
591  return pop;
592 }
593 
595 {
596  if (!dialog)
597  return true; // No dialog is treated as user pressing OK
598 
599  // Local event loop processes events whilst we wait
600  QEventLoop block;
601 
602  // Quit when dialog exits
603  QObject::connect(dialog, &MythConfirmationDialog::haveResult,
604  &block, [&block](bool result)
605  { block.exit(result ? 1 : 0); });
606 
607  // Block and return dialog result
608  return block.exec() != 0;
609 }
610 
612 
614 {
615  if (!CopyWindowFromBase("MythTextInputDialog", this))
616  return false;
617 
618  MythUIText *messageText = nullptr;
619  MythUIButton *okButton = nullptr;
620  MythUIButton *cancelButton = nullptr;
621 
622  bool err = false;
623  UIUtilE::Assign(this, m_textEdit, "input", &err);
624  UIUtilE::Assign(this, messageText, "message", &err);
625  UIUtilE::Assign(this, okButton, "ok", &err);
626  UIUtilW::Assign(this, cancelButton, "cancel");
627 
628  if (err)
629  {
630  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'MythTextInputDialog'");
631  return false;
632  }
633 
634  if (cancelButton)
635  connect(cancelButton, &MythUIButton::Clicked, this, &MythScreenType::Close);
636  connect(okButton, &MythUIButton::Clicked, this, &MythTextInputDialog::sendResult);
637 
641 
642  messageText->SetText(m_message);
643 
644  BuildFocusList();
645 
646  return true;
647 }
648 
649 void MythTextInputDialog::SetReturnEvent(QObject *retobject,
650  const QString &resultid)
651 {
652  m_retObject = retobject;
653  m_id = resultid;
654 }
655 
657 {
658  QString inputString = m_textEdit->GetText();
659  emit haveResult(inputString);
660 
661  if (m_retObject)
662  {
663  auto *dce = new DialogCompletionEvent(m_id, 0, inputString, "");
664  QCoreApplication::postEvent(m_retObject, dce);
665  }
666 
667  Close();
668 }
669 
671 
673  QString message)
674  : MythScreenType(parent, "mythspinboxpopup"),
675  m_spinBox(nullptr),
676  m_message(std::move(message)),
677  m_retObject(nullptr),
678  m_id("")
679 {
680 }
681 
683 {
684  if (!CopyWindowFromBase("MythSpinBoxDialog", this))
685  return false;
686 
687  MythUIText *messageText = nullptr;
688  MythUIButton *okButton = nullptr;
689  MythUIButton *cancelButton = nullptr;
690 
691  bool err = false;
692  UIUtilE::Assign(this, m_spinBox, "input", &err);
693  UIUtilE::Assign(this, messageText, "message", &err);
694  UIUtilE::Assign(this, okButton, "ok", &err);
695  UIUtilW::Assign(this, cancelButton, "cancel");
696 
697  if (err)
698  {
699  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'MythSpinBoxDialog'");
700  return false;
701  }
702 
703  if (cancelButton)
704  connect(cancelButton, &MythUIButton::Clicked, this, &MythScreenType::Close);
705  connect(okButton, &MythUIButton::Clicked, this, &MythSpinBoxDialog::sendResult);
706 
707  messageText->SetText(m_message);
708  BuildFocusList();
709 
710  return true;
711 }
712 
717 void MythSpinBoxDialog::SetRange(int low, int high, int step, uint pageMultiple)
718 {
719  m_spinBox->SetRange(low, high, step, pageMultiple);
720 }
721 
725 void MythSpinBoxDialog::AddSelection(const QString& label, int value)
726 {
727  m_spinBox->AddSelection(value, label);
728 }
729 
734 void MythSpinBoxDialog::SetValue (const QString & value)
735 {
736  m_spinBox->SetValue(value);
737 }
738 
743 {
744  m_spinBox->SetValue(value);
745 }
746 
747 void MythSpinBoxDialog::SetReturnEvent(QObject *retobject,
748  const QString &resultid)
749 {
750  m_retObject = retobject;
751  m_id = resultid;
752 }
753 
755 {
756  QString inputString = m_spinBox->GetValue();
757  emit haveResult(inputString);
758 
759  if (m_retObject)
760  {
761  auto *dce = new DialogCompletionEvent(m_id, 0, inputString, "");
762  QCoreApplication::postEvent(m_retObject, dce);
763  }
764 
765  Close();
766 }
767 
769 
770 
786  const QString &title,
787  const QStringList &list,
788  bool matchAnywhere,
789  const QString &defaultValue)
790  : MythScreenType(parent, "mythsearchdialogpopup")
791 {
792  m_list = list;
793  m_matchAnywhere = matchAnywhere;
794  m_title = title;
795  m_defaultValue = defaultValue;
796 
797  m_titleText = nullptr;
798  m_matchesText = nullptr;
799  m_textEdit = nullptr;
800  m_itemList = nullptr;
801 
802  m_id = "";
803  m_retObject = nullptr;
804 }
805 
807 {
808  if (!CopyWindowFromBase("MythSearchDialog", this))
809  return false;
810 
811  MythUIButton *okButton = nullptr;
812  MythUIButton *cancelButton = nullptr;
813 
814  bool err = false;
815  UIUtilE::Assign(this, m_textEdit, "input", &err);
816  UIUtilE::Assign(this, m_titleText, "title", &err);
817  UIUtilW::Assign(this, m_matchesText, "matches");
818  UIUtilE::Assign(this, m_itemList, "itemlist", &err);
819  UIUtilE::Assign(this, okButton, "ok", &err);
820  UIUtilW::Assign(this, cancelButton, "cancel");
821 
822  if (err)
823  {
824  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'MythSearchDialog'");
825  return false;
826  }
827 
828  if (cancelButton)
829  connect(cancelButton, &MythUIButton::Clicked, this, &MythScreenType::Close);
830 
831  connect(okButton, &MythUIButton::Clicked, this, &MythUISearchDialog::slotSendResult);
832 
835 
838 
840  if (m_matchesText)
841  m_matchesText->SetText(tr("%n match(es)", "", 0));
842 
843  BuildFocusList();
844 
845  slotUpdateList();
846 
847  return true;
848 }
849 
850 void MythUISearchDialog::SetReturnEvent(QObject *retobject,
851  const QString &resultid)
852 {
853  m_retObject = retobject;
854  m_id = resultid;
855 }
856 
858 {
859  if (!m_itemList->GetItemCurrent())
860  return;
861 
862  QString result = m_itemList->GetValue();
863 
864  emit haveResult(result);
865 
866  if (m_retObject)
867  {
868  auto *dce = new DialogCompletionEvent(m_id, 0, result, "");
869  QCoreApplication::postEvent(m_retObject, dce);
870  }
871 
872  Close();
873 }
874 
876 {
877  m_itemList->Reset();
878 
879  for (int x = 0; x < m_list.size(); x++)
880  {
881  QString item = m_list.at(x);
882 
883  if (m_matchAnywhere)
884  {
885  if (!item.contains(m_textEdit->GetText(), Qt::CaseInsensitive))
886  continue;
887  }
888  else
889  {
890  if (!item.startsWith(m_textEdit->GetText(), Qt::CaseInsensitive))
891  continue;
892  }
893 
894  // add item to list
895  new MythUIButtonListItem(m_itemList, item, nullptr, false);
896  }
897 
899 
900  if (m_matchesText)
901  m_matchesText->SetText(tr("%n match(es)", "", 0));
902 }
903 
905 
907  QString message,
908  int resolutionFlags,
909  QDateTime startTime,
910  int rangeLimit)
911  : MythScreenType(parent, "timepopup"),
912  m_message(std::move(message)), m_startTime(std::move(startTime)),
913  m_resolution(resolutionFlags), m_rangeLimit(rangeLimit),
914  m_dateList(nullptr), m_timeList(nullptr), m_retObject(nullptr)
915 {
916 }
917 
919 {
920  if (!CopyWindowFromBase("MythTimeInputDialog", this))
921  return false;
922 
923  MythUIText *messageText = nullptr;
924  MythUIButton *okButton = nullptr;
925 
926  bool err = false;
927  UIUtilE::Assign(this, messageText, "message", &err);
928  UIUtilE::Assign(this, m_dateList, "dates", &err);
929  UIUtilE::Assign(this, m_timeList, "times", &err);
930  UIUtilE::Assign(this, okButton, "ok", &err);
931 
932  if (err)
933  {
934  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'MythTimeInputDialog'");
935  return false;
936  }
937 
938  m_dateList->SetVisible(false);
939  m_timeList->SetVisible(false);
940 
941  // Date
942  if (kNoDate != (m_resolution & 0xF))
943  {
944  const QDate startdate(m_startTime.toLocalTime().date());
945  QDate date(startdate);
946 
947  int limit = 0;
949  {
950  limit += m_rangeLimit;
951  }
952  if (m_resolution & kPastDates)
953  {
954  limit += m_rangeLimit;
955  date = date.addDays(0-m_rangeLimit);
956  }
957 
958  QString text;
959  bool selected = false;
960  for (int x = 0; x <= limit; x++)
961  {
962  selected = false;
963  if (m_resolution & kDay)
964  {
965  date = date.addDays(1);
967  if (m_rangeLimit >= 356)
968  flags |= MythDate::kAddYear;
969  text = MythDate::toString(date, flags);
970 
971  if (date == startdate)
972  selected = true;
973  }
974  else if (m_resolution & kMonth)
975  {
976  date = date.addMonths(1);
977  text = date.toString("MMM yyyy");
978 
979  if ((date.month() == startdate.month()) &&
980  (date.year() == startdate.year()))
981  selected = true;
982  }
983  else if (m_resolution & kYear)
984  {
985  date = date.addYears(1);
986  text = date.toString("yyyy");
987  if (date.year() == startdate.year())
988  selected = true;
989  }
990 
991  auto *item = new MythUIButtonListItem(m_dateList, text, nullptr, false);
992  item->SetData(QVariant(date));
993 
994  if (selected)
995  m_dateList->SetItemCurrent(item);
996  }
997  m_dateList->SetVisible(true);
998  }
999 
1000  // Time
1001  if (kNoTime != (m_resolution & 0xF0))
1002  {
1003  QDate startdate(m_startTime.toLocalTime().date());
1004  QTime starttime(m_startTime.toLocalTime().time());
1005  QTime time(0,0,0);
1006  QString text;
1007  bool selected = false;
1008 
1009  int limit = (m_resolution & kMinutes) ? (60 * 24) : 24;
1010 
1011  for (int x = 0; x < limit; x++)
1012  {
1013  selected = false;
1014  if (m_resolution & kMinutes)
1015  {
1016  time = time.addSecs(60);
1017  QDateTime dt = QDateTime(startdate, time, Qt::LocalTime);
1018  text = MythDate::toString(dt, MythDate::kTime);
1019 
1020  if (time == starttime)
1021  selected = true;
1022  }
1023  else if (m_resolution & kHours)
1024  {
1025  time = time.addSecs(60*60);
1026  text = time.toString("hh:00");
1027 
1028  if (time.hour() == starttime.hour())
1029  selected = true;
1030  }
1031 
1032  auto *item = new MythUIButtonListItem(m_timeList, text, nullptr, false);
1033  item->SetData(QVariant(time));
1034 
1035  if (selected)
1036  m_timeList->SetItemCurrent(item);
1037  }
1038  m_timeList->SetVisible(true);
1039  }
1040 
1041  if (messageText && !m_message.isEmpty())
1042  messageText->SetText(m_message);
1043 
1044  connect(okButton, &MythUIButton::Clicked, this, &MythTimeInputDialog::okClicked);
1045 
1046  BuildFocusList();
1047 
1048  return true;
1049 }
1050 
1051 void MythTimeInputDialog::SetReturnEvent(QObject* retobject,
1052  const QString& resultid)
1053 {
1054  m_retObject = retobject;
1055  m_id = resultid;
1056 }
1057 
1059 {
1060  QDate date = m_dateList->GetDataValue().toDate();
1061  QTime time = m_timeList->GetDataValue().toTime();
1062 
1063  QDateTime dateTime = QDateTime(date, time, Qt::LocalTime).toUTC();
1064 
1065  emit haveResult(dateTime);
1066 
1067  if (m_retObject)
1068  {
1069  QVariant data(dateTime);
1070  auto *dce = new DialogCompletionEvent(m_id, 0, "", data);
1071  QCoreApplication::postEvent(m_retObject, dce);
1072  }
1073 
1074  Close();
1075 }
MythUIButton::Clicked
void Clicked()
MythMenu::m_menuItems
QList< MythMenuItem * > m_menuItems
Definition: mythdialogbox.h:154
MythDialogBox::m_backdata
QVariant m_backdata
Definition: mythdialogbox.h:254
MythDialogBox::m_id
QString m_id
Definition: mythdialogbox.h:245
WaitFor
bool WaitFor(MythConfirmationDialog *dialog)
Blocks until confirmation dialog exits.
Definition: mythdialogbox.cpp:594
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:315
MythDialogBox::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:300
MythDate::toString
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
Definition: mythdate.cpp:80
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1590
MythUISearchDialog::m_title
QString m_title
Definition: mythdialogbox.h:421
MythTimeInputDialog::kHours
@ kHours
Definition: mythdialogbox.h:457
mythuitext.h
MythMenu::Init
void Init(void)
Definition: mythdialogbox.h:146
MythUIButtonList::GetLayout
LayoutType GetLayout() const
Definition: mythuibuttonlist.h:192
MythSpinBoxDialog::sendResult
void sendResult()
Definition: mythdialogbox.cpp:754
MythUISpinBox::GetValue
QString GetValue(void) const override
Definition: mythuispinbox.h:31
MythDialogBox::m_currentMenu
MythMenu * m_currentMenu
Definition: mythdialogbox.h:259
MythConfirmationDialog::Create
bool Create(void) override
Definition: mythdialogbox.cpp:446
MythUISearchDialog::m_titleText
MythUIText * m_titleText
Definition: mythdialogbox.h:418
MythSpinBoxDialog::Create
bool Create(void) override
Definition: mythdialogbox.cpp:682
MythGestureEvent::GetGesture
Gesture GetGesture() const
Definition: mythgesture.h:85
MythGestureEvent::GetButton
Qt::MouseButton GetButton() const
Definition: mythgesture.h:88
MythTimeInputDialog::m_id
QString m_id
Definition: mythdialogbox.h:492
MythConfirmationDialog::m_resultData
QVariant m_resultData
Definition: mythdialogbox.h:298
MythSpinBoxDialog::m_spinBox
MythUISpinBox * m_spinBox
Definition: mythdialogbox.h:373
MythTimeInputDialog::kDay
@ kDay
Definition: mythdialogbox.h:453
MythTextInputDialog::m_isPassword
bool m_isPassword
Definition: mythdialogbox.h:337
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:402
MythDialogBox::m_titlearea
MythUIText * m_titlearea
Definition: mythdialogbox.h:241
MythDialogBox::SendEvent
void SendEvent(int res, const QString &text="", const QVariant &data=0)
Definition: mythdialogbox.cpp:420
MythUISearchDialog::slotSendResult
void slotSendResult(void)
Definition: mythdialogbox.cpp:857
MythDialogBox::m_textarea
MythUIText * m_textarea
Definition: mythdialogbox.h:242
MythSpinBoxDialog::m_id
QString m_id
Definition: mythdialogbox.h:377
title
QString title
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:636
MythSpinBoxDialog::MythSpinBoxDialog
MythSpinBoxDialog(MythScreenStack *parent, QString message)
Definition: mythdialogbox.cpp:672
MythMenu::SetSelectedByData
void SetSelectedByData(const QVariant &data)
Definition: mythdialogbox.cpp:101
MythTimeInputDialog::kYear
@ kYear
Definition: mythdialogbox.h:451
MythConfirmationDialog::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:519
MythDialogBox::m_fullscreen
bool m_fullscreen
Definition: mythdialogbox.h:248
MythTimeInputDialog::kPastDates
@ kPastDates
Definition: mythdialogbox.h:462
MythDialogBox::SetBackAction
void SetBackAction(const QString &text, QVariant data)
Definition: mythdialogbox.cpp:307
MythTextInputDialog::m_id
QString m_id
Definition: mythdialogbox.h:339
MythUISearchDialog::haveResult
void haveResult(QString)
DialogCompletionEvent::kEventType
static Type kEventType
Definition: mythdialogbox.h:57
MythUISearchDialog::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:850
MythMenu::AddItem
void AddItem(const QString &title)
Definition: mythdialogbox.h:110
LOC
#define LOC
Definition: audioconvert.cpp:38
MythConfirmationDialog::haveResult
void haveResult(bool)
mythdialogbox.h
MythScreenStack
Definition: mythscreenstack.h:15
arg
arg(title).arg(filename).arg(doDelete))
MythDialogBox::m_useSlots
bool m_useSlots
Definition: mythdialogbox.h:246
MythTimeInputDialog::kMonth
@ kMonth
Definition: mythdialogbox.h:452
MythDialogBox::m_exitdata
QVariant m_exitdata
Definition: mythdialogbox.h:256
MythMenu::m_selectedItem
int m_selectedItem
Definition: mythdialogbox.h:155
MythUISearchDialog::m_matchAnywhere
bool m_matchAnywhere
Definition: mythdialogbox.h:424
MythTextInputDialog::m_message
QString m_message
Definition: mythdialogbox.h:334
MythTextInputDialog::m_defaultValue
QString m_defaultValue
Definition: mythdialogbox.h:335
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
MythDialogBox::Closed
void Closed(QString, int)
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:44
mythuistatetype.h
MythUITextEdit::GetText
QString GetText(void) const
Definition: mythuitextedit.h:47
MythSpinBoxDialog::AddSelection
void AddSelection(const QString &label, int value)
Definition: mythdialogbox.cpp:725
MythConfirmationDialog::sendResult
void sendResult(bool ok)
Definition: mythdialogbox.cpp:536
MythUICallbackNMF
std::function< void(void)> MythUICallbackNMF
Definition: mythuitype.h:41
MythTextInputDialog::haveResult
void haveResult(QString)
MythConfirmationDialog::m_showCancel
bool m_showCancel
Definition: mythdialogbox.h:295
MythConfirmationDialog::Confirm
void Confirm(void)
Definition: mythdialogbox.cpp:526
MythDialogBox::Select
void Select(MythUIButtonListItem *item)
Definition: mythdialogbox.cpp:207
menu
static MythThemedMenu * menu
Definition: mythtv/programs/mythtv-setup/main.cpp:53
MythUISpinBox::SetRange
void SetRange(int low, int high, int step, uint pageMultiple=5)
Set the lower and upper bounds of the spinbox, the interval and page amount.
Definition: mythuispinbox.cpp:25
MythConfirmationDialog::m_message
QString m_message
Definition: mythdialogbox.h:294
mythuibuttonlist.h
MythUISearchDialog::Create
bool Create(void) override
Definition: mythdialogbox.cpp:806
MythTextInputDialog::m_textEdit
MythUITextEdit * m_textEdit
Definition: mythdialogbox.h:333
MythSpinBoxDialog::m_message
QString m_message
Definition: mythdialogbox.h:374
mythuiimage.h
MythConfirmationDialog::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythdialogbox.cpp:486
MythTimeInputDialog::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:1051
MythMenuItem::m_subMenu
MythMenu * m_subMenu
Definition: mythdialogbox.h:92
MythMenu::SetSelectedByTitle
void SetSelectedByTitle(const QString &title)
Definition: mythdialogbox.cpp:86
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:112
MythTextInputDialog::m_filter
InputFilter m_filter
Definition: mythdialogbox.h:336
MythUIButtonList::GetItemPos
int GetItemPos(MythUIButtonListItem *item) const
Definition: mythuibuttonlist.cpp:1698
MythSpinBoxDialog::haveResult
void haveResult(QString)
mythuiutils.h
MythUIButtonListItem
Definition: mythuibuttonlist.h:27
MythUISpinBox::SetValue
void SetValue(int val) override
Definition: mythuispinbox.h:26
MythUITextEdit::SetText
void SetText(const QString &text, bool moveCursor=true)
Definition: mythuitextedit.cpp:216
MythUICallbackMF
void(QObject::*)(void) MythUICallbackMF
Definition: mythuitype.h:43
mythdate.h
MythMenuItem::m_text
QString m_text
Definition: mythdialogbox.h:89
MythDialogBox::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythdialogbox.cpp:339
MythDialogBox::m_osdDialog
bool m_osdDialog
Definition: mythdialogbox.h:249
mythfontproperties.h
MythTimeInputDialog::kNoDate
@ kNoDate
Definition: mythdialogbox.h:450
mythlogging.h
MythTimeInputDialog::MythTimeInputDialog
MythTimeInputDialog(MythScreenStack *parent, QString message, int resolutionFlags, QDateTime startTime=QDateTime::currentDateTime(), int rangeLimit=14)
Definition: mythdialogbox.cpp:906
MythTimeInputDialog::kNoTime
@ kNoTime
Definition: mythdialogbox.h:456
MythDialogBox::m_text
QString m_text
Definition: mythdialogbox.h:251
MythDialogBox::SetMenuItems
void SetMenuItems(MythMenu *menu)
Definition: mythdialogbox.cpp:166
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:1114
MythUIButtonList::GetCurrentPos
int GetCurrentPos() const
Definition: mythuibuttonlist.h:198
MythDialogBox::m_buttonList
MythUIButtonList * m_buttonList
Definition: mythdialogbox.h:243
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:117
MythDialogBox::SetExitAction
void SetExitAction(const QString &text, QVariant data)
Definition: mythdialogbox.cpp:313
MythTimeInputDialog::m_rangeLimit
int m_rangeLimit
Definition: mythdialogbox.h:484
MythTimeInputDialog::m_timeList
MythUIButtonList * m_timeList
Definition: mythdialogbox.h:489
MythUISearchDialog::MythUISearchDialog
MythUISearchDialog(MythScreenStack *parent, const QString &title, const QStringList &list, bool matchAnywhere=false, const QString &defaultValue="")
the classes constructor
Definition: mythdialogbox.cpp:785
MythDialogBox::Create
bool Create(void) override
Definition: mythdialogbox.cpp:127
MythDialogBox::SetText
void SetText(const QString &text)
Definition: mythdialogbox.cpp:319
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:222
MythTimeInputDialog::okClicked
void okClicked(void)
Definition: mythdialogbox.cpp:1058
XMLParseBase::CopyWindowFromBase
static bool CopyWindowFromBase(const QString &windowname, MythScreenType *win)
Definition: xmlparsebase.cpp:916
MythMenu::m_parentMenu
MythMenu * m_parentMenu
Definition: mythdialogbox.h:149
MythUIButton
A single button widget.
Definition: mythuibutton.h:21
MythMenuItem
Definition: mythdialogbox.h:67
MythTimeInputDialog::kMinutes
@ kMinutes
Definition: mythdialogbox.h:458
MythTextInputDialog::m_retObject
QObject * m_retObject
Definition: mythdialogbox.h:338
MythDialogBox::gestureEvent
bool gestureEvent(MythGestureEvent *event) override
Mouse click/movement handler, receives mouse gesture events from the QCoreApplication event loop.
Definition: mythdialogbox.cpp:396
MythUIButtonList::GetDataValue
QVariant GetDataValue() const
Definition: mythuibuttonlist.cpp:1619
MythGestureEvent::Click
@ Click
Definition: mythgesture.h:77
MythUITextEdit::SetPassword
void SetPassword(bool isPassword)
Definition: mythuitextedit.h:50
MythTimeInputDialog::m_dateList
MythUIButtonList * m_dateList
Definition: mythdialogbox.h:488
MythMenu::MythMenu
MythMenu(QString text, QObject *retobject, QString resultid)
Definition: mythdialogbox.cpp:36
MythSpinBoxDialog::m_retObject
QObject * m_retObject
Definition: mythdialogbox.h:376
MythTimeInputDialog::haveResult
void haveResult(QDateTime time)
MythUITextEdit::SetFilter
void SetFilter(InputFilter filter)
Definition: mythuitextedit.h:49
MythUIButtonListItem::GetData
QVariant GetData()
Definition: mythuibuttonlist.cpp:3580
uint
unsigned int uint
Definition: compat.h:141
MythUIButtonList::GetVisibleCount
int GetVisibleCount()
Definition: mythuibuttonlist.cpp:1660
MythSpinBoxDialog::SetValue
void SetValue(const QString &value)
Can be called only after MythSpinBoxDialog::Create() return successfully The range need to be set bef...
Definition: mythdialogbox.cpp:734
mythgesture.h
A C++ ripoff of the stroke library for MythTV.
UIUtilDisp::Assign
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
Definition: mythuiutils.h:27
MythMenu::m_text
QString m_text
Definition: mythdialogbox.h:151
MythUISearchDialog::m_textEdit
MythUITextEdit * m_textEdit
Definition: mythdialogbox.h:417
MythMenu::m_resultid
QString m_resultid
Definition: mythdialogbox.h:152
MythMenu::SetParent
void SetParent(MythMenu *parent)
Definition: mythdialogbox.h:141
MythDate::kSimplify
@ kSimplify
Do Today/Yesterday/Tomorrow transform.
Definition: mythdate.h:23
MythUIButtonListItem::GetText
QString GetText(const QString &name="") const
Definition: mythuibuttonlist.cpp:3305
mythuispinbox.h
MythDialogBox::m_title
QString m_title
Definition: mythdialogbox.h:250
MythDialogBox::AddButtonV
void AddButtonV(const QString &title, QVariant data=0, bool newMenu=false, bool setCurrent=false)
Definition: mythdialogbox.cpp:325
MythSpinBoxDialog::SetRange
void SetRange(int low, int high, int step, uint pageMultiple=5)
Set the lower and upper bounds of the spinbox, the interval and page amount.
Definition: mythdialogbox.cpp:717
MythMenu
Definition: mythdialogbox.h:99
MythDialogBox::Selected
void Selected()
MythUISearchDialog::m_defaultValue
QString m_defaultValue
Definition: mythdialogbox.h:422
MythTimeInputDialog::m_startTime
QDateTime m_startTime
Definition: mythdialogbox.h:482
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:30
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythscreentype.cpp:414
MythMenu::m_title
QString m_title
Definition: mythdialogbox.h:150
MythUISearchDialog::slotUpdateList
void slotUpdateList(void)
Definition: mythdialogbox.cpp:875
MythDate::kAddYear
@ kAddYear
Add year to string if not included.
Definition: mythdate.h:22
MythConfirmationDialog
Dialog asking for user confirmation. Ok and optional Cancel button.
Definition: mythdialogbox.h:271
MythTimeInputDialog::m_resolution
int m_resolution
Definition: mythdialogbox.h:483
MythUIButtonList::LayoutVertical
@ LayoutVertical
Definition: mythuibuttonlist.h:167
MythTextInputDialog::Create
bool Create(void) override
Definition: mythdialogbox.cpp:613
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:692
MythUISearchDialog::m_retObject
QObject * m_retObject
Definition: mythdialogbox.h:426
MythConfirmationDialog::m_messageText
MythUIText * m_messageText
Definition: mythdialogbox.h:293
DialogCompletionEvent
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
Definition: mythdialogbox.h:41
MythUISearchDialog::m_itemList
MythUIButtonList * m_itemList
Definition: mythdialogbox.h:416
MythTimeInputDialog::Create
bool Create() override
Definition: mythdialogbox.cpp:918
MythConfirmationDialog::m_retObject
QObject * m_retObject
Definition: mythdialogbox.h:296
MythUIButtonList::GetValue
virtual QString GetValue() const
Definition: mythuibuttonlist.cpp:1609
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:133
MythUIType::SetVisible
virtual void SetVisible(bool visible)
Definition: mythuitype.cpp:1086
MythTextInputDialog::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:649
MythScreenStack::PopScreen
virtual void PopScreen(MythScreenType *screen=nullptr, bool allowFade=true, bool deleteScreen=true)
Definition: mythscreenstack.cpp:86
DialogCompletionEvent::~DialogCompletionEvent
~DialogCompletionEvent() override
Definition: mythdialogbox.cpp:32
MythConfirmationDialog::m_id
QString m_id
Definition: mythdialogbox.h:297
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
MythUISearchDialog::m_list
QStringList m_list
Definition: mythdialogbox.h:423
MythTimeInputDialog::m_retObject
QObject * m_retObject
Definition: mythdialogbox.h:491
MythUISearchDialog::m_matchesText
MythUIText * m_matchesText
Definition: mythdialogbox.h:419
MythDialogBox::m_backtext
QString m_backtext
Definition: mythdialogbox.h:253
MythUIButtonList::SetItemCurrent
void SetItemCurrent(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1557
MythSpinBoxDialog::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:747
build_compdb.action
action
Definition: build_compdb.py:9
MythMenu::~MythMenu
~MythMenu(void)
Definition: mythdialogbox.cpp:49
MythConfirmationDialog::SetMessage
void SetMessage(const QString &message)
Definition: mythdialogbox.cpp:512
mythuibutton.h
MythScreenType::gestureEvent
bool gestureEvent(MythGestureEvent *event) override
Mouse click/movement handler, receives mouse gesture events from the QCoreApplication event loop.
Definition: mythscreentype.cpp:456
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &Stackname)
Definition: mythmainwindow.cpp:320
MythDate::kDateFull
@ kDateFull
Default local time.
Definition: mythdate.h:16
MythUITextEdit::valueChanged
void valueChanged()
MythTimeInputDialog::kFutureDates
@ kFutureDates
Definition: mythdialogbox.h:461
MythMenu::m_retObject
QObject * m_retObject
Definition: mythdialogbox.h:153
MythScreenType::m_screenStack
MythScreenStack * m_screenStack
Definition: mythscreentype.h:128
MythGestureEvent
A custom event that represents a mouse gesture.
Definition: mythgesture.h:39
MythDialogBox::~MythDialogBox
~MythDialogBox(void) override
Definition: mythdialogbox.cpp:118
MythUICallbackMFc
void(QObject::*)(void) const MythUICallbackMFc
Definition: mythuitype.h:44
MythDate::kTime
@ kTime
Default local time.
Definition: mythdate.h:19
MythUIButtonList::LayoutHorizontal
@ LayoutHorizontal
Definition: mythuibuttonlist.h:167
MythDialogBox::updateMenu
void updateMenu(void)
Definition: mythdialogbox.cpp:173
mythmainwindow.h
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:52
MythUIType::SetRedraw
void SetRedraw(void)
Definition: mythuitype.cpp:294
MythDialogBox::m_exittext
QString m_exittext
Definition: mythdialogbox.h:255
MythUISpinBox::AddSelection
void AddSelection(int value, const QString &label="")
Add a special label for a value of the spinbox, it does not need to be in the range.
Definition: mythuispinbox.cpp:95
ShowOkPopup
MythConfirmationDialog * ShowOkPopup(const QString &message, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
Definition: mythdialogbox.cpp:557
MythTimeInputDialog::m_message
QString m_message
Definition: mythdialogbox.h:481
MythUISearchDialog::m_id
QString m_id
Definition: mythdialogbox.h:427
MythConfirmationDialog::Cancel
void Cancel()
Definition: mythdialogbox.cpp:531
MythMainWindow
Definition: mythmainwindow.h:34
MythTextInputDialog::sendResult
void sendResult()
Definition: mythdialogbox.cpp:656
MythMenu::AddItemV
void AddItemV(const QString &title, QVariant data=0, MythMenu *subMenu=nullptr, bool selected=false, bool checked=false)
Definition: mythdialogbox.cpp:60
MythDialogBox::m_retObject
QObject * m_retObject
Definition: mythdialogbox.h:244
MythScreenStack::GetTopScreen
virtual MythScreenType * GetTopScreen(void) const
Definition: mythscreenstack.cpp:182
MythDialogBox::m_menu
MythMenu * m_menu
Definition: mythdialogbox.h:258