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 "libmythbase/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 
27 const QEvent::Type DialogCompletionEvent::kEventType =
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 : std::as_const(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 : std::as_const(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  {
138  return false;
139  }
140 
141  bool err = false;
142  if (m_fullscreen)
143  UIUtilW::Assign(this, m_titlearea, "title");
144  UIUtilE::Assign(this, m_textarea, "messagearea", &err);
145  UIUtilE::Assign(this, m_buttonList, "list", &err);
146 
147  if (err)
148  {
149  LOG(VB_GENERAL, LOG_ERR, QString("Cannot load screen '%1'")
150  .arg(windowName));
151  return false;
152  }
153 
154  if (m_titlearea)
157 
158  BuildFocusList();
159 
160  if (m_menu)
161  updateMenu();
162 
164  this, &MythDialogBox::Select);
165 
166  return true;
167 }
168 
170 {
171  m_menu = menu;
173  updateMenu();
174 }
175 
177 {
178  if (!m_buttonList)
179  {
180  LOG(VB_GENERAL, LOG_ERR, "UpdateMenu() called before we have a button list to update!");
181  return;
182  }
183 
184  if (!m_currentMenu)
185  return;
186 
187  if (m_titlearea)
189 
191 
192  m_buttonList->Reset();
193 
194  for (int x = 0; x < m_currentMenu->m_menuItems.count(); x++)
195  {
196  MythMenuItem *menuItem = m_currentMenu->m_menuItems.at(x);
197  auto *button = new MythUIButtonListItem(m_buttonList, menuItem->m_text);
198  button->SetData(QVariant::fromValue(menuItem));
199  button->setDrawArrow((menuItem->m_subMenu != nullptr));
200 
201  if (m_currentMenu->m_selectedItem == x)
202  m_buttonList->SetItemCurrent(button);
203  }
204  // GetVisibleCount here makes sure that the dialog size is
205  // calculated correctly
208 }
209 
211 {
212  if (!item)
213  return;
214 
215  if (m_currentMenu)
216  {
217  auto *menuItem = item->GetData().value< MythMenuItem * >();
218  if (menuItem == nullptr)
219  return;
220  if (menuItem->m_subMenu)
221  {
223  m_currentMenu = menuItem->m_subMenu;
224  updateMenu();
225  return;
226  }
227 
228  if (menuItem->m_useSlot)
229  {
230  const char *slot = menuItem->m_data.value < const char * >();
231  if (slot)
232  {
233  connect(this, SIGNAL(Selected()), m_currentMenu->m_retObject, slot,
234  Qt::QueuedConnection);
235  emit Selected();
236  }
237  else if (menuItem->m_data.value<MythUICallbackNMF>())
238  {
240  menuItem->m_data.value<MythUICallbackNMF>(),
241  Qt::QueuedConnection);
242  emit Selected();
243  }
244  else if (menuItem->m_data.value<MythUICallbackMF>())
245  {
247  menuItem->m_data.value<MythUICallbackMF>(),
248  Qt::QueuedConnection);
249  emit Selected();
250  }
251  else if (menuItem->m_data.value<MythUICallbackMFc>())
252  {
254  menuItem->m_data.value<MythUICallbackMFc>(),
255  Qt::QueuedConnection);
256  emit Selected();
257  }
258  }
259 
260  SendEvent(m_buttonList->GetItemPos(item), item->GetText(), menuItem->m_data);
261  }
262  else
263  {
264  if (m_useSlots)
265  {
266  const char *slot = item->GetData().value<const char *>();
267  if (slot)
268  {
269  connect(this, SIGNAL(Selected()), m_retObject, slot,
270  Qt::QueuedConnection);
271  emit Selected();
272  }
273  else if (item->GetData().value<MythUICallbackNMF>())
274  {
275  connect(this, &MythDialogBox::Selected, m_retObject,
276  item->GetData().value<MythUICallbackNMF>(),
277  Qt::QueuedConnection);
278  emit Selected();
279  }
280  else if (item->GetData().value<MythUICallbackMF>())
281  {
282  connect(this, &MythDialogBox::Selected, m_retObject,
283  item->GetData().value<MythUICallbackMF>(),
284  Qt::QueuedConnection);
285  emit Selected();
286  }
287  else if (item->GetData().value<MythUICallbackMFc>())
288  {
289  connect(this, &MythDialogBox::Selected, m_retObject,
290  item->GetData().value<MythUICallbackMFc>(),
291  Qt::QueuedConnection);
292  emit Selected();
293  }
294  }
295 
296  SendEvent(m_buttonList->GetItemPos(item), item->GetText(), item->GetData());
297  }
298 
299  if (m_screenStack)
300  m_screenStack->PopScreen(nullptr, false);
301 }
302 
303 void MythDialogBox::SetReturnEvent(QObject *retobject,
304  const QString &resultid)
305 {
306  m_retObject = retobject;
307  m_id = resultid;
308 }
309 
310 void MythDialogBox::SetBackAction(const QString &text, QVariant data)
311 {
312  m_backtext = text;
313  m_backdata = std::move(data);
314 }
315 
316 void MythDialogBox::SetExitAction(const QString &text, QVariant data)
317 {
318  m_exittext = text;
319  m_exitdata = std::move(data);
320 }
321 
322 void MythDialogBox::SetText(const QString &text)
323 {
324  if (m_textarea)
325  m_textarea->SetText(text);
326 }
327 
328 void MythDialogBox::AddButtonV(const QString &title, QVariant data, bool newMenu,
329  bool setCurrent)
330 {
331  auto *button = new MythUIButtonListItem(m_buttonList, title);
332  button->SetData(std::move(data));
333  button->setDrawArrow(newMenu);
334 
335  if (setCurrent)
336  m_buttonList->SetItemCurrent(button);
337  // GetVisibleCount here makes sure that the dialog size is
338  // calculated correctly
340 }
341 
342 bool MythDialogBox::inputMethodEvent(QInputMethodEvent *event)
343 {
344  return GetFocusWidget()->inputMethodEvent(event);
345 }
346 
347 bool MythDialogBox::keyPressEvent(QKeyEvent *event)
348 {
349  if (GetFocusWidget()->keyPressEvent(event))
350  return true;
351 
352  bool handled = false;
353  QStringList actions;
354  handled = GetMythMainWindow()->TranslateKeyPress("qt", event, actions);
355 
356  for (int i = 0; i < actions.size() && !handled; i++)
357  {
358  const QString& action = actions[i];
359  handled = true;
360 
361  if (action == "ESCAPE")
362  {
364  if (m_exitdata == 0 && m_exittext.isEmpty())
365  Close();
366  }
367  else if ((action == "LEFT" &&
369  (action == "UP" &&
371  {
373  {
375  updateMenu();
376  return true;
377  }
378 
380  Close();
381  }
382  else if (action == "MENU")
383  {
384  SendEvent(-2);
385  Close();
386  }
387  else if ((action == "RIGHT" &&
389  (action == "DOWN" &&
391  {
393  }
394  else
395  {
396  handled = false;
397  }
398  }
399 
400  if (!handled && MythScreenType::keyPressEvent(event))
401  handled = true;
402 
403  return handled;
404 }
405 
407 {
408  bool handled = false;
409  if (event->GetGesture() == MythGestureEvent::Click)
410  {
411  switch (event->GetButton())
412  {
413  case Qt::RightButton:
414  SendEvent(-2);
415  Close();
416  handled = true;
417  break;
418  default :
419  break;
420  }
421 
422  }
423 
424  if (!handled && MythScreenType::gestureEvent(event))
425  handled = true;
426 
427  return handled;
428 }
429 
430 void MythDialogBox::SendEvent(int res, const QString& text, const QVariant& data)
431 {
432  if (m_currentMenu)
433  {
434  emit Closed(m_currentMenu->m_resultid, res);
435 
437  return;
438 
439  auto *dce = new DialogCompletionEvent(m_currentMenu->m_resultid, res, text, data);
440  QCoreApplication::postEvent(m_currentMenu->m_retObject, dce);
441  }
442  else
443  {
444  emit Closed(m_id, res);
445 
446  if (!m_retObject)
447  return;
448 
449  auto *dce = new DialogCompletionEvent(m_id, res, text, data);
450  QCoreApplication::postEvent(m_retObject, dce);
451  }
452 }
453 
455 
457 {
458  if (!CopyWindowFromBase("MythConfirmationDialog", this))
459  return false;
460 
461  MythUIButton *okButton = nullptr;
462  MythUIButton *cancelButton = nullptr;
463 
464  bool err = false;
465  UIUtilE::Assign(this, m_messageText, "message", &err);
466  UIUtilE::Assign(this, okButton, "ok", &err);
467  UIUtilE::Assign(this, cancelButton, "cancel", &err);
468 
469  if (err)
470  {
471  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'MythConfirmationDialog'");
472  return false;
473  }
474 
475  if (cancelButton && m_showCancel)
476  connect(cancelButton, &MythUIButton::Clicked, this, &MythConfirmationDialog::Cancel);
477  else if (cancelButton)
478  cancelButton->SetVisible(false);
479 
480  if (okButton)
481  connect(okButton, &MythUIButton::Clicked, this, &MythConfirmationDialog::Confirm);
482 
484 
485  BuildFocusList();
486 
487  if (m_showCancel)
488  SetFocusWidget(cancelButton);
489  else
490  SetFocusWidget(okButton);
491 
492  return true;
493 }
494 
496 {
497  if (GetFocusWidget()->keyPressEvent(event))
498  return true;
499 
500  bool handled = false;
501  QStringList actions;
502  handled = GetMythMainWindow()->TranslateKeyPress("qt", event, actions);
503 
504  for (int i = 0; i < actions.size() && !handled; i++)
505  {
506  const QString& action = actions[i];
507  handled = true;
508 
509  if (action == "ESCAPE")
510  sendResult(false);
511  else
512  handled = false;
513  }
514 
515  if (!handled && MythScreenType::keyPressEvent(event))
516  handled = true;
517 
518  return handled;
519 }
520 
521 void MythConfirmationDialog::SetMessage(const QString &message)
522 {
523  m_message = message;
524  if (m_messageText)
526 }
527 
529  const QString &resultid)
530 {
531  m_retObject = retobject;
532  m_id = resultid;
533 }
534 
536 {
537  sendResult(true);
538 }
539 
541 {
542  sendResult(false);
543 }
544 
546 {
547  emit haveResult(ok);
548 
549  if (m_retObject)
550  {
551  int res = 0;
552  if (ok)
553  res = 1;
554 
555  auto *dce = new DialogCompletionEvent(m_id, res, "", m_resultData);
556  QCoreApplication::postEvent(m_retObject, dce);
557  m_retObject = nullptr;
558  }
559 
560  Close();
561 }
562 
566 MythConfirmationDialog *ShowOkPopup(const QString &message, bool showCancel)
567 {
568  QString LOC = "ShowOkPopup('" + message + "') - ";
569  MythScreenStack *stk = nullptr;
570 
572 
573  if (win)
574  stk = win->GetStack("popup stack");
575  else
576  {
577  LOG(VB_GENERAL, LOG_ERR, LOC + "no main window?");
578  return nullptr;
579  }
580 
581  if (!stk)
582  {
583  LOG(VB_GENERAL, LOG_ERR, LOC + "no popup stack? "
584  "Is there a MythThemeBase?");
585  return nullptr;
586  }
587 
588  auto *pop = new MythConfirmationDialog(stk, message, showCancel);
589  if (pop->Create())
590  {
591  stk->AddScreen(pop);
592  }
593  else
594  {
595  delete pop;
596  pop = nullptr;
597  LOG(VB_GENERAL, LOG_ERR, LOC + "Couldn't Create() Dialog");
598  }
599 
600  return pop;
601 }
602 
604 {
605  if (!dialog)
606  return true; // No dialog is treated as user pressing OK
607 
608  // Local event loop processes events whilst we wait
609  QEventLoop block;
610 
611  // Quit when dialog exits
612  QObject::connect(dialog, &MythConfirmationDialog::haveResult,
613  &block, [&block](bool result)
614  { block.exit(result ? 1 : 0); });
615 
616  // Block and return dialog result
617  return block.exec() != 0;
618 }
619 
621 
623 {
624  if (!CopyWindowFromBase("MythTextInputDialog", this))
625  return false;
626 
627  MythUIText *messageText = nullptr;
628  MythUIButton *okButton = nullptr;
629  MythUIButton *cancelButton = nullptr;
630 
631  bool err = false;
632  UIUtilE::Assign(this, m_textEdit, "input", &err);
633  UIUtilE::Assign(this, messageText, "message", &err);
634  UIUtilE::Assign(this, okButton, "ok", &err);
635  UIUtilW::Assign(this, cancelButton, "cancel");
636 
637  if (err)
638  {
639  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'MythTextInputDialog'");
640  return false;
641  }
642 
643  if (cancelButton)
644  connect(cancelButton, &MythUIButton::Clicked, this, &MythScreenType::Close);
645  if (okButton)
646  connect(okButton, &MythUIButton::Clicked, this, &MythTextInputDialog::sendResult);
647 
651 
652  if (messageText)
653  messageText->SetText(m_message);
654 
655  BuildFocusList();
656 
657  return true;
658 }
659 
660 void MythTextInputDialog::SetReturnEvent(QObject *retobject,
661  const QString &resultid)
662 {
663  m_retObject = retobject;
664  m_id = resultid;
665 }
666 
668 {
669  QString inputString = m_textEdit->GetText();
670  emit haveResult(inputString);
671 
672  if (m_retObject)
673  {
674  auto *dce = new DialogCompletionEvent(m_id, 0, inputString, "");
675  QCoreApplication::postEvent(m_retObject, dce);
676  }
677 
678  Close();
679 }
680 
682 
684  QString message)
685  : MythScreenType(parent, "mythspinboxpopup"),
686  m_message(std::move(message)),
687  m_id("")
688 {
689 }
690 
692 {
693  if (!CopyWindowFromBase("MythSpinBoxDialog", this))
694  return false;
695 
696  MythUIText *messageText = nullptr;
697  MythUIButton *okButton = nullptr;
698  MythUIButton *cancelButton = nullptr;
699 
700  bool err = false;
701  UIUtilE::Assign(this, m_spinBox, "input", &err);
702  UIUtilE::Assign(this, messageText, "message", &err);
703  UIUtilE::Assign(this, okButton, "ok", &err);
704  UIUtilW::Assign(this, cancelButton, "cancel");
705 
706  if (err)
707  {
708  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'MythSpinBoxDialog'");
709  return false;
710  }
711 
712  if (cancelButton)
713  connect(cancelButton, &MythUIButton::Clicked, this, &MythScreenType::Close);
714  if (okButton)
715  connect(okButton, &MythUIButton::Clicked, this, &MythSpinBoxDialog::sendResult);
716 
717  if (messageText)
718  messageText->SetText(m_message);
719  BuildFocusList();
720 
721  return true;
722 }
723 
728 void MythSpinBoxDialog::SetRange(int low, int high, int step, uint pageMultiple)
729 {
730  m_spinBox->SetRange(low, high, step, pageMultiple);
731 }
732 
736 void MythSpinBoxDialog::AddSelection(const QString& label, int value)
737 {
738  m_spinBox->AddSelection(value, label);
739 }
740 
745 void MythSpinBoxDialog::SetValue (const QString & value)
746 {
747  m_spinBox->SetValue(value);
748 }
749 
754 {
755  m_spinBox->SetValue(value);
756 }
757 
758 void MythSpinBoxDialog::SetReturnEvent(QObject *retobject,
759  const QString &resultid)
760 {
761  m_retObject = retobject;
762  m_id = resultid;
763 }
764 
766 {
767  QString inputString = m_spinBox->GetValue();
768  emit haveResult(inputString);
769 
770  if (m_retObject)
771  {
772  auto *dce = new DialogCompletionEvent(m_id, 0, inputString, "");
773  QCoreApplication::postEvent(m_retObject, dce);
774  }
775 
776  Close();
777 }
778 
780 
782 {
783  if (!CopyWindowFromBase("MythSearchDialog", this))
784  return false;
785 
786  MythUIButton *okButton = nullptr;
787  MythUIButton *cancelButton = nullptr;
788 
789  bool err = false;
790  UIUtilE::Assign(this, m_textEdit, "input", &err);
791  UIUtilE::Assign(this, m_titleText, "title", &err);
792  UIUtilW::Assign(this, m_matchesText, "matches");
793  UIUtilE::Assign(this, m_itemList, "itemlist", &err);
794  UIUtilE::Assign(this, okButton, "ok", &err);
795  UIUtilW::Assign(this, cancelButton, "cancel");
796 
797  if (err)
798  {
799  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'MythSearchDialog'");
800  return false;
801  }
802 
803  if (cancelButton)
804  connect(cancelButton, &MythUIButton::Clicked, this, &MythScreenType::Close);
805 
806  if (okButton)
807  connect(okButton, &MythUIButton::Clicked, this, &MythUISearchDialog::slotSendResult);
808 
811 
814 
816  if (m_matchesText)
817  m_matchesText->SetText(tr("%n match(es)", "", 0));
818 
819  BuildFocusList();
820 
821  slotUpdateList();
822 
823  return true;
824 }
825 
826 void MythUISearchDialog::SetReturnEvent(QObject *retobject,
827  const QString &resultid)
828 {
829  m_retObject = retobject;
830  m_id = resultid;
831 }
832 
834 {
835  if (!m_itemList->GetItemCurrent())
836  return;
837 
838  QString result = m_itemList->GetValue();
839 
840  emit haveResult(result);
841 
842  if (m_retObject)
843  {
844  auto *dce = new DialogCompletionEvent(m_id, 0, result, "");
845  QCoreApplication::postEvent(m_retObject, dce);
846  }
847 
848  Close();
849 }
850 
852 {
853  m_itemList->Reset();
854 
855  for (const QString& item : std::as_const(m_list))
856  {
857  if (m_matchAnywhere)
858  {
859  if (!item.contains(m_textEdit->GetText(), Qt::CaseInsensitive))
860  continue;
861  }
862  else
863  {
864  if (!item.startsWith(m_textEdit->GetText(), Qt::CaseInsensitive))
865  continue;
866  }
867 
868  // add item to list
869  new MythUIButtonListItem(m_itemList, item, nullptr, false);
870  }
871 
873 
874  if (m_matchesText)
875  m_matchesText->SetText(tr("%n match(es)", "", 0));
876 }
877 
879 
881  QString message,
882  int resolutionFlags,
883  QDateTime startTime,
884  int rangeLimit)
885  : MythScreenType(parent, "timepopup"),
886  m_message(std::move(message)), m_startTime(std::move(startTime)),
887  m_resolution(resolutionFlags), m_rangeLimit(rangeLimit)
888 {
889 }
890 
892 {
893  if (!CopyWindowFromBase("MythTimeInputDialog", this))
894  return false;
895 
896  MythUIText *messageText = nullptr;
897  MythUIButton *okButton = nullptr;
898 
899  bool err = false;
900  UIUtilE::Assign(this, messageText, "message", &err);
901  UIUtilE::Assign(this, m_dateList, "dates", &err);
902  UIUtilE::Assign(this, m_timeList, "times", &err);
903  UIUtilE::Assign(this, okButton, "ok", &err);
904 
905  if (err)
906  {
907  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'MythTimeInputDialog'");
908  return false;
909  }
910 
911  m_dateList->SetVisible(false);
912  m_timeList->SetVisible(false);
913 
914  // Date
915  if (kNoDate != (m_resolution & 0xF))
916  {
917  const QDate startdate(m_startTime.toLocalTime().date());
918  QDate date(startdate);
919 
920  int limit = 0;
922  {
923  limit += m_rangeLimit;
924  }
925  if (m_resolution & kPastDates)
926  {
927  limit += m_rangeLimit;
928  date = date.addDays(0-m_rangeLimit);
929  }
930 
931  QString text;
932  bool selected = false;
933  for (int x = 0; x <= limit; x++)
934  {
935  selected = false;
936  if (m_resolution & kDay)
937  {
938  date = date.addDays(1);
940  if (m_rangeLimit >= 356)
941  flags |= MythDate::kAddYear;
942  text = MythDate::toString(date, flags);
943 
944  if (date == startdate)
945  selected = true;
946  }
947  else if (m_resolution & kMonth)
948  {
949  date = date.addMonths(1);
950  text = date.toString("MMM yyyy");
951 
952  if ((date.month() == startdate.month()) &&
953  (date.year() == startdate.year()))
954  selected = true;
955  }
956  else if (m_resolution & kYear)
957  {
958  date = date.addYears(1);
959  text = date.toString("yyyy");
960  if (date.year() == startdate.year())
961  selected = true;
962  }
963 
964  auto *item = new MythUIButtonListItem(m_dateList, text, nullptr, false);
965  item->SetData(QVariant(date));
966 
967  if (selected)
968  m_dateList->SetItemCurrent(item);
969  }
970  m_dateList->SetVisible(true);
971  }
972 
973  // Time
974  if (kNoTime != (m_resolution & 0xF0))
975  {
976  QDate startdate(m_startTime.toLocalTime().date());
977  QTime starttime(m_startTime.toLocalTime().time());
978  QTime time(0,0,0);
979  QString text;
980  bool selected = false;
981 
982  int limit = (m_resolution & kMinutes) ? (60 * 24) : 24;
983 
984  for (int x = 0; x < limit; x++)
985  {
986  selected = false;
987  if (m_resolution & kMinutes)
988  {
989  time = time.addSecs(60);
990 #if QT_VERSION < QT_VERSION_CHECK(6,5,0)
991  QDateTime dt = QDateTime(startdate, time, Qt::LocalTime);
992 #else
993  QDateTime dt = QDateTime(startdate, time,
994  QTimeZone(QTimeZone::LocalTime));
995 #endif
997 
998  if (time == starttime)
999  selected = true;
1000  }
1001  else if (m_resolution & kHours)
1002  {
1003  time = time.addSecs(60*60);
1004  text = time.toString("hh:00");
1005 
1006  if (time.hour() == starttime.hour())
1007  selected = true;
1008  }
1009 
1010  auto *item = new MythUIButtonListItem(m_timeList, text, nullptr, false);
1011  item->SetData(QVariant(time));
1012 
1013  if (selected)
1014  m_timeList->SetItemCurrent(item);
1015  }
1016  m_timeList->SetVisible(true);
1017  }
1018 
1019  if (messageText && !m_message.isEmpty())
1020  messageText->SetText(m_message);
1021 
1022  if (okButton)
1023  connect(okButton, &MythUIButton::Clicked, this, &MythTimeInputDialog::okClicked);
1024 
1025  BuildFocusList();
1026 
1027  return true;
1028 }
1029 
1030 void MythTimeInputDialog::SetReturnEvent(QObject* retobject,
1031  const QString& resultid)
1032 {
1033  m_retObject = retobject;
1034  m_id = resultid;
1035 }
1036 
1038 {
1039  QDate date = m_dateList->GetDataValue().toDate();
1040  QTime time = m_timeList->GetDataValue().toTime();
1041 
1042 #if QT_VERSION < QT_VERSION_CHECK(6,5,0)
1043  QDateTime dateTime = QDateTime(date, time, Qt::LocalTime).toUTC();
1044 #else
1045  QDateTime dateTime = QDateTime(date, time,
1046  QTimeZone(QTimeZone::LocalTime)).toUTC();
1047 #endif
1048 
1049  emit haveResult(dateTime);
1050 
1051  if (m_retObject)
1052  {
1053  QVariant data(dateTime);
1054  auto *dce = new DialogCompletionEvent(m_id, 0, "", data);
1055  QCoreApplication::postEvent(m_retObject, dce);
1056  }
1057 
1058  Close();
1059 }
MythUIButton::Clicked
void Clicked()
MythMenu::m_menuItems
QList< MythMenuItem * > m_menuItems
Definition: mythdialogbox.h:154
MythDialogBox::m_backdata
QVariant m_backdata
Definition: mythdialogbox.h:255
MythDialogBox::m_id
QString m_id
Definition: mythdialogbox.h:246
WaitFor
bool WaitFor(MythConfirmationDialog *dialog)
Blocks until confirmation dialog exits.
Definition: mythdialogbox.cpp:603
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:317
MythDialogBox::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:303
MythGestureEvent::Click
@ Click
Definition: mythgesture.h:77
MythDate::toString
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
Definition: mythdate.cpp:93
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1614
MythUISearchDialog::m_title
QString m_title
Definition: mythdialogbox.h:437
mythuitext.h
MythMenu::Init
void Init(void)
Definition: mythdialogbox.h:146
MythUIButtonList::GetLayout
LayoutType GetLayout() const
Definition: mythuibuttonlist.h:234
MythSpinBoxDialog::sendResult
void sendResult()
Definition: mythdialogbox.cpp:765
MythUIType::inputMethodEvent
virtual bool inputMethodEvent(QInputMethodEvent *event)
Input Method event handler.
Definition: mythuitype.cpp:998
MythUISpinBox::GetValue
QString GetValue(void) const override
Definition: mythuispinbox.h:31
MythDialogBox::m_currentMenu
MythMenu * m_currentMenu
Definition: mythdialogbox.h:260
MythConfirmationDialog::Create
bool Create(void) override
Definition: mythdialogbox.cpp:456
MythUISearchDialog::m_titleText
MythUIText * m_titleText
Definition: mythdialogbox.h:434
MythSpinBoxDialog::Create
bool Create(void) override
Definition: mythdialogbox.cpp:691
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:508
MythConfirmationDialog::m_resultData
QVariant m_resultData
Definition: mythdialogbox.h:299
MythSpinBoxDialog::m_spinBox
MythUISpinBox * m_spinBox
Definition: mythdialogbox.h:374
MythTextInputDialog::m_isPassword
bool m_isPassword
Definition: mythdialogbox.h:338
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:383
MythDialogBox::m_titlearea
MythUIText * m_titlearea
Definition: mythdialogbox.h:242
MythDialogBox::SendEvent
void SendEvent(int res, const QString &text="", const QVariant &data=0)
Definition: mythdialogbox.cpp:430
MythUISearchDialog::slotSendResult
void slotSendResult(void)
Definition: mythdialogbox.cpp:833
MythDialogBox::m_textarea
MythUIText * m_textarea
Definition: mythdialogbox.h:243
MythSpinBoxDialog::m_id
QString m_id
Definition: mythdialogbox.h:378
MythSpinBoxDialog::MythSpinBoxDialog
MythSpinBoxDialog(MythScreenStack *parent, QString message)
Definition: mythdialogbox.cpp:683
MythMenu::SetSelectedByData
void SetSelectedByData(const QVariant &data)
Definition: mythdialogbox.cpp:101
MythTimeInputDialog::kHours
@ kHours
Definition: mythdialogbox.h:473
MythConfirmationDialog::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:528
MythDialogBox::m_fullscreen
bool m_fullscreen
Definition: mythdialogbox.h:249
MythDialogBox::SetBackAction
void SetBackAction(const QString &text, QVariant data)
Definition: mythdialogbox.cpp:310
MythTextInputDialog::m_id
QString m_id
Definition: mythdialogbox.h:340
MythUISearchDialog::haveResult
void haveResult(QString)
MythUISearchDialog::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:826
MythMenu::AddItem
void AddItem(const QString &title)
Definition: mythdialogbox.h:110
LOC
#define LOC
Definition: audioconvert.cpp:41
MythConfirmationDialog::haveResult
void haveResult(bool)
mythdialogbox.h
MythScreenStack
Definition: mythscreenstack.h:16
MythDialogBox::m_useSlots
bool m_useSlots
Definition: mythdialogbox.h:247
MythUIButtonList::LayoutHorizontal
@ LayoutHorizontal
Definition: mythuibuttonlist.h:209
MythDialogBox::m_exitdata
QVariant m_exitdata
Definition: mythdialogbox.h:257
MythMenu::m_selectedItem
int m_selectedItem
Definition: mythdialogbox.h:155
MythUISearchDialog::m_matchAnywhere
bool m_matchAnywhere
Definition: mythdialogbox.h:440
MythTextInputDialog::m_message
QString m_message
Definition: mythdialogbox.h:335
MythTextInputDialog::m_defaultValue
QString m_defaultValue
Definition: mythdialogbox.h:336
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
MythDialogBox::Closed
void Closed(QString, int)
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
mythuistatetype.h
MythTimeInputDialog::kMinutes
@ kMinutes
Definition: mythdialogbox.h:474
MythUITextEdit::GetText
QString GetText(void) const
Definition: mythuitextedit.h:50
MythSpinBoxDialog::AddSelection
void AddSelection(const QString &label, int value)
Definition: mythdialogbox.cpp:736
MythConfirmationDialog::sendResult
void sendResult(bool ok)
Definition: mythdialogbox.cpp:545
MythUICallbackNMF
std::function< void(void)> MythUICallbackNMF
Definition: mythuitype.h:42
MythTextInputDialog::haveResult
void haveResult(QString)
MythConfirmationDialog::m_showCancel
bool m_showCancel
Definition: mythdialogbox.h:296
MythConfirmationDialog::Confirm
void Confirm(void)
Definition: mythdialogbox.cpp:535
MythDialogBox::Select
void Select(MythUIButtonListItem *item)
Definition: mythdialogbox.cpp:210
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:26
MythConfirmationDialog::m_message
QString m_message
Definition: mythdialogbox.h:295
mythuibuttonlist.h
MythUISearchDialog::Create
bool Create(void) override
Definition: mythdialogbox.cpp:781
MythTextInputDialog::m_textEdit
MythUITextEdit * m_textEdit
Definition: mythdialogbox.h:334
MythSpinBoxDialog::m_message
QString m_message
Definition: mythdialogbox.h:375
mythuiimage.h
MythConfirmationDialog::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythdialogbox.cpp:495
MythTimeInputDialog::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:1030
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:110
MythTextInputDialog::m_filter
InputFilter m_filter
Definition: mythdialogbox.h:337
MythUIButtonList::GetItemPos
int GetItemPos(MythUIButtonListItem *item) const
Definition: mythuibuttonlist.cpp:1722
MythSpinBoxDialog::haveResult
void haveResult(QString)
mythuiutils.h
MythUIButtonListItem
Definition: mythuibuttonlist.h:41
MythUISpinBox::SetValue
void SetValue(int val) override
Definition: mythuispinbox.h:26
MythUITextEdit::SetText
void SetText(const QString &text, bool moveCursor=true)
Definition: mythuitextedit.cpp:198
MythUICallbackMF
void(QObject::*)(void) MythUICallbackMF
Definition: mythuitype.h:44
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:347
MythDialogBox::m_osdDialog
bool m_osdDialog
Definition: mythdialogbox.h:250
mythfontproperties.h
mythlogging.h
MythTimeInputDialog::MythTimeInputDialog
MythTimeInputDialog(MythScreenStack *parent, QString message, int resolutionFlags, QDateTime startTime=QDateTime::currentDateTime(), int rangeLimit=14)
Definition: mythdialogbox.cpp:880
MythDialogBox::m_text
QString m_text
Definition: mythdialogbox.h:252
MythTimeInputDialog::kYear
@ kYear
Definition: mythdialogbox.h:467
MythDialogBox::SetMenuItems
void SetMenuItems(MythMenu *menu)
Definition: mythdialogbox.cpp:169
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:1111
MythUIButtonList::GetCurrentPos
int GetCurrentPos() const
Definition: mythuibuttonlist.h:240
MythDialogBox::m_buttonList
MythUIButtonList * m_buttonList
Definition: mythdialogbox.h:244
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:115
MythDialogBox::SetExitAction
void SetExitAction(const QString &text, QVariant data)
Definition: mythdialogbox.cpp:316
menu
static MythThemedMenu * menu
Definition: mythtv-setup.cpp:58
MythTimeInputDialog::m_rangeLimit
int m_rangeLimit
Definition: mythdialogbox.h:500
MythTimeInputDialog::m_timeList
MythUIButtonList * m_timeList
Definition: mythdialogbox.h:505
MythDialogBox::Create
bool Create(void) override
Definition: mythdialogbox.cpp:127
MythDialogBox::SetText
void SetText(const QString &text)
Definition: mythdialogbox.cpp:322
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:203
MythTimeInputDialog::okClicked
void okClicked(void)
Definition: mythdialogbox.cpp:1037
XMLParseBase::CopyWindowFromBase
static bool CopyWindowFromBase(const QString &windowname, MythScreenType *win)
Definition: xmlparsebase.cpp:941
MythMenu::m_parentMenu
MythMenu * m_parentMenu
Definition: mythdialogbox.h:149
MythTimeInputDialog::kMonth
@ kMonth
Definition: mythdialogbox.h:468
MythUIButton
A single button widget.
Definition: mythuibutton.h:21
MythMenuItem
Definition: mythdialogbox.h:67
MythTextInputDialog::m_retObject
QObject * m_retObject
Definition: mythdialogbox.h:339
MythDialogBox::gestureEvent
bool gestureEvent(MythGestureEvent *event) override
Mouse click/movement handler, receives mouse gesture events from the QCoreApplication event loop.
Definition: mythdialogbox.cpp:406
MythUIButtonList::GetDataValue
QVariant GetDataValue() const
Definition: mythuibuttonlist.cpp:1643
MythUITextEdit::SetPassword
void SetPassword(bool isPassword)
Definition: mythuitextedit.h:53
MythTimeInputDialog::m_dateList
MythUIButtonList * m_dateList
Definition: mythdialogbox.h:504
MythMenu::MythMenu
MythMenu(QString text, QObject *retobject, QString resultid)
Definition: mythdialogbox.cpp:36
MythSpinBoxDialog::m_retObject
QObject * m_retObject
Definition: mythdialogbox.h:377
MythTimeInputDialog::haveResult
void haveResult(QDateTime time)
MythUITextEdit::SetFilter
void SetFilter(InputFilter filter)
Definition: mythuitextedit.h:52
MythUIButtonListItem::GetData
QVariant GetData()
Definition: mythuibuttonlist.cpp:3715
MythUIButtonList::GetVisibleCount
int GetVisibleCount()
Definition: mythuibuttonlist.cpp:1684
MythUIButtonList::LayoutVertical
@ LayoutVertical
Definition: mythuibuttonlist.h:209
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:745
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:433
MythMenu::m_resultid
QString m_resultid
Definition: mythdialogbox.h:152
MythMenu::SetParent
void SetParent(MythMenu *parent)
Definition: mythdialogbox.h:141
MythTimeInputDialog::kNoTime
@ kNoTime
Definition: mythdialogbox.h:472
MythDate::kSimplify
@ kSimplify
Do Today/Yesterday/Tomorrow transform.
Definition: mythdate.h:26
MythDialogBox::inputMethodEvent
bool inputMethodEvent(QInputMethodEvent *event) override
Input Method event handler.
Definition: mythdialogbox.cpp:342
MythUIButtonListItem::GetText
QString GetText(const QString &name="") const
Definition: mythuibuttonlist.cpp:3368
mythuispinbox.h
MythDialogBox::m_title
QString m_title
Definition: mythdialogbox.h:251
MythDialogBox::AddButtonV
void AddButtonV(const QString &title, QVariant data=0, bool newMenu=false, bool setCurrent=false)
Definition: mythdialogbox.cpp:328
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:728
MythMenu
Definition: mythdialogbox.h:99
MythDialogBox::Selected
void Selected()
MythUISearchDialog::m_defaultValue
QString m_defaultValue
Definition: mythdialogbox.h:438
MythTimeInputDialog::m_startTime
QDateTime m_startTime
Definition: mythdialogbox.h:498
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythscreentype.cpp:401
MythMenu::m_title
QString m_title
Definition: mythdialogbox.h:150
MythUISearchDialog::slotUpdateList
void slotUpdateList(void)
Definition: mythdialogbox.cpp:851
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:272
MythTimeInputDialog::m_resolution
int m_resolution
Definition: mythdialogbox.h:499
MythTextInputDialog::Create
bool Create(void) override
Definition: mythdialogbox.cpp:622
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:701
MythUISearchDialog::m_retObject
QObject * m_retObject
Definition: mythdialogbox.h:442
MythTimeInputDialog::kFutureDates
@ kFutureDates
Definition: mythdialogbox.h:477
MythConfirmationDialog::m_messageText
MythUIText * m_messageText
Definition: mythdialogbox.h:294
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:432
MythTimeInputDialog::Create
bool Create() override
Definition: mythdialogbox.cpp:891
MythConfirmationDialog::m_retObject
QObject * m_retObject
Definition: mythdialogbox.h:297
MythUIButtonList::GetValue
virtual QString GetValue() const
Definition: mythuibuttonlist.cpp:1633
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:115
MythUIType::SetVisible
virtual void SetVisible(bool visible)
Definition: mythuitype.cpp:1105
MythTextInputDialog::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:660
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
DialogCompletionEvent::kEventType
static const Type kEventType
Definition: mythdialogbox.h:57
MythConfirmationDialog::m_id
QString m_id
Definition: mythdialogbox.h:298
MythUIButtonList::Reset
void Reset() override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuibuttonlist.cpp:116
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:104
MythUISearchDialog::m_list
QStringList m_list
Definition: mythdialogbox.h:439
MythTimeInputDialog::m_retObject
QObject * m_retObject
Definition: mythdialogbox.h:507
MythUISearchDialog::m_matchesText
MythUIText * m_matchesText
Definition: mythdialogbox.h:435
MythDialogBox::m_backtext
QString m_backtext
Definition: mythdialogbox.h:254
MythUIButtonList::SetItemCurrent
void SetItemCurrent(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1581
MythSpinBoxDialog::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:758
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:521
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:455
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()
MythMenu::m_retObject
QObject * m_retObject
Definition: mythdialogbox.h:153
MythScreenType::m_screenStack
MythScreenStack * m_screenStack
Definition: mythscreentype.h:130
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:45
MythDate::kTime
@ kTime
Default local time.
Definition: mythdate.h:22
MythDialogBox::updateMenu
void updateMenu(void)
Definition: mythdialogbox.cpp:176
MythTimeInputDialog::kNoDate
@ kNoDate
Definition: mythdialogbox.h:466
mythmainwindow.h
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:52
MythUIType::SetRedraw
void SetRedraw(void)
Definition: mythuitype.cpp:313
MythDialogBox::m_exittext
QString m_exittext
Definition: mythdialogbox.h:256
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:96
ShowOkPopup
MythConfirmationDialog * ShowOkPopup(const QString &message, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
Definition: mythdialogbox.cpp:566
MythTimeInputDialog::m_message
QString m_message
Definition: mythdialogbox.h:497
MythUISearchDialog::m_id
QString m_id
Definition: mythdialogbox.h:443
MythConfirmationDialog::Cancel
void Cancel()
Definition: mythdialogbox.cpp:540
MythTimeInputDialog::kPastDates
@ kPastDates
Definition: mythdialogbox.h:478
MythMainWindow
Definition: mythmainwindow.h:28
MythTextInputDialog::sendResult
void sendResult()
Definition: mythdialogbox.cpp:667
MythMenu::AddItemV
void AddItemV(const QString &title, QVariant data=0, MythMenu *subMenu=nullptr, bool selected=false, bool checked=false)
Definition: mythdialogbox.cpp:60
uint
unsigned int uint
Definition: freesurround.h:24
MythTimeInputDialog::kDay
@ kDay
Definition: mythdialogbox.h:469
MythDialogBox::m_retObject
QObject * m_retObject
Definition: mythdialogbox.h:245
MythScreenStack::GetTopScreen
virtual MythScreenType * GetTopScreen(void) const
Definition: mythscreenstack.cpp:182
MythDialogBox::m_menu
MythMenu * m_menu
Definition: mythdialogbox.h:259