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  if (m_titlearea)
141  UIUtilW::Assign(this, m_titlearea, "title");
142  UIUtilE::Assign(this, m_textarea, "messagearea", &err);
143  UIUtilE::Assign(this, m_buttonList, "list", &err);
144 
145  if (err)
146  {
147  LOG(VB_GENERAL, LOG_ERR, QString("Cannot load screen '%1'")
148  .arg(windowName));
149  return false;
150  }
151 
152  if (m_titlearea)
155 
156  BuildFocusList();
157 
158  if (m_menu)
159  updateMenu();
160 
162  this, &MythDialogBox::Select);
163 
164  return true;
165 }
166 
168 {
169  m_menu = menu;
171  updateMenu();
172 }
173 
175 {
176  if (!m_buttonList)
177  {
178  LOG(VB_GENERAL, LOG_ERR, "UpdateMenu() called before we have a button list to update!");
179  return;
180  }
181 
182  if (!m_currentMenu)
183  return;
184 
185  if (m_titlearea)
187 
189 
190  m_buttonList->Reset();
191 
192  for (int x = 0; x < m_currentMenu->m_menuItems.count(); x++)
193  {
194  MythMenuItem *menuItem = m_currentMenu->m_menuItems.at(x);
195  auto *button = new MythUIButtonListItem(m_buttonList, menuItem->m_text);
196  button->SetData(QVariant::fromValue(menuItem));
197  button->setDrawArrow((menuItem->m_subMenu != nullptr));
198 
199  if (m_currentMenu->m_selectedItem == x)
200  m_buttonList->SetItemCurrent(button);
201  }
202  // GetVisibleCount here makes sure that the dialog size is
203  // calculated correctly
206 }
207 
209 {
210  if (!item)
211  return;
212 
213  if (m_currentMenu)
214  {
215  auto *menuItem = item->GetData().value< MythMenuItem * >();
216  if (menuItem == nullptr)
217  return;
218  if (menuItem->m_subMenu)
219  {
221  m_currentMenu = menuItem->m_subMenu;
222  updateMenu();
223  return;
224  }
225 
226  if (menuItem->m_useSlot)
227  {
228  const char *slot = menuItem->m_data.value < const char * >();
229  if (slot)
230  {
231  connect(this, SIGNAL(Selected()), m_currentMenu->m_retObject, slot,
232  Qt::QueuedConnection);
233  emit Selected();
234  }
235  else if (menuItem->m_data.value<MythUICallbackNMF>())
236  {
238  menuItem->m_data.value<MythUICallbackNMF>(),
239  Qt::QueuedConnection);
240  emit Selected();
241  }
242  else if (menuItem->m_data.value<MythUICallbackMF>())
243  {
245  menuItem->m_data.value<MythUICallbackMF>(),
246  Qt::QueuedConnection);
247  emit Selected();
248  }
249  else if (menuItem->m_data.value<MythUICallbackMFc>())
250  {
252  menuItem->m_data.value<MythUICallbackMFc>(),
253  Qt::QueuedConnection);
254  emit Selected();
255  }
256  }
257 
258  SendEvent(m_buttonList->GetItemPos(item), item->GetText(), menuItem->m_data);
259  }
260  else
261  {
262  if (m_useSlots)
263  {
264  const char *slot = item->GetData().value<const char *>();
265  if (slot)
266  {
267  connect(this, SIGNAL(Selected()), m_retObject, slot,
268  Qt::QueuedConnection);
269  emit Selected();
270  }
271  else if (item->GetData().value<MythUICallbackNMF>())
272  {
273  connect(this, &MythDialogBox::Selected, m_retObject,
274  item->GetData().value<MythUICallbackNMF>(),
275  Qt::QueuedConnection);
276  emit Selected();
277  }
278  else if (item->GetData().value<MythUICallbackMF>())
279  {
280  connect(this, &MythDialogBox::Selected, m_retObject,
281  item->GetData().value<MythUICallbackMF>(),
282  Qt::QueuedConnection);
283  emit Selected();
284  }
285  else if (item->GetData().value<MythUICallbackMFc>())
286  {
287  connect(this, &MythDialogBox::Selected, m_retObject,
288  item->GetData().value<MythUICallbackMFc>(),
289  Qt::QueuedConnection);
290  emit Selected();
291  }
292  }
293 
294  SendEvent(m_buttonList->GetItemPos(item), item->GetText(), item->GetData());
295  }
296 
297  if (m_screenStack)
298  m_screenStack->PopScreen(nullptr, false);
299 }
300 
301 void MythDialogBox::SetReturnEvent(QObject *retobject,
302  const QString &resultid)
303 {
304  m_retObject = retobject;
305  m_id = resultid;
306 }
307 
308 void MythDialogBox::SetBackAction(const QString &text, QVariant data)
309 {
310  m_backtext = text;
311  m_backdata = std::move(data);
312 }
313 
314 void MythDialogBox::SetExitAction(const QString &text, QVariant data)
315 {
316  m_exittext = text;
317  m_exitdata = std::move(data);
318 }
319 
320 void MythDialogBox::SetText(const QString &text)
321 {
322  if (m_textarea)
323  m_textarea->SetText(text);
324 }
325 
326 void MythDialogBox::AddButtonV(const QString &title, QVariant data, bool newMenu,
327  bool setCurrent)
328 {
329  auto *button = new MythUIButtonListItem(m_buttonList, title);
330  button->SetData(std::move(data));
331  button->setDrawArrow(newMenu);
332 
333  if (setCurrent)
334  m_buttonList->SetItemCurrent(button);
335  // GetVisibleCount here makes sure that the dialog size is
336  // calculated correctly
338 }
339 
340 bool MythDialogBox::keyPressEvent(QKeyEvent *event)
341 {
342  if (GetFocusWidget()->keyPressEvent(event))
343  return true;
344 
345  bool handled = false;
346  QStringList actions;
347  handled = GetMythMainWindow()->TranslateKeyPress("qt", event, actions);
348 
349  for (int i = 0; i < actions.size() && !handled; i++)
350  {
351  QString action = actions[i];
352  handled = true;
353 
354  if (action == "ESCAPE")
355  {
357  if (m_exitdata == 0 && m_exittext.isEmpty())
358  Close();
359  }
360  else if ((action == "LEFT" &&
362  (action == "UP" &&
364  {
366  {
368  updateMenu();
369  return true;
370  }
371 
373  Close();
374  }
375  else if (action == "MENU")
376  {
377  SendEvent(-2);
378  Close();
379  }
380  else if ((action == "RIGHT" &&
382  (action == "DOWN" &&
384  {
386  }
387  else
388  handled = false;
389  }
390 
391  if (!handled && MythScreenType::keyPressEvent(event))
392  handled = true;
393 
394  return handled;
395 }
396 
398 {
399  bool handled = false;
400  if (event->GetGesture() == MythGestureEvent::Click)
401  {
402  switch (event->GetButton())
403  {
404  case Qt::RightButton:
405  SendEvent(-2);
406  Close();
407  handled = true;
408  break;
409  default :
410  break;
411  }
412 
413  }
414 
415  if (!handled && MythScreenType::gestureEvent(event))
416  handled = true;
417 
418  return handled;
419 }
420 
421 void MythDialogBox::SendEvent(int res, const QString& text, const QVariant& data)
422 {
423  if (m_currentMenu)
424  {
425  emit Closed(m_currentMenu->m_resultid, res);
426 
428  return;
429 
430  auto *dce = new DialogCompletionEvent(m_currentMenu->m_resultid, res, text, data);
431  QCoreApplication::postEvent(m_currentMenu->m_retObject, dce);
432  }
433  else
434  {
435  emit Closed(m_id, res);
436 
437  if (!m_retObject)
438  return;
439 
440  auto *dce = new DialogCompletionEvent(m_id, res, text, data);
441  QCoreApplication::postEvent(m_retObject, dce);
442  }
443 }
444 
446 
448 {
449  if (!CopyWindowFromBase("MythConfirmationDialog", this))
450  return false;
451 
452  MythUIButton *okButton = nullptr;
453  MythUIButton *cancelButton = nullptr;
454 
455  bool err = false;
456  UIUtilE::Assign(this, m_messageText, "message", &err);
457  UIUtilE::Assign(this, okButton, "ok", &err);
458  UIUtilE::Assign(this, cancelButton, "cancel", &err);
459 
460  if (err)
461  {
462  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'MythConfirmationDialog'");
463  return false;
464  }
465 
466  if (m_showCancel)
467  {
468  connect(cancelButton, &MythUIButton::Clicked, this, &MythConfirmationDialog::Cancel);
469  }
470  else
471  cancelButton->SetVisible(false);
472 
473  connect(okButton, &MythUIButton::Clicked, this, &MythConfirmationDialog::Confirm);
474 
476 
477  BuildFocusList();
478 
479  if (m_showCancel)
480  SetFocusWidget(cancelButton);
481  else
482  SetFocusWidget(okButton);
483 
484  return true;
485 }
486 
488 {
489  if (GetFocusWidget()->keyPressEvent(event))
490  return true;
491 
492  bool handled = false;
493  QStringList actions;
494  handled = GetMythMainWindow()->TranslateKeyPress("qt", event, actions);
495 
496  for (int i = 0; i < actions.size() && !handled; i++)
497  {
498  QString action = actions[i];
499  handled = true;
500 
501  if (action == "ESCAPE")
502  sendResult(false);
503  else
504  handled = false;
505  }
506 
507  if (!handled && MythScreenType::keyPressEvent(event))
508  handled = true;
509 
510  return handled;
511 }
512 
513 void MythConfirmationDialog::SetMessage(const QString &message)
514 {
515  m_message = message;
516  if (m_messageText)
518 }
519 
521  const QString &resultid)
522 {
523  m_retObject = retobject;
524  m_id = resultid;
525 }
526 
528 {
529  sendResult(true);
530 }
531 
533 {
534  sendResult(false);
535 }
536 
538 {
539  emit haveResult(ok);
540 
541  if (m_retObject)
542  {
543  int res = 0;
544  if (ok)
545  res = 1;
546 
547  auto *dce = new DialogCompletionEvent(m_id, res, "", m_resultData);
548  QCoreApplication::postEvent(m_retObject, dce);
549  m_retObject = nullptr;
550  }
551 
552  Close();
553 }
554 
558 MythConfirmationDialog *ShowOkPopup(const QString &message, bool showCancel)
559 {
560  QString LOC = "ShowOkPopup('" + message + "') - ";
561  MythScreenStack *stk = nullptr;
562 
564 
565  if (win)
566  stk = win->GetStack("popup stack");
567  else
568  {
569  LOG(VB_GENERAL, LOG_ERR, LOC + "no main window?");
570  return nullptr;
571  }
572 
573  if (!stk)
574  {
575  LOG(VB_GENERAL, LOG_ERR, LOC + "no popup stack? "
576  "Is there a MythThemeBase?");
577  return nullptr;
578  }
579 
580  auto *pop = new MythConfirmationDialog(stk, message, showCancel);
581  if (pop->Create())
582  {
583  stk->AddScreen(pop);
584  }
585  else
586  {
587  delete pop;
588  pop = nullptr;
589  LOG(VB_GENERAL, LOG_ERR, LOC + "Couldn't Create() Dialog");
590  }
591 
592  return pop;
593 }
594 
596 {
597  if (!dialog)
598  return true; // No dialog is treated as user pressing OK
599 
600  // Local event loop processes events whilst we wait
601  QEventLoop block;
602 
603  // Quit when dialog exits
604  QObject::connect(dialog, &MythConfirmationDialog::haveResult,
605  &block, [&block](bool result)
606  { block.exit(result ? 1 : 0); });
607 
608  // Block and return dialog result
609  return block.exec() != 0;
610 }
611 
613 
615 {
616  if (!CopyWindowFromBase("MythTextInputDialog", this))
617  return false;
618 
619  MythUIText *messageText = nullptr;
620  MythUIButton *okButton = nullptr;
621  MythUIButton *cancelButton = nullptr;
622 
623  bool err = false;
624  UIUtilE::Assign(this, m_textEdit, "input", &err);
625  UIUtilE::Assign(this, messageText, "message", &err);
626  UIUtilE::Assign(this, okButton, "ok", &err);
627  UIUtilW::Assign(this, cancelButton, "cancel");
628 
629  if (err)
630  {
631  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'MythTextInputDialog'");
632  return false;
633  }
634 
635  if (cancelButton)
636  connect(cancelButton, &MythUIButton::Clicked, this, &MythScreenType::Close);
637  connect(okButton, &MythUIButton::Clicked, this, &MythTextInputDialog::sendResult);
638 
642 
643  messageText->SetText(m_message);
644 
645  BuildFocusList();
646 
647  return true;
648 }
649 
650 void MythTextInputDialog::SetReturnEvent(QObject *retobject,
651  const QString &resultid)
652 {
653  m_retObject = retobject;
654  m_id = resultid;
655 }
656 
658 {
659  QString inputString = m_textEdit->GetText();
660  emit haveResult(inputString);
661 
662  if (m_retObject)
663  {
664  auto *dce = new DialogCompletionEvent(m_id, 0, inputString, "");
665  QCoreApplication::postEvent(m_retObject, dce);
666  }
667 
668  Close();
669 }
670 
672 
674  QString message)
675  : MythScreenType(parent, "mythspinboxpopup"),
676  m_spinBox(nullptr),
677  m_message(std::move(message)),
678  m_retObject(nullptr),
679  m_id("")
680 {
681 }
682 
684 {
685  if (!CopyWindowFromBase("MythSpinBoxDialog", this))
686  return false;
687 
688  MythUIText *messageText = nullptr;
689  MythUIButton *okButton = nullptr;
690  MythUIButton *cancelButton = nullptr;
691 
692  bool err = false;
693  UIUtilE::Assign(this, m_spinBox, "input", &err);
694  UIUtilE::Assign(this, messageText, "message", &err);
695  UIUtilE::Assign(this, okButton, "ok", &err);
696  UIUtilW::Assign(this, cancelButton, "cancel");
697 
698  if (err)
699  {
700  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'MythSpinBoxDialog'");
701  return false;
702  }
703 
704  if (cancelButton)
705  connect(cancelButton, &MythUIButton::Clicked, this, &MythScreenType::Close);
706  connect(okButton, &MythUIButton::Clicked, this, &MythSpinBoxDialog::sendResult);
707 
708  messageText->SetText(m_message);
709  BuildFocusList();
710 
711  return true;
712 }
713 
718 void MythSpinBoxDialog::SetRange(int low, int high, int step, uint pageMultiple)
719 {
720  m_spinBox->SetRange(low, high, step, pageMultiple);
721 }
722 
726 void MythSpinBoxDialog::AddSelection(const QString& label, int value)
727 {
728  m_spinBox->AddSelection(value, label);
729 }
730 
735 void MythSpinBoxDialog::SetValue (const QString & value)
736 {
737  m_spinBox->SetValue(value);
738 }
739 
744 {
745  m_spinBox->SetValue(value);
746 }
747 
748 void MythSpinBoxDialog::SetReturnEvent(QObject *retobject,
749  const QString &resultid)
750 {
751  m_retObject = retobject;
752  m_id = resultid;
753 }
754 
756 {
757  QString inputString = m_spinBox->GetValue();
758  emit haveResult(inputString);
759 
760  if (m_retObject)
761  {
762  auto *dce = new DialogCompletionEvent(m_id, 0, inputString, "");
763  QCoreApplication::postEvent(m_retObject, dce);
764  }
765 
766  Close();
767 }
768 
770 
771 
787  const QString &title,
788  const QStringList &list,
789  bool matchAnywhere,
790  const QString &defaultValue)
791  : MythScreenType(parent, "mythsearchdialogpopup")
792 {
793  m_list = list;
794  m_matchAnywhere = matchAnywhere;
795  m_title = title;
796  m_defaultValue = defaultValue;
797 
798  m_titleText = nullptr;
799  m_matchesText = nullptr;
800  m_textEdit = nullptr;
801  m_itemList = nullptr;
802 
803  m_id = "";
804  m_retObject = nullptr;
805 }
806 
808 {
809  if (!CopyWindowFromBase("MythSearchDialog", this))
810  return false;
811 
812  MythUIButton *okButton = nullptr;
813  MythUIButton *cancelButton = nullptr;
814 
815  bool err = false;
816  UIUtilE::Assign(this, m_textEdit, "input", &err);
817  UIUtilE::Assign(this, m_titleText, "title", &err);
818  UIUtilW::Assign(this, m_matchesText, "matches");
819  UIUtilE::Assign(this, m_itemList, "itemlist", &err);
820  UIUtilE::Assign(this, okButton, "ok", &err);
821  UIUtilW::Assign(this, cancelButton, "cancel");
822 
823  if (err)
824  {
825  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'MythSearchDialog'");
826  return false;
827  }
828 
829  if (cancelButton)
830  connect(cancelButton, &MythUIButton::Clicked, this, &MythScreenType::Close);
831 
832  connect(okButton, &MythUIButton::Clicked, this, &MythUISearchDialog::slotSendResult);
833 
836 
839 
841  if (m_matchesText)
842  m_matchesText->SetText(tr("%n match(es)", "", 0));
843 
844  BuildFocusList();
845 
846  slotUpdateList();
847 
848  return true;
849 }
850 
851 void MythUISearchDialog::SetReturnEvent(QObject *retobject,
852  const QString &resultid)
853 {
854  m_retObject = retobject;
855  m_id = resultid;
856 }
857 
859 {
860  if (!m_itemList->GetItemCurrent())
861  return;
862 
863  QString result = m_itemList->GetValue();
864 
865  emit haveResult(result);
866 
867  if (m_retObject)
868  {
869  auto *dce = new DialogCompletionEvent(m_id, 0, result, "");
870  QCoreApplication::postEvent(m_retObject, dce);
871  }
872 
873  Close();
874 }
875 
877 {
878  m_itemList->Reset();
879 
880  for (int x = 0; x < m_list.size(); x++)
881  {
882  QString item = m_list.at(x);
883 
884  if (m_matchAnywhere)
885  {
886  if (!item.contains(m_textEdit->GetText(), Qt::CaseInsensitive))
887  continue;
888  }
889  else
890  {
891  if (!item.startsWith(m_textEdit->GetText(), Qt::CaseInsensitive))
892  continue;
893  }
894 
895  // add item to list
896  new MythUIButtonListItem(m_itemList, item, nullptr, false);
897  }
898 
900 
901  if (m_matchesText)
902  m_matchesText->SetText(tr("%n match(es)", "", 0));
903 }
904 
906 
908  QString message,
909  int resolutionFlags,
910  QDateTime startTime,
911  int rangeLimit)
912  : MythScreenType(parent, "timepopup"),
913  m_message(std::move(message)), m_startTime(std::move(startTime)),
914  m_resolution(resolutionFlags), m_rangeLimit(rangeLimit),
915  m_dateList(nullptr), m_timeList(nullptr), m_retObject(nullptr)
916 {
917 }
918 
920 {
921  if (!CopyWindowFromBase("MythTimeInputDialog", this))
922  return false;
923 
924  MythUIText *messageText = nullptr;
925  MythUIButton *okButton = nullptr;
926 
927  bool err = false;
928  UIUtilE::Assign(this, messageText, "message", &err);
929  UIUtilE::Assign(this, m_dateList, "dates", &err);
930  UIUtilE::Assign(this, m_timeList, "times", &err);
931  UIUtilE::Assign(this, okButton, "ok", &err);
932 
933  if (err)
934  {
935  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'MythTimeInputDialog'");
936  return false;
937  }
938 
939  m_dateList->SetVisible(false);
940  m_timeList->SetVisible(false);
941 
942  // Date
943  if (kNoDate != (m_resolution & 0xF))
944  {
945  const QDate startdate(m_startTime.toLocalTime().date());
946  QDate date(startdate);
947 
948  int limit = 0;
950  {
951  limit += m_rangeLimit;
952  }
953  if (m_resolution & kPastDates)
954  {
955  limit += m_rangeLimit;
956  date = date.addDays(0-m_rangeLimit);
957  }
958 
959  QString text;
960  bool selected = false;
961  for (int x = 0; x <= limit; x++)
962  {
963  selected = false;
964  if (m_resolution & kDay)
965  {
966  date = date.addDays(1);
968  if (m_rangeLimit >= 356)
969  flags |= MythDate::kAddYear;
970  text = MythDate::toString(date, flags);
971 
972  if (date == startdate)
973  selected = true;
974  }
975  else if (m_resolution & kMonth)
976  {
977  date = date.addMonths(1);
978  text = date.toString("MMM yyyy");
979 
980  if ((date.month() == startdate.month()) &&
981  (date.year() == startdate.year()))
982  selected = true;
983  }
984  else if (m_resolution & kYear)
985  {
986  date = date.addYears(1);
987  text = date.toString("yyyy");
988  if (date.year() == startdate.year())
989  selected = true;
990  }
991 
992  auto *item = new MythUIButtonListItem(m_dateList, text, nullptr, false);
993  item->SetData(QVariant(date));
994 
995  if (selected)
996  m_dateList->SetItemCurrent(item);
997  }
998  m_dateList->SetVisible(true);
999  }
1000 
1001  // Time
1002  if (kNoTime != (m_resolution & 0xF0))
1003  {
1004  QDate startdate(m_startTime.toLocalTime().date());
1005  QTime starttime(m_startTime.toLocalTime().time());
1006  QTime time(0,0,0);
1007  QString text;
1008  bool selected = false;
1009 
1010  int limit = (m_resolution & kMinutes) ? (60 * 24) : 24;
1011 
1012  for (int x = 0; x < limit; x++)
1013  {
1014  selected = false;
1015  if (m_resolution & kMinutes)
1016  {
1017  time = time.addSecs(60);
1018  QDateTime dt = QDateTime(startdate, time, Qt::LocalTime);
1019  text = MythDate::toString(dt, MythDate::kTime);
1020 
1021  if (time == starttime)
1022  selected = true;
1023  }
1024  else if (m_resolution & kHours)
1025  {
1026  time = time.addSecs(60*60);
1027  text = time.toString("hh:00");
1028 
1029  if (time.hour() == starttime.hour())
1030  selected = true;
1031  }
1032 
1033  auto *item = new MythUIButtonListItem(m_timeList, text, nullptr, false);
1034  item->SetData(QVariant(time));
1035 
1036  if (selected)
1037  m_timeList->SetItemCurrent(item);
1038  }
1039  m_timeList->SetVisible(true);
1040  }
1041 
1042  if (messageText && !m_message.isEmpty())
1043  messageText->SetText(m_message);
1044 
1045  connect(okButton, &MythUIButton::Clicked, this, &MythTimeInputDialog::okClicked);
1046 
1047  BuildFocusList();
1048 
1049  return true;
1050 }
1051 
1052 void MythTimeInputDialog::SetReturnEvent(QObject* retobject,
1053  const QString& resultid)
1054 {
1055  m_retObject = retobject;
1056  m_id = resultid;
1057 }
1058 
1060 {
1061  QDate date = m_dateList->GetDataValue().toDate();
1062  QTime time = m_timeList->GetDataValue().toTime();
1063 
1064  QDateTime dateTime = QDateTime(date, time, Qt::LocalTime).toUTC();
1065 
1066  emit haveResult(dateTime);
1067 
1068  if (m_retObject)
1069  {
1070  QVariant data(dateTime);
1071  auto *dce = new DialogCompletionEvent(m_id, 0, "", data);
1072  QCoreApplication::postEvent(m_retObject, dce);
1073  }
1074 
1075  Close();
1076 }
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:595
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:317
MythDialogBox::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:301
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:755
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:447
MythUISearchDialog::m_titleText
MythUIText * m_titleText
Definition: mythdialogbox.h:418
MythSpinBoxDialog::Create
bool Create(void) override
Definition: mythdialogbox.cpp:683
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:385
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:421
MythUISearchDialog::slotSendResult
void slotSendResult(void)
Definition: mythdialogbox.cpp:858
MythDialogBox::m_textarea
MythUIText * m_textarea
Definition: mythdialogbox.h:242
MythSpinBoxDialog::m_id
QString m_id
Definition: mythdialogbox.h:377
MythSpinBoxDialog::MythSpinBoxDialog
MythSpinBoxDialog(MythScreenStack *parent, QString message)
Definition: mythdialogbox.cpp:673
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:520
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:308
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:851
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:16
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:726
MythConfirmationDialog::sendResult
void sendResult(bool ok)
Definition: mythdialogbox.cpp:537
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:527
MythDialogBox::Select
void Select(MythUIButtonListItem *item)
Definition: mythdialogbox.cpp:208
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:807
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:487
MythTimeInputDialog::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:1052
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:215
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:340
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:907
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:167
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
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:314
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:786
MythDialogBox::Create
bool Create(void) override
Definition: mythdialogbox.cpp:127
MythDialogBox::SetText
void SetText(const QString &text)
Definition: mythdialogbox.cpp:320
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:205
MythTimeInputDialog::okClicked
void okClicked(void)
Definition: mythdialogbox.cpp:1059
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:397
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:3582
uint
unsigned int uint
Definition: compat.h:140
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:735
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:26
MythUIButtonListItem::GetText
QString GetText(const QString &name="") const
Definition: mythuibuttonlist.cpp:3307
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:326
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:718
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:397
MythMenu::m_title
QString m_title
Definition: mythdialogbox.h:150
MythUISearchDialog::slotUpdateList
void slotUpdateList(void)
Definition: mythdialogbox.cpp:876
MythDate::kAddYear
@ kAddYear
Add year to string if not included.
Definition: mythdate.h:25
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:614
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
std
Definition: mythchrono.h:23
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:919
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:650
MythScreenStack::PopScreen
virtual void PopScreen(MythScreenType *screen=nullptr, bool allowFade=true, bool deleteScreen=true)
Definition: mythscreenstack.cpp:84
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:748
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:513
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:439
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &Stackname)
Definition: mythmainwindow.cpp:322
MythDate::kDateFull
@ kDateFull
Default local time.
Definition: mythdate.h:19
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:22
MythUIButtonList::LayoutHorizontal
@ LayoutHorizontal
Definition: mythuibuttonlist.h:167
MythDialogBox::updateMenu
void updateMenu(void)
Definition: mythdialogbox.cpp:174
mythmainwindow.h
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:50
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:558
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:532
MythMainWindow
Definition: mythmainwindow.h:35
MythTextInputDialog::sendResult
void sendResult()
Definition: mythdialogbox.cpp:657
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:180
MythDialogBox::m_menu
MythMenu * m_menu
Definition: mythdialogbox.h:258