MythTV  master
progfind.cpp
Go to the documentation of this file.
1 
2 #include "progfind.h"
3 
4 // Qt
5 #include <QDateTime>
6 #include <QCoreApplication>
7 #include <QStringList>
8 #include <QEvent>
9 #include <QList> // for QList
10 #include <QRect> // for QRect
11 
12 // MythTV
13 #include "mythdb.h"
14 #include "mythdbcon.h"
15 #include "mythcorecontext.h"
16 #include "programtypes.h" // for RecStatus
17 #include "tv_play.h"
18 #include "tv_actions.h" // for ACTION_CHANNELSEARCH
19 
20 // MythUI
21 #include "mythuitext.h"
22 #include "mythuibuttonlist.h"
23 #include "mythuibutton.h"
24 #include "mythscreenstack.h"
25 #include "mythmainwindow.h"
26 #include "mythuiutils.h" // for UIUtilE, UIUtilW
27 
28 // mythfrontend
29 #include "guidegrid.h"
30 
31 #define LOC QString("ProgFinder: ")
32 #define LOC_ERR QString("ProgFinder, Error: ")
33 #define LOC_WARN QString("ProgFinder, Warning: ")
34 
35 void RunProgramFinder(TV *player, bool embedVideo, bool allowEPG)
36 {
37  // Language specific progfinder, if needed
39  ProgFinder *programFind = nullptr;
40  if (gCoreContext->GetLanguage() == "ja")
41  programFind = new JaProgFinder(mainStack, allowEPG, player, embedVideo);
42  else if (gCoreContext->GetLanguage() == "he")
43  programFind = new HeProgFinder(mainStack, allowEPG, player, embedVideo);
44  else if (gCoreContext->GetLanguage() == "ru")
45  programFind = new RuProgFinder(mainStack, allowEPG, player, embedVideo);
46  else // default
47  programFind = new ProgFinder(mainStack, allowEPG, player, embedVideo);
48 
49  if (programFind->Create())
50  mainStack->AddScreen(programFind, (player == nullptr));
51  else
52  delete programFind;
53 }
54 
55 ProgFinder::ProgFinder(MythScreenStack *parentStack, bool allowEPG ,
56  TV *player, bool embedVideo)
57  : ScheduleCommon(parentStack, "ProgFinder"),
58  m_player(player),
59  m_embedVideo(embedVideo),
60  m_allowEPG(allowEPG)
61 {
62  if (m_player)
63  m_player->IncrRef();
64 }
65 
67 {
68  if (!LoadWindowFromXML("schedule-ui.xml", "programfind", this))
69  return false;
70 
71  bool err = false;
72  UIUtilE::Assign(this, m_alphabetList, "alphabet", &err);
73  UIUtilE::Assign(this, m_showList, "shows", &err);
74  UIUtilE::Assign(this, m_timesList, "times", &err);
75 
76  UIUtilW::Assign(this, m_help1Text, "help1text");
77  UIUtilW::Assign(this, m_help2Text, "help2text");
78  UIUtilW::Assign(this, m_searchText, "search");
79 
80  if (err)
81  {
82  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'programfind'");
83  return false;
84  }
85 
86  m_alphabetList->SetLCDTitles(tr("Starts With"), "");
87  m_showList->SetLCDTitles(tr("Programs"), "");
88  m_timesList->SetLCDTitles(tr("Times"), "buttontext");
89 
92 
93  if (m_player)
94  emit m_player->RequestEmbedding(true);
95 
96  return true;
97 }
98 
99 void ProgFinder::Init(void)
100 {
101  m_allowKeypress = true;
102 
104 
105  gCoreContext->addListener(this);
106 
108  this, &ProgFinder::updateInfo);
110  this, &ProgFinder::select);
113 
117  this, &ProgFinder::select);
118 
121  this, &ProgFinder::select);
122 
124 }
125 
127 {
129 
130  // if we have a player and we are returning to it we need
131  // to tell it to stop embedding and return to fullscreen
132  if (m_player)
133  {
134  if (m_allowEPG)
135  emit m_player->RequestEmbedding(false);
136  m_player->DecrRef();
137  }
138 }
139 
141 {
142  if (!item || (m_currentLetter == item->GetText()))
143  return;
144 
145  m_currentLetter = item->GetText();
146 
147  updateShowList();
148  updateInfo();
149 }
150 
152 {
153  m_timesList->Reset();
154 }
155 
157 {
158  updateInfo();
159 }
160 
162 {
163  selectShowData("", 0);
164  updateInfo();
165 }
166 
167 bool ProgFinder::keyPressEvent(QKeyEvent *event)
168 {
169  if (!m_allowKeypress)
170  return true;
171 
172  m_allowKeypress = false;
173 
174  if (GetFocusWidget() && GetFocusWidget()->keyPressEvent(event))
175  {
176  m_allowKeypress = true;
177  return true;
178  }
179 
180  QStringList actions;
181  bool handled = GetMythMainWindow()->TranslateKeyPress("TV Frontend", event, actions);
182 
183  for (int i = 0; i < actions.size() && !handled; ++i)
184  {
185  QString action = actions[i];
186  handled = true;
187 
188  if (action == "EDIT")
189  EditScheduled();
190  else if (action == "CUSTOMEDIT")
191  EditCustom();
192  else if (action == "UPCOMING")
193  ShowUpcoming();
194  else if (action == "PREVRECORDED")
195  ShowPrevious();
196  else if (action == "DETAILS" || action == "INFO")
197  ShowDetails();
198  else if (action == "TOGGLERECORD")
199  QuickRecord();
200  else if (action == "GUIDE" || action == "4")
201  ShowGuide();
202  else if (action == ACTION_CHANNELSEARCH)
204  else if (action == "ESCAPE")
205  {
206  // don't fade the screen if we are returning to the player
207  if (m_player && m_allowEPG)
208  GetScreenStack()->PopScreen(this, false);
209  else
210  GetScreenStack()->PopScreen(this, true);
211  }
212  else
213  handled = false;
214  }
215 
216  if (!handled && MythScreenType::keyPressEvent(event))
217  handled = true;
218 
219  m_allowKeypress = true;
220 
221  return handled;
222 }
223 
225 {
226  QString label = tr("Options");
227 
228  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
229  auto *menuPopup = new MythDialogBox(label, popupStack, "menuPopup");
230 
231  if (menuPopup->Create())
232  {
233  menuPopup->SetReturnEvent(this, "menu");
234 
235  if (!m_searchStr.isEmpty())
236  menuPopup->AddButton(tr("Clear Search"));
237  menuPopup->AddButton(tr("Edit Search"));
238  if (GetFocusWidget() == m_timesList && m_timesList->GetCount() > 0)
239  {
240  menuPopup->AddButton(tr("Toggle Record"));
241  menuPopup->AddButton(tr("Program Details"));
242  menuPopup->AddButton(tr("Upcoming"));
243  menuPopup->AddButton(tr("Previously Recorded"));
244  menuPopup->AddButton(tr("Custom Edit"));
245  menuPopup->AddButton(tr("Program Guide"));
246  menuPopup->AddButton(tr("Channel Search"));
247  }
248 
249  popupStack->AddScreen(menuPopup);
250  }
251  else
252  {
253  delete menuPopup;
254  }
255 }
256 
257 void ProgFinder::customEvent(QEvent *event)
258 {
259  if (event->type() == MythEvent::MythEventMessage)
260  {
261  auto *me = dynamic_cast<MythEvent *>(event);
262  if (me == nullptr)
263  return;
264 
265  const QString& message = me->Message();
266 
267  if (message == "SCHEDULE_CHANGE")
268  {
269  if (GetFocusWidget() == m_timesList)
270  {
272  if (curPick)
273  selectShowData(curPick->GetTitle(),
275  }
276  }
277  }
278  else if (event->type() == DialogCompletionEvent::kEventType)
279  {
280  auto *dce = (DialogCompletionEvent*)(event);
281 
282  QString resultid = dce->GetId();
283  QString resulttext = dce->GetResultText();
284 
285  if (resultid == "menu")
286  {
287  if (resulttext == tr("Clear Search"))
288  {
289  m_searchStr.clear();
290  if (m_searchText)
292  updateShowList();
294  }
295  else if (resulttext == tr("Edit Search"))
296  {
297  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
298  auto *textInput = new SearchInputDialog(popupStack, m_searchStr);
299 
300  if (textInput->Create())
301  {
302  textInput->SetReturnEvent(this, "searchtext");
303  popupStack->AddScreen(textInput);
304  }
305  }
306  else if (resulttext == tr("Toggle Record"))
307  {
308  QuickRecord();
309  }
310  else if (resulttext == tr("Program Details"))
311  {
312  ShowDetails();
313  }
314  else if (resulttext == tr("Upcoming"))
315  {
316  ShowUpcoming();
317  }
318  else if (resulttext == tr("Previously Recorded"))
319  {
320  ShowPrevious();
321  }
322  else if (resulttext == tr("Custom Edit"))
323  {
324  EditCustom();
325  }
326  else if (resulttext == tr("Program Guide"))
327  {
328  ShowGuide();
329  }
330  else if (resulttext == tr("Channel Search"))
331  {
333  }
334  }
335  else if (resultid == "searchtext")
336  {
337  m_searchStr = resulttext;
338  if (m_searchText)
340  updateShowList();
342  }
343  else
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 
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  data = data.mid(4) + ", The";
630  else if (data.startsWith("A T"))
631  data = data.mid(2) + ", A";
632  else
633  {
634  // don't add
635  retval = false;
636  }
637  }
638  else if (searchChar == "A")
639  {
640  if (!data.startsWith("The ") && !data.startsWith("A "))
641  {
642  // nothing, use as is
643  }
644  else if (data.startsWith("The A"))
645  data = data.mid(4) + ", The";
646  else if (data.startsWith("A A"))
647  data = data.mid(2) + ", A";
648  else if (data.startsWith("An A"))
649  data = data.mid(3) + ", An";
650  else
651  {
652  // don't add
653  retval = false;
654  }
655  }
656  else
657  {
658  if (data.startsWith("The "))
659  data = data.mid(4) + ", The";
660  else if (data.startsWith("A "))
661  data = data.mid(2) + ", A";
662  else if (data.startsWith("An "))
663  data = data.mid(3) + ", An";
664  }
665 
666  return retval;
667 }
668 
669 bool ProgFinder::formatSelectedData(QString& data, int charNum)
670 {
671  bool retval = true;
672 
673  if (charNum == 29 || charNum == 10)
674  {
675  if ((data.startsWith("The T") && charNum == 29) ||
676  (data.startsWith("The A") && charNum == 10))
677  data = data.mid(4) + ", The";
678  else if ((data.startsWith("A T") && charNum == 29) ||
679  (data.startsWith("A A") && charNum == 10))
680  data = data.mid(2) + ", A";
681  else if (data.startsWith("An A") && charNum == 10)
682  data = data.mid(3) + ", An";
683  else if (!data.startsWith("The ") && !data.startsWith("A "))
684  {
685  // use as is
686  }
687  else
688  {
689  // don't add
690  retval = false;
691  }
692  }
693  else
694  {
695  if (data.startsWith("The "))
696  data = data.mid(4) + ", The";
697  if (data.startsWith("A "))
698  data = data.mid(2) + ", A";
699  if (data.startsWith("An "))
700  data = data.mid(3) + ", An";
701  }
702 
703  return retval;
704 }
705 
707 {
708  if (data.endsWith(", The"))
709  data = "The " + data.left(data.length() - 5);
710  if (data.endsWith(", A"))
711  data = "A " + data.left(data.length() - 3);
712 }
713 
715 // Japanese specific program finder
716 
717 // japanese HIRAGANA list and more
718 const std::vector<QChar> JaProgFinder::kSearchChars
719 {
720  // "あ", "か", "さ", "た",
721  QChar(0x3042), QChar(0x304b), QChar(0x3055), QChar(0x305f),
722  // "な", "は", "ま", "や",
723  QChar(0x306a), QChar(0x306f), QChar(0x307e), QChar(0x3084),
724  // "ら", "わ", "英", "数",
725  QChar(0x3089), QChar(0x308f), QChar(0x82f1), QChar(0x6570),
726 };
727 
729 {
730  for (auto search_char : kSearchChars)
731  {
732  new MythUIButtonListItem(m_alphabetList, QString(search_char));
733  }
734 }
735 
736 // search title_pronounce
737 // we hope japanese HIRAGANA and alphabets, numerics is inserted
738 // these character must required ZENKAKU
739 // because query work not fine, if mysql's default charset latin1
741 {
742  QDateTime progStart = MythDate::current();
743  int charNum = m_alphabetList->GetCurrentPos();
744 
745  where = "SELECT DISTINCT title FROM program "
746  "LEFT JOIN channel ON program.chanid = channel.chanid "
747  "WHERE channel.deleted IS NULL AND channel.visible > 0 ";
748 
749  switch (charNum) {
750  case 0:
751  where += "AND ( title_pronounce >= 'あ' AND title_pronounce <= 'お') ";
752  break;
753  case 1:
754  where += "AND ( title_pronounce >= 'か' AND title_pronounce <= 'ご') ";
755  break;
756  case 2:
757  where += "AND ( title_pronounce >= 'さ' AND title_pronounce <= 'そ') ";
758  break;
759  case 3:
760  where += "AND ( title_pronounce >= 'た' AND title_pronounce <= 'ど') ";
761  break;
762  case 4:
763  where += "AND ( title_pronounce >= 'な' AND title_pronounce <= 'の') ";
764  break;
765  case 5:
766  where += "AND ( title_pronounce >= 'は' AND title_pronounce <= 'ぽ') ";
767  break;
768  case 6:
769  where += "AND ( title_pronounce >= 'ま' AND title_pronounce <= 'も') ";
770  break;
771  case 7:
772  where += "AND ( title_pronounce >= 'や' AND title_pronounce <= 'よ') ";
773  break;
774  case 8:
775  where += "AND ( title_pronounce >= 'ら' AND title_pronounce <= 'ろ') ";
776  break;
777  case 9:
778  where += "AND ( title_pronounce >= 'わ' AND title_pronounce <= 'ん') ";
779  break;
780  case 10:
781  where += "AND ( title_pronounce >= 'A' AND title_pronounce <= 'z') ";
782  break;
783  case 11:
784  where += "AND ( title_pronounce >= '0' AND title_pronounce <= '9') ";
785  break;
786  }
787 
788  where += "AND starttime > :STARTTIME ";
789 
790  if (!m_searchStr.isEmpty())
791  {
792  where += "AND title_pronounce LIKE :SEARCH ";
793  bindings[":SEARCH"] = '%' + m_searchStr + '%';
794  }
795 
796  where += "ORDER BY title_pronounce;";
797 
798  bindings[":STARTTIME"] = progStart.addSecs(50 - progStart.time().second());
799 }
800 
801 
803 {
804  (void)data;
805  return true;
806 }
807 
808 bool JaProgFinder::formatSelectedData(QString& data, int charNum)
809 {
810  (void)data;
811  (void)charNum;
812  return true;
813 }
814 
816 {
817  (void)data;
818 }
819 
820 // Hebrew specific program finder
821 
822 // Hebrew alphabet list and more
823 const std::vector<QChar> HeProgFinder::kSearchChars
824 {
825  // "א", "ב", "ג", "ד",
826  QChar(0x5d0), QChar(0x5d1), QChar(0x5d2), QChar(0x5d3),
827  // "ה", "ו", "ז", "ח",
828  QChar(0x5d4), QChar(0x5d5), QChar(0x5d6), QChar(0x5d7),
829  // "ט", "י", "כ", "ל",
830  QChar(0x5d8), QChar(0x5d9), QChar(0x5db), QChar(0x5dc),
831  // "מ", "נ", "ס", "ע",
832  QChar(0x5de), QChar(0x5e0), QChar(0x5e1), QChar(0x5e2),
833  // "פ", "צ", "ק", "ר",
834  QChar(0x5e4), QChar(0x5e6), QChar(0x5e7), QChar(0x5e8),
835  // "ש", "ת", "E", "#",
836  QChar(0x5e9), QChar(0x5ea), QChar('E'), QChar('#'),
837 };
838 
840 {
841  for (auto search_char : kSearchChars)
842  {
843  new MythUIButtonListItem(m_alphabetList, QString(search_char));
844  }
845 }
846 
847 // search by hebrew aleph-bet
848 // # for all numbers, E for all latin
850 {
851  QDateTime progStart = MythDate::current();
852  QString searchChar = m_alphabetList->GetValue();
853 
854  if (searchChar.isEmpty())
855  searchChar = kSearchChars[0];
856 
857  where = "SELECT DISTINCT title FROM program "
858  "LEFT JOIN channel ON program.chanid = channel.chanid "
859  "WHERE channel.deleted IS NULL AND channel.visible > 0 ";
860 
861  if (searchChar.contains('E'))
862  {
863  where += "AND ( title REGEXP '^[A-Z]') ";
864  }
865  else if (searchChar.contains('#'))
866  {
867  where += "AND ( title REGEXP '^[0-9]') ";
868  }
869  else
870  {
871  QString one = searchChar + '%';
872  bindings[":ONE"] = one;
873  where += "AND ( title LIKE :ONE ) ";
874  }
875 
876  where += "AND starttime > :STARTTIME ";
877 
878  if (!m_searchStr.isEmpty())
879  {
880  where += "AND title LIKE :SEARCH ";
881  bindings[":SEARCH"] = '%' + m_searchStr + '%';
882  }
883 
884  where += "ORDER BY title;";
885 
886  bindings[":STARTTIME"] = progStart.addSecs(50 - progStart.time().second());
887 }
888 
890 {
891  (void)data;
892  return true;
893 }
894 
895 bool HeProgFinder::formatSelectedData(QString& data, int charNum)
896 {
897  (void)data;
898  (void)charNum;
899  return true;
900 }
901 
903 {
904  (void)data;
905 }
906 
908 
909 // Cyrrilic specific program finder
910 // Cyrrilic alphabet list and more
911 const std::vector<QChar> RuProgFinder::kSearchChars
912 {
913  // "А", "Б", "В", "Г",
914  QChar(0x410), QChar(0x411), QChar(0x412), QChar(0x413),
915  // "Д", "Е", "Ё", "Ж",
916  QChar(0x414), QChar(0x415), QChar(0x401), QChar(0x416),
917  // "З", "И", "Й", "К",
918  QChar(0x417), QChar(0x418), QChar(0x419), QChar(0x41a),
919  // "Л", "М", "Н", "О",
920  QChar(0x41b), QChar(0x41c), QChar(0x41d), QChar(0x41e),
921  // "П", "Р", "С", "Т",
922  QChar(0x41f), QChar(0x420), QChar(0x421), QChar(0x422),
923  // "У", "Ф", "Х", "Ц",
924  QChar(0x423), QChar(0x424), QChar(0x425), QChar(0x426),
925  // "Ч", "Ш", "Щ", "Ъ",
926  QChar(0x427), QChar(0x428), QChar(0x429), QChar(0x42a),
927  // "Ы", "ь", "Э", "Ю",
928  QChar(0x42b), QChar(0x44c), QChar(0x42d), QChar(0x42e),
929  // "Я", "0", "1", "2",
930  QChar(0x42f), QChar('0'), QChar('1'), QChar('2'),
931  QChar('3'), QChar('4'), QChar('5'), QChar('6'),
932  QChar('7'), QChar('8'), QChar('9'), QChar('@'),
933  QChar('A'), QChar('B'), QChar('C'), QChar('D'),
934  QChar('E'), QChar('F'), QChar('G'), QChar('H'),
935  QChar('I'), QChar('J'), QChar('K'), QChar('L'),
936  QChar('M'), QChar('N'), QChar('O'), QChar('P'),
937  QChar('Q'), QChar('R'), QChar('S'), QChar('T'),
938  QChar('U'), QChar('V'), QChar('W'), QChar('X'),
939  QChar('Y'), QChar('Z')
940 };
941 
943 {
944  for (auto search_char : kSearchChars)
945  {
946  new MythUIButtonListItem(m_alphabetList, search_char);
947  }
948 }
949 
950 // search by cyrillic and latin alphabet
951 // @ all programm
953 &bindings)
954 {
955  QDateTime progStart = MythDate::current();
956  QString searchChar = m_alphabetList->GetValue();
957 
958  if (searchChar.isEmpty())
959  searchChar = kSearchChars[0];
960 
961 
962  if (searchChar.contains('@'))
963  {
964  where = "SELECT DISTINCT title FROM program "
965  "LEFT JOIN channel ON program.chanid = channel.chanid "
966  "WHERE channel.deleted IS NULL AND "
967  " channel.visible > 0 AND "
968  "( "
969  "title NOT REGEXP '^[A-Z0-9]' AND "
970  "title NOT REGEXP '^The [A-Z0-9]' AND "
971  "title NOT REGEXP '^A [A-Z0-9]' AND "
972  "title NOT REGEXP '^[0-9]' AND "
973  "starttime > :STARTTIME ) ";
974  if (!m_searchStr.isEmpty())
975  {
976  where += "AND title LIKE :SEARCH ";
977  bindings[":SEARCH"] = '%' + m_searchStr + '%';
978  }
979 
980  where += "ORDER BY title;";
981 
982  bindings[":STARTTIME"] =
983  progStart.addSecs(50 - progStart.time().second());
984  }
985  else
986  {
987  QString one = searchChar + '%';
988  QString two = QString("The ") + one;
989  QString three = QString("A ") + one;
990  QString four = QString("An ") + one;
991  QString five = QString("\"") + one;
992 
993  where = "SELECT DISTINCT title FROM program "
994  "LEFT JOIN channel ON program.chanid = channel.chanid "
995  "WHERE channel.deleted IS NULL "
996  "AND channel.visible > 0 "
997  "AND ( title LIKE :ONE OR title LIKE :TWO "
998  " OR title LIKE :THREE "
999  " OR title LIKE :FOUR "
1000  " OR title LIKE :FIVE )"
1001  "AND starttime > :STARTTIME ";
1002  if (!m_searchStr.isEmpty())
1003  where += "AND title LIKE :SEARCH ";
1004 
1005  where += "ORDER BY title;";
1006 
1007  bindings[":ONE"] = one;
1008  bindings[":TWO"] = two;
1009  bindings[":THREE"] = three;
1010  bindings[":FOUR"] = four;
1011  bindings[":FIVE"] = five;
1012  bindings[":STARTTIME"] =
1013  progStart.addSecs(50 - progStart.time().second());
1014 
1015  if (!m_searchStr.isEmpty())
1016  bindings[":SEARCH"] = '%' + m_searchStr + '%';
1017  }
1018 }
1019 
1021 {
1022  (void)data;
1023  return true;
1024 }
1025 
1026 bool RuProgFinder::formatSelectedData(QString& data, int charNum)
1027 {
1028  (void)data;
1029  (void)charNum;
1030  return true;
1031 }
1032 
1034 {
1035  (void)data;
1036 }
1037 
1039 {
1040  return (GetFocusWidget() == m_timesList) ?
1041  m_showData[m_timesList->GetCurrentPos()] : nullptr;
1042 };
1043 
1045 
1047 {
1048  if (!LoadWindowFromXML("schedule-ui.xml", "searchpopup", this))
1049  return false;
1050 
1051  MythUIText *messageText = nullptr;
1052  MythUIButton *okButton = nullptr;
1053  MythUIButton *cancelButton = nullptr;
1054 
1055  bool err = false;
1056  UIUtilE::Assign(this, m_textEdit, "input", &err);
1057  UIUtilE::Assign(this, messageText, "message", &err);
1058  UIUtilE::Assign(this, okButton, "ok", &err);
1059  UIUtilW::Assign(this, cancelButton, "cancel");
1060 
1061  if (err)
1062  {
1063  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'searchpopup'");
1064  return false;
1065  }
1066 
1067  if (cancelButton)
1068  connect(cancelButton, &MythUIButton::Clicked, this, &MythScreenType::Close);
1069  connect(okButton, &MythUIButton::Clicked, this, &SearchInputDialog::sendResult);
1070 
1075 
1076  BuildFocusList();
1077 
1078  return true;
1079 }
1080 
1082 {
1083  QString inputString = m_textEdit->GetText();
1084  emit valueChanged(inputString);
1085 
1086  if (m_retObject)
1087  {
1088  //FIXME: add a new event type for this?
1089  auto *dce = new DialogCompletionEvent(m_id, 0, inputString, "");
1090  QCoreApplication::postEvent(m_retObject, dce);
1091  }
1092 }
1093 
1094 /* 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:98
MythScreenType::LoadInBackground
void LoadInBackground(const QString &message="")
Definition: mythscreentype.cpp:302
MSqlQuery::next
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:783
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:126
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:321
TVPlaybackState::RequestEmbedding
void RequestEmbedding(bool Embed, const QRect &Rect={}, const QStringList &Data={})
MythDate::toString
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
Definition: mythdate.cpp:80
ProgFinder::ShowGuide
void ShowGuide() const override
Definition: progfind.cpp:413
MythEvent::MythEventMessage
static Type MythEventMessage
Definition: mythevent.h:73
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:414
mythuitext.h
LoadFromScheduler
bool LoadFromScheduler(AutoDeleteDeque< TYPE * > &destination, bool &hasConflicts, const QString &altTable="", int recordid=-1)
Definition: programinfo.h:883
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:84
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:287
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:402
ScheduleCommon::customEvent
void customEvent(QEvent *event) override
Definition: schedulecommon.cpp:480
HeProgFinder::restoreSelectedData
void restoreSelectedData(QString &data) override
Definition: progfind.cpp:902
ProgFinder::~ProgFinder
~ProgFinder() override
Definition: progfind.cpp:126
ProgFinder::alphabetListItemSelected
void alphabetListItemSelected(MythUIButtonListItem *item)
Definition: progfind.cpp:140
ProgFinder::m_schedList
ProgramList m_schedList
Definition: progfind.h:75
MythMainWindow::TranslateKeyPress
bool TranslateKeyPress(const QString &context, QKeyEvent *e, QStringList &actions, bool allowJumps=true)
Get a list of actions for a keypress in the given context.
Definition: mythmainwindow.cpp:1139
RunProgramFinder
void RunProgramFinder(TV *player, bool embedVideo, bool allowEPG)
Definition: progfind.cpp:35
mythscreenstack.h
MSqlQuery::bindValues
void bindValues(const MSqlBindings &bindings)
Add all the bindings in the passed in bindings.
Definition: mythdbcon.cpp:879
MythTextInputDialog::m_id
QString m_id
Definition: mythdialogbox.h:289
DialogCompletionEvent::kEventType
static Type kEventType
Definition: mythdialogbox.h:57
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:374
MythUIButtonList::itemSelected
void itemSelected(MythUIButtonListItem *item)
MythEvent
This class is used as a container for messages.
Definition: mythevent.h:17
JaProgFinder::initAlphabetList
void initAlphabetList() override
Definition: progfind.cpp:728
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:198
MythScreenStack
Definition: mythscreenstack.h:16
mythdbcon.h
MSqlQuery::exec
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:603
MythTextInputDialog::m_defaultValue
QString m_defaultValue
Definition: mythdialogbox.h:285
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
show
static void show(uint8_t *buf, int length)
Definition: ringbuffer.cpp:339
ProgFinder::m_searchStr
QString m_searchStr
Definition: progfind.h:66
MythUITextEdit::GetText
QString GetText(void) const
Definition: mythuitextedit.h:47
progfind.h
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &stackname)
Definition: mythmainwindow.cpp:326
mythuibuttonlist.h
MythTextInputDialog::m_textEdit
MythUITextEdit * m_textEdit
Definition: mythdialogbox.h:283
ProgFinder::updateShowList
void updateShowList()
Definition: progfind.cpp:502
MythUIButtonList::GetCount
int GetCount() const
Definition: mythuibuttonlist.cpp:1655
ScheduleCommon::ShowDetails
virtual void ShowDetails(void) const
Show the Program Details screen.
Definition: schedulecommon.cpp:33
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:10
MythEvent::Message
const QString & Message() const
Definition: mythevent.h:65
ProgFinder::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: progfind.cpp:167
ProgFinder
Definition: progfind.h:24
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:274
ScheduleCommon::EditScheduled
virtual void EditScheduled(void)
Creates a dialog for editing the recording schedule.
Definition: schedulecommon.cpp:166
ProgFinder::m_timesList
MythUIButtonList * m_timesList
Definition: progfind.h:81
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:112
MythTextInputDialog::m_filter
InputFilter m_filter
Definition: mythdialogbox.h:286
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:55
mythuiutils.h
MythUIButtonListItem
Definition: mythuibuttonlist.h:28
MythUITextEdit::SetText
void SetText(const QString &text, bool moveCursor=true)
Definition: mythuitextedit.cpp:216
ScheduleCommon::ShowPrevious
virtual void ShowPrevious(void) const
Show the previous recordings for this recording rule.
Definition: schedulecommon.cpp:248
ProgFinder::timesListTakeFocus
void timesListTakeFocus(void)
Definition: progfind.cpp:161
RecStatus::toUIState
static QString toUIState(Type recstatus)
Definition: recStatus.cpp:4
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:388
ScheduleCommon::EditCustom
virtual void EditCustom(void)
Creates a dialog for creating a custom recording rule.
Definition: schedulecommon.cpp:202
JaProgFinder::kSearchChars
static const std::vector< QChar > kSearchChars
Definition: progfind.h:103
ProgFinder::showListTakeFocus
void showListTakeFocus(void)
Definition: progfind.cpp:156
MythUIButtonList::itemClicked
void itemClicked(MythUIButtonListItem *item)
ProgFinder::m_allowEPG
bool m_allowEPG
Definition: progfind.h:71
ProgFinder::Create
bool Create(void) override
Definition: progfind.cpp:66
MythUIButtonList::GetCurrentPos
int GetCurrentPos() const
Definition: mythuibuttonlist.h:190
tv_actions.h
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:117
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:138
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:535
ProgramInfo::GetTitle
QString GetTitle(void) const
Definition: programinfo.h:359
HeProgFinder::formatSelectedData
bool formatSelectedData(QString &data) override
Definition: progfind.cpp:889
MythDB::DBError
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:178
HeProgFinder::whereClauseGetSearchData
void whereClauseGetSearchData(QString &where, MSqlBindings &bindings) override
Definition: progfind.cpp:849
ProgFinder::m_help2Text
MythUIText * m_help2Text
Definition: progfind.h:85
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:222
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:22
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:16
ProgFinder::m_showList
MythUIButtonList * m_showList
Definition: progfind.h:80
MythTextInputDialog::m_retObject
QObject * m_retObject
Definition: mythdialogbox.h:288
SearchInputDialog::editChanged
void editChanged(void)
Definition: progfind.cpp:1081
MythUITextEdit::SetPassword
void SetPassword(bool isPassword)
Definition: mythuitextedit.h:50
JaProgFinder::whereClauseGetSearchData
void whereClauseGetSearchData(QString &where, MSqlBindings &bindings) override
Definition: progfind.cpp:740
MythUIButtonList::SetLCDTitles
void SetLCDTitles(const QString &title, const QString &columnList="")
Definition: mythuibuttonlist.cpp:3030
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:99
MythUITextEdit::SetFilter
void SetFilter(InputFilter filter)
Definition: mythuitextedit.h:49
SearchInputDialog
Definition: progfind.h:144
uint
unsigned int uint
Definition: compat.h:140
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:56
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:1778
MythScreenType::GetScreenStack
MythScreenStack * GetScreenStack() const
Definition: mythscreentype.cpp:233
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:815
RuProgFinder::initAlphabetList
void initAlphabetList() override
Definition: progfind.cpp:942
ProgFinder::ShowMenu
void ShowMenu(void) override
Definition: progfind.cpp:224
MythDate::kSimplify
@ kSimplify
Do Today/Yesterday/Tomorrow transform.
Definition: mythdate.h:23
MythUIButtonListItem::GetText
QString GetText(const QString &name="") const
Definition: mythuibuttonlist.cpp:3305
JaProgFinder::formatSelectedData
bool formatSelectedData(QString &data) override
Definition: progfind.cpp:802
ProgramInfo::GetChanID
uint GetChanID(void) const
This is the unique key used in the database to locate tuning information.
Definition: programinfo.h:370
ProgFinder::whereClauseGetSearchData
virtual void whereClauseGetSearchData(QString &where, MSqlBindings &bindings)
Definition: progfind.cpp:555
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:68
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:29
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythscreentype.cpp:414
RuProgFinder::restoreSelectedData
void restoreSelectedData(QString &data) override
Definition: progfind.cpp:1033
ProgFinder::m_currentLetter
QString m_currentLetter
Definition: progfind.h:67
ProgFinder::timesListLosingFocus
void timesListLosingFocus(void)
Definition: progfind.cpp:151
mythcorecontext.h
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:692
HeProgFinder
Definition: progfind.h:107
ProgFinder::selectShowData
void selectShowData(QString progTitle, int newCurShow)
Definition: progfind.cpp:520
RuProgFinder
Definition: progfind.h:125
LoadFromProgram
bool LoadFromProgram(ProgramList &destination, const QString &where, const QString &groupBy, const QString &orderBy, const MSqlBindings &bindings, const ProgramList &schedList)
Definition: programinfo.cpp:5458
ProgFinder::customEvent
void customEvent(QEvent *e) override
Definition: progfind.cpp:257
DialogCompletionEvent
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
Definition: mythdialogbox.h:42
HeProgFinder::initAlphabetList
void initAlphabetList() override
Definition: progfind.cpp:839
MythUIButtonList::GetValue
virtual QString GetValue() const
Definition: mythuibuttonlist.cpp:1609
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:134
MythScreenStack::PopScreen
virtual void PopScreen(MythScreenType *screen=nullptr, bool allowFade=true, bool deleteScreen=true)
Definition: mythscreenstack.cpp:83
ScheduleCommon::ShowUpcoming
virtual void ShowUpcoming(void) const
Show the upcoming recordings for this title.
Definition: schedulecommon.cpp:73
ScheduleCommon::QuickRecord
virtual void QuickRecord(void)
Create a kSingleRecord or bring up recording dialog.
Definition: schedulecommon.cpp:147
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:105
MythUIButtonList::MoveToNamedPosition
bool MoveToNamedPosition(const QString &position_name)
Definition: mythuibuttonlist.cpp:2282
MythUIButtonList::SetItemCurrent
void SetItemCurrent(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1557
build_compdb.action
action
Definition: build_compdb.py:9
mythuibutton.h
ProgFinder::GetCurrentProgram
ProgramInfo * GetCurrentProgram(void) const override
Definition: progfind.cpp:1038
MythUITextEdit::valueChanged
void valueChanged()
ScheduleCommon::ShowChannelSearch
virtual void ShowChannelSearch(void) const
Show the channel search.
Definition: schedulecommon.cpp:113
RuProgFinder::formatSelectedData
bool formatSelectedData(QString &data) override
Definition: progfind.cpp:1020
MythDate::kDateTimeFull
@ kDateTimeFull
Default local time.
Definition: mythdate.h:20
SearchInputDialog::Create
bool Create(void) override
Definition: progfind.cpp:1046
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:89
mythmainwindow.h
RuProgFinder::whereClauseGetSearchData
void whereClauseGetSearchData(QString &where, MSqlBindings &bindings) override
Definition: progfind.cpp:952
ProgFinder::m_allowKeypress
bool m_allowKeypress
Definition: progfind.h:72
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:49
query
MSqlQuery query(MSqlQuery::InitCon())
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:654
MythCoreContext::GetSetting
QString GetSetting(const QString &key, const QString &defaultval="")
Definition: mythcorecontext.cpp:915
MSqlQuery::prepare
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:808
tv_play.h
ProgFinder::restoreSelectedData
virtual void restoreSelectedData(QString &data)
Definition: progfind.cpp:706
TV
Control TV playback.
Definition: tv_play.h:153