MythTV  master
progfind.cpp
Go to the documentation of this file.
1 // Qt
2 #include <QCoreApplication>
3 #include <QDateTime>
4 #include <QEvent>
5 #include <QList> // for QList
6 #include <QRect> // for QRect
7 #include <QStringList>
8 
9 // MythTV
11 #include "libmythbase/mythdb.h"
12 #include "libmythbase/mythdbcon.h"
13 #include "libmythbase/programtypes.h" // for RecStatus
14 #include "libmythtv/tv_actions.h" // for ACTION_CHANNELSEARCH
15 #include "libmythtv/tv_play.h"
18 #include "libmythui/mythuibutton.h"
20 #include "libmythui/mythuitext.h"
21 #include "libmythui/mythuiutils.h" // for UIUtilE, UIUtilW
22 
23 // MythFrontend
24 #include "guidegrid.h"
25 #include "progfind.h"
26 
27 #define LOC QString("ProgFinder: ")
28 #define LOC_ERR QString("ProgFinder, Error: ")
29 #define LOC_WARN QString("ProgFinder, Warning: ")
30 
31 void RunProgramFinder(TV *player, bool embedVideo, bool allowEPG)
32 {
33  // Language specific progfinder, if needed
35  ProgFinder *programFind = nullptr;
36  if (gCoreContext->GetLanguage() == "ja")
37  programFind = new JaProgFinder(mainStack, allowEPG, player, embedVideo);
38  else if (gCoreContext->GetLanguage() == "he")
39  programFind = new HeProgFinder(mainStack, allowEPG, player, embedVideo);
40  else if (gCoreContext->GetLanguage() == "ru")
41  programFind = new RuProgFinder(mainStack, allowEPG, player, embedVideo);
42  else // default
43  programFind = new ProgFinder(mainStack, allowEPG, player, embedVideo);
44 
45  if (programFind->Create())
46  mainStack->AddScreen(programFind, (player == nullptr));
47  else
48  delete programFind;
49 }
50 
51 ProgFinder::ProgFinder(MythScreenStack *parentStack, bool allowEPG ,
52  TV *player, bool embedVideo)
53  : ScheduleCommon(parentStack, "ProgFinder"),
54  m_player(player),
55  m_embedVideo(embedVideo),
56  m_allowEPG(allowEPG)
57 {
58  if (m_player)
59  m_player->IncrRef();
60 }
61 
63 {
64  if (!LoadWindowFromXML("schedule-ui.xml", "programfind", this))
65  return false;
66 
67  bool err = false;
68  UIUtilE::Assign(this, m_alphabetList, "alphabet", &err);
69  UIUtilE::Assign(this, m_showList, "shows", &err);
70  UIUtilE::Assign(this, m_timesList, "times", &err);
71 
72  UIUtilW::Assign(this, m_help1Text, "help1text");
73  UIUtilW::Assign(this, m_help2Text, "help2text");
74  UIUtilW::Assign(this, m_searchText, "search");
75 
76  if (err)
77  {
78  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'programfind'");
79  return false;
80  }
81 
82  m_alphabetList->SetLCDTitles(tr("Starts With"), "");
83  m_showList->SetLCDTitles(tr("Programs"), "");
84  m_timesList->SetLCDTitles(tr("Times"), "buttontext");
85 
88 
89  if (m_player)
90  emit m_player->RequestEmbedding(true);
91 
92  return true;
93 }
94 
95 void ProgFinder::Init(void)
96 {
97  m_allowKeypress = true;
98 
100 
101  gCoreContext->addListener(this);
102 
104  this, &ProgFinder::updateInfo);
106  this, &ProgFinder::select);
109 
113  this, &ProgFinder::select);
114 
117  this, &ProgFinder::select);
118 
120 }
121 
123 {
125 
126  // if we have a player and we are returning to it we need
127  // to tell it to stop embedding and return to fullscreen
128  if (m_player)
129  {
130  if (m_allowEPG)
131  emit m_player->RequestEmbedding(false);
132  m_player->DecrRef();
133  }
134 }
135 
137 {
138  if (!item || (m_currentLetter == item->GetText()))
139  return;
140 
141  m_currentLetter = item->GetText();
142 
143  updateShowList();
144  updateInfo();
145 }
146 
148 {
149  m_timesList->Reset();
150 }
151 
153 {
154  updateInfo();
155 }
156 
158 {
159  selectShowData("", 0);
160  updateInfo();
161 }
162 
163 bool ProgFinder::keyPressEvent(QKeyEvent *event)
164 {
165  if (!m_allowKeypress)
166  return true;
167 
168  m_allowKeypress = false;
169 
170  if (GetFocusWidget() && GetFocusWidget()->keyPressEvent(event))
171  {
172  m_allowKeypress = true;
173  return true;
174  }
175 
176  QStringList actions;
177  bool handled = GetMythMainWindow()->TranslateKeyPress("TV Frontend", event, actions);
178 
179  for (int i = 0; i < actions.size() && !handled; ++i)
180  {
181  const QString& action = actions[i];
182  handled = true;
183 
184  if (action == "EDIT")
185  EditScheduled();
186  else if (action == "CUSTOMEDIT")
187  EditCustom();
188  else if (action == "UPCOMING")
189  ShowUpcoming();
190  else if (action == "PREVRECORDED")
191  ShowPrevious();
192  else if (action == "DETAILS" || action == "INFO")
193  ShowDetails();
194  else if (action == "TOGGLERECORD")
195  QuickRecord();
196  else if (action == "GUIDE" || action == "4")
197  ShowGuide();
198  else if (action == ACTION_CHANNELSEARCH)
200  else if (action == "ESCAPE")
201  {
202  // don't fade the screen if we are returning to the player
203  if (m_player && m_allowEPG)
204  GetScreenStack()->PopScreen(this, false);
205  else
206  GetScreenStack()->PopScreen(this, true);
207  }
208  else
209  {
210  handled = false;
211  }
212  }
213 
214  if (!handled && MythScreenType::keyPressEvent(event))
215  handled = true;
216 
217  m_allowKeypress = true;
218 
219  return handled;
220 }
221 
223 {
224  QString label = tr("Options");
225 
226  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
227  auto *menuPopup = new MythDialogBox(label, popupStack, "menuPopup");
228 
229  if (menuPopup->Create())
230  {
231  menuPopup->SetReturnEvent(this, "menu");
232 
233  if (!m_searchStr.isEmpty())
234  menuPopup->AddButton(tr("Clear Search"));
235  menuPopup->AddButton(tr("Edit Search"));
236  if (GetFocusWidget() == m_timesList && m_timesList->GetCount() > 0)
237  {
238  menuPopup->AddButton(tr("Toggle Record"));
239  menuPopup->AddButton(tr("Program Details"));
240  menuPopup->AddButton(tr("Upcoming"));
241  menuPopup->AddButton(tr("Previously Recorded"));
242  menuPopup->AddButton(tr("Custom Edit"));
243  menuPopup->AddButton(tr("Program Guide"));
244  menuPopup->AddButton(tr("Channel Search"));
245  }
246 
247  popupStack->AddScreen(menuPopup);
248  }
249  else
250  {
251  delete menuPopup;
252  }
253 }
254 
255 void ProgFinder::customEvent(QEvent *event)
256 {
257  if (event->type() == MythEvent::kMythEventMessage)
258  {
259  auto *me = dynamic_cast<MythEvent *>(event);
260  if (me == nullptr)
261  return;
262 
263  const QString& message = me->Message();
264 
265  if (message == "SCHEDULE_CHANGE")
266  {
267  if (GetFocusWidget() == m_timesList)
268  {
270  if (curPick)
271  selectShowData(curPick->GetTitle(),
273  }
274  }
275  }
276  else if (event->type() == DialogCompletionEvent::kEventType)
277  {
278  auto *dce = (DialogCompletionEvent*)(event);
279 
280  QString resultid = dce->GetId();
281  QString resulttext = dce->GetResultText();
282 
283  if (resultid == "menu")
284  {
285  if (resulttext == tr("Clear Search"))
286  {
287  m_searchStr.clear();
288  if (m_searchText)
290  updateShowList();
292  }
293  else if (resulttext == tr("Edit Search"))
294  {
295  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
296  auto *textInput = new SearchInputDialog(popupStack, m_searchStr);
297 
298  if (textInput->Create())
299  {
300  textInput->SetReturnEvent(this, "searchtext");
301  popupStack->AddScreen(textInput);
302  }
303  }
304  else if (resulttext == tr("Toggle Record"))
305  {
306  QuickRecord();
307  }
308  else if (resulttext == tr("Program Details"))
309  {
310  ShowDetails();
311  }
312  else if (resulttext == tr("Upcoming"))
313  {
314  ShowUpcoming();
315  }
316  else if (resulttext == tr("Previously Recorded"))
317  {
318  ShowPrevious();
319  }
320  else if (resulttext == tr("Custom Edit"))
321  {
322  EditCustom();
323  }
324  else if (resulttext == tr("Program Guide"))
325  {
326  ShowGuide();
327  }
328  else if (resulttext == tr("Channel Search"))
329  {
331  }
332  }
333  else if (resultid == "searchtext")
334  {
335  m_searchStr = resulttext;
336  if (m_searchText)
338  updateShowList();
340  }
341  else
342  {
344  }
345  }
346 }
347 
349 {
350  if (m_help1Text)
351  m_help1Text->Reset();
352  if (m_help2Text)
353  m_help2Text->Reset();
354 
356  {
357  if (m_showList->GetCount() == 0)
358  {
359  if (m_help1Text)
360  m_help1Text->SetText(tr("No Programs"));
361  if (m_help2Text)
362  m_help2Text->SetText(tr("There are no available programs under this search. "
363  "Please select another search."));
364  }
365  else
366  {
367  if (m_help1Text)
368  m_help1Text->SetText(tr("Select a letter..."));
369  if (m_help2Text)
370  m_help2Text->SetText(tr("Pick the first letter of the program name, "
371  "then press SELECT or the right arrow."));
372  }
373 
375  }
376  else if (GetFocusWidget() == m_showList)
377  {
378  if (m_help1Text)
379  m_help1Text->SetText(tr("Select a program..."));
380  if (m_help2Text)
381  {
382  m_help2Text->SetText(tr("Select the title of the program you wish to find. "
383  "When finished return with the left arrow key. "
384  "Press SELECT to schedule a recording."));
385  }
386 
388  }
389  else if (GetFocusWidget() == m_timesList)
390  {
391  if (m_showData.empty())
392  {
394  if (m_help1Text)
395  m_help1Text->SetText(tr("No Programs"));
396  if (m_help2Text)
397  {
398  m_help2Text->SetText(tr("There are no available programs under "
399  "this search. Please select another "
400  "search."));
401  }
402  }
403  else
404  {
405  InfoMap infoMap;
406  m_showData[m_timesList->GetCurrentPos()]->ToMap(infoMap);
407  SetTextFromMap(infoMap);
408  m_infoMap = infoMap;
409  }
410  }
411 }
412 
414 {
415  if (m_allowEPG)
416  {
417  QString startchannel = gCoreContext->GetSetting("DefaultTVChannel");
418  uint startchanid = 0;
419  QDateTime starttime;
420 
421  if (GetFocusWidget() == m_timesList)
422  {
424  if (pginfo != nullptr)
425  {
426  startchannel = pginfo->GetChanNum();
427  startchanid = pginfo->GetChanID();
428  starttime = pginfo->GetScheduledStartTime();
429  }
430  }
431  GuideGrid::RunProgramGuide(startchanid, startchannel, starttime,
432  m_player, m_embedVideo, false, -2);
433  }
434 }
435 
437 {
438  if (GetFocusWidget() == m_timesList)
439  EditRecording();
440  else if (GetFocusWidget() == m_alphabetList && m_showList->GetCount())
442  else if (GetFocusWidget() == m_showList)
444 }
445 
447 {
448  InfoMap infoMap;
449 
450  m_timesList->Reset();
451 
452  if (!m_showData.empty())
453  {
454  QString itemText;
455  QDateTime starttime;
456  for (auto *show : m_showData)
457  {
458  starttime = show->GetScheduledStartTime();
459  itemText = MythDate::toString(starttime,
461 
462  auto *item = new MythUIButtonListItem(m_timesList, "");
463 
464  QString state = RecStatus::toUIState(show->GetRecordingStatus());
465  item->SetText(itemText, "buttontext", state);
466  item->DisplayState(state, "status");
467 
468  show->ToMap(infoMap);
469  item->SetTextFromMap(infoMap, state);
470  }
471  }
472 }
473 
475 {
476  m_showNames.clear();
477 
478  QString thequery;
479  MSqlBindings bindings;
480 
481  MSqlQuery query(MSqlQuery::InitCon());
482  whereClauseGetSearchData(thequery, bindings);
483 
484  query.prepare(thequery);
485  query.bindValues(bindings);
486  if (!query.exec())
487  {
488  MythDB::DBError("getShowNames", query);
489  return;
490  }
491 
492  QString data;
493  while (query.next())
494  {
495  data = query.value(0).toString();
496 
497  if (formatSelectedData(data))
498  m_showNames[data.toLower()] = data;
499  }
500 }
501 
503 {
504  m_showList->Reset();
505 
506  if (m_showNames.isEmpty())
507  getShowNames();
508 
509  ShowName::Iterator it;
510  for (it = m_showNames.begin(); it != m_showNames.end(); ++it)
511  {
512  QString tmpProgData = *it;
513  restoreSelectedData(tmpProgData);
514  new MythUIButtonListItem(m_showList, tmpProgData);
515  }
516 
517  m_showNames.clear();
518 }
519 
520 void ProgFinder::selectShowData(QString progTitle, int newCurShow)
521 {
522  progTitle = m_showList->GetValue();
523 
524  QDateTime progStart = MythDate::current();
525 
526  MSqlBindings bindings;
527  QString querystr = "WHERE program.title = :TITLE "
528  " AND program.endtime > :ENDTIME "
529  " AND channel.deleted IS NULL "
530  " AND channel.visible > 0 ";
531  bindings[":TITLE"] = progTitle;
532  bindings[":ENDTIME"] = progStart.addSecs(50 - progStart.time().second());
533 
535  LoadFromProgram(m_showData, querystr, bindings, m_schedList);
536 
537  updateTimesList();
538 
539  m_timesList->SetItemCurrent(newCurShow);
540 }
541 
543 {
544  for (int charNum = 48; charNum < 91; ++charNum)
545  {
546  if (charNum == 58)
547  charNum = 65;
548 
549  new MythUIButtonListItem(m_alphabetList, QString((char)charNum));
550  }
551 
552  new MythUIButtonListItem(m_alphabetList, QString('@'));
553 }
554 
555 void ProgFinder::whereClauseGetSearchData(QString &where, MSqlBindings &bindings)
556 {
557  QDateTime progStart = MythDate::current();
558  QString searchChar = m_alphabetList->GetValue();
559 
560  if (searchChar.isEmpty())
561  searchChar = "A";
562 
563  if (searchChar.contains('@'))
564  {
565  where = "SELECT DISTINCT title FROM program "
566  "LEFT JOIN channel ON program.chanid = channel.chanid "
567  "WHERE channel.deleted IS NULL AND "
568  " channel.visible > 0 AND "
569  "( title NOT REGEXP '^[A-Z0-9]' AND "
570  " title NOT REGEXP '^The [A-Z0-9]' AND "
571  " title NOT REGEXP '^A [A-Z0-9]' AND "
572  " title NOT REGEXP '^An [A-Z0-9]' AND "
573  " starttime > :STARTTIME ) ";
574  if (!m_searchStr.isEmpty())
575  {
576  where += "AND title LIKE :SEARCH ";
577  bindings[":SEARCH"] = '%' + m_searchStr + '%';
578  }
579 
580  where += "ORDER BY title;";
581 
582  bindings[":STARTTIME"] =
583  progStart.addSecs(50 - progStart.time().second());
584  }
585  else
586  {
587  QString one = searchChar + '%';
588  QString two = QString("The ") + one;
589  QString three = QString("A ") + one;
590  QString four = QString("An ") + one;
591 
592  where = "SELECT DISTINCT title FROM program "
593  "LEFT JOIN channel ON program.chanid = channel.chanid "
594  "WHERE channel.deleted IS NULL "
595  "AND channel.visible > 0 "
596  "AND ( title LIKE :ONE OR title LIKE :TWO "
597  " OR title LIKE :THREE "
598  " OR title LIKE :FOUR ) "
599  "AND starttime > :STARTTIME ";
600  if (!m_searchStr.isEmpty())
601  where += "AND title LIKE :SEARCH ";
602 
603  where += "ORDER BY title;";
604 
605  bindings[":ONE"] = one;
606  bindings[":TWO"] = two;
607  bindings[":THREE"] = three;
608  bindings[":FOUR"] = four;
609  bindings[":STARTTIME"] =
610  progStart.addSecs(50 - progStart.time().second());
611 
612  if (!m_searchStr.isEmpty())
613  bindings[":SEARCH"] = '%' + m_searchStr + '%';
614  }
615 }
616 
618 {
619  bool retval = true;
620  QString searchChar = m_alphabetList->GetValue();
621 
622  if (searchChar == "T")
623  {
624  if (!data.startsWith("The ") && !data.startsWith("A "))
625  {
626  // nothing, use as is
627  }
628  else if (data.startsWith("The T"))
629  {
630  data = data.mid(4) + ", The";
631  }
632  else if (data.startsWith("A T"))
633  {
634  data = data.mid(2) + ", A";
635  }
636  else
637  {
638  // don't add
639  retval = false;
640  }
641  }
642  else if (searchChar == "A")
643  {
644  if (!data.startsWith("The ") && !data.startsWith("A "))
645  {
646  // nothing, use as is
647  }
648  else if (data.startsWith("The A"))
649  {
650  data = data.mid(4) + ", The";
651  }
652  else if (data.startsWith("A A"))
653  {
654  data = data.mid(2) + ", A";
655  }
656  else if (data.startsWith("An A"))
657  {
658  data = data.mid(3) + ", An";
659  }
660  else
661  {
662  // don't add
663  retval = false;
664  }
665  }
666  else
667  {
668  if (data.startsWith("The "))
669  data = data.mid(4) + ", The";
670  else if (data.startsWith("A "))
671  data = data.mid(2) + ", A";
672  else if (data.startsWith("An "))
673  data = data.mid(3) + ", An";
674  }
675 
676  return retval;
677 }
678 
679 bool ProgFinder::formatSelectedData(QString& data, int charNum)
680 {
681  bool retval = true;
682 
683  if (charNum == 29 || charNum == 10)
684  {
685  if ((data.startsWith("The T") && charNum == 29) ||
686  (data.startsWith("The A") && charNum == 10))
687  data = data.mid(4) + ", The";
688  else if ((data.startsWith("A T") && charNum == 29) ||
689  (data.startsWith("A A") && charNum == 10))
690  data = data.mid(2) + ", A";
691  else if (data.startsWith("An A") && charNum == 10)
692  data = data.mid(3) + ", An";
693  else if (!data.startsWith("The ") && !data.startsWith("A "))
694  {
695  // use as is
696  }
697  else
698  {
699  // don't add
700  retval = false;
701  }
702  }
703  else
704  {
705  if (data.startsWith("The "))
706  data = data.mid(4) + ", The";
707  if (data.startsWith("A "))
708  data = data.mid(2) + ", A";
709  if (data.startsWith("An "))
710  data = data.mid(3) + ", An";
711  }
712 
713  return retval;
714 }
715 
717 {
718  if (data.endsWith(", The"))
719  data = "The " + data.left(data.length() - 5);
720  if (data.endsWith(", A"))
721  data = "A " + data.left(data.length() - 3);
722 }
723 
725 // Japanese specific program finder
726 
727 // japanese HIRAGANA list and more
728 const std::vector<QChar> JaProgFinder::kSearchChars
729 {
730  // "あ", "か", "さ", "た",
731  QChar(0x3042), QChar(0x304b), QChar(0x3055), QChar(0x305f),
732  // "な", "は", "ま", "や",
733  QChar(0x306a), QChar(0x306f), QChar(0x307e), QChar(0x3084),
734  // "ら", "わ", "英", "数",
735  QChar(0x3089), QChar(0x308f), QChar(0x82f1), QChar(0x6570),
736 };
737 
739 {
740  for (const auto& search_char : kSearchChars)
741  {
742  new MythUIButtonListItem(m_alphabetList, QString(search_char));
743  }
744 }
745 
746 // search title_pronounce
747 // we hope japanese HIRAGANA and alphabets, numerics is inserted
748 // these character must required ZENKAKU
749 // because query work not fine, if mysql's default charset latin1
751 {
752  QDateTime progStart = MythDate::current();
753  int charNum = m_alphabetList->GetCurrentPos();
754 
755  where = "SELECT DISTINCT title FROM program "
756  "LEFT JOIN channel ON program.chanid = channel.chanid "
757  "WHERE channel.deleted IS NULL AND channel.visible > 0 ";
758 
759  switch (charNum) {
760  case 0:
761  where += "AND ( title_pronounce >= 'あ' AND title_pronounce <= 'お') ";
762  break;
763  case 1:
764  where += "AND ( title_pronounce >= 'か' AND title_pronounce <= 'ご') ";
765  break;
766  case 2:
767  where += "AND ( title_pronounce >= 'さ' AND title_pronounce <= 'そ') ";
768  break;
769  case 3:
770  where += "AND ( title_pronounce >= 'た' AND title_pronounce <= 'ど') ";
771  break;
772  case 4:
773  where += "AND ( title_pronounce >= 'な' AND title_pronounce <= 'の') ";
774  break;
775  case 5:
776  where += "AND ( title_pronounce >= 'は' AND title_pronounce <= 'ぽ') ";
777  break;
778  case 6:
779  where += "AND ( title_pronounce >= 'ま' AND title_pronounce <= 'も') ";
780  break;
781  case 7:
782  where += "AND ( title_pronounce >= 'や' AND title_pronounce <= 'よ') ";
783  break;
784  case 8:
785  where += "AND ( title_pronounce >= 'ら' AND title_pronounce <= 'ろ') ";
786  break;
787  case 9:
788  where += "AND ( title_pronounce >= 'わ' AND title_pronounce <= 'ん') ";
789  break;
790  case 10:
791  where += "AND ( title_pronounce >= 'A' AND title_pronounce <= 'z') ";
792  break;
793  case 11:
794  where += "AND ( title_pronounce >= '0' AND title_pronounce <= '9') ";
795  break;
796  }
797 
798  where += "AND starttime > :STARTTIME ";
799 
800  if (!m_searchStr.isEmpty())
801  {
802  where += "AND title_pronounce LIKE :SEARCH ";
803  bindings[":SEARCH"] = '%' + m_searchStr + '%';
804  }
805 
806  where += "ORDER BY title_pronounce;";
807 
808  bindings[":STARTTIME"] = progStart.addSecs(50 - progStart.time().second());
809 }
810 
811 
812 bool JaProgFinder::formatSelectedData([[maybe_unused]] QString& data)
813 {
814  return true;
815 }
816 
817 bool JaProgFinder::formatSelectedData([[maybe_unused]] QString& data,
818  [[maybe_unused]] int charNum)
819 {
820  return true;
821 }
822 
823 void JaProgFinder::restoreSelectedData([[maybe_unused]] QString& data)
824 {
825 }
826 
827 // Hebrew specific program finder
828 
829 // Hebrew alphabet list and more
830 const std::vector<QChar> HeProgFinder::kSearchChars
831 {
832  // "א", "ב", "ג", "ד",
833  QChar(0x5d0), QChar(0x5d1), QChar(0x5d2), QChar(0x5d3),
834  // "ה", "ו", "ז", "ח",
835  QChar(0x5d4), QChar(0x5d5), QChar(0x5d6), QChar(0x5d7),
836  // "ט", "י", "כ", "ל",
837  QChar(0x5d8), QChar(0x5d9), QChar(0x5db), QChar(0x5dc),
838  // "מ", "נ", "ס", "ע",
839  QChar(0x5de), QChar(0x5e0), QChar(0x5e1), QChar(0x5e2),
840  // "פ", "צ", "ק", "ר",
841  QChar(0x5e4), QChar(0x5e6), QChar(0x5e7), QChar(0x5e8),
842  // "ש", "ת", "E", "#",
843  QChar(0x5e9), QChar(0x5ea), QChar('E'), QChar('#'),
844 };
845 
847 {
848  for (const auto& search_char : kSearchChars)
849  {
850  new MythUIButtonListItem(m_alphabetList, QString(search_char));
851  }
852 }
853 
854 // search by hebrew aleph-bet
855 // # for all numbers, E for all latin
857 {
858  QDateTime progStart = MythDate::current();
859  QString searchChar = m_alphabetList->GetValue();
860 
861  if (searchChar.isEmpty())
862  searchChar = kSearchChars[0];
863 
864  where = "SELECT DISTINCT title FROM program "
865  "LEFT JOIN channel ON program.chanid = channel.chanid "
866  "WHERE channel.deleted IS NULL AND channel.visible > 0 ";
867 
868  if (searchChar.contains('E'))
869  {
870  where += "AND ( title REGEXP '^[A-Z]') ";
871  }
872  else if (searchChar.contains('#'))
873  {
874  where += "AND ( title REGEXP '^[0-9]') ";
875  }
876  else
877  {
878  QString one = searchChar + '%';
879  bindings[":ONE"] = one;
880  where += "AND ( title LIKE :ONE ) ";
881  }
882 
883  where += "AND starttime > :STARTTIME ";
884 
885  if (!m_searchStr.isEmpty())
886  {
887  where += "AND title LIKE :SEARCH ";
888  bindings[":SEARCH"] = '%' + m_searchStr + '%';
889  }
890 
891  where += "ORDER BY title;";
892 
893  bindings[":STARTTIME"] = progStart.addSecs(50 - progStart.time().second());
894 }
895 
896 bool HeProgFinder::formatSelectedData([[maybe_unused]] QString& data)
897 {
898  return true;
899 }
900 
901 bool HeProgFinder::formatSelectedData([[maybe_unused]] QString& data,
902  [[maybe_unused]] int charNum)
903 {
904  return true;
905 }
906 
907 void HeProgFinder::restoreSelectedData([[maybe_unused]] QString& data)
908 {
909 }
910 
912 
913 // Cyrrilic specific program finder
914 // Cyrrilic alphabet list and more
915 const std::vector<QChar> RuProgFinder::kSearchChars
916 {
917  // "А", "Б", "В", "Г",
918  QChar(0x410), QChar(0x411), QChar(0x412), QChar(0x413),
919  // "Д", "Е", "Ё", "Ж",
920  QChar(0x414), QChar(0x415), QChar(0x401), QChar(0x416),
921  // "З", "И", "Й", "К",
922  QChar(0x417), QChar(0x418), QChar(0x419), QChar(0x41a),
923  // "Л", "М", "Н", "О",
924  QChar(0x41b), QChar(0x41c), QChar(0x41d), QChar(0x41e),
925  // "П", "Р", "С", "Т",
926  QChar(0x41f), QChar(0x420), QChar(0x421), QChar(0x422),
927  // "У", "Ф", "Х", "Ц",
928  QChar(0x423), QChar(0x424), QChar(0x425), QChar(0x426),
929  // "Ч", "Ш", "Щ", "Ъ",
930  QChar(0x427), QChar(0x428), QChar(0x429), QChar(0x42a),
931  // "Ы", "ь", "Э", "Ю",
932  QChar(0x42b), QChar(0x44c), QChar(0x42d), QChar(0x42e),
933  // "Я", "0", "1", "2",
934  QChar(0x42f), QChar('0'), QChar('1'), QChar('2'),
935  QChar('3'), QChar('4'), QChar('5'), QChar('6'),
936  QChar('7'), QChar('8'), QChar('9'), QChar('@'),
937  QChar('A'), QChar('B'), QChar('C'), QChar('D'),
938  QChar('E'), QChar('F'), QChar('G'), QChar('H'),
939  QChar('I'), QChar('J'), QChar('K'), QChar('L'),
940  QChar('M'), QChar('N'), QChar('O'), QChar('P'),
941  QChar('Q'), QChar('R'), QChar('S'), QChar('T'),
942  QChar('U'), QChar('V'), QChar('W'), QChar('X'),
943  QChar('Y'), QChar('Z')
944 };
945 
947 {
948  for (const auto& search_char : kSearchChars)
949  {
950  new MythUIButtonListItem(m_alphabetList, search_char);
951  }
952 }
953 
954 // search by cyrillic and latin alphabet
955 // @ all programm
957 &bindings)
958 {
959  QDateTime progStart = MythDate::current();
960  QString searchChar = m_alphabetList->GetValue();
961 
962  if (searchChar.isEmpty())
963  searchChar = kSearchChars[0];
964 
965 
966  if (searchChar.contains('@'))
967  {
968  where = "SELECT DISTINCT title FROM program "
969  "LEFT JOIN channel ON program.chanid = channel.chanid "
970  "WHERE channel.deleted IS NULL AND "
971  " channel.visible > 0 AND "
972  "( "
973  "title NOT REGEXP '^[A-Z0-9]' AND "
974  "title NOT REGEXP '^The [A-Z0-9]' AND "
975  "title NOT REGEXP '^A [A-Z0-9]' AND "
976  "title NOT REGEXP '^[0-9]' AND "
977  "starttime > :STARTTIME ) ";
978  if (!m_searchStr.isEmpty())
979  {
980  where += "AND title LIKE :SEARCH ";
981  bindings[":SEARCH"] = '%' + m_searchStr + '%';
982  }
983 
984  where += "ORDER BY title;";
985 
986  bindings[":STARTTIME"] =
987  progStart.addSecs(50 - progStart.time().second());
988  }
989  else
990  {
991  QString one = searchChar + '%';
992  QString two = QString("The ") + one;
993  QString three = QString("A ") + one;
994  QString four = QString("An ") + one;
995  QString five = QString("\"") + one;
996 
997  where = "SELECT DISTINCT title FROM program "
998  "LEFT JOIN channel ON program.chanid = channel.chanid "
999  "WHERE channel.deleted IS NULL "
1000  "AND channel.visible > 0 "
1001  "AND ( title LIKE :ONE OR title LIKE :TWO "
1002  " OR title LIKE :THREE "
1003  " OR title LIKE :FOUR "
1004  " OR title LIKE :FIVE )"
1005  "AND starttime > :STARTTIME ";
1006  if (!m_searchStr.isEmpty())
1007  where += "AND title LIKE :SEARCH ";
1008 
1009  where += "ORDER BY title;";
1010 
1011  bindings[":ONE"] = one;
1012  bindings[":TWO"] = two;
1013  bindings[":THREE"] = three;
1014  bindings[":FOUR"] = four;
1015  bindings[":FIVE"] = five;
1016  bindings[":STARTTIME"] =
1017  progStart.addSecs(50 - progStart.time().second());
1018 
1019  if (!m_searchStr.isEmpty())
1020  bindings[":SEARCH"] = '%' + m_searchStr + '%';
1021  }
1022 }
1023 
1024 bool RuProgFinder::formatSelectedData([[maybe_unused]] QString& data)
1025 {
1026  return true;
1027 }
1028 
1029 bool RuProgFinder::formatSelectedData([[maybe_unused]] QString& data,
1030  [[maybe_unused]] int charNum)
1031 {
1032  return true;
1033 }
1034 
1035 void RuProgFinder::restoreSelectedData([[maybe_unused]] QString& data)
1036 {
1037 }
1038 
1040 {
1041  return (GetFocusWidget() == m_timesList) ?
1042  m_showData[m_timesList->GetCurrentPos()] : nullptr;
1043 };
1044 
1046 
1048 {
1049  if (!LoadWindowFromXML("schedule-ui.xml", "searchpopup", this))
1050  return false;
1051 
1052  MythUIText *messageText = nullptr;
1053  MythUIButton *okButton = nullptr;
1054  MythUIButton *cancelButton = nullptr;
1055 
1056  bool err = false;
1057  UIUtilE::Assign(this, m_textEdit, "input", &err);
1058  UIUtilE::Assign(this, messageText, "message", &err);
1059  UIUtilE::Assign(this, okButton, "ok", &err);
1060  UIUtilW::Assign(this, cancelButton, "cancel");
1061 
1062  if (err)
1063  {
1064  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'searchpopup'");
1065  return false;
1066  }
1067 
1068  if (cancelButton)
1069  connect(cancelButton, &MythUIButton::Clicked, this, &MythScreenType::Close);
1070  connect(okButton, &MythUIButton::Clicked, this, &SearchInputDialog::sendResult);
1071 
1076 
1077  BuildFocusList();
1078 
1079  return true;
1080 }
1081 
1083 {
1084  QString inputString = m_textEdit->GetText();
1085  emit valueChanged(inputString);
1086 
1087  if (m_retObject)
1088  {
1089  //FIXME: add a new event type for this?
1090  auto *dce = new DialogCompletionEvent(m_id, 0, inputString, "");
1091  QCoreApplication::postEvent(m_retObject, dce);
1092  }
1093 }
1094 
1095 /* vim: set expandtab tabstop=4 shiftwidth=4: */
MythUIButton::Clicked
void Clicked()
MSqlBindings
QMap< QString, QVariant > MSqlBindings
typedef for a map of string -> string bindings for generic queries.
Definition: mythdbcon.h:100
MythScreenType::LoadInBackground
void LoadInBackground(const QString &message="")
Definition: mythscreentype.cpp:283
MSqlQuery::next
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:812
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:127
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:317
TVPlaybackState::RequestEmbedding
void RequestEmbedding(bool Embed, const QRect &Rect={}, const QStringList &Data={})
RecStatus::toUIState
static QString toUIState(RecStatus::Type recstatus)
Definition: recordingstatus.cpp:5
MythDate::toString
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
Definition: mythdate.cpp:84
ProgFinder::ShowGuide
void ShowGuide() const override
Definition: progfind.cpp:413
GuideGrid::RunProgramGuide
static void RunProgramGuide(uint startChanId, const QString &startChanNum, const QDateTime &startTime, TV *player=nullptr, bool embedVideo=false, bool allowFinder=true, int changrpid=-1)
Definition: guidegrid.cpp:411
mythuitext.h
MythEvent::kMythEventMessage
static const Type kMythEventMessage
Definition: mythevent.h:79
LoadFromScheduler
bool LoadFromScheduler(AutoDeleteDeque< TYPE * > &destination, bool &hasConflicts, const QString &altTable="", int recordid=-1)
Definition: programinfo.h:916
MythUIText::Reset
void Reset(void) override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuitext.cpp:65
ReferenceCounter::DecrRef
virtual int DecrRef(void)
Decrements reference count and deletes on 0.
Definition: referencecounter.cpp:125
guidegrid.h
ProgFinder::m_help1Text
MythUIText * m_help1Text
Definition: progfind.h:84
mythdb.h
MythUIComposite::ResetMap
virtual void ResetMap(const InfoMap &infoMap)
Definition: mythuicomposite.cpp:28
MythTextInputDialog::m_isPassword
bool m_isPassword
Definition: mythdialogbox.h:338
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:383
ScheduleCommon::customEvent
void customEvent(QEvent *event) override
Definition: schedulecommon.cpp:483
HeProgFinder::restoreSelectedData
void restoreSelectedData(QString &data) override
Definition: progfind.cpp:907
ProgFinder::~ProgFinder
~ProgFinder() override
Definition: progfind.cpp:122
ProgFinder::alphabetListItemSelected
void alphabetListItemSelected(MythUIButtonListItem *item)
Definition: progfind.cpp:136
ProgFinder::m_schedList
ProgramList m_schedList
Definition: progfind.h:75
RunProgramFinder
void RunProgramFinder(TV *player, bool embedVideo, bool allowEPG)
Definition: progfind.cpp:31
mythscreenstack.h
MSqlQuery::bindValues
void bindValues(const MSqlBindings &bindings)
Add all the bindings in the passed in bindings.
Definition: mythdbcon.cpp:926
MythTextInputDialog::m_id
QString m_id
Definition: mythdialogbox.h:340
ProgramInfo::GetChanNum
QString GetChanNum(void) const
This is the channel "number", in the form 1, 1_2, 1-2, 1#1, etc.
Definition: programinfo.h:377
MythUIButtonList::itemSelected
void itemSelected(MythUIButtonListItem *item)
MythEvent
This class is used as a container for messages.
Definition: mythevent.h:16
JaProgFinder::initAlphabetList
void initAlphabetList() override
Definition: progfind.cpp:738
ProgFinder::formatSelectedData
virtual bool formatSelectedData(QString &data)
Definition: progfind.cpp:617
RuProgFinder::kSearchChars
static const std::vector< QChar > kSearchChars
Definition: progfind.h:139
AutoDeleteDeque::empty
bool empty(void) const
Definition: autodeletedeque.h:66
MSqlQuery::value
QVariant value(int i) const
Definition: mythdbcon.h:204
MythScreenStack
Definition: mythscreenstack.h:16
mythdbcon.h
MSqlQuery::exec
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:618
MythTextInputDialog::m_defaultValue
QString m_defaultValue
Definition: mythdialogbox.h:336
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
show
static void show(uint8_t *buf, int length)
Definition: ringbuffer.cpp:341
ProgFinder::m_searchStr
QString m_searchStr
Definition: progfind.h:66
MythUITextEdit::GetText
QString GetText(void) const
Definition: mythuitextedit.h:50
progfind.h
mythuibuttonlist.h
MythTextInputDialog::m_textEdit
MythUITextEdit * m_textEdit
Definition: mythdialogbox.h:334
ProgFinder::updateShowList
void updateShowList()
Definition: progfind.cpp:502
MythUIButtonList::GetCount
int GetCount() const
Definition: mythuibuttonlist.cpp:1679
ScheduleCommon::ShowDetails
virtual void ShowDetails(void) const
Show the Program Details screen.
Definition: schedulecommon.cpp:27
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:14
MythEvent::Message
const QString & Message() const
Definition: mythevent.h:65
ProgFinder::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: progfind.cpp:163
ProgFinder
Definition: progfind.h:23
ScheduleCommon::EditRecording
virtual void EditRecording(bool may_watch_now=false)
Creates a dialog for editing the recording status, blocking until user leaves dialog.
Definition: schedulecommon.cpp:276
ScheduleCommon::EditScheduled
virtual void EditScheduled(void)
Creates a dialog for editing the recording schedule.
Definition: schedulecommon.cpp:168
ProgFinder::m_timesList
MythUIButtonList * m_timesList
Definition: progfind.h:81
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:110
MythTextInputDialog::m_filter
InputFilter m_filter
Definition: mythdialogbox.h:337
MythUIType::TakingFocus
void TakingFocus()
ProgFinder::select
void select()
Definition: progfind.cpp:436
programtypes.h
ProgFinder::m_player
TV * m_player
Definition: progfind.h:69
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
MythObservable::addListener
void addListener(QObject *listener)
Add a listener to the observable.
Definition: mythobservable.cpp:38
ProgFinder::m_alphabetList
MythUIButtonList * m_alphabetList
Definition: progfind.h:79
ProgFinder::ProgFinder
ProgFinder(MythScreenStack *parentStack, bool allowEPG=true, TV *player=nullptr, bool embedVideo=false)
Definition: progfind.cpp:51
mythuiutils.h
MythUIButtonListItem
Definition: mythuibuttonlist.h:41
MythUITextEdit::SetText
void SetText(const QString &text, bool moveCursor=true)
Definition: mythuitextedit.cpp:198
ScheduleCommon::ShowPrevious
virtual void ShowPrevious(void) const
Show the previous recordings for this recording rule.
Definition: schedulecommon.cpp:250
ProgFinder::timesListTakeFocus
void timesListTakeFocus(void)
Definition: progfind.cpp:157
ProgFinder::initAlphabetList
virtual void initAlphabetList(void)
Definition: progfind.cpp:542
ProgramInfo::GetScheduledStartTime
QDateTime GetScheduledStartTime(void) const
The scheduled start time of program.
Definition: programinfo.h:391
ScheduleCommon::EditCustom
virtual void EditCustom(void)
Creates a dialog for creating a custom recording rule.
Definition: schedulecommon.cpp:204
JaProgFinder::kSearchChars
static const std::vector< QChar > kSearchChars
Definition: progfind.h:103
ProgFinder::showListTakeFocus
void showListTakeFocus(void)
Definition: progfind.cpp:152
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
ProgFinder::m_allowEPG
bool m_allowEPG
Definition: progfind.h:71
ProgFinder::Create
bool Create(void) override
Definition: progfind.cpp:62
MythUIButtonList::GetCurrentPos
int GetCurrentPos() const
Definition: mythuibuttonlist.h:240
tv_actions.h
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:115
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:166
ProgFinder::updateTimesList
void updateTimesList()
Definition: progfind.cpp:446
MSqlQuery::InitCon
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:550
ProgramInfo::GetTitle
QString GetTitle(void) const
Definition: programinfo.h:362
HeProgFinder::formatSelectedData
bool formatSelectedData(QString &data) override
MythDB::DBError
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:225
HeProgFinder::whereClauseGetSearchData
void whereClauseGetSearchData(QString &where, MSqlBindings &bindings) override
Definition: progfind.cpp:856
ProgFinder::m_help2Text
MythUIText * m_help2Text
Definition: progfind.h:85
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:203
ProgFinder::m_showNames
ShowName m_showNames
Definition: progfind.h:64
ACTION_CHANNELSEARCH
#define ACTION_CHANNELSEARCH
Definition: tv_actions.h:28
ProgFinder::updateInfo
void updateInfo(void)
Definition: progfind.cpp:348
MythUIButton
A single button widget.
Definition: mythuibutton.h:21
ProgFinder::m_infoMap
InfoMap m_infoMap
Definition: progfind.h:77
MythUIComposite::SetTextFromMap
virtual void SetTextFromMap(const InfoMap &infoMap)
Definition: mythuicomposite.cpp:9
ScheduleCommon
Definition: schedulecommon.h:15
ProgFinder::m_showList
MythUIButtonList * m_showList
Definition: progfind.h:80
MythTextInputDialog::m_retObject
QObject * m_retObject
Definition: mythdialogbox.h:339
SearchInputDialog::editChanged
void editChanged(void)
Definition: progfind.cpp:1082
MythUITextEdit::SetPassword
void SetPassword(bool isPassword)
Definition: mythuitextedit.h:53
JaProgFinder::whereClauseGetSearchData
void whereClauseGetSearchData(QString &where, MSqlBindings &bindings) override
Definition: progfind.cpp:750
MythUIButtonList::SetLCDTitles
void SetLCDTitles(const QString &title, const QString &columnList="")
Definition: mythuibuttonlist.cpp:3083
ProgFinder::Init
void Init(void) override
Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in...
Definition: progfind.cpp:95
MythUITextEdit::SetFilter
void SetFilter(InputFilter filter)
Definition: mythuitextedit.h:52
SearchInputDialog
Definition: progfind.h:143
uint
unsigned int uint
Definition: compat.h:81
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:55
ProgFinder::m_searchText
MythUIText * m_searchText
Definition: progfind.h:83
MythCoreContext::GetLanguage
QString GetLanguage(void)
Returns two character ISO-639 language descriptor for UI language.
Definition: mythcorecontext.cpp:1775
MythScreenType::GetScreenStack
MythScreenStack * GetScreenStack() const
Definition: mythscreentype.cpp:214
SearchInputDialog::valueChanged
void valueChanged(QString)
UIUtilDisp::Assign
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
Definition: mythuiutils.h:27
HeProgFinder::kSearchChars
static const std::vector< QChar > kSearchChars
Definition: progfind.h:121
JaProgFinder::restoreSelectedData
void restoreSelectedData(QString &data) override
Definition: progfind.cpp:823
RuProgFinder::initAlphabetList
void initAlphabetList() override
Definition: progfind.cpp:946
ProgFinder::ShowMenu
void ShowMenu(void) override
Definition: progfind.cpp:222
MythDate::kSimplify
@ kSimplify
Do Today/Yesterday/Tomorrow transform.
Definition: mythdate.h:26
MythUIButtonListItem::GetText
QString GetText(const QString &name="") const
Definition: mythuibuttonlist.cpp:3368
JaProgFinder::formatSelectedData
bool formatSelectedData(QString &data) override
ProgramInfo::GetChanID
uint GetChanID(void) const
This is the unique key used in the database to locate tuning information.
Definition: programinfo.h:373
ProgFinder::whereClauseGetSearchData
virtual void whereClauseGetSearchData(QString &where, MSqlBindings &bindings)
Definition: progfind.cpp:555
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:67
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
RuProgFinder::restoreSelectedData
void restoreSelectedData(QString &data) override
Definition: progfind.cpp:1035
ProgFinder::m_currentLetter
QString m_currentLetter
Definition: progfind.h:67
ProgFinder::timesListLosingFocus
void timesListLosingFocus(void)
Definition: progfind.cpp:147
mythcorecontext.h
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:687
HeProgFinder
Definition: progfind.h:106
ProgFinder::selectShowData
void selectShowData(QString progTitle, int newCurShow)
Definition: progfind.cpp:520
RuProgFinder
Definition: progfind.h:124
LoadFromProgram
bool LoadFromProgram(ProgramList &destination, const QString &where, const QString &groupBy, const QString &orderBy, const MSqlBindings &bindings, const ProgramList &schedList)
Definition: programinfo.cpp:5738
ProgFinder::customEvent
void customEvent(QEvent *e) override
Definition: progfind.cpp:255
DialogCompletionEvent
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
Definition: mythdialogbox.h:41
HeProgFinder::initAlphabetList
void initAlphabetList() override
Definition: progfind.cpp:846
MythUIButtonList::GetValue
virtual QString GetValue() const
Definition: mythuibuttonlist.cpp:1633
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:115
MythScreenStack::PopScreen
virtual void PopScreen(MythScreenType *screen=nullptr, bool allowFade=true, bool deleteScreen=true)
Definition: mythscreenstack.cpp:86
ScheduleCommon::ShowUpcoming
virtual void ShowUpcoming(void) const
Show the upcoming recordings for this title.
Definition: schedulecommon.cpp:69
DialogCompletionEvent::kEventType
static const Type kEventType
Definition: mythdialogbox.h:57
ScheduleCommon::QuickRecord
virtual void QuickRecord(void)
Create a kSingleRecord or bring up recording dialog.
Definition: schedulecommon.cpp:149
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
MythUIButtonList::MoveToNamedPosition
bool MoveToNamedPosition(const QString &position_name)
Definition: mythuibuttonlist.cpp:2318
MythUIButtonList::SetItemCurrent
void SetItemCurrent(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1581
build_compdb.action
action
Definition: build_compdb.py:9
mythuibutton.h
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &Stackname)
Definition: mythmainwindow.cpp:322
ProgFinder::GetCurrentProgram
ProgramInfo * GetCurrentProgram(void) const override
Definition: progfind.cpp:1039
MythUITextEdit::valueChanged
void valueChanged()
ScheduleCommon::ShowChannelSearch
virtual void ShowChannelSearch(void) const
Show the channel search.
Definition: schedulecommon.cpp:115
RuProgFinder::formatSelectedData
bool formatSelectedData(QString &data) override
MythDate::kDateTimeFull
@ kDateTimeFull
Default local time.
Definition: mythdate.h:23
SearchInputDialog::Create
bool Create(void) override
Definition: progfind.cpp:1047
ProgFinder::m_embedVideo
bool m_embedVideo
Definition: progfind.h:70
MythUIType::LosingFocus
void LosingFocus()
ProgFinder::m_showData
ProgramList m_showData
Definition: progfind.h:74
ReferenceCounter::IncrRef
virtual int IncrRef(void)
Increments reference count.
Definition: referencecounter.cpp:101
JaProgFinder
Definition: progfind.h:88
mythmainwindow.h
RuProgFinder::whereClauseGetSearchData
void whereClauseGetSearchData(QString &where, MSqlBindings &bindings) override
Definition: progfind.cpp:956
ProgFinder::m_allowKeypress
bool m_allowKeypress
Definition: progfind.h:72
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:52
MythObservable::removeListener
void removeListener(QObject *listener)
Remove a listener to the observable.
Definition: mythobservable.cpp:55
ProgFinder::getShowNames
void getShowNames(void)
Definition: progfind.cpp:474
MythTextInputDialog::sendResult
void sendResult()
Definition: mythdialogbox.cpp:667
MythCoreContext::GetSetting
QString GetSetting(const QString &key, const QString &defaultval="")
Definition: mythcorecontext.cpp:902
MSqlQuery::prepare
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:837
tv_play.h
ProgFinder::restoreSelectedData
virtual void restoreSelectedData(QString &data)
Definition: progfind.cpp:716
TV
Control TV playback.
Definition: tv_play.h:152