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  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  handled = false;
210  }
211 
212  if (!handled && MythScreenType::keyPressEvent(event))
213  handled = true;
214 
215  m_allowKeypress = true;
216 
217  return handled;
218 }
219 
221 {
222  QString label = tr("Options");
223 
224  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
225  auto *menuPopup = new MythDialogBox(label, popupStack, "menuPopup");
226 
227  if (menuPopup->Create())
228  {
229  menuPopup->SetReturnEvent(this, "menu");
230 
231  if (!m_searchStr.isEmpty())
232  menuPopup->AddButton(tr("Clear Search"));
233  menuPopup->AddButton(tr("Edit Search"));
234  if (GetFocusWidget() == m_timesList && m_timesList->GetCount() > 0)
235  {
236  menuPopup->AddButton(tr("Toggle Record"));
237  menuPopup->AddButton(tr("Program Details"));
238  menuPopup->AddButton(tr("Upcoming"));
239  menuPopup->AddButton(tr("Previously Recorded"));
240  menuPopup->AddButton(tr("Custom Edit"));
241  menuPopup->AddButton(tr("Program Guide"));
242  menuPopup->AddButton(tr("Channel Search"));
243  }
244 
245  popupStack->AddScreen(menuPopup);
246  }
247  else
248  {
249  delete menuPopup;
250  }
251 }
252 
253 void ProgFinder::customEvent(QEvent *event)
254 {
255  if (event->type() == MythEvent::MythEventMessage)
256  {
257  auto *me = dynamic_cast<MythEvent *>(event);
258  if (me == nullptr)
259  return;
260 
261  const QString& message = me->Message();
262 
263  if (message == "SCHEDULE_CHANGE")
264  {
265  if (GetFocusWidget() == m_timesList)
266  {
268  if (curPick)
269  selectShowData(curPick->GetTitle(),
271  }
272  }
273  }
274  else if (event->type() == DialogCompletionEvent::kEventType)
275  {
276  auto *dce = (DialogCompletionEvent*)(event);
277 
278  QString resultid = dce->GetId();
279  QString resulttext = dce->GetResultText();
280 
281  if (resultid == "menu")
282  {
283  if (resulttext == tr("Clear Search"))
284  {
285  m_searchStr.clear();
286  if (m_searchText)
288  updateShowList();
290  }
291  else if (resulttext == tr("Edit Search"))
292  {
293  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
294  auto *textInput = new SearchInputDialog(popupStack, m_searchStr);
295 
296  if (textInput->Create())
297  {
298  textInput->SetReturnEvent(this, "searchtext");
299  popupStack->AddScreen(textInput);
300  }
301  }
302  else if (resulttext == tr("Toggle Record"))
303  {
304  QuickRecord();
305  }
306  else if (resulttext == tr("Program Details"))
307  {
308  ShowDetails();
309  }
310  else if (resulttext == tr("Upcoming"))
311  {
312  ShowUpcoming();
313  }
314  else if (resulttext == tr("Previously Recorded"))
315  {
316  ShowPrevious();
317  }
318  else if (resulttext == tr("Custom Edit"))
319  {
320  EditCustom();
321  }
322  else if (resulttext == tr("Program Guide"))
323  {
324  ShowGuide();
325  }
326  else if (resulttext == tr("Channel Search"))
327  {
329  }
330  }
331  else if (resultid == "searchtext")
332  {
333  m_searchStr = resulttext;
334  if (m_searchText)
336  updateShowList();
338  }
339  else
341  }
342 }
343 
345 {
346  if (m_help1Text)
347  m_help1Text->Reset();
348  if (m_help2Text)
349  m_help2Text->Reset();
350 
352  {
353  if (m_showList->GetCount() == 0)
354  {
355  if (m_help1Text)
356  m_help1Text->SetText(tr("No Programs"));
357  if (m_help2Text)
358  m_help2Text->SetText(tr("There are no available programs under this search. "
359  "Please select another search."));
360  }
361  else
362  {
363  if (m_help1Text)
364  m_help1Text->SetText(tr("Select a letter..."));
365  if (m_help2Text)
366  m_help2Text->SetText(tr("Pick the first letter of the program name, "
367  "then press SELECT or the right arrow."));
368  }
369 
371  }
372  else if (GetFocusWidget() == m_showList)
373  {
374  if (m_help1Text)
375  m_help1Text->SetText(tr("Select a program..."));
376  if (m_help2Text)
377  {
378  m_help2Text->SetText(tr("Select the title of the program you wish to find. "
379  "When finished return with the left arrow key. "
380  "Press SELECT to schedule a recording."));
381  }
382 
384  }
385  else if (GetFocusWidget() == m_timesList)
386  {
387  if (m_showData.empty())
388  {
390  if (m_help1Text)
391  m_help1Text->SetText(tr("No Programs"));
392  if (m_help2Text)
393  {
394  m_help2Text->SetText(tr("There are no available programs under "
395  "this search. Please select another "
396  "search."));
397  }
398  }
399  else
400  {
401  InfoMap infoMap;
402  m_showData[m_timesList->GetCurrentPos()]->ToMap(infoMap);
403  SetTextFromMap(infoMap);
404  m_infoMap = infoMap;
405  }
406  }
407 }
408 
410 {
411  if (m_allowEPG)
412  {
413  QString startchannel = gCoreContext->GetSetting("DefaultTVChannel");
414  uint startchanid = 0;
415  QDateTime starttime;
416 
417  if (GetFocusWidget() == m_timesList)
418  {
420  if (pginfo != nullptr)
421  {
422  startchannel = pginfo->GetChanNum();
423  startchanid = pginfo->GetChanID();
424  starttime = pginfo->GetScheduledStartTime();
425  }
426  }
427  GuideGrid::RunProgramGuide(startchanid, startchannel, starttime,
428  m_player, m_embedVideo, false, -2);
429  }
430 }
431 
433 {
434  if (GetFocusWidget() == m_timesList)
435  EditRecording();
436  else if (GetFocusWidget() == m_alphabetList && m_showList->GetCount())
438  else if (GetFocusWidget() == m_showList)
440 }
441 
443 {
444  InfoMap infoMap;
445 
446  m_timesList->Reset();
447 
448  if (!m_showData.empty())
449  {
450  QString itemText;
451  QDateTime starttime;
452  for (auto *show : m_showData)
453  {
454  starttime = show->GetScheduledStartTime();
455  itemText = MythDate::toString(starttime,
457 
458  auto *item = new MythUIButtonListItem(m_timesList, "");
459 
460  QString state = RecStatus::toUIState(show->GetRecordingStatus());
461  item->SetText(itemText, "buttontext", state);
462  item->DisplayState(state, "status");
463 
464  show->ToMap(infoMap);
465  item->SetTextFromMap(infoMap, state);
466  }
467  }
468 }
469 
471 {
472  m_showNames.clear();
473 
474  QString thequery;
475  MSqlBindings bindings;
476 
477  MSqlQuery query(MSqlQuery::InitCon());
478  whereClauseGetSearchData(thequery, bindings);
479 
480  query.prepare(thequery);
481  query.bindValues(bindings);
482  if (!query.exec())
483  {
484  MythDB::DBError("getShowNames", query);
485  return;
486  }
487 
488  QString data;
489  while (query.next())
490  {
491  data = query.value(0).toString();
492 
493  if (formatSelectedData(data))
494  m_showNames[data.toLower()] = data;
495  }
496 }
497 
499 {
500  m_showList->Reset();
501 
502  if (m_showNames.isEmpty())
503  getShowNames();
504 
505  ShowName::Iterator it;
506  for (it = m_showNames.begin(); it != m_showNames.end(); ++it)
507  {
508  QString tmpProgData = *it;
509  restoreSelectedData(tmpProgData);
510  new MythUIButtonListItem(m_showList, tmpProgData);
511  }
512 
513  m_showNames.clear();
514 }
515 
516 void ProgFinder::selectShowData(QString progTitle, int newCurShow)
517 {
518  progTitle = m_showList->GetValue();
519 
520  QDateTime progStart = MythDate::current();
521 
522  MSqlBindings bindings;
523  QString querystr = "WHERE program.title = :TITLE "
524  " AND program.endtime > :ENDTIME "
525  " AND channel.deleted IS NULL "
526  " AND channel.visible > 0 ";
527  bindings[":TITLE"] = progTitle;
528  bindings[":ENDTIME"] = progStart.addSecs(50 - progStart.time().second());
529 
531  LoadFromProgram(m_showData, querystr, bindings, m_schedList);
532 
533  updateTimesList();
534 
535  m_timesList->SetItemCurrent(newCurShow);
536 }
537 
539 {
540  for (int charNum = 48; charNum < 91; ++charNum)
541  {
542  if (charNum == 58)
543  charNum = 65;
544 
545  new MythUIButtonListItem(m_alphabetList, QString((char)charNum));
546  }
547 
548  new MythUIButtonListItem(m_alphabetList, QString('@'));
549 }
550 
551 void ProgFinder::whereClauseGetSearchData(QString &where, MSqlBindings &bindings)
552 {
553  QDateTime progStart = MythDate::current();
554  QString searchChar = m_alphabetList->GetValue();
555 
556  if (searchChar.isEmpty())
557  searchChar = "A";
558 
559  if (searchChar.contains('@'))
560  {
561  where = "SELECT DISTINCT title FROM program "
562  "LEFT JOIN channel ON program.chanid = channel.chanid "
563  "WHERE channel.deleted IS NULL AND "
564  " channel.visible > 0 AND "
565  "( title NOT REGEXP '^[A-Z0-9]' AND "
566  " title NOT REGEXP '^The [A-Z0-9]' AND "
567  " title NOT REGEXP '^A [A-Z0-9]' AND "
568  " title NOT REGEXP '^An [A-Z0-9]' AND "
569  " starttime > :STARTTIME ) ";
570  if (!m_searchStr.isEmpty())
571  {
572  where += "AND title LIKE :SEARCH ";
573  bindings[":SEARCH"] = '%' + m_searchStr + '%';
574  }
575 
576  where += "ORDER BY title;";
577 
578  bindings[":STARTTIME"] =
579  progStart.addSecs(50 - progStart.time().second());
580  }
581  else
582  {
583  QString one = searchChar + '%';
584  QString two = QString("The ") + one;
585  QString three = QString("A ") + one;
586  QString four = QString("An ") + one;
587 
588  where = "SELECT DISTINCT title FROM program "
589  "LEFT JOIN channel ON program.chanid = channel.chanid "
590  "WHERE channel.deleted IS NULL "
591  "AND channel.visible > 0 "
592  "AND ( title LIKE :ONE OR title LIKE :TWO "
593  " OR title LIKE :THREE "
594  " OR title LIKE :FOUR ) "
595  "AND starttime > :STARTTIME ";
596  if (!m_searchStr.isEmpty())
597  where += "AND title LIKE :SEARCH ";
598 
599  where += "ORDER BY title;";
600 
601  bindings[":ONE"] = one;
602  bindings[":TWO"] = two;
603  bindings[":THREE"] = three;
604  bindings[":FOUR"] = four;
605  bindings[":STARTTIME"] =
606  progStart.addSecs(50 - progStart.time().second());
607 
608  if (!m_searchStr.isEmpty())
609  bindings[":SEARCH"] = '%' + m_searchStr + '%';
610  }
611 }
612 
614 {
615  bool retval = true;
616  QString searchChar = m_alphabetList->GetValue();
617 
618  if (searchChar == "T")
619  {
620  if (!data.startsWith("The ") && !data.startsWith("A "))
621  {
622  // nothing, use as is
623  }
624  else if (data.startsWith("The T"))
625  data = data.mid(4) + ", The";
626  else if (data.startsWith("A T"))
627  data = data.mid(2) + ", A";
628  else
629  {
630  // don't add
631  retval = false;
632  }
633  }
634  else if (searchChar == "A")
635  {
636  if (!data.startsWith("The ") && !data.startsWith("A "))
637  {
638  // nothing, use as is
639  }
640  else if (data.startsWith("The A"))
641  data = data.mid(4) + ", The";
642  else if (data.startsWith("A A"))
643  data = data.mid(2) + ", A";
644  else if (data.startsWith("An A"))
645  data = data.mid(3) + ", An";
646  else
647  {
648  // don't add
649  retval = false;
650  }
651  }
652  else
653  {
654  if (data.startsWith("The "))
655  data = data.mid(4) + ", The";
656  else if (data.startsWith("A "))
657  data = data.mid(2) + ", A";
658  else if (data.startsWith("An "))
659  data = data.mid(3) + ", An";
660  }
661 
662  return retval;
663 }
664 
665 bool ProgFinder::formatSelectedData(QString& data, int charNum)
666 {
667  bool retval = true;
668 
669  if (charNum == 29 || charNum == 10)
670  {
671  if ((data.startsWith("The T") && charNum == 29) ||
672  (data.startsWith("The A") && charNum == 10))
673  data = data.mid(4) + ", The";
674  else if ((data.startsWith("A T") && charNum == 29) ||
675  (data.startsWith("A A") && charNum == 10))
676  data = data.mid(2) + ", A";
677  else if (data.startsWith("An A") && charNum == 10)
678  data = data.mid(3) + ", An";
679  else if (!data.startsWith("The ") && !data.startsWith("A "))
680  {
681  // use as is
682  }
683  else
684  {
685  // don't add
686  retval = false;
687  }
688  }
689  else
690  {
691  if (data.startsWith("The "))
692  data = data.mid(4) + ", The";
693  if (data.startsWith("A "))
694  data = data.mid(2) + ", A";
695  if (data.startsWith("An "))
696  data = data.mid(3) + ", An";
697  }
698 
699  return retval;
700 }
701 
703 {
704  if (data.endsWith(", The"))
705  data = "The " + data.left(data.length() - 5);
706  if (data.endsWith(", A"))
707  data = "A " + data.left(data.length() - 3);
708 }
709 
711 // Japanese specific program finder
712 
713 // japanese HIRAGANA list and more
714 const std::vector<QChar> JaProgFinder::kSearchChars
715 {
716  // "あ", "か", "さ", "た",
717  QChar(0x3042), QChar(0x304b), QChar(0x3055), QChar(0x305f),
718  // "な", "は", "ま", "や",
719  QChar(0x306a), QChar(0x306f), QChar(0x307e), QChar(0x3084),
720  // "ら", "わ", "英", "数",
721  QChar(0x3089), QChar(0x308f), QChar(0x82f1), QChar(0x6570),
722 };
723 
725 {
726  for (const auto& search_char : kSearchChars)
727  {
728  new MythUIButtonListItem(m_alphabetList, QString(search_char));
729  }
730 }
731 
732 // search title_pronounce
733 // we hope japanese HIRAGANA and alphabets, numerics is inserted
734 // these character must required ZENKAKU
735 // because query work not fine, if mysql's default charset latin1
737 {
738  QDateTime progStart = MythDate::current();
739  int charNum = m_alphabetList->GetCurrentPos();
740 
741  where = "SELECT DISTINCT title FROM program "
742  "LEFT JOIN channel ON program.chanid = channel.chanid "
743  "WHERE channel.deleted IS NULL AND channel.visible > 0 ";
744 
745  switch (charNum) {
746  case 0:
747  where += "AND ( title_pronounce >= 'あ' AND title_pronounce <= 'お') ";
748  break;
749  case 1:
750  where += "AND ( title_pronounce >= 'か' AND title_pronounce <= 'ご') ";
751  break;
752  case 2:
753  where += "AND ( title_pronounce >= 'さ' AND title_pronounce <= 'そ') ";
754  break;
755  case 3:
756  where += "AND ( title_pronounce >= 'た' AND title_pronounce <= 'ど') ";
757  break;
758  case 4:
759  where += "AND ( title_pronounce >= 'な' AND title_pronounce <= 'の') ";
760  break;
761  case 5:
762  where += "AND ( title_pronounce >= 'は' AND title_pronounce <= 'ぽ') ";
763  break;
764  case 6:
765  where += "AND ( title_pronounce >= 'ま' AND title_pronounce <= 'も') ";
766  break;
767  case 7:
768  where += "AND ( title_pronounce >= 'や' AND title_pronounce <= 'よ') ";
769  break;
770  case 8:
771  where += "AND ( title_pronounce >= 'ら' AND title_pronounce <= 'ろ') ";
772  break;
773  case 9:
774  where += "AND ( title_pronounce >= 'わ' AND title_pronounce <= 'ん') ";
775  break;
776  case 10:
777  where += "AND ( title_pronounce >= 'A' AND title_pronounce <= 'z') ";
778  break;
779  case 11:
780  where += "AND ( title_pronounce >= '0' AND title_pronounce <= '9') ";
781  break;
782  }
783 
784  where += "AND starttime > :STARTTIME ";
785 
786  if (!m_searchStr.isEmpty())
787  {
788  where += "AND title_pronounce LIKE :SEARCH ";
789  bindings[":SEARCH"] = '%' + m_searchStr + '%';
790  }
791 
792  where += "ORDER BY title_pronounce;";
793 
794  bindings[":STARTTIME"] = progStart.addSecs(50 - progStart.time().second());
795 }
796 
797 
799 {
800  (void)data;
801  return true;
802 }
803 
804 bool JaProgFinder::formatSelectedData(QString& data, int charNum)
805 {
806  (void)data;
807  (void)charNum;
808  return true;
809 }
810 
812 {
813  (void)data;
814 }
815 
816 // Hebrew specific program finder
817 
818 // Hebrew alphabet list and more
819 const std::vector<QChar> HeProgFinder::kSearchChars
820 {
821  // "א", "ב", "ג", "ד",
822  QChar(0x5d0), QChar(0x5d1), QChar(0x5d2), QChar(0x5d3),
823  // "ה", "ו", "ז", "ח",
824  QChar(0x5d4), QChar(0x5d5), QChar(0x5d6), QChar(0x5d7),
825  // "ט", "י", "כ", "ל",
826  QChar(0x5d8), QChar(0x5d9), QChar(0x5db), QChar(0x5dc),
827  // "מ", "נ", "ס", "ע",
828  QChar(0x5de), QChar(0x5e0), QChar(0x5e1), QChar(0x5e2),
829  // "פ", "צ", "ק", "ר",
830  QChar(0x5e4), QChar(0x5e6), QChar(0x5e7), QChar(0x5e8),
831  // "ש", "ת", "E", "#",
832  QChar(0x5e9), QChar(0x5ea), QChar('E'), QChar('#'),
833 };
834 
836 {
837  for (const auto& search_char : kSearchChars)
838  {
839  new MythUIButtonListItem(m_alphabetList, QString(search_char));
840  }
841 }
842 
843 // search by hebrew aleph-bet
844 // # for all numbers, E for all latin
846 {
847  QDateTime progStart = MythDate::current();
848  QString searchChar = m_alphabetList->GetValue();
849 
850  if (searchChar.isEmpty())
851  searchChar = kSearchChars[0];
852 
853  where = "SELECT DISTINCT title FROM program "
854  "LEFT JOIN channel ON program.chanid = channel.chanid "
855  "WHERE channel.deleted IS NULL AND channel.visible > 0 ";
856 
857  if (searchChar.contains('E'))
858  {
859  where += "AND ( title REGEXP '^[A-Z]') ";
860  }
861  else if (searchChar.contains('#'))
862  {
863  where += "AND ( title REGEXP '^[0-9]') ";
864  }
865  else
866  {
867  QString one = searchChar + '%';
868  bindings[":ONE"] = one;
869  where += "AND ( title LIKE :ONE ) ";
870  }
871 
872  where += "AND starttime > :STARTTIME ";
873 
874  if (!m_searchStr.isEmpty())
875  {
876  where += "AND title LIKE :SEARCH ";
877  bindings[":SEARCH"] = '%' + m_searchStr + '%';
878  }
879 
880  where += "ORDER BY title;";
881 
882  bindings[":STARTTIME"] = progStart.addSecs(50 - progStart.time().second());
883 }
884 
886 {
887  (void)data;
888  return true;
889 }
890 
891 bool HeProgFinder::formatSelectedData(QString& data, int charNum)
892 {
893  (void)data;
894  (void)charNum;
895  return true;
896 }
897 
899 {
900  (void)data;
901 }
902 
904 
905 // Cyrrilic specific program finder
906 // Cyrrilic alphabet list and more
907 const std::vector<QChar> RuProgFinder::kSearchChars
908 {
909  // "А", "Б", "В", "Г",
910  QChar(0x410), QChar(0x411), QChar(0x412), QChar(0x413),
911  // "Д", "Е", "Ё", "Ж",
912  QChar(0x414), QChar(0x415), QChar(0x401), QChar(0x416),
913  // "З", "И", "Й", "К",
914  QChar(0x417), QChar(0x418), QChar(0x419), QChar(0x41a),
915  // "Л", "М", "Н", "О",
916  QChar(0x41b), QChar(0x41c), QChar(0x41d), QChar(0x41e),
917  // "П", "Р", "С", "Т",
918  QChar(0x41f), QChar(0x420), QChar(0x421), QChar(0x422),
919  // "У", "Ф", "Х", "Ц",
920  QChar(0x423), QChar(0x424), QChar(0x425), QChar(0x426),
921  // "Ч", "Ш", "Щ", "Ъ",
922  QChar(0x427), QChar(0x428), QChar(0x429), QChar(0x42a),
923  // "Ы", "ь", "Э", "Ю",
924  QChar(0x42b), QChar(0x44c), QChar(0x42d), QChar(0x42e),
925  // "Я", "0", "1", "2",
926  QChar(0x42f), QChar('0'), QChar('1'), QChar('2'),
927  QChar('3'), QChar('4'), QChar('5'), QChar('6'),
928  QChar('7'), QChar('8'), QChar('9'), QChar('@'),
929  QChar('A'), QChar('B'), QChar('C'), QChar('D'),
930  QChar('E'), QChar('F'), QChar('G'), QChar('H'),
931  QChar('I'), QChar('J'), QChar('K'), QChar('L'),
932  QChar('M'), QChar('N'), QChar('O'), QChar('P'),
933  QChar('Q'), QChar('R'), QChar('S'), QChar('T'),
934  QChar('U'), QChar('V'), QChar('W'), QChar('X'),
935  QChar('Y'), QChar('Z')
936 };
937 
939 {
940  for (const auto& search_char : kSearchChars)
941  {
942  new MythUIButtonListItem(m_alphabetList, search_char);
943  }
944 }
945 
946 // search by cyrillic and latin alphabet
947 // @ all programm
949 &bindings)
950 {
951  QDateTime progStart = MythDate::current();
952  QString searchChar = m_alphabetList->GetValue();
953 
954  if (searchChar.isEmpty())
955  searchChar = kSearchChars[0];
956 
957 
958  if (searchChar.contains('@'))
959  {
960  where = "SELECT DISTINCT title FROM program "
961  "LEFT JOIN channel ON program.chanid = channel.chanid "
962  "WHERE channel.deleted IS NULL AND "
963  " channel.visible > 0 AND "
964  "( "
965  "title NOT REGEXP '^[A-Z0-9]' AND "
966  "title NOT REGEXP '^The [A-Z0-9]' AND "
967  "title NOT REGEXP '^A [A-Z0-9]' AND "
968  "title NOT REGEXP '^[0-9]' AND "
969  "starttime > :STARTTIME ) ";
970  if (!m_searchStr.isEmpty())
971  {
972  where += "AND title LIKE :SEARCH ";
973  bindings[":SEARCH"] = '%' + m_searchStr + '%';
974  }
975 
976  where += "ORDER BY title;";
977 
978  bindings[":STARTTIME"] =
979  progStart.addSecs(50 - progStart.time().second());
980  }
981  else
982  {
983  QString one = searchChar + '%';
984  QString two = QString("The ") + one;
985  QString three = QString("A ") + one;
986  QString four = QString("An ") + one;
987  QString five = QString("\"") + one;
988 
989  where = "SELECT DISTINCT title FROM program "
990  "LEFT JOIN channel ON program.chanid = channel.chanid "
991  "WHERE channel.deleted IS NULL "
992  "AND channel.visible > 0 "
993  "AND ( title LIKE :ONE OR title LIKE :TWO "
994  " OR title LIKE :THREE "
995  " OR title LIKE :FOUR "
996  " OR title LIKE :FIVE )"
997  "AND starttime > :STARTTIME ";
998  if (!m_searchStr.isEmpty())
999  where += "AND title LIKE :SEARCH ";
1000 
1001  where += "ORDER BY title;";
1002 
1003  bindings[":ONE"] = one;
1004  bindings[":TWO"] = two;
1005  bindings[":THREE"] = three;
1006  bindings[":FOUR"] = four;
1007  bindings[":FIVE"] = five;
1008  bindings[":STARTTIME"] =
1009  progStart.addSecs(50 - progStart.time().second());
1010 
1011  if (!m_searchStr.isEmpty())
1012  bindings[":SEARCH"] = '%' + m_searchStr + '%';
1013  }
1014 }
1015 
1017 {
1018  (void)data;
1019  return true;
1020 }
1021 
1022 bool RuProgFinder::formatSelectedData(QString& data, int charNum)
1023 {
1024  (void)data;
1025  (void)charNum;
1026  return true;
1027 }
1028 
1030 {
1031  (void)data;
1032 }
1033 
1035 {
1036  return (GetFocusWidget() == m_timesList) ?
1037  m_showData[m_timesList->GetCurrentPos()] : nullptr;
1038 };
1039 
1041 
1043 {
1044  if (!LoadWindowFromXML("schedule-ui.xml", "searchpopup", this))
1045  return false;
1046 
1047  MythUIText *messageText = nullptr;
1048  MythUIButton *okButton = nullptr;
1049  MythUIButton *cancelButton = nullptr;
1050 
1051  bool err = false;
1052  UIUtilE::Assign(this, m_textEdit, "input", &err);
1053  UIUtilE::Assign(this, messageText, "message", &err);
1054  UIUtilE::Assign(this, okButton, "ok", &err);
1055  UIUtilW::Assign(this, cancelButton, "cancel");
1056 
1057  if (err)
1058  {
1059  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'searchpopup'");
1060  return false;
1061  }
1062 
1063  if (cancelButton)
1064  connect(cancelButton, &MythUIButton::Clicked, this, &MythScreenType::Close);
1065  connect(okButton, &MythUIButton::Clicked, this, &SearchInputDialog::sendResult);
1066 
1071 
1072  BuildFocusList();
1073 
1074  return true;
1075 }
1076 
1078 {
1079  QString inputString = m_textEdit->GetText();
1080  emit valueChanged(inputString);
1081 
1082  if (m_retObject)
1083  {
1084  //FIXME: add a new event type for this?
1085  auto *dce = new DialogCompletionEvent(m_id, 0, inputString, "");
1086  QCoreApplication::postEvent(m_retObject, dce);
1087  }
1088 }
1089 
1090 /* 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:101
MythScreenType::LoadInBackground
void LoadInBackground(const QString &message="")
Definition: mythscreentype.cpp:286
MSqlQuery::next
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:807
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:128
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:315
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:409
MythEvent::MythEventMessage
static Type MythEventMessage
Definition: mythevent.h:79
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
LoadFromScheduler
bool LoadFromScheduler(AutoDeleteDeque< TYPE * > &destination, bool &hasConflicts, const QString &altTable="", int recordid=-1)
Definition: programinfo.h:912
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:82
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:386
ScheduleCommon::customEvent
void customEvent(QEvent *event) override
Definition: schedulecommon.cpp:481
HeProgFinder::restoreSelectedData
void restoreSelectedData(QString &data) override
Definition: progfind.cpp:898
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:903
MythTextInputDialog::m_id
QString m_id
Definition: mythdialogbox.h:340
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:376
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:724
ProgFinder::formatSelectedData
virtual bool formatSelectedData(QString &data)
Definition: progfind.cpp:613
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:205
MythScreenStack
Definition: mythscreenstack.h:16
mythdbcon.h
MSqlQuery::exec
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:608
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:339
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:498
MythUIButtonList::GetCount
int GetCount() const
Definition: mythuibuttonlist.cpp:1652
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: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:113
MythTextInputDialog::m_filter
InputFilter m_filter
Definition: mythdialogbox.h:337
MythUIType::TakingFocus
void TakingFocus()
ProgFinder::select
void select()
Definition: progfind.cpp:432
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:219
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:157
ProgFinder::initAlphabetList
virtual void initAlphabetList(void)
Definition: progfind.cpp:538
ProgramInfo::GetScheduledStartTime
QDateTime GetScheduledStartTime(void) const
The scheduled start time of program.
Definition: programinfo.h:390
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: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:1104
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:238
tv_actions.h
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:118
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:166
ProgFinder::updateTimesList
void updateTimesList()
Definition: progfind.cpp:442
MSqlQuery::InitCon
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:540
ProgramInfo::GetTitle
QString GetTitle(void) const
Definition: programinfo.h:361
HeProgFinder::formatSelectedData
bool formatSelectedData(QString &data) override
Definition: progfind.cpp:885
MythDB::DBError
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:227
HeProgFinder::whereClauseGetSearchData
void whereClauseGetSearchData(QString &where, MSqlBindings &bindings) override
Definition: progfind.cpp:845
ProgFinder::m_help2Text
MythUIText * m_help2Text
Definition: progfind.h:85
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:206
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:344
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:1077
MythUITextEdit::SetPassword
void SetPassword(bool isPassword)
Definition: mythuitextedit.h:53
JaProgFinder::whereClauseGetSearchData
void whereClauseGetSearchData(QString &where, MSqlBindings &bindings) override
Definition: progfind.cpp:736
MythUIButtonList::SetLCDTitles
void SetLCDTitles(const QString &title, const QString &columnList="")
Definition: mythuibuttonlist.cpp:3034
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:79
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:54
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:1771
MythScreenType::GetScreenStack
MythScreenStack * GetScreenStack() const
Definition: mythscreentype.cpp:217
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:811
RuProgFinder::initAlphabetList
void initAlphabetList() override
Definition: progfind.cpp:938
ProgFinder::ShowMenu
void ShowMenu(void) override
Definition: progfind.cpp:220
MythDate::kSimplify
@ kSimplify
Do Today/Yesterday/Tomorrow transform.
Definition: mythdate.h:26
MythUIButtonListItem::GetText
QString GetText(const QString &name="") const
Definition: mythuibuttonlist.cpp:3315
JaProgFinder::formatSelectedData
bool formatSelectedData(QString &data) override
Definition: progfind.cpp:798
ProgramInfo::GetChanID
uint GetChanID(void) const
This is the unique key used in the database to locate tuning information.
Definition: programinfo.h:372
ProgFinder::whereClauseGetSearchData
virtual void whereClauseGetSearchData(QString &where, MSqlBindings &bindings)
Definition: progfind.cpp:551
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:404
RuProgFinder::restoreSelectedData
void restoreSelectedData(QString &data) override
Definition: progfind.cpp:1029
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:695
HeProgFinder
Definition: progfind.h:106
ProgFinder::selectShowData
void selectShowData(QString progTitle, int newCurShow)
Definition: progfind.cpp:516
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:5642
ProgFinder::customEvent
void customEvent(QEvent *e) override
Definition: progfind.cpp:253
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:835
MythUIButtonList::GetValue
virtual QString GetValue() const
Definition: mythuibuttonlist.cpp:1606
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:132
MythScreenStack::PopScreen
virtual void PopScreen(MythScreenType *screen=nullptr, bool allowFade=true, bool deleteScreen=true)
Definition: mythscreenstack.cpp:84
ScheduleCommon::ShowUpcoming
virtual void ShowUpcoming(void) const
Show the upcoming recordings for this title.
Definition: schedulecommon.cpp:67
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:116
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:102
MythUIButtonList::MoveToNamedPosition
bool MoveToNamedPosition(const QString &position_name)
Definition: mythuibuttonlist.cpp:2279
MythUIButtonList::SetItemCurrent
void SetItemCurrent(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1554
build_compdb.action
action
Definition: build_compdb.py:9
mythuibutton.h
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &Stackname)
Definition: mythmainwindow.cpp:320
ProgFinder::GetCurrentProgram
ProgramInfo * GetCurrentProgram(void) const override
Definition: progfind.cpp:1034
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:1016
MythDate::kDateTimeFull
@ kDateTimeFull
Default local time.
Definition: mythdate.h:23
SearchInputDialog::Create
bool Create(void) override
Definition: progfind.cpp:1042
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:948
ProgFinder::m_allowKeypress
bool m_allowKeypress
Definition: progfind.h:72
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:50
MythObservable::removeListener
void removeListener(QObject *listener)
Remove a listener to the observable.
Definition: mythobservable.cpp:55
ProgFinder::getShowNames
void getShowNames(void)
Definition: progfind.cpp:470
MythTextInputDialog::sendResult
void sendResult()
Definition: mythdialogbox.cpp:662
MythCoreContext::GetSetting
QString GetSetting(const QString &key, const QString &defaultval="")
Definition: mythcorecontext.cpp:896
MSqlQuery::prepare
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:832
tv_play.h
ProgFinder::restoreSelectedData
virtual void restoreSelectedData(QString &data)
Definition: progfind.cpp:702
TV
Control TV playback.
Definition: tv_play.h:154