MythTV  master
guidegrid.cpp
Go to the documentation of this file.
1 
2 #include "guidegrid.h"
3 
4 // c/c++
5 #include <algorithm>
6 #include <cstdint> // for uint64_t
7 #include <deque> // for _Deque_iterator, operator!=, etc
8 
9 //qt
10 #include <QCoreApplication>
11 #include <QDateTime>
12 #include <QKeyEvent>
13 
14 // libmythbase
15 #include "mythdate.h"
16 #include "mythcorecontext.h"
17 #include "mythdbcon.h"
18 #include "mythlogging.h"
19 #include "autodeletedeque.h" // for AutoDeleteDeque, etc
20 #include "mythevent.h" // for MythEvent, etc
21 #include "mythtypes.h" // for InfoMap
22 
23 // libmyth
24 #include "programtypes.h" // for RecStatus, etc
25 
26 // libmythtv
27 #include "remoteutil.h"
28 #include "channelutil.h"
29 #include "cardutil.h"
30 #include "tvremoteutil.h"
31 #include "channelinfo.h"
32 #include "programinfo.h"
33 #include "recordingrule.h"
34 #include "tv_play.h"
35 #include "tv.h" // for ::kState_WatchingLiveTV
36 #include "tv_actions.h" // for ACTION_CHANNELSEARCH, etc
37 #include "recordingtypes.h" // for toString, etc
38 
39 // libmythui
40 #include "mythuibuttonlist.h"
41 #include "mythuiguidegrid.h"
42 #include "mythuistatetype.h"
43 #include "mythdialogbox.h"
44 #include "mythuiimage.h"
45 #include "mythuitext.h"
46 #include "mythmainwindow.h" // for GetMythMainWindow, etc
47 #include "mythrect.h" // for MythRect
48 #include "mythscreenstack.h" // for MythScreenStack
49 #include "mythscreentype.h" // for MythScreenType
50 #include "mythuiactions.h" // for ACTION_SELECT, ACTION_DOWN, etc
51 #include "mythuiutils.h" // for UIUtilW, UIUtilE
52 #include "mythgesture.h"
53 
54 // mythfrontend
55 #include "progfind.h"
56 
57 QWaitCondition epgIsVisibleCond;
58 
59 #define LOC QString("GuideGrid: ")
60 #define LOC_ERR QString("GuideGrid, Error: ")
61 #define LOC_WARN QString("GuideGrid, Warning: ")
62 
63 const QString kUnknownTitle = "";
64 //const QString kUnknownCategory = QObject::tr("Unknown");
65 static constexpr std::chrono::milliseconds kUpdateMS { 60s }; // Grid update interval
66 static bool SelectionIsTunable(const ChannelInfoList &selection);
67 
69  JumpToChannelListener *parent, QString start_entry,
70  int start_chan_idx, int cur_chan_idx, uint rows_disp) :
71  m_listener(parent),
72  m_entry(std::move(start_entry)),
73  m_previousStartChannelIndex(start_chan_idx),
74  m_previousCurrentChannelIndex(cur_chan_idx),
75  m_rowsDisplayed(rows_disp),
76  m_timer(new QTimer(this))
77 {
78  if (parent && m_timer)
79  {
81  m_timer->setSingleShot(true);
82  }
83  Update();
84 }
85 
86 
88 {
89  if (m_listener)
90  {
91  m_listener->SetJumpToChannel(nullptr);
92  m_listener = nullptr;
93  }
94 
95  if (m_timer)
96  {
97  m_timer->stop();
98  m_timer = nullptr;
99  }
100 
101  QObject::deleteLater();
102 }
103 
104 
105 static bool has_action(const QString& action, const QStringList &actions)
106 {
107  QStringList::const_iterator it;
108  for (it = actions.begin(); it != actions.end(); ++it)
109  {
110  if (action == *it)
111  return true;
112  }
113  return false;
114 }
115 
116 bool JumpToChannel::ProcessEntry(const QStringList &actions, const QKeyEvent *e)
117 {
118  if (!m_listener)
119  return false;
120 
121  if (has_action("ESCAPE", actions))
122  {
125  deleteLater();
126  return true;
127  }
128 
129  if (has_action("DELETE", actions))
130  {
131  if (!m_entry.isEmpty())
132  m_entry = m_entry.left(m_entry.length()-1);
133  Update();
134  return true;
135  }
136 
137  if (has_action(ACTION_SELECT, actions))
138  {
139  if (Update())
140  deleteLater();
141  return true;
142  }
143 
144  QString txt = e->text();
145  bool isUInt = false;
146  // cppcheck-suppress ignoredReturnValue
147  txt.toUInt(&isUInt);
148  if (isUInt)
149  {
150  m_entry += txt;
151  Update();
152  return true;
153  }
154 
155  if (!m_entry.isEmpty() && (txt=="_" || txt=="-" || txt=="#" || txt=="."))
156  {
157  m_entry += txt;
158  Update();
159  return true;
160  }
161 
162  return false;
163 }
164 
166 {
167  if (!m_timer || !m_listener)
168  return false;
169 
170  m_timer->stop();
171 
172  // find the closest channel ...
173  int i = m_listener->FindChannel(0, m_entry, false);
174  if (i >= 0)
175  {
176  // setup the timeout timer for jump mode
178 
179  // rows_displayed to center
180  int start = i - m_rowsDisplayed/2;
181  int cur = m_rowsDisplayed/2;
182  m_listener->GoTo(start, cur);
183  return true;
184  }
185 
186  // prefix must be invalid.. reset entry..
188  return false;
189 }
190 
191 // GuideStatus is used for transferring the relevant read-only data
192 // from GuideGrid to the GuideUpdateProgramRow constructor.
194 {
195 public:
196  GuideStatus(unsigned int firstRow, unsigned int numRows,
197  QVector<int> channums,
198  const MythRect &gg_programRect,
199  int gg_channelCount,
200  QDateTime currentStartTime,
201  QDateTime currentEndTime,
202  uint currentStartChannel,
203  int currentRow, int currentCol,
204  int channelCount, int timeCount,
205  bool verticalLayout,
206  QDateTime firstTime, QDateTime lastTime)
207  : m_firstRow(firstRow), m_numRows(numRows),
208  m_chanNums(std::move(channums)),
209  m_ggProgramRect(gg_programRect), m_ggChannelCount(gg_channelCount),
210  m_currentStartTime(std::move(currentStartTime)),
211  m_currentEndTime(std::move(currentEndTime)),
212  m_currentStartChannel(currentStartChannel), m_currentRow(currentRow),
213  m_currentCol(currentCol), m_channelCount(channelCount),
214  m_timeCount(timeCount), m_verticalLayout(verticalLayout),
215  m_firstTime(std::move(firstTime)), m_lastTime(std::move(lastTime)) {}
216  const unsigned int m_firstRow, m_numRows;
217  const QVector<int> m_chanNums;
219  const int m_ggChannelCount;
224  const bool m_verticalLayout;
225  const QDateTime m_firstTime, m_lastTime;
226 };
227 
229 {
230 public:
231  explicit GuideUpdaterBase(GuideGrid *guide) : m_guide(guide) {}
232  virtual ~GuideUpdaterBase() = default;
233 
234  // Execute the initial non-UI part (in a separate thread). Return
235  // true if ExecuteUI() should be run later, or false if the work
236  // is no longer relevant (e.g., the UI elements have scrolled
237  // offscreen by now).
238  virtual bool ExecuteNonUI(void) = 0;
239  // Execute the UI part in the UI thread.
240  virtual void ExecuteUI(void) = 0;
241 
242 protected:
243  GuideGrid *m_guide {nullptr};
244 };
245 
247 {
248 public:
250  QVector<ProgramList*> proglists)
251  : GuideUpdaterBase(guide),
253  m_numRows(gs.m_numRows),
267  m_proglists(std::move(proglists)) {}
268  ~GuideUpdateProgramRow() override = default;
269  bool ExecuteNonUI(void) override // GuideUpdaterBase
270  {
271  // Don't bother to do any work if the starting coordinates of
272  // the guide have changed while the thread was waiting to
273  // start.
276  {
277  return false;
278  }
279 
280  for (unsigned int i = 0; i < m_numRows; ++i)
281  {
282  unsigned int row = i + m_firstRow;
283  if (!m_proglists[i])
284  m_proglists[i] =
288  m_proglists[i]);
289  }
290  return true;
291  }
292  void ExecuteUI(void) override // GuideUpdaterBase
293  {
297  }
298 
299 private:
300  void fillProgramRowInfosWith(int row, const QDateTime& start,
301  ProgramList *proglist);
302 
303  const unsigned int m_firstRow;
304  const unsigned int m_numRows;
305  const QVector<int> m_chanNums;
307  const int m_ggChannelCount;
308  const QDateTime m_currentStartTime;
309  const QDateTime m_currentEndTime;
311  const int m_currentRow;
312  const int m_currentCol;
313  const int m_channelCount;
314  const int m_timeCount;
315  const bool m_verticalLayout;
316  const QDateTime m_firstTime;
317  const QDateTime m_lastTime;
318 
319  QVector<ProgramList*> m_proglists;
321  int m_progPast {0};
322  std::list<GuideUIElement> m_result;
323 };
324 
326 {
327 public:
328  GuideUpdateChannels(GuideGrid *guide, uint startChan)
329  : GuideUpdaterBase(guide), m_currentStartChannel(startChan) {}
330  bool ExecuteNonUI(void) override // GuideUpdaterBase
331  {
333  return false;
335  return true;
336  }
337  void ExecuteUI(void) override // GuideUpdaterBase
338  {
340  }
342  QVector<ChannelInfo *> m_chinfos;
343  QVector<bool> m_unavailables;
344 };
345 
346 class UpdateGuideEvent : public QEvent
347 {
348 public:
349  explicit UpdateGuideEvent(GuideUpdaterBase *updater) :
350  QEvent(kEventType), m_updater(updater) {}
352  static Type kEventType;
353 };
354 QEvent::Type UpdateGuideEvent::kEventType =
355  (QEvent::Type) QEvent::registerEventType();
356 
357 class GuideHelper : public QRunnable
358 {
359 public:
361  : m_guide(guide), m_updater(updater)
362  {
363  QMutexLocker locker(&s_lock);
364  ++s_loading[m_guide];
365  }
366  void run(void) override // QRunnable
367  {
368  QThread::currentThread()->setPriority(QThread::IdlePriority);
369  if (m_updater)
370  {
371  if (m_updater->ExecuteNonUI())
372  {
373  QCoreApplication::postEvent(m_guide,
375  }
376  else
377  {
378  delete m_updater;
379  m_updater = nullptr;
380  }
381  }
382 
383  QMutexLocker locker(&s_lock);
384  --s_loading[m_guide];
385  if (!s_loading[m_guide])
386  s_wait.wakeAll();
387  }
388  static bool IsLoading(GuideGrid *guide)
389  {
390  QMutexLocker locker(&s_lock);
391  return s_loading[guide] != 0U;
392  }
393  static void Wait(GuideGrid *guide)
394  {
395  QMutexLocker locker(&s_lock);
396  while (s_loading[guide])
397  {
398  if (!s_wait.wait(locker.mutex(), 15000UL))
399  return;
400  }
401  }
402 private:
403  GuideGrid *m_guide {nullptr};
405 
406  static QMutex s_lock;
407  static QWaitCondition s_wait;
408  static QHash<GuideGrid*,uint> s_loading;
409 };
410 QMutex GuideHelper::s_lock;
411 QWaitCondition GuideHelper::s_wait;
412 QHash<GuideGrid*,uint> GuideHelper::s_loading;
413 
414 void GuideGrid::RunProgramGuide(uint chanid, const QString &channum,
415  const QDateTime &startTime,
416  TV *player, bool embedVideo,
417  bool allowFinder, int changrpid)
418 {
419  // which channel group should we default to
420  if (changrpid == -2)
421  changrpid = gCoreContext->GetNumSetting("ChannelGroupDefault", -1);
422 
423  // check there are some channels setup
425  0, true, "", (changrpid<0) ? 0 : changrpid);
426  if (channels.empty())
427  {
428  QString message;
429  if (changrpid == -1)
430  {
431  message = tr("You don't have any channels defined in the database."
432  "\n\t\t\tThe program guide will have nothing to show you.");
433  }
434  else
435  {
436  message = tr("Channel group '%1' doesn't have any channels defined."
437  "\n\t\t\tThe program guide will have nothing to show you.")
438  .arg(ChannelGroup::GetChannelGroupName(changrpid));
439  }
440 
441  LOG(VB_GENERAL, LOG_WARNING, LOC + message);
442 
443  if (!player)
444  ShowOkPopup(message);
445  else if (allowFinder)
446  emit player->RequestEmbedding(false);
447  return;
448  }
449 
450  // If chanid/channum are unset, find the channel that would
451  // naturally be selected when Live TV is started. This depends on
452  // the available tuners, their capturecard.livetvorder values, and
453  // their capturecard.startchan values.
454  QString actualChannum = channum;
455  if (chanid == 0 && actualChannum.isEmpty())
456  {
457  uint defaultChanid = gCoreContext->GetNumSetting("DefaultChanid", 0);
458  if (defaultChanid && TV::IsTunable(defaultChanid))
459  chanid = defaultChanid;
460  }
461  if (chanid == 0 && actualChannum.isEmpty())
462  {
463  vector<uint> inputIDs = RemoteRequestFreeInputList(0);
464  if (!inputIDs.empty())
465  actualChannum = CardUtil::GetStartingChannel(inputIDs[0]);
466  }
467 
469  auto *gg = new GuideGrid(mainStack, chanid, actualChannum, startTime,
470  player, embedVideo, allowFinder, changrpid);
471 
472  if (gg->Create())
473  mainStack->AddScreen(gg, (player == nullptr));
474  else
475  delete gg;
476 }
477 
479  uint chanid, QString channum, const QDateTime &startTime,
480  TV *player, bool embedVideo,
481  bool allowFinder, int changrpid)
482  : ScheduleCommon(parent, "guidegrid"),
483  m_selectRecThreshold(gCoreContext->GetDurSetting<std::chrono::minutes>("SelChangeRecThreshold", 16min)),
484  m_allowFinder(allowFinder),
485  m_startChanID(chanid),
486  m_startChanNum(std::move(channum)),
487  m_sortReverse(gCoreContext->GetBoolSetting("EPGSortReverse", false)),
488  m_player(player),
489  m_embedVideo(embedVideo),
490  m_channelOrdering(gCoreContext->GetSetting("ChannelOrdering", "channum")),
491  m_updateTimer(new QTimer(this)),
492  m_threadPool("GuideGridHelperPool"),
493  m_changrpid(changrpid),
494  m_changrplist(ChannelGroup::GetChannelGroups(false))
495 {
497 
498  for (uint i = 0; i < MAX_DISPLAY_CHANS; i++)
499  m_programs.push_back(nullptr);
500 
502  if (startTime.isValid() &&
503  startTime > m_originalStartTime.addSecs(-8 * 3600))
504  m_originalStartTime = startTime;
505 
506  int secsoffset = -((m_originalStartTime.time().minute() % 30) * 60 +
507  m_originalStartTime.time().second());
508  m_currentStartTime = m_originalStartTime.addSecs(secsoffset);
510 
511  if (m_player)
512  {
513  m_player->IncrRef();
517  }
518 }
519 
521 {
522  if (Player && (Player == m_player))
523  {
524  emit m_player->RequestEmbedding(false);
525  HideTVWindow();
526  m_player->DecrRef();
527  m_player = nullptr;
528  }
529 }
530 
532 {
533  QString windowName = "programguide";
534 
535  if (m_embedVideo)
536  windowName = "programguide-video";
537 
538  if (!LoadWindowFromXML("schedule-ui.xml", windowName, this))
539  return false;
540 
541  bool err = false;
542  UIUtilE::Assign(this, m_timeList, "timelist", &err);
543  UIUtilE::Assign(this, m_channelList, "channellist", &err);
544  UIUtilE::Assign(this, m_guideGrid, "guidegrid", &err);
545  UIUtilW::Assign(this, m_dateText, "datetext");
546  UIUtilW::Assign(this, m_longdateText, "longdatetext");
547  UIUtilW::Assign(this, m_changroupname, "channelgroup");
548  UIUtilW::Assign(this, m_channelImage, "channelicon");
549  UIUtilW::Assign(this, m_jumpToText, "jumptotext");
550 
551  if (err)
552  {
553  LOG(VB_GENERAL, LOG_ERR,
554  QString("Cannot load screen '%1'").arg(windowName));
555  return false;
556  }
557 
558  BuildFocusList();
559 
560  MythUIImage *videoImage = dynamic_cast<MythUIImage *>(GetChild("video"));
561  if (videoImage && m_embedVideo)
562  m_videoRect = videoImage->GetArea();
563  else
564  m_videoRect = QRect(0,0,0,0);
565 
569 
570  m_currentEndTime = m_currentStartTime.addSecs(m_timeCount * 60 * 5);
571 
573  return true;
574 }
575 
576 void GuideGrid::Load(void)
577 {
580 
581  int maxchannel = std::max((int)GetChannelCount() - 1, 0);
583  m_channelCount = std::min(m_channelCount, maxchannel + 1);
584 
585  for (int y = 0; y < m_channelCount; ++y)
586  {
587  int chanNum = y + m_currentStartChannel;
588  if (chanNum >= (int) m_channelInfos.size())
589  chanNum -= (int) m_channelInfos.size();
590  if (chanNum >= (int) m_channelInfos.size())
591  continue;
592 
593  if (chanNum < 0)
594  chanNum = 0;
595 
596  delete m_programs[y];
598  }
599 }
600 
601 void GuideGrid::Init(void)
602 {
604  m_currentCol = 0;
605 
606  fillTimeInfos();
607 
608  updateChannels();
609 
610  fillProgramInfos(true);
611 
612  m_updateTimer->start(kUpdateMS);
613 
614  updateDateText();
615 
616  QString changrpname = ChannelGroup::GetChannelGroupName(m_changrpid);
617 
618  if (m_changroupname)
619  m_changroupname->SetText(changrpname);
620 
621  gCoreContext->addListener(this);
622 }
623 
625 {
626  m_updateTimer->disconnect(this);
627  m_updateTimer = nullptr;
628 
629  GuideHelper::Wait(this);
630 
632 
633  while (!m_programs.empty())
634  {
635  if (m_programs.back())
636  delete m_programs.back();
637  m_programs.pop_back();
638  }
639 
640  m_channelInfos.clear();
641 
642  gCoreContext->SaveSetting("EPGSortReverse", m_sortReverse ? "1" : "0");
643 
644  if (m_player)
645  {
646  // if we have a player and we are returning to it we need
647  // to tell it to stop embedding and return to fullscreen
648  if (m_allowFinder)
649  emit m_player->RequestEmbedding(false);
650 
651  // maybe the user selected a different channel group,
652  // tell the player to update its channel list just in case
654  m_player->DecrRef();
655  }
656 
657  if (gCoreContext->GetBoolSetting("ChannelGroupRememberLast", false))
658  gCoreContext->SaveSetting("ChannelGroupDefault", m_changrpid);
659 }
660 
661 bool GuideGrid::keyPressEvent(QKeyEvent *event)
662 {
663  QStringList actions;
664  bool handled = GetMythMainWindow()->TranslateKeyPress("TV Frontend", event, actions);
665 
666  if (handled)
667  return true;
668 
669  if (!actions.empty())
670  {
671  QMutexLocker locker(&m_jumpToChannelLock);
672 
673  if (!m_jumpToChannel)
674  {
675  QString chanNum = actions[0];
676  bool isNum = false;
677  (void)chanNum.toInt(&isNum);
678  if (isNum)
679  {
680  // see if we can find a matching channel before creating the JumpToChannel otherwise
681  // JumpToChannel will delete itself in the ctor leading to a segfault
682  int i = FindChannel(0, chanNum, false);
683  if (i >= 0)
684  {
685  m_jumpToChannel = new JumpToChannel(this, chanNum,
689  }
690 
691  handled = true;
692  }
693  }
694 
695  if (m_jumpToChannel && !handled)
696  handled = m_jumpToChannel->ProcessEntry(actions, event);
697  }
698 
699  for (int i = 0; i < actions.size() && !handled; ++i)
700  {
701  QString action = actions[i];
702  handled = true;
703  if (action == ACTION_UP)
704  {
705  if (m_verticalLayout)
706  cursorLeft();
707  else
708  cursorUp();
709  }
710  else if (action == ACTION_DOWN)
711  {
712  if (m_verticalLayout)
713  cursorRight();
714  else
715  cursorDown();
716  }
717  else if (action == ACTION_LEFT)
718  {
719  if (m_verticalLayout)
720  cursorUp();
721  else
722  cursorLeft();
723  }
724  else if (action == ACTION_RIGHT)
725  {
726  if (m_verticalLayout)
727  cursorDown();
728  else
729  cursorRight();
730  }
731  else if (action == "PAGEUP")
732  {
733  if (m_verticalLayout)
735  else
737  }
738  else if (action == "PAGEDOWN")
739  {
740  if (m_verticalLayout)
742  else
744  }
745  else if (action == ACTION_PAGELEFT)
746  {
747  if (m_verticalLayout)
749  else
751  }
752  else if (action == ACTION_PAGERIGHT)
753  {
754  if (m_verticalLayout)
756  else
758  }
759  else if (action == ACTION_DAYLEFT)
761  else if (action == ACTION_DAYRIGHT)
763  else if (action == "NEXTFAV")
765  else if (action == ACTION_FINDER)
766  showProgFinder();
767  else if (action == ACTION_CHANNELSEARCH)
769  else if (action == "MENU")
770  ShowMenu();
771  else if (action == "ESCAPE" || action == ACTION_GUIDE)
772  Close();
773  else if (action == ACTION_SELECT)
774  {
775  ProgramInfo *pginfo =
777  auto secsTillStart = (pginfo)
780  {
781  // See if this show is far enough into the future that it's
782  // probable that the user wanted to schedule it to record
783  // instead of changing the channel.
784  if (pginfo && (pginfo->GetTitle() != kUnknownTitle) &&
785  (secsTillStart >= m_selectRecThreshold))
786  {
787  EditRecording();
788  }
789  else
790  {
791  enter();
792  }
793  }
794  else
795  {
796  // Edit Recording should include "Watch this channel"
797  // is we selected a show that is current.
800  && (secsTillStart < m_selectRecThreshold));
801  }
802  }
803  else if (action == "EDIT")
804  EditScheduled();
805  else if (action == "CUSTOMEDIT")
806  EditCustom();
807  else if (action == "DELETE")
808  deleteRule();
809  else if (action == "UPCOMING")
810  ShowUpcoming();
811  else if (action == "PREVRECORDED")
812  ShowPrevious();
813  else if (action == "DETAILS" || action == "INFO")
814  ShowDetails();
815  else if (action == ACTION_TOGGLERECORD)
816  QuickRecord();
817  else if (action == ACTION_TOGGLEFAV)
818  {
819  if (m_changrpid == -1)
820  ChannelGroupMenu(0);
821  else
823  }
824  else if (action == "CHANUPDATE")
825  channelUpdate();
826  else if (action == ACTION_VOLUMEUP)
827  emit ChangeVolume(true);
828  else if (action == ACTION_VOLUMEDOWN)
829  emit ChangeVolume(false);
830  else if (action == "CYCLEAUDIOCHAN")
831  emit ToggleMute(true);
832  else if (action == ACTION_MUTEAUDIO)
833  emit ToggleMute(false);
834  else if (action == ACTION_TOGGLEPGORDER)
835  {
838  updateChannels();
839  }
840  else
841  handled = false;
842  }
843 
844  if (!handled && MythScreenType::keyPressEvent(event))
845  handled = true;
846 
847  return handled;
848 }
849 
851 {
852  bool handled = true;
853 
854  if (!event)
855  {
856  LOG(VB_GENERAL, LOG_INFO, LOC + "Guide Gesture no event");
857  return false;
858  }
859 
860  LOG(VB_GENERAL, LOG_INFO, LOC + QString("Guide Gesture event %1")
861  .arg(QString::number(event->GetGesture())));
862  switch (event->GetGesture())
863  {
865  {
866  handled = false;
867 
868  // We want the relative position of the click
869  QPoint position = event->GetPosition();
870  if (m_parent)
871  position -= m_parent->GetArea().topLeft();
872 
873  MythUIType *type = GetChildAt(position, false, false);
874 
875  if (!type)
876  return false;
877 
878  auto *object = dynamic_cast<MythUIStateType *>(type);
879 
880  if (object)
881  {
882  QString name = object->objectName();
883  LOG(VB_GENERAL, LOG_INFO, LOC + QString("Guide Gesture Click name %1").arg(name));
884 
885  if (name.startsWith("channellist"))
886  {
887  auto* channelList = qobject_cast<MythUIButtonList*>(object);
888 
889  if (channelList)
890  {
891  handled = channelList->gestureEvent(event);
892  LOG(VB_GENERAL, LOG_INFO, LOC + QString("Guide Gesture Click channel list %1").arg(handled));
893  }
894  }
895  else if (name.startsWith("guidegrid"))
896  {
897  auto* guidegrid = qobject_cast<MythUIGuideGrid*>(object);
898 
899  if (guidegrid)
900  {
901  handled = true;
902 
903  QPoint rowCol = guidegrid->GetRowAndColumn(position - guidegrid->GetArea().topLeft());
904 
905  LOG(VB_GENERAL, LOG_INFO, LOC + QString("Guide Gesture Click gg %1,%2 (%3,%4)")
906  .arg(rowCol.y())
907  .arg(rowCol.x())
908  .arg(m_currentRow)
909  .arg(m_currentCol)
910  );
911  if ((rowCol.y() >= 0) && (rowCol.x() >= 0))
912  {
913  if ((rowCol.y() == m_currentRow) && (rowCol.x() == m_currentCol))
914  {
916  {
917  // See if this show is far enough into the future that it's
918  // probable that the user wanted to schedule it to record
919  // instead of changing the channel.
920  ProgramInfo *pginfo =
922  auto secsTillStart = (pginfo)
924  if (pginfo && (pginfo->GetTitle() != kUnknownTitle) &&
925  (secsTillStart >= m_selectRecThreshold))
926  {
927  //EditRecording();
928  LOG(VB_GENERAL, LOG_INFO, LOC + QString("Guide Gesture Click gg EditRec"));
929  }
930  else
931  {
932  LOG(VB_GENERAL, LOG_INFO, LOC + QString("Guide Gesture Click gg enter"));
933  enter();
934  }
935  }
936  else
937  {
938  //EditRecording();
939  LOG(VB_GENERAL, LOG_INFO, LOC + QString("Guide Gesture Click gg not live"));
940  }
941  }
942  else
943  {
944  bool rowChanged = (rowCol.y() != m_currentRow);
945  bool colChanged = (rowCol.x() != m_currentCol);
946  if (rowChanged)
948 
949  m_currentRow = rowCol.y();
950  m_currentCol = rowCol.x();
951 
953  if (colChanged)
954  {
955  m_currentStartTime = m_programInfos[m_currentRow][m_currentCol]->GetScheduledStartTime();
956  fillTimeInfos();
957  }
958  if (rowChanged)
959  updateChannels();
960  if (colChanged)
961  updateDateText();
962  }
963  }
964  }
965  }
966 
967  }
968  }
969  break;
970 
972  if (m_verticalLayout)
973  cursorLeft();
974  else
975  cursorUp();
976  break;
977 
979  if (m_verticalLayout)
980  cursorRight();
981  else
982  cursorDown();
983  break;
984 
986  if (m_verticalLayout)
987  cursorUp();
988  else
989  cursorLeft();
990  break;
991 
993  if (m_verticalLayout)
994  cursorDown();
995  else
996  cursorRight();
997  break;
998 
1000  if (m_verticalLayout)
1002  else
1004  break;
1005 
1007  if (m_verticalLayout)
1009  else
1011  break;
1012 
1014  if (m_verticalLayout)
1016  else
1018  break;
1019 
1021  if (m_verticalLayout)
1023  else
1025  break;
1026 
1029  break;
1030 
1033  break;
1034 
1036  enter();
1037  break;
1038 
1039  default:
1040  handled = false;
1041  break;
1042  }
1043 
1044  if (!handled && MythScreenType::gestureEvent(event))
1045  handled = true;
1046 
1047  return handled;
1048 }
1049 
1050 static bool SelectionIsTunable(const ChannelInfoList &selection)
1051 {
1052  return std::any_of(selection.cbegin(), selection.cend(),
1053  [selection](const auto & chan){ return TV::IsTunable(chan.m_chanId); } );
1054 }
1055 
1057 {
1058  QString label = tr("Guide Options");
1059 
1060  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
1061  auto *menuPopup = new MythDialogBox(label, popupStack, "guideMenuPopup");
1062 
1063  if (menuPopup->Create())
1064  {
1065  menuPopup->SetReturnEvent(this, "guidemenu");
1066 
1068  menuPopup->AddButton(tr("Change to Channel"));
1069  else if (!m_player && SelectionIsTunable(GetSelection()))
1070  menuPopup->AddButton(tr("Watch This Channel"));
1071 
1072  menuPopup->AddButton(tr("Record This"));
1073 
1074  menuPopup->AddButton(tr("Recording Options"), nullptr, true);
1075 
1076  menuPopup->AddButton(tr("Program Details"));
1077 
1078  menuPopup->AddButton(tr("Jump to Time"), nullptr, true);
1079 
1080  menuPopup->AddButton(tr("Reverse Channel Order"));
1081 
1082  menuPopup->AddButton(tr("Channel Search"));
1083 
1084  if (!m_changrplist.empty())
1085  {
1086  menuPopup->AddButton(tr("Choose Channel Group"));
1087 
1088  if (m_changrpid == -1)
1089  menuPopup->AddButton(tr("Add To Channel Group"), nullptr, true);
1090  else
1091  menuPopup->AddButton(tr("Remove from Channel Group"), nullptr, true);
1092  }
1093 
1094  popupStack->AddScreen(menuPopup);
1095  }
1096  else
1097  {
1098  delete menuPopup;
1099  }
1100 }
1101 
1103 {
1104  QString label = tr("Recording Options");
1105 
1106  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
1107  auto *menuPopup = new MythDialogBox(label, popupStack, "recMenuPopup");
1108 
1109  if (menuPopup->Create())
1110  {
1111  menuPopup->SetReturnEvent(this, "recmenu");
1112 
1114 
1115  if (pginfo && pginfo->GetRecordingRuleID())
1116  menuPopup->AddButton(tr("Edit Recording Status"));
1117  menuPopup->AddButton(tr("Edit Schedule"));
1118  menuPopup->AddButton(tr("Show Upcoming"));
1119  menuPopup->AddButton(tr("Previously Recorded"));
1120  menuPopup->AddButton(tr("Custom Edit"));
1121 
1122  if (pginfo && pginfo->GetRecordingRuleID())
1123  menuPopup->AddButton(tr("Delete Rule"));
1124 
1125  popupStack->AddScreen(menuPopup);
1126  }
1127  else
1128  {
1129  delete menuPopup;
1130  }
1131 }
1132 
1134 {
1135  sel = (sel >= 0) ? sel : m_channelInfoIdx[chan_idx];
1136 
1137  if (chan_idx >= GetChannelCount())
1138  return nullptr;
1139 
1140  if (sel >= (int) m_channelInfos[chan_idx].size())
1141  return nullptr;
1142 
1143  return &(m_channelInfos[chan_idx][sel]);
1144 }
1145 
1146 const ChannelInfo *GuideGrid::GetChannelInfo(uint chan_idx, int sel) const
1147 {
1148  return ((GuideGrid*)this)->GetChannelInfo(chan_idx, sel);
1149 }
1150 
1152 {
1153  return m_channelInfos.size();
1154 }
1155 
1157 {
1158  uint cnt = GetChannelCount();
1159  if (!cnt)
1160  return -1;
1161 
1162  row = (row < 0) ? m_currentRow : row;
1163  return (row + m_currentStartChannel) % cnt;
1164 }
1165 
1167 {
1168  ProgramList proglist;
1169  MSqlBindings bindings;
1170  QString querystr =
1171  "WHERE program.chanid = :CHANID AND "
1172  " program.endtime >= :STARTTS AND "
1173  " program.starttime <= :ENDTS AND "
1174  " program.starttime >= :STARTLIMITTS AND "
1175  " program.manualid = 0 ";
1176  QDateTime starttime = m_currentStartTime.addSecs(0 - m_currentStartTime.time().second());
1177  bindings[":STARTTS"] = starttime;
1178  bindings[":STARTLIMITTS"] = starttime.addDays(-1);
1179  bindings[":ENDTS"] = m_currentEndTime.addSecs(0 - m_currentEndTime.time().second());
1180  bindings[":CHANID"] = chanid;
1181 
1182  ProgramList dummy;
1183  LoadFromProgram(proglist, querystr, bindings, dummy);
1184 
1185  return proglist;
1186 }
1187 
1189 {
1190  if (!proglist)
1191  return nullptr;
1192  auto *result = new ProgramList();
1193  // AutoDeleteDeque doesn't work with std::back_inserter
1194  for (auto & pi : *proglist)
1195  result->push_back(new ProgramInfo(*pi)); // cppcheck-suppress useStlAlgorithm
1196  return result;
1197 }
1198 
1200  uint chan_idx, bool with_same_channum) const
1201 {
1202  uint si = m_channelInfoIdx[chan_idx];
1203  const ChannelInfo *chinfo = GetChannelInfo(chan_idx, si);
1204 
1207 
1208  const uint cnt = (ctx && chinfo) ? m_channelInfos[chan_idx].size() : 0;
1209  for (uint i = 0; i < cnt; ++i)
1210  {
1211  if (i == si)
1212  continue;
1213 
1214  const ChannelInfo *ciinfo = GetChannelInfo(chan_idx, i);
1215  if (!ciinfo)
1216  continue;
1217 
1218  bool same_channum = ciinfo->m_chanNum == chinfo->m_chanNum;
1219 
1220  if (with_same_channum != same_channum)
1221  continue;
1222 
1223  if (!TV::IsTunable(ciinfo->m_chanId))
1224  continue;
1225 
1226  if (with_same_channum)
1227  {
1228  si = i;
1229  break;
1230  }
1231 
1232  ProgramList proglist = GetProgramList(chinfo->m_chanId);
1233  ProgramList ch_proglist = GetProgramList(ciinfo->m_chanId);
1234 
1235  if (proglist.empty() ||
1236  proglist.size() != ch_proglist.size())
1237  continue;
1238 
1239  bool isAlt = true;
1240  for (size_t j = 0; j < proglist.size(); ++j)
1241  {
1242  isAlt &= proglist[j]->IsSameTitleTimeslotAndChannel(*ch_proglist[j]);
1243  }
1244 
1245  if (isAlt)
1246  {
1247  si = i;
1248  break;
1249  }
1250  }
1251 
1253 
1254  return si;
1255 }
1256 
1257 
1258 #define MKKEY(IDX,SEL) ((((uint64_t)(IDX)) << 32) | (SEL))
1260 {
1261  ChannelInfoList selected;
1262 
1263  int idx = GetStartChannelOffset();
1264  if (idx < 0)
1265  return selected;
1266 
1267  uint si = m_channelInfoIdx[idx];
1268 
1269  vector<uint64_t> sel;
1270  sel.push_back( MKKEY(idx, si) );
1271 
1272  const ChannelInfo *ch = GetChannelInfo(sel[0]>>32, sel[0]&0xffff);
1273  if (!ch)
1274  return selected;
1275 
1276  selected.push_back(*ch);
1277  if (m_channelInfos[idx].size() <= 1)
1278  return selected;
1279 
1280  ProgramList proglist = GetProgramList(selected[0].m_chanId);
1281 
1282  if (proglist.empty())
1283  return selected;
1284 
1285  for (size_t i = 0; i < m_channelInfos[idx].size(); ++i)
1286  {
1287  const ChannelInfo *ci = GetChannelInfo(idx, i);
1288  if (ci && (i != si) &&
1289  (ci->m_callSign == ch->m_callSign) && (ci->m_chanNum == ch->m_chanNum))
1290  {
1291  sel.push_back( MKKEY(idx, i) );
1292  }
1293  }
1294 
1295  for (size_t i = 0; i < m_channelInfos[idx].size(); ++i)
1296  {
1297  const ChannelInfo *ci = GetChannelInfo(idx, i);
1298  if (ci && (i != si) &&
1299  (ci->m_callSign == ch->m_callSign) && (ci->m_chanNum != ch->m_chanNum))
1300  {
1301  sel.push_back( MKKEY(idx, i) );
1302  }
1303  }
1304 
1305  for (size_t i = 0; i < m_channelInfos[idx].size(); ++i)
1306  {
1307  const ChannelInfo *ci = GetChannelInfo(idx, i);
1308  if ((i != si) && (ci->m_callSign != ch->m_callSign))
1309  {
1310  sel.push_back( MKKEY(idx, i) );
1311  }
1312  }
1313 
1314  for (size_t i = 1; i < sel.size(); ++i)
1315  {
1316  const ChannelInfo *ci = GetChannelInfo(sel[i]>>32, sel[i]&0xffff);
1317  const ProgramList ch_proglist = GetProgramList(ch->m_chanId);
1318 
1319  if (!ci || proglist.size() != ch_proglist.size())
1320  continue;
1321 
1322  bool isAlt = true;
1323  for (size_t j = 0; j < proglist.size(); ++j)
1324  {
1325  isAlt &= proglist[j]->IsSameTitleTimeslotAndChannel(*ch_proglist[j]);
1326  }
1327 
1328  if (isAlt)
1329  selected.push_back(*ci);
1330  }
1331 
1332  return selected;
1333 }
1334 #undef MKKEY
1335 
1337 {
1338  m_updateTimer->stop();
1339  fillProgramInfos();
1340  m_updateTimer->start(kUpdateMS);
1341 }
1342 
1343 void GuideGrid::fillChannelInfos(bool gotostartchannel)
1344 {
1345  m_channelInfos.clear();
1346  m_channelInfoIdx.clear();
1348 
1349  uint avail = 0;
1350  const ChannelUtil::OrderBy ordering = m_channelOrdering == "channum" ?
1352  ChannelInfoList channels = ChannelUtil::LoadChannels(0, 0, avail, true,
1353  ordering,
1355  0,
1356  (m_changrpid < 0) ? 0 : m_changrpid);
1357 
1358  using uint_list_t = vector<uint>;
1359  QMap<QString,uint_list_t> channum_to_index_map;
1360  QMap<QString,uint_list_t> callsign_to_index_map;
1361 
1362  for (size_t i = 0; i < channels.size(); ++i)
1363  {
1364  uint chan = i;
1365  if (m_sortReverse)
1366  {
1367  chan = channels.size() - i - 1;
1368  }
1369 
1370  bool ndup = !channum_to_index_map[channels[chan].m_chanNum].empty();
1371  bool cdup = !callsign_to_index_map[channels[chan].m_callSign].empty();
1372 
1373  if (ndup && cdup)
1374  continue;
1375 
1376  ChannelInfo val(channels[chan]);
1377 
1378  channum_to_index_map[val.m_chanNum].push_back(GetChannelCount());
1379  callsign_to_index_map[val.m_callSign].push_back(GetChannelCount());
1380 
1381  // add the new channel to the list
1383  tmp.push_back(val);
1384  m_channelInfos.push_back(tmp);
1385  }
1386 
1387  // handle duplicates
1388  for (auto & channel : channels)
1389  {
1390  const uint_list_t &ndups = channum_to_index_map[channel.m_chanNum];
1391  for (unsigned int ndup : ndups)
1392  {
1393  if (channel.m_chanId != m_channelInfos[ndup][0].m_chanId &&
1394  channel.m_callSign == m_channelInfos[ndup][0].m_callSign)
1395  m_channelInfos[ndup].push_back(channel);
1396  }
1397 
1398  const uint_list_t &cdups = callsign_to_index_map[channel.m_callSign];
1399  for (unsigned int cdup : cdups)
1400  {
1401  if (channel.m_chanId != m_channelInfos[cdup][0].m_chanId)
1402  m_channelInfos[cdup].push_back(channel);
1403  }
1404  }
1405 
1406  if (gotostartchannel)
1407  {
1408  int ch = FindChannel(m_startChanID, m_startChanNum, false);
1409  m_currentStartChannel = (uint) std::max(0, ch);
1410  }
1411 
1412  if (m_channelInfos.empty())
1413  {
1414  LOG(VB_GENERAL, LOG_ERR, "GuideGrid: "
1415  "\n\t\t\tYou don't have any channels defined in the database."
1416  "\n\t\t\tGuide grid will have nothing to show you.");
1417  }
1418 }
1419 
1420 int GuideGrid::FindChannel(uint chanid, const QString &channum,
1421  bool exact) const
1422 {
1423  // first check chanid
1424  uint i = (chanid) ? 0 : GetChannelCount();
1425  for (; i < GetChannelCount(); ++i)
1426  {
1427  if (m_channelInfos[i][0].m_chanId == chanid)
1428  return i;
1429  }
1430 
1431  // then check for chanid in duplicates
1432  i = (chanid) ? 0 : GetChannelCount();
1433  for (; i < GetChannelCount(); ++i)
1434  {
1435  for (size_t j = 1; j < m_channelInfos[i].size(); ++j)
1436  {
1437  if (m_channelInfos[i][j].m_chanId == chanid)
1438  return i;
1439  }
1440  }
1441 
1442  // then check channum, first only
1443  i = (channum.isEmpty()) ? GetChannelCount() : 0;
1444  for (; i < GetChannelCount(); ++i)
1445  {
1446  if (m_channelInfos[i][0].m_chanNum == channum)
1447  return i;
1448  }
1449 
1450  // then check channum duplicates
1451  i = (channum.isEmpty()) ? GetChannelCount() : 0;
1452  for (; i < GetChannelCount(); ++i)
1453  {
1454  for (size_t j = 1; j < m_channelInfos[i].size(); ++j)
1455  {
1456  if (m_channelInfos[i][j].m_chanNum == channum)
1457  return i;
1458  }
1459  }
1460 
1461  if (exact || channum.isEmpty())
1462  return -1;
1463 
1464  ChannelInfoList list;
1465  QVector<int> idxList;
1466  for (i = 0; i < GetChannelCount(); ++i)
1467  {
1468  for (size_t j = 0; j < m_channelInfos[i].size(); ++j)
1469  {
1470  list.push_back(m_channelInfos[i][j]);
1471  idxList.push_back(i);
1472  }
1473  }
1474  int result = ChannelUtil::GetNearestChannel(list, channum);
1475  if (result >= 0)
1476  result = idxList[result];
1477  return result;
1478 }
1479 
1481 {
1482  m_timeList->Reset();
1483 
1484  QDateTime starttime = m_currentStartTime;
1485 
1487  m_lastTime = m_firstTime.addSecs(m_timeCount * 60 * 4);
1488 
1489  for (int x = 0; x < m_timeCount; ++x)
1490  {
1491  int mins = starttime.time().minute();
1492  mins = 5 * (mins / 5);
1493  if (mins % 30 == 0)
1494  {
1495  QString timeStr = MythDate::toString(starttime, MythDate::kTime);
1496 
1497  InfoMap infomap;
1498  infomap["starttime"] = timeStr;
1499 
1500  QDateTime endtime = starttime.addSecs(60 * 30);
1501 
1502  infomap["endtime"] = MythDate::toString(endtime, MythDate::kTime);
1503 
1504  auto *item = new MythUIButtonListItem(m_timeList, timeStr);
1505 
1506  item->SetTextFromMap(infomap);
1507  }
1508 
1509  starttime = starttime.addSecs(5 * 60);
1510  }
1511  m_currentEndTime = starttime;
1512 }
1513 
1514 void GuideGrid::fillProgramInfos(bool useExistingData)
1515 {
1516  fillProgramRowInfos(-1, useExistingData);
1517 }
1518 
1520 {
1521  auto *proglist = new ProgramList();
1522 
1523  if (proglist)
1524  {
1525  MSqlBindings bindings;
1526  QString querystr = "WHERE program.chanid = :CHANID "
1527  " AND program.endtime >= :STARTTS "
1528  " AND program.starttime <= :ENDTS "
1529  " AND program.starttime >= :STARTLIMITTS "
1530  " AND program.manualid = 0 ";
1531  QDateTime starttime = m_currentStartTime.addSecs(0 - m_currentStartTime.time().second());
1532  bindings[":CHANID"] = GetChannelInfo(chanNum)->m_chanId;
1533  bindings[":STARTTS"] = starttime;
1534  bindings[":STARTLIMITTS"] = starttime.addDays(-1);
1535  bindings[":ENDTS"] = m_currentEndTime.addSecs(0 - m_currentEndTime.time().second());
1536 
1537  LoadFromProgram(*proglist, querystr, bindings, m_recList);
1538  }
1539 
1540  return proglist;
1541 }
1542 
1543 void GuideGrid::fillProgramRowInfos(int firstRow, bool useExistingData)
1544 {
1545  bool allRows = false;
1546  unsigned int numRows = 1;
1547  if (firstRow < 0)
1548  {
1549  firstRow = 0;
1550  allRows = true;
1551  numRows = std::min((unsigned int)m_channelInfos.size(),
1552  (unsigned int)m_guideGrid->getChannelCount());
1553  }
1554  QVector<int> chanNums;
1555  QVector<ProgramList*> proglists;
1556 
1557  for (unsigned int i = 0; i < numRows; ++i)
1558  {
1559  unsigned int row = i + firstRow;
1560  // never divide by zero..
1562  return;
1563 
1564  for (int x = 0; x < m_timeCount; ++x)
1565  {
1566  m_programInfos[row][x] = nullptr;
1567  }
1568 
1569  if (m_channelInfos.empty())
1570  return;
1571 
1572  int chanNum = row + m_currentStartChannel;
1573  if (chanNum >= (int) m_channelInfos.size())
1574  chanNum -= (int) m_channelInfos.size();
1575  if (chanNum >= (int) m_channelInfos.size())
1576  return;
1577 
1578  if (chanNum < 0)
1579  chanNum = 0;
1580 
1581  ProgramList *proglist = nullptr;
1582  if (useExistingData)
1583  proglist = CopyProglist(m_programs[row]);
1584  chanNums.push_back(chanNum);
1585  proglists.push_back(proglist);
1586  }
1587  if (allRows)
1588  {
1589  for (unsigned int i = numRows;
1590  i < (unsigned int) m_guideGrid->getChannelCount(); ++i)
1591  {
1592  delete m_programs[i];
1593  m_programs[i] = nullptr;
1594  m_guideGrid->ResetRow(i);
1595  }
1596  }
1597 
1599 
1600  GuideStatus gs(firstRow, chanNums.size(), chanNums,
1605  auto *updater = new GuideUpdateProgramRow(this, gs, proglists);
1606  m_threadPool.start(new GuideHelper(this, updater), "GuideHelper");
1607 }
1608 
1610  const QDateTime& start,
1611  ProgramList *proglist)
1612 {
1613  if (row < 0 || row >= m_channelCount ||
1614  start != m_currentStartTime)
1615  {
1616  delete proglist;
1617  return;
1618  }
1619 
1620  QDateTime ts = m_currentStartTime;
1621 
1622  QDateTime tnow = MythDate::current();
1623  int progPast = 0;
1624  if (tnow > m_currentEndTime)
1625  progPast = 100;
1626  else if (tnow < m_currentStartTime)
1627  progPast = 0;
1628  else
1629  {
1630  int played = m_currentStartTime.secsTo(tnow);
1631  int length = m_currentStartTime.secsTo(m_currentEndTime);
1632  if (length)
1633  progPast = played * 100 / length;
1634  }
1635 
1636  m_progPast = progPast;
1637 
1638  auto program = proglist->begin();
1639  vector<ProgramInfo*> unknownlist;
1640  bool unknown = false;
1641  ProgramInfo *proginfo = nullptr;
1642  for (int x = 0; x < m_timeCount; ++x)
1643  {
1644  if (program != proglist->end() &&
1645  (ts >= (*program)->GetScheduledEndTime()))
1646  {
1647  ++program;
1648  }
1649 
1650  if ((program == proglist->end()) ||
1651  (ts < (*program)->GetScheduledStartTime()))
1652  {
1653  if (unknown)
1654  {
1655  if (proginfo)
1656  {
1657  proginfo->m_spread++;
1658  proginfo->SetScheduledEndTime(proginfo->GetScheduledEndTime().addSecs(5 * 60));
1659  }
1660  }
1661  else
1662  {
1663  proginfo = new ProgramInfo(kUnknownTitle,
1664  GuideGrid::tr("Unknown", "Unknown program title"),
1665  ts, ts.addSecs(5*60));
1666  unknownlist.push_back(proginfo);
1667  proginfo->m_startCol = x;
1668  proginfo->m_spread = 1;
1669  unknown = true;
1670  }
1671  }
1672  else
1673  {
1674  if (proginfo && proginfo == *program)
1675  {
1676  proginfo->m_spread++;
1677  }
1678  else
1679  {
1680  proginfo = *program;
1681  if (proginfo)
1682  {
1683  proginfo->m_startCol = x;
1684  proginfo->m_spread = 1;
1685  unknown = false;
1686  }
1687  }
1688  }
1689  m_programInfos[row][x] = proginfo;
1690  ts = ts.addSecs(5 * 60);
1691  }
1692 
1693  // AutoDeleteDeque doesn't work with std::back_inserter
1694  for (auto & pi : unknownlist)
1695  proglist->push_back(pi); // cppcheck-suppress useStlAlgorithm
1696 
1697  MythRect programRect = m_ggProgramRect;
1698 
1700  double ydifference = 0.0;
1701  double xdifference = 0.0;
1702 
1703  if (m_verticalLayout)
1704  {
1705  ydifference = programRect.width() /
1706  (double) m_ggChannelCount;
1707  xdifference = programRect.height() /
1708  (double) m_timeCount;
1709  }
1710  else
1711  {
1712  ydifference = programRect.height() /
1713  (double) m_ggChannelCount;
1714  xdifference = programRect.width() /
1715  (double) m_timeCount;
1716  }
1717 
1718  int arrow = GridTimeNormal;
1719  int cnt = 0;
1720  int8_t spread = 1;
1721  QDateTime lastprog;
1722  QRect tempRect;
1723  bool isCurrent = false;
1724 
1725  for (int x = 0; x < m_timeCount; ++x)
1726  {
1727  ProgramInfo *pginfo = m_programInfos[row][x];
1728  if (!pginfo)
1729  continue;
1730 
1731  spread = 1;
1732  if (pginfo->GetScheduledStartTime() != lastprog)
1733  {
1734  arrow = GridTimeNormal;
1735  if (pginfo->GetScheduledStartTime() < m_firstTime.addSecs(-300))
1736  arrow |= GridTimeStartsBefore;
1737  if (pginfo->GetScheduledEndTime() > m_lastTime.addSecs(2100))
1738  arrow |= GridTimeEndsAfter;
1739 
1740  if (pginfo->m_spread != -1)
1741  {
1742  spread = pginfo->m_spread;
1743  }
1744  else
1745  {
1746  for (int z = x + 1; z < m_timeCount; ++z)
1747  {
1748  ProgramInfo *test = m_programInfos[row][z];
1749  if (test && (test->GetScheduledStartTime() ==
1750  pginfo->GetScheduledStartTime()))
1751  spread++;
1752  }
1753  pginfo->m_spread = spread;
1754  pginfo->m_startCol = x;
1755 
1756  for (int z = x + 1; z < x + spread; ++z)
1757  {
1758  ProgramInfo *test = m_programInfos[row][z];
1759  if (test)
1760  {
1761  test->m_spread = spread;
1762  test->m_startCol = x;
1763  }
1764  }
1765  }
1766 
1767  if (m_verticalLayout)
1768  {
1769  tempRect = QRect((int)(row * ydifference),
1770  (int)(x * xdifference),
1771  (int)(ydifference),
1772  (int)(xdifference * pginfo->m_spread));
1773  }
1774  else
1775  {
1776  tempRect = QRect((int)(x * xdifference),
1777  (int)(row * ydifference),
1778  (int)(xdifference * pginfo->m_spread),
1779  (int)ydifference);
1780  }
1781 
1782  // snap to right edge for last entry.
1783  if (tempRect.right() + 2 >= programRect.width())
1784  tempRect.setRight(programRect.width());
1785  if (tempRect.bottom() + 2 >= programRect.bottom())
1786  tempRect.setBottom(programRect.bottom());
1787 
1788  isCurrent = m_currentRow == row && (m_currentCol >= x) &&
1789  (m_currentCol < (x + spread));
1790 
1791  int recFlag = 0;
1792  switch (pginfo->GetRecordingRuleType())
1793  {
1794  case kSingleRecord:
1795  recFlag = 1;
1796  break;
1797  case kDailyRecord:
1798  recFlag = 2;
1799  break;
1800  case kAllRecord:
1801  recFlag = 4;
1802  break;
1803  case kWeeklyRecord:
1804  recFlag = 5;
1805  break;
1806  case kOneRecord:
1807  recFlag = 6;
1808  break;
1809  case kOverrideRecord:
1810  case kDontRecord:
1811  recFlag = 7;
1812  break;
1813  case kNotRecording:
1814  default:
1815  recFlag = 0;
1816  break;
1817  }
1818 
1819  int recStat = 0;
1820  if (pginfo->GetRecordingStatus() == RecStatus::Conflict ||
1822  recStat = 2;
1823  else if (pginfo->GetRecordingStatus() <= RecStatus::WillRecord)
1824  recStat = 1;
1825  else
1826  recStat = 0;
1827 
1828  QString title = (pginfo->GetTitle() == kUnknownTitle) ?
1829  GuideGrid::tr("Unknown", "Unknown program title") :
1830  pginfo->GetTitle();
1831  m_result.emplace_back(
1832  row, cnt, tempRect, title,
1833  pginfo->GetCategory(), arrow, recFlag,
1834  recStat, isCurrent);
1835 
1836  cnt++;
1837  }
1838 
1839  lastprog = pginfo->GetScheduledStartTime();
1840  }
1841 }
1842 
1843 void GuideGrid::customEvent(QEvent *event)
1844 {
1845  if (event->type() == MythEvent::MythEventMessage)
1846  {
1847  auto *me = dynamic_cast<MythEvent *>(event);
1848  if (me == nullptr)
1849  return;
1850 
1851  const QString& message = me->Message();
1852 
1853  if (message == "SCHEDULE_CHANGE")
1854  {
1855  GuideHelper::Wait(this);
1857  fillProgramInfos();
1858  }
1859  }
1860  else if (event->type() == DialogCompletionEvent::kEventType)
1861  {
1862  auto *dce = (DialogCompletionEvent*)(event);
1863 
1864  QString resultid = dce->GetId();
1865  QString resulttext = dce->GetResultText();
1866  int buttonnum = dce->GetResult();
1867 
1868  if (resultid == "deleterule")
1869  {
1870  auto *record = dce->GetData().value<RecordingRule *>();
1871  if (record)
1872  {
1873  if ((buttonnum > 0) && !record->Delete())
1874  LOG(VB_GENERAL, LOG_ERR, "Failed to delete recording rule");
1875  delete record;
1876  }
1877  }
1878  // Test for this here because it can come from
1879  // different menus.
1880  else if (resulttext == tr("Watch This Channel"))
1881  {
1882  ChannelInfoList selection = GetSelection();
1883  if (SelectionIsTunable(selection))
1884  TV::StartTV(nullptr, kStartTVNoFlags, selection);
1885  }
1886  else if (resultid == "guidemenu")
1887  {
1888  if (resulttext == tr("Record This"))
1889  {
1890  QuickRecord();
1891  }
1892  else if (resulttext == tr("Change to Channel"))
1893  {
1894  enter();
1895  }
1896  else if (resulttext == tr("Program Details"))
1897  {
1898  ShowDetails();
1899  }
1900  else if (resulttext == tr("Reverse Channel Order"))
1901  {
1903  generateListings();
1904  updateChannels();
1905  }
1906  else if (resulttext == tr("Channel Search"))
1907  {
1909  }
1910  else if (resulttext == tr("Add To Channel Group"))
1911  {
1912  if (m_changrpid == -1)
1913  ChannelGroupMenu(0);
1914  }
1915  else if (resulttext == tr("Remove from Channel Group"))
1916  {
1918  }
1919  else if (resulttext == tr("Choose Channel Group"))
1920  {
1921  ChannelGroupMenu(1);
1922  }
1923  else if (resulttext == tr("Recording Options"))
1924  {
1926  }
1927  else if (resulttext == tr("Jump to Time"))
1928  {
1929  ShowJumpToTime();
1930  }
1931  }
1932  else if (resultid == "recmenu")
1933  {
1934  if (resulttext == tr("Edit Recording Status"))
1935  {
1936  EditRecording();
1937  }
1938  else if (resulttext == tr("Edit Schedule"))
1939  {
1940  EditScheduled();
1941  }
1942  else if (resulttext == tr("Show Upcoming"))
1943  {
1944  ShowUpcoming();
1945  }
1946  else if (resulttext == tr("Previously Recorded"))
1947  {
1948  ShowPrevious();
1949  }
1950  else if (resulttext == tr("Custom Edit"))
1951  {
1952  EditCustom();
1953  }
1954  else if (resulttext == tr("Delete Rule"))
1955  {
1956  deleteRule();
1957  }
1958 
1959  }
1960  else if (resultid == "channelgrouptogglemenu")
1961  {
1962  int changroupid = ChannelGroup::GetChannelGroupId(resulttext);
1963 
1964  if (changroupid > 0)
1965  toggleChannelFavorite(changroupid);
1966  }
1967  else if (resultid == "channelgroupmenu")
1968  {
1969  if (buttonnum >= 0)
1970  {
1971  int changroupid = -1;
1972 
1973  if (resulttext == QObject::tr("All Channels"))
1974  changroupid = -1;
1975  else
1976  changroupid = ChannelGroup::GetChannelGroupId(resulttext);
1977 
1978  m_changrpid = changroupid;
1979  generateListings();
1980  updateChannels();
1981  updateInfo();
1982 
1983  QString changrpname;
1985 
1986  if (m_changroupname)
1987  m_changroupname->SetText(changrpname);
1988  }
1989  }
1990  else if (resultid == "jumptotime")
1991  {
1992  QDateTime datetime = dce->GetData().toDateTime();
1993  moveToTime(datetime);
1994  }
1995  else
1997  }
1998  else if (event->type() == UpdateGuideEvent::kEventType)
1999  {
2000  auto *uge = dynamic_cast<UpdateGuideEvent*>(event);
2001  if (uge && uge->m_updater)
2002  {
2003  uge->m_updater->ExecuteUI();
2004  delete uge->m_updater;
2005  uge->m_updater = nullptr;
2006  }
2007  }
2008 }
2009 
2011 {
2012  if (m_dateText)
2014  if (m_longdateText)
2017 }
2018 
2019 void GuideGrid::updateProgramsUI(unsigned int firstRow, unsigned int numRows,
2020  int progPast,
2021  const QVector<ProgramList*> &proglists,
2022  const ProgInfoGuideArray &programInfos,
2023  const std::list<GuideUIElement> &elements)
2024 {
2025  for (unsigned int i = 0; i < numRows; ++i)
2026  {
2027  unsigned int row = i + firstRow;
2028  m_guideGrid->ResetRow(row);
2029  if (m_programs[row] != proglists[i])
2030  {
2031  delete m_programs[row];
2032  m_programs[row] = proglists[i];
2033  }
2034  }
2035  m_guideGrid->SetProgPast(progPast);
2036  for (const auto & r : elements)
2037  {
2038  m_guideGrid->SetProgramInfo(r.m_row, r.m_col, r.m_area, r.m_title,
2039  r.m_category, r.m_arrow, r.m_recType,
2040  r.m_recStat, r.m_selected);
2041  }
2042  for (unsigned int i = firstRow; i < firstRow + numRows; ++i)
2043  {
2044  for (int j = 0; j < MAX_DISPLAY_TIMES; ++j)
2045  m_programInfos[i][j] = programInfos[i][j];
2046  if (i == (unsigned int)m_currentRow)
2047  updateInfo();
2048  }
2050 }
2051 
2053 {
2054  auto *updater = new GuideUpdateChannels(this, m_currentStartChannel);
2055  m_threadPool.start(new GuideHelper(this, updater), "GuideHelper");
2056 }
2057 
2058 void GuideGrid::updateChannelsNonUI(QVector<ChannelInfo *> &chinfos,
2059  QVector<bool> &unavailables)
2060 {
2062 
2063  for (unsigned int y = 0; (y < (unsigned int)m_channelCount) && chinfo; ++y)
2064  {
2065  unsigned int chanNumber = y + m_currentStartChannel;
2066  if (chanNumber >= m_channelInfos.size())
2067  chanNumber -= m_channelInfos.size();
2068  if (chanNumber >= m_channelInfos.size())
2069  break;
2070 
2071  chinfo = GetChannelInfo(chanNumber);
2072 
2073  bool unavailable = false;
2074  bool try_alt = false;
2075 
2076  if (m_player)
2077  {
2079  const PlayerContext* ctx = m_player->GetPlayerContext();
2080  if (ctx && chinfo)
2081  try_alt = !TV::IsTunable(chinfo->m_chanId);
2083  }
2084 
2085  if (try_alt)
2086  {
2087  unavailable = true;
2088 
2089  // Try alternates with same channum if applicable
2090  uint alt = GetAlternateChannelIndex(chanNumber, true);
2091  if (alt != m_channelInfoIdx[chanNumber])
2092  {
2093  unavailable = false;
2094  m_channelInfoIdx[chanNumber] = alt;
2095  chinfo = GetChannelInfo(chanNumber);
2096  }
2097 
2098  // Try alternates with different channum if applicable
2099  if (unavailable && chinfo &&
2100  !GetProgramList(chinfo->m_chanId).empty())
2101  {
2102  alt = GetAlternateChannelIndex(chanNumber, false);
2103  unavailable = (alt == m_channelInfoIdx[chanNumber]);
2104  }
2105  }
2106  chinfos.push_back(chinfo);
2107  unavailables.push_back(unavailable);
2108  }
2109 }
2110 
2111 void GuideGrid::updateChannelsUI(const QVector<ChannelInfo *> &chinfos,
2112  const QVector<bool> &unavailables)
2113 {
2114  m_channelList->Reset();
2115  for (int i = 0; i < chinfos.size(); ++i)
2116  {
2117  ChannelInfo *chinfo = chinfos[i];
2118  bool unavailable = unavailables[i];
2119  auto *item = new MythUIButtonListItem(m_channelList,
2120  chinfo ? chinfo->GetFormatted(ChannelInfo::kChannelShort) : QString());
2121 
2122  QString state = "available";
2123  if (unavailable)
2124  state = (m_changrpid == -1) ? "unavailable" : "favunavailable";
2125  else
2126  state = (m_changrpid == -1) ? "available" : "favourite";
2127 
2128  item->SetFontState(state);
2129  item->DisplayState(state, "chanstatus");
2130 
2131  if (chinfo)
2132  {
2133  InfoMap infomap;
2134  chinfo->ToMap(infomap);
2135  item->SetTextFromMap(infomap);
2136 
2137  if (!chinfo->m_icon.isEmpty())
2138  {
2139  QString iconurl =
2140  gCoreContext->GetMasterHostPrefix("ChannelIcons",
2141  chinfo->m_icon);
2142  item->SetImage(iconurl, "channelicon");
2143  }
2144  }
2145  }
2147 }
2148 
2150 {
2151  if (m_currentRow < 0 || m_currentCol < 0)
2152  return;
2153 
2155  if (!pginfo)
2156  return;
2157 
2158  InfoMap infoMap;
2159 
2160  int chanNum = m_currentRow + m_currentStartChannel;
2161  if (chanNum >= (int)m_channelInfos.size())
2162  chanNum -= (int)m_channelInfos.size();
2163  if (chanNum >= (int)m_channelInfos.size())
2164  return;
2165  if (chanNum < 0)
2166  chanNum = 0;
2167 
2168  ChannelInfo *chinfo = GetChannelInfo(chanNum);
2169 
2170  if (m_channelImage)
2171  {
2172  m_channelImage->Reset();
2173  if (!chinfo->m_icon.isEmpty())
2174  {
2175  QString iconurl = gCoreContext->GetMasterHostPrefix("ChannelIcons",
2176  chinfo->m_icon);
2177 
2178  m_channelImage->SetFilename(iconurl);
2179  m_channelImage->Load();
2180  }
2181  }
2182 
2183  chinfo->ToMap(infoMap);
2184  pginfo->ToMap(infoMap);
2185  // HACK - This should be done in ProgramInfo, but that needs more careful
2186  // review since it may have unintended consequences so we're doing it here
2187  // for now
2188  if (infoMap["title"] == kUnknownTitle)
2189  {
2190  infoMap["title"] = tr("Unknown", "Unknown program title");
2191  infoMap["titlesubtitle"] = tr("Unknown", "Unknown program title");
2192  }
2193 
2194  SetTextFromMap(infoMap);
2195 
2196  MythUIStateType *ratingState = dynamic_cast<MythUIStateType*>
2197  (GetChild("ratingstate"));
2198  if (ratingState)
2199  {
2200  QString rating = QString::number(pginfo->GetStars(10));
2201  ratingState->DisplayState(rating);
2202  }
2204 }
2205 
2207 {
2208  int oldchangrpid = m_changrpid;
2209 
2211 
2212  if (oldchangrpid != m_changrpid)
2213  generateListings();
2214 
2215  updateChannels();
2216  updateInfo();
2217 
2218  QString changrpname = ChannelGroup::GetChannelGroupName(m_changrpid);
2219 
2220  if (m_changroupname)
2221  m_changroupname->SetText(changrpname);
2222 }
2223 
2225 {
2227  m_currentRow = 0;
2228 
2229  int maxchannel = 0;
2230  fillChannelInfos();
2231  maxchannel = std::max((int)GetChannelCount() - 1, 0);
2232  m_channelCount = std::min(m_guideGrid->getChannelCount(), maxchannel + 1);
2233 
2235  fillProgramInfos();
2236 }
2237 
2239 {
2240  ChannelGroupList channels = ChannelGroup::GetChannelGroups(mode == 0);
2241 
2242  if (channels.empty())
2243  {
2244  QString message = tr("You don't have any channel groups defined");
2245 
2246  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
2247 
2248  auto *okPopup = new MythConfirmationDialog(popupStack, message, false);
2249  if (okPopup->Create())
2250  popupStack->AddScreen(okPopup);
2251  else
2252  delete okPopup;
2253 
2254  return;
2255  }
2256 
2257  QString label = tr("Select Channel Group");
2258 
2259  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
2260  auto *menuPopup = new MythDialogBox(label, popupStack, "menuPopup");
2261 
2262  if (menuPopup->Create())
2263  {
2264  if (mode == 0)
2265  {
2266  // add channel to group menu
2267  menuPopup->SetReturnEvent(this, "channelgrouptogglemenu");
2268  }
2269  else
2270  {
2271  // switch to channel group menu
2272  menuPopup->SetReturnEvent(this, "channelgroupmenu");
2273  menuPopup->AddButton(QObject::tr("All Channels"));
2274  }
2275 
2276  for (auto & channel : channels)
2277  {
2278  menuPopup->AddButton(channel.m_name);
2279  }
2280 
2281  popupStack->AddScreen(menuPopup);
2282  }
2283  else
2284  {
2285  delete menuPopup;
2286  }
2287 }
2288 
2290 {
2291  MSqlQuery query(MSqlQuery::InitCon());
2292 
2293  if (grpid == -1)
2294  {
2295  if (m_changrpid == -1)
2296  return;
2297  grpid = m_changrpid;
2298  }
2299 
2300  // Get current channel id, and make sure it exists...
2301  int chanNum = m_currentRow + m_currentStartChannel;
2302  if (chanNum >= (int)m_channelInfos.size())
2303  chanNum -= (int)m_channelInfos.size();
2304  if (chanNum >= (int)m_channelInfos.size())
2305  return;
2306  if (chanNum < 0)
2307  chanNum = 0;
2308 
2309  ChannelInfo *ch = GetChannelInfo(chanNum);
2310  uint chanid = ch->m_chanId;
2311 
2312  if (m_changrpid == -1)
2313  {
2314  // If currently viewing all channels, allow to add only not delete
2315  ChannelGroup::ToggleChannel(chanid, grpid, false);
2316  }
2317  else
2318  {
2319  // Only allow delete if viewing the favorite group in question
2320  ChannelGroup::ToggleChannel(chanid, grpid, true);
2321  }
2322 
2323  //regenerate the list of non empty group in case it did change
2325 
2326  // If viewing favorites, refresh because a channel was removed
2327  if (m_changrpid != -1)
2328  {
2329  generateListings();
2330  updateChannels();
2331  updateInfo();
2332  }
2333 }
2334 
2336 {
2338 
2339  if (!test)
2340  {
2342  return;
2343  }
2344 
2345  int8_t startCol = test->m_startCol;
2346  m_currentCol = startCol - 1;
2347 
2348  if (m_currentCol < 0)
2349  {
2350  m_currentCol = 0;
2352  }
2353  else
2354  {
2356  }
2357 }
2358 
2360 {
2362 
2363  if (!test)
2364  {
2366  return;
2367  }
2368 
2369  int8_t spread = test->m_spread;
2370  int8_t startCol = test->m_startCol;
2371 
2372  m_currentCol = startCol + spread;
2373 
2374  if (m_currentCol > m_timeCount - 1)
2375  {
2376  m_currentCol = m_timeCount - 1;
2378  }
2379  else
2380  {
2382  }
2383 }
2384 
2386 {
2387  m_currentRow++;
2388 
2389  if (m_currentRow > m_channelCount - 1)
2390  {
2393  }
2394  else
2395  {
2397  }
2398 }
2399 
2401 {
2402  m_currentRow--;
2403 
2404  if (m_currentRow < 0)
2405  {
2406  m_currentRow = 0;
2408  }
2409  else
2410  {
2412  }
2413 }
2414 
2416 {
2417  switch (movement)
2418  {
2419  case kScrollLeft :
2420  m_currentStartTime = m_currentStartTime.addSecs(-30 * 60);
2421  break;
2422  case kScrollRight :
2423  m_currentStartTime = m_currentStartTime.addSecs(30 * 60);
2424  break;
2425  case kPageLeft :
2426  m_currentStartTime = m_currentStartTime.addSecs(-5 * 60 * m_timeCount);
2427  break;
2428  case kPageRight :
2430  break;
2431  case kDayLeft :
2432  m_currentStartTime = m_currentStartTime.addSecs(-24 * 60 * 60);
2433  break;
2434  case kDayRight :
2435  m_currentStartTime = m_currentStartTime.addSecs(24 * 60 * 60);
2436  break;
2437  default :
2438  break;
2439  }
2440 
2441  fillTimeInfos();
2442  fillProgramInfos();
2443  updateDateText();
2444 }
2445 
2447 {
2448  switch (movement)
2449  {
2450  case kScrollDown :
2452  break;
2453  case kScrollUp :
2455  break;
2456  case kPageDown :
2458  break;
2459  case kPageUp :
2461  break;
2462  default :
2463  break;
2464  }
2465 
2466  fillProgramInfos();
2467  updateChannels();
2468 }
2469 
2470 void GuideGrid::moveToTime(const QDateTime& datetime)
2471 {
2472  if (!datetime.isValid())
2473  return;
2474 
2475  m_currentStartTime = datetime;
2476 
2477  fillTimeInfos();
2478  fillProgramInfos();
2479  updateDateText();
2480 }
2481 
2482 void GuideGrid::setStartChannel(int newStartChannel)
2483 {
2484  if (newStartChannel < 0)
2485  m_currentStartChannel = newStartChannel + GetChannelCount();
2486  else if (newStartChannel >= (int) GetChannelCount())
2487  m_currentStartChannel = newStartChannel - GetChannelCount();
2488  else
2489  m_currentStartChannel = newStartChannel;
2490 }
2491 
2493 {
2494  if (m_allowFinder)
2496 }
2497 
2499 {
2500  if (!m_player)
2501  return;
2502 
2503  m_updateTimer->stop();
2504 
2505  channelUpdate();
2506 
2507  // Don't perform transition effects when guide is being used during playback
2508  GetScreenStack()->PopScreen(this, false);
2509 
2510  epgIsVisibleCond.wakeAll();
2511 }
2512 
2514 {
2515  // HACK: Do not allow exit if we have a popup menu open, not convinced
2516  // that this is the right solution
2517  if (GetMythMainWindow()->GetStack("popup stack")->TotalScreens() > 0)
2518  return;
2519 
2520  m_updateTimer->stop();
2521 
2522  // don't fade the screen if we are returning to the player
2523  if (m_player)
2524  GetScreenStack()->PopScreen(this, false);
2525  else
2526  GetScreenStack()->PopScreen(this, true);
2527 
2528  epgIsVisibleCond.wakeAll();
2529 }
2530 
2532 {
2534 
2535  if (!pginfo || !pginfo->GetRecordingRuleID())
2536  return;
2537 
2538  auto *record = new RecordingRule();
2539  if (!record->LoadByProgram(pginfo))
2540  {
2541  delete record;
2542  return;
2543  }
2544 
2545  QString message = tr("Delete '%1' %2 rule?")
2546  .arg(record->m_title, toString(pginfo->GetRecordingRuleType()));
2547 
2548  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
2549 
2550  auto *okPopup = new MythConfirmationDialog(popupStack, message, true);
2551 
2552  okPopup->SetReturnEvent(this, "deleterule");
2553  okPopup->SetData(QVariant::fromValue(record));
2554 
2555  if (okPopup->Create())
2556  popupStack->AddScreen(okPopup);
2557  else
2558  delete okPopup;
2559 }
2560 
2562 {
2563  if (!m_player)
2564  return;
2565 
2566  ChannelInfoList sel = GetSelection();
2567 
2568  if (!sel.empty())
2569  {
2571  m_player->ChangeChannel(sel);
2573  }
2574 }
2575 
2576 void GuideGrid::GoTo(int start, int cur_row)
2577 {
2578  setStartChannel(start);
2579  m_currentRow = cur_row % m_channelCount;
2580  updateChannels();
2581  fillProgramInfos();
2583 }
2584 
2586 {
2587  QString txt;
2588  {
2589  QMutexLocker locker(&m_jumpToChannelLock);
2590  if (m_jumpToChannel)
2591  txt = m_jumpToChannel->GetEntry();
2592  }
2593 
2594  if (txt.isEmpty())
2595  return;
2596 
2597  if (m_jumpToText)
2598  m_jumpToText->SetText(txt);
2599 }
2600 
2602 {
2603  QMutexLocker locker(&m_jumpToChannelLock);
2604  m_jumpToChannel = ptr;
2605 
2606  if (!m_jumpToChannel)
2607  {
2608  if (m_jumpToText)
2609  m_jumpToText->Reset();
2610 
2611  updateDateText();
2612  }
2613 }
2614 
2616 {
2617  GetMythMainWindow()->GetPaintWindow()->clearMask();
2618 }
2619 
2621 {
2622  emit m_player->RequestEmbedding(true, m_videoRect);
2623  QRegion r1 = QRegion(m_area);
2624  QRegion r2 = QRegion(m_videoRect);
2625  GetMythMainWindow()->GetPaintWindow()->setMask(r1.xored(r2));
2626 }
2627 
2629 {
2630  if (m_player)
2631  HideTVWindow();
2632 
2634 }
2635 
2637 {
2638  if (m_player)
2639  EmbedTVWindow();
2640 
2642 }
2643 
2645 {
2646  QString message = tr("Jump to a specific date and time in the guide");
2649 
2650  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
2651  auto *timedlg = new MythTimeInputDialog(popupStack, message, flags);
2652 
2653  if (timedlg->Create())
2654  {
2655  timedlg->SetReturnEvent(this, "jumptotime");
2656  popupStack->AddScreen(timedlg);
2657  }
2658  else
2659  delete timedlg;
2660 }
ChannelInfo
Definition: channelinfo.h:31
has_action
static bool has_action(const QString &action, const QStringList &actions)
Definition: guidegrid.cpp:105
GuideGrid::ShowMenu
void ShowMenu(void) override
Definition: guidegrid.cpp:1056
GuideGrid::m_guideGrid
MythUIGuideGrid * m_guideGrid
Definition: guidegrid.h:293
MSqlBindings
QMap< QString, QVariant > MSqlBindings
typedef for a map of string -> string bindings for generic queries.
Definition: mythdbcon.h:97
GuideUpdaterBase::~GuideUpdaterBase
virtual ~GuideUpdaterBase()=default
GuideGrid::GetChannelCount
uint GetChannelCount(void) const
Definition: guidegrid.cpp:1151
MythGestureEvent::Down
@ Down
Definition: mythgesture.h:50
MythGestureEvent::LeftThenUp
@ LeftThenUp
Definition: mythgesture.h:65
MythUIType::m_area
MythRect m_area
Definition: mythuitype.h:271
GuideUpdateChannels::ExecuteNonUI
bool ExecuteNonUI(void) override
Definition: guidegrid.cpp:330
MythScreenType::LoadInBackground
void LoadInBackground(const QString &message="")
Definition: mythscreentype.cpp:285
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:124
ACTION_UP
#define ACTION_UP
Definition: mythuiactions.h:16
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:317
GuideStatus::m_currentStartChannel
const uint m_currentStartChannel
Definition: guidegrid.cpp:221
TVPlaybackState::RequestEmbedding
void RequestEmbedding(bool Embed, const QRect &Rect={}, const QStringList &Data={})
GuideGrid::m_embedVideo
bool m_embedVideo
Definition: guidegrid.h:270
mythrect.h
mythevent.h
ProgramInfo::m_startCol
int8_t m_startCol
Definition: programinfo.h:830
MythDate::toString
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
Definition: mythdate.cpp:80
tv.h
TV::GetState
TVState GetState() const
Definition: tv_play.cpp:1330
MythEvent::MythEventMessage
static Type MythEventMessage
Definition: mythevent.h:78
hardwareprofile.smolt.timeout
float timeout
Definition: smolt.py:103
GuideGrid::moveUpDown
void moveUpDown(MoveVector movement)
Definition: guidegrid.cpp:2446
GuideStatus::m_channelCount
const int m_channelCount
Definition: guidegrid.cpp:223
GuideGrid::EmbedTVWindow
void EmbedTVWindow(void)
Definition: guidegrid.cpp:2620
MythTimeInputDialog::kHours
@ kHours
Definition: mythdialogbox.h:457
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
JumpToChannelListener::FindChannel
virtual int FindChannel(uint chanid, const QString &channum, bool exact=true) const =0
mythuitext.h
GuideGrid::channelUpdate
void channelUpdate()
Definition: guidegrid.cpp:2561
GuideUpdateProgramRow::m_currentStartTime
const QDateTime m_currentStartTime
Definition: guidegrid.cpp:308
GuideGrid::m_timeCount
int m_timeCount
Definition: guidegrid.h:263
MythUIImage
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:97
ChannelGroup::GetChannelGroupName
static QString GetChannelGroupName(int grpid)
Definition: channelgroup.cpp:231
LoadFromScheduler
bool LoadFromScheduler(AutoDeleteDeque< TYPE * > &destination, bool &hasConflicts, const QString &altTable="", int recordid=-1)
Definition: programinfo.h:893
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:83
ReferenceCounter::DecrRef
virtual int DecrRef(void)
Decrements reference count and deletes on 0.
Definition: referencecounter.cpp:125
GuideGrid::m_changroupname
MythUIText * m_changroupname
Definition: guidegrid.h:297
ACTION_PAGERIGHT
#define ACTION_PAGERIGHT
Definition: tv_actions.h:12
JumpToChannel
Definition: guidegrid.h:47
guidegrid.h
GuideGrid::gestureEvent
bool gestureEvent(MythGestureEvent *event) override
Mouse click/movement handler, receives mouse gesture events from the QCoreApplication event loop.
Definition: guidegrid.cpp:850
false
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:85
MythGestureEvent::GetGesture
Gesture GetGesture() const
Definition: mythgesture.h:85
ChannelInfo::kChannelShort
@ kChannelShort
Definition: channelinfo.h:49
MythUIType::GetChildAt
MythUIType * GetChildAt(QPoint p, bool recursive=true, bool focusable=true) const
Return the first MythUIType at the given coordinates.
Definition: mythuitype.cpp:222
ChannelInfo::m_chanId
uint m_chanId
Definition: channelinfo.h:85
ACTION_DOWN
#define ACTION_DOWN
Definition: mythuiactions.h:17
ChannelInfo::ToMap
void ToMap(InfoMap &infoMap)
Definition: channelinfo.cpp:218
ChannelUtil::LoadChannels
static ChannelInfoList LoadChannels(uint startIndex, uint count, uint &totalAvailable, bool ignoreHidden=true, OrderBy orderBy=kChanOrderByChanNum, GroupBy groupBy=kChanGroupByChanid, uint sourceID=0, uint channelGroupID=0, bool liveTVOnly=false, const QString &callsign="", const QString &channum="", bool ignoreUntunable=true)
Load channels from database into a list of ChannelInfo objects.
Definition: channelutil.cpp:2407
MythGestureEvent::Up
@ Up
Definition: mythgesture.h:49
MythTimeInputDialog::kDay
@ kDay
Definition: mythdialogbox.h:453
ChannelGroup
Definition: channelgroup.h:35
GuideGrid::Close
void Close() override
Definition: guidegrid.cpp:2513
ScheduleCommon::customEvent
void customEvent(QEvent *event) override
Definition: schedulecommon.cpp:486
GuideGrid::ShowRecordingMenu
void ShowRecordingMenu(void)
Definition: guidegrid.cpp:1102
UpdateGuideEvent::kEventType
static Type kEventType
Definition: guidegrid.cpp:352
kDailyRecord
@ kDailyRecord
Definition: recordingtypes.h:23
MAX_DISPLAY_CHANS
#define MAX_DISPLAY_CHANS
Definition: mythuiguidegrid.h:23
GuideGrid::m_allowFinder
bool m_allowFinder
Definition: guidegrid.h:242
GuideUpdaterBase::GuideUpdaterBase
GuideUpdaterBase(GuideGrid *guide)
Definition: guidegrid.cpp:231
GuideGrid::kPageRight
@ kPageRight
Definition: guidegrid.h:193
GuideGrid::ToggleMute
void ToggleMute(bool CycleChannels)
GuideGrid::m_channelImage
MythUIImage * m_channelImage
Definition: guidegrid.h:298
GuideGrid::GetAlternateChannelIndex
uint GetAlternateChannelIndex(uint chan_idx, bool with_same_channum) const
Definition: guidegrid.cpp:1199
ACTION_FINDER
#define ACTION_FINDER
Definition: tv_actions.h:27
RunProgramFinder
void RunProgramFinder(TV *player, bool embedVideo, bool allowEPG)
Definition: progfind.cpp:35
MythUIGuideGrid::isVerticalLayout
bool isVerticalLayout(void) const
Definition: mythuiguidegrid.h:53
GuideGrid::m_jumpToChannelLock
QRecursiveMutex m_jumpToChannelLock
Definition: guidegrid.h:287
GuideGrid::m_startChanID
uint m_startChanID
Definition: guidegrid.h:254
MythUIType::GetChild
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
Definition: mythuitype.cpp:131
MythUIGuideGrid::SetProgPast
void SetProgPast(int ppast)
Definition: mythuiguidegrid.cpp:806
mythscreenstack.h
MythGestureEvent::RightThenDown
@ RightThenDown
Definition: mythgesture.h:68
GuideGrid::m_currentEndTime
QDateTime m_currentEndTime
Definition: guidegrid.h:252
ChannelUtil::OrderBy
OrderBy
Definition: channelutil.h:198
MythUIImage::Load
bool Load(bool allowLoadInBackground=true, bool forceStat=false)
Load the image(s), wraps ImageLoader::LoadImage()
Definition: mythuiimage.cpp:968
GuideGrid::updateChannels
void updateChannels(void)
Definition: guidegrid.cpp:2052
GuideGrid::m_verticalLayout
bool m_verticalLayout
Definition: guidegrid.h:264
DialogCompletionEvent::kEventType
static Type kEventType
Definition: mythdialogbox.h:57
GuideGrid::setStartChannel
void setStartChannel(int newStartChannel)
Definition: guidegrid.cpp:2482
ChannelUtil::kChanGroupByChanid
@ kChanGroupByChanid
Definition: channelutil.h:209
MythEvent
This class is used as a container for messages.
Definition: mythevent.h:16
JumpToChannelListener
Definition: guidegrid.h:37
ACTION_TOGGLERECORD
#define ACTION_TOGGLERECORD
Definition: tv_actions.h:19
GuideUpdaterBase::ExecuteUI
virtual void ExecuteUI(void)=0
AutoDeleteDeque::empty
bool empty(void) const
Definition: autodeletedeque.h:66
kStartTVNoFlags
@ kStartTVNoFlags
Definition: tv_play.h:113
GuideGrid::m_currentStartChannel
uint m_currentStartChannel
Definition: guidegrid.h:253
JumpToChannel::kJumpToChannelTimeout
static const uint kJumpToChannelTimeout
Definition: guidegrid.h:75
GuideUpdateProgramRow::m_timeCount
const int m_timeCount
Definition: guidegrid.cpp:314
mythdialogbox.h
MythScreenStack
Definition: mythscreenstack.h:16
GuideHelper::s_wait
static QWaitCondition s_wait
Definition: guidegrid.cpp:407
mythdbcon.h
ProgramInfo::GetCategory
QString GetCategory(void) const
Definition: programinfo.h:368
ProgInfoGuideArray
std::array< std::array< ProgramInfo *, MAX_DISPLAY_TIMES >, MAX_DISPLAY_CHANS > ProgInfoGuideArray
Definition: guidegrid.h:34
ACTION_VOLUMEUP
#define ACTION_VOLUMEUP
Definition: tv_actions.h:110
GuideUpdateProgramRow::m_ggChannelCount
const int m_ggChannelCount
Definition: guidegrid.cpp:307
RecordingRule
Internal representation of a recording rule, mirrors the record table.
Definition: recordingrule.h:32
GuideGrid::GetStartChannelOffset
int GetStartChannelOffset(int row=-1) const
Definition: guidegrid.cpp:1156
GuideGrid::toggleChannelFavorite
void toggleChannelFavorite(int grpid=-1)
Definition: guidegrid.cpp:2289
GuideGrid::Init
void Init(void) override
Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in...
Definition: guidegrid.cpp:601
GuideUpdateProgramRow::m_firstRow
const unsigned int m_firstRow
Definition: guidegrid.cpp:303
TV::ChangeChannel
void ChangeChannel(const ChannelInfoList &Options)
Definition: tv_play.cpp:6142
JumpToChannel::m_timer
QTimer * m_timer
Definition: guidegrid.h:73
ACTION_TOGGLEPGORDER
#define ACTION_TOGGLEPGORDER
Definition: tv_actions.h:13
GuideGrid::ShowJumpToTime
void ShowJumpToTime(void)
Definition: guidegrid.cpp:2644
GuideUpdateProgramRow::m_numRows
const unsigned int m_numRows
Definition: guidegrid.cpp:304
GuideGrid::m_channelList
MythUIButtonList * m_channelList
Definition: guidegrid.h:292
GuideGrid::cursorUp
void cursorUp()
Definition: guidegrid.cpp:2400
GuideUpdateChannels::m_unavailables
QVector< bool > m_unavailables
Definition: guidegrid.cpp:343
GuideStatus::m_ggChannelCount
const int m_ggChannelCount
Definition: guidegrid.cpp:219
GuideUpdateProgramRow::m_programInfos
ProgInfoGuideArray m_programInfos
Definition: guidegrid.cpp:320
GuideUpdateProgramRow::m_currentEndTime
const QDateTime m_currentEndTime
Definition: guidegrid.cpp:309
GuideHelper
Definition: guidegrid.cpp:357
ProgramInfo::GetScheduledEndTime
QDateTime GetScheduledEndTime(void) const
The scheduled end time of the program.
Definition: programinfo.h:396
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
GuideGrid::GuideGrid
GuideGrid(MythScreenStack *parentStack, uint chanid, QString channum, const QDateTime &startTime, TV *player=nullptr, bool embedVideo=false, bool allowFinder=true, int changrpid=-1)
Definition: guidegrid.cpp:478
GuideStatus::m_firstTime
const QDateTime m_firstTime
Definition: guidegrid.cpp:225
mythuistatetype.h
GuideStatus::m_currentRow
const int m_currentRow
Definition: guidegrid.cpp:222
GuideGrid::m_currentCol
int m_currentCol
Definition: guidegrid.h:258
GuideGrid::PlayerExiting
void PlayerExiting(TV *Player)
Definition: guidegrid.cpp:520
ChannelUtil::kChanOrderByName
@ kChanOrderByName
Definition: channelutil.h:201
kUnknownTitle
const QString kUnknownTitle
Definition: guidegrid.cpp:63
autodeletedeque.h
ChannelGroup::GetChannelGroups
static ChannelGroupList GetChannelGroups(bool includeEmpty=true)
Definition: channelgroup.cpp:172
GuideGrid::kScrollDown
@ kScrollDown
Definition: guidegrid.h:187
JumpToChannel::deleteLater
virtual void deleteLater(void)
Definition: guidegrid.cpp:87
recordingtypes.h
JumpToChannel::m_rowsDisplayed
uint m_rowsDisplayed
Definition: guidegrid.h:72
GuideGrid::Create
bool Create(void) override
Definition: guidegrid.cpp:531
MythUIImage::Reset
void Reset(void) override
Reset the image back to the default defined in the theme.
Definition: mythuiimage.cpp:645
MythGestureEvent::UpThenLeft
@ UpThenLeft
Definition: mythgesture.h:61
progfind.h
GuideGrid::cursorRight
void cursorRight()
Definition: guidegrid.cpp:2359
UpdateGuideEvent::UpdateGuideEvent
UpdateGuideEvent(GuideUpdaterBase *updater)
Definition: guidegrid.cpp:349
MythRect
Wrapper around QRect allowing us to handle percentage and other relative values for areas in mythui.
Definition: mythrect.h:17
GuideUpdateProgramRow::m_currentCol
const int m_currentCol
Definition: guidegrid.cpp:312
MythUIGuideGrid::getChannelCount
int getChannelCount(void) const
Definition: mythuiguidegrid.h:54
GuideGrid::updateChannelsNonUI
void updateChannelsNonUI(QVector< ChannelInfo * > &chinfos, QVector< bool > &unavailables)
Definition: guidegrid.cpp:2058
remoteutil.h
mythuibuttonlist.h
GuideGrid::deleteRule
void deleteRule()
Definition: guidegrid.cpp:2531
mythuiimage.h
ScheduleCommon::ShowDetails
virtual void ShowDetails(void) const
Show the Program Details screen.
Definition: schedulecommon.cpp:33
ChannelInfo::m_icon
QString m_icon
Definition: channelinfo.h:93
GuideUpdateProgramRow::ExecuteNonUI
bool ExecuteNonUI(void) override
Definition: guidegrid.cpp:269
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
mythuiguidegrid.h
GuideGrid::m_channelCount
int m_channelCount
Definition: guidegrid.h:262
TV::StartTV
static bool StartTV(ProgramInfo *TVRec, uint Flags, const ChannelInfoList &Selection=ChannelInfoList())
Start playback of media.
Definition: tv_play.cpp:265
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:280
GuideGrid::aboutToShow
void aboutToShow() override
Definition: guidegrid.cpp:2636
ScheduleCommon::EditScheduled
virtual void EditScheduled(void)
Creates a dialog for editing the recording schedule.
Definition: schedulecommon.cpp:172
tmp
static guint32 * tmp
Definition: goom_core.cpp:31
GuideUpdaterBase::ExecuteNonUI
virtual bool ExecuteNonUI(void)=0
JumpToChannel::Update
bool Update(void)
Definition: guidegrid.cpp:165
MythUIType::GetArea
virtual MythRect GetArea(void) const
If the object has a minimum area defined, return it, other wise return the default area.
Definition: mythuitype.cpp:870
programtypes.h
GuideGrid::aboutToHide
void aboutToHide() override
Definition: guidegrid.cpp:2628
db_chan_list_t
std::vector< ChannelInfo > db_chan_list_t
Definition: guidegrid.h:32
GuideUpdateProgramRow::m_verticalLayout
const bool m_verticalLayout
Definition: guidegrid.cpp:315
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
GuideGrid::m_programs
std::vector< ProgramList * > m_programs
Definition: guidegrid.h:246
MythObservable::addListener
void addListener(QObject *listener)
Add a listener to the observable.
Definition: mythobservable.cpp:38
ChannelInfo::GetFormatted
QString GetFormatted(ChannelFormat format) const
Definition: channelinfo.cpp:190
AutoDeleteDeque::begin
iterator begin(void)
Definition: autodeletedeque.h:50
GuideUpdateProgramRow::ExecuteUI
void ExecuteUI(void) override
Definition: guidegrid.cpp:292
RecStatus::WillRecord
@ WillRecord
Definition: recStatus.h:31
mythuiutils.h
GuideGrid::m_startChanNum
QString m_startChanNum
Definition: guidegrid.h:255
GuideGrid::m_currentStartTime
QDateTime m_currentStartTime
Definition: guidegrid.h:251
MythUIButtonListItem
Definition: mythuibuttonlist.h:27
GuideGrid::kScrollUp
@ kScrollUp
Definition: guidegrid.h:186
JumpToChannelListener::GoTo
virtual void GoTo(int start, int cur_row)=0
GuideGrid::m_selectRecThreshold
std::chrono::minutes m_selectRecThreshold
Definition: guidegrid.h:240
GuideHelper::GuideHelper
GuideHelper(GuideGrid *guide, GuideUpdaterBase *updater)
Definition: guidegrid.cpp:360
MythDate::secsInFuture
std::chrono::seconds secsInFuture(const QDateTime &future)
Definition: mythdate.cpp:204
toString
QString toString(MarkTypes type)
Definition: programtypes.cpp:26
ScheduleCommon::ShowPrevious
virtual void ShowPrevious(void) const
Show the previous recordings for this recording rule.
Definition: schedulecommon.cpp:254
GuideStatus::m_timeCount
const int m_timeCount
Definition: guidegrid.cpp:223
GuideGrid::customEvent
void customEvent(QEvent *event) override
Definition: guidegrid.cpp:1843
MAX_DISPLAY_TIMES
#define MAX_DISPLAY_TIMES
Definition: mythuiguidegrid.h:26
mythdate.h
GuideGrid::cursorDown
void cursorDown()
Definition: guidegrid.cpp:2385
GuideGrid::m_originalStartTime
QDateTime m_originalStartTime
Definition: guidegrid.h:250
GuideGrid::m_videoRect
QRect m_videoRect
Definition: guidegrid.h:273
SelectionIsTunable
static bool SelectionIsTunable(const ChannelInfoList &selection)
Definition: guidegrid.cpp:1050
programinfo.h
RemoteRequestFreeInputList
std::vector< uint > RemoteRequestFreeInputList(uint excluded_input)
Definition: tvremoteutil.cpp:244
GuideGrid::fillChannelInfos
void fillChannelInfos(bool gotostartchannel=true)
Definition: guidegrid.cpp:1343
GuideUpdateProgramRow::m_chanNums
const QVector< int > m_chanNums
Definition: guidegrid.cpp:305
ProgramInfo::GetScheduledStartTime
QDateTime GetScheduledStartTime(void) const
The scheduled start time of program.
Definition: programinfo.h:389
GuideStatus::m_chanNums
const QVector< int > m_chanNums
Definition: guidegrid.cpp:217
ScheduleCommon::EditCustom
virtual void EditCustom(void)
Creates a dialog for creating a custom recording rule.
Definition: schedulecommon.cpp:208
mythlogging.h
ProgramInfo::GetRecordingStatus
RecStatus::Type GetRecordingStatus(void) const
Definition: programinfo.h:446
GuideGrid::m_sortReverse
bool m_sortReverse
Definition: guidegrid.h:260
GuideStatus::m_ggProgramRect
const MythRect m_ggProgramRect
Definition: guidegrid.cpp:218
kUpdateMS
static constexpr std::chrono::milliseconds kUpdateMS
Definition: guidegrid.cpp:65
GuideStatus::m_currentEndTime
const QDateTime m_currentEndTime
Definition: guidegrid.cpp:220
GuideGrid::m_longdateText
MythUIText * m_longdateText
Definition: guidegrid.h:295
GuideGrid::m_firstTime
QDateTime m_firstTime
Definition: guidegrid.h:266
MythMainWindow::TranslateKeyPress
bool TranslateKeyPress(const QString &Context, QKeyEvent *Event, QStringList &Actions, bool AllowJumps=true)
Get a list of actions for a keypress in the given context.
Definition: mythmainwindow.cpp:1116
GuideUpdateChannels::m_chinfos
QVector< ChannelInfo * > m_chinfos
Definition: guidegrid.cpp:342
ProgramInfo::SetScheduledEndTime
void SetScheduledEndTime(const QDateTime &dt)
Definition: programinfo.h:524
GuideGrid::m_recList
ProgramList m_recList
Definition: guidegrid.h:248
MythUIGuideGrid::ResetRow
void ResetRow(int row)
Definition: mythuiguidegrid.cpp:797
tv_actions.h
GridTimeStartsBefore
#define GridTimeStartsBefore
Definition: mythuiguidegrid.h:29
ACTION_RIGHT
#define ACTION_RIGHT
Definition: mythuiactions.h:19
GuideHelper::s_lock
static QMutex s_lock
Definition: guidegrid.cpp:406
GuideUpdaterBase::m_guide
GuideGrid * m_guide
Definition: guidegrid.cpp:243
GuideStatus
Definition: guidegrid.cpp:193
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:166
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:360
GuideGrid::m_threadPool
MThreadPool m_threadPool
Definition: guidegrid.h:279
GuideGrid::showProgFinder
void showProgFinder()
Definition: guidegrid.cpp:2492
GuideGrid::updateProgramsUI
void updateProgramsUI(unsigned int firstRow, unsigned int numRows, int progPast, const QVector< ProgramList * > &proglists, const ProgInfoGuideArray &programInfos, const std::list< GuideUIElement > &elements)
Definition: guidegrid.cpp:2019
GuideGrid::fillTimeInfos
void fillTimeInfos(void)
Definition: guidegrid.cpp:1480
GuideGrid::enter
void enter()
Definition: guidegrid.cpp:2498
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:205
hardwareprofile.scan.rating
def rating(profile, smoonURL, gate)
Definition: scan.py:39
GuideUpdateChannels::ExecuteUI
void ExecuteUI(void) override
Definition: guidegrid.cpp:337
GuideUpdateProgramRow::m_progPast
int m_progPast
Definition: guidegrid.cpp:321
ACTION_CHANNELSEARCH
#define ACTION_CHANNELSEARCH
Definition: tv_actions.h:28
GuideUpdateProgramRow::GuideUpdateProgramRow
GuideUpdateProgramRow(GuideGrid *guide, const GuideStatus &gs, QVector< ProgramList * > proglists)
Definition: guidegrid.cpp:249
ChannelInfo::m_chanNum
QString m_chanNum
Definition: channelinfo.h:86
GuideUpdateProgramRow::~GuideUpdateProgramRow
~GuideUpdateProgramRow() override=default
GuideGrid
Definition: guidegrid.h:101
mythtypes.h
MythUIComposite::SetTextFromMap
virtual void SetTextFromMap(const InfoMap &infoMap)
Definition: mythuicomposite.cpp:9
ScheduleCommon
Definition: schedulecommon.h:15
MythDate::kDateShort
@ kDateShort
Default local time.
Definition: mythdate.h:20
MythUIType::m_parent
MythUIType * m_parent
Definition: mythuitype.h:291
MythGestureEvent::Right
@ Right
Definition: mythgesture.h:52
RecStatus::Conflict
@ Conflict
Definition: recStatus.h:39
LOC
#define LOC
Definition: guidegrid.cpp:59
GuideGrid::kDayRight
@ kDayRight
Definition: guidegrid.h:195
GuideUpdateProgramRow::m_lastTime
const QDateTime m_lastTime
Definition: guidegrid.cpp:317
ACTION_SELECT
#define ACTION_SELECT
Definition: mythuiactions.h:15
ProgramInfo::ToMap
virtual void ToMap(InfoMap &progMap, bool showrerecord=false, uint star_range=10, uint date_format=0) const
Converts ProgramInfo into QString QHash containing each field in ProgramInfo converted into localized...
Definition: programinfo.cpp:1560
GuideGrid::m_updateTimer
QTimer * m_updateTimer
Definition: guidegrid.h:277
MythGestureEvent::DownThenRight
@ DownThenRight
Definition: mythgesture.h:64
TV::IsTunable
static bool IsTunable(uint ChanId)
Definition: tv_play.cpp:6658
MythGestureEvent::Click
@ Click
Definition: mythgesture.h:77
GuideGrid::Load
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
Definition: guidegrid.cpp:576
GuideGrid::GetCurrentStartChannel
uint GetCurrentStartChannel(void) const
Definition: guidegrid.h:131
MythMainWindow::GetPaintWindow
QWidget * GetPaintWindow()
Definition: mythmainwindow.cpp:267
GuideGrid::m_channelInfos
db_chan_list_list_t m_channelInfos
Definition: guidegrid.h:243
GuideUpdateProgramRow::fillProgramRowInfosWith
void fillProgramRowInfosWith(int row, const QDateTime &start, ProgramList *proglist)
Definition: guidegrid.cpp:1609
ChannelGroupList
std::vector< ChannelGroupItem > ChannelGroupList
Definition: channelgroup.h:31
GridTimeEndsAfter
#define GridTimeEndsAfter
Definition: mythuiguidegrid.h:30
GuideUpdateChannels
Definition: guidegrid.cpp:325
ChannelUtil::GetChannels
static ChannelInfoList GetChannels(uint sourceid, bool visible_only, const QString &group_by=QString(), uint channel_groupid=0)
Definition: channelutil.h:243
GuideGrid::m_timeList
MythUIButtonList * m_timeList
Definition: guidegrid.h:291
uint
unsigned int uint
Definition: compat.h:140
GuideUpdateChannels::m_currentStartChannel
uint m_currentStartChannel
Definition: guidegrid.cpp:341
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:60
UpdateGuideEvent
Definition: guidegrid.cpp:346
GuideStatus::m_currentCol
const int m_currentCol
Definition: guidegrid.cpp:222
GuideStatus::m_numRows
const unsigned int m_numRows
Definition: guidegrid.cpp:216
JumpToChannel::JumpToChannel
JumpToChannel(JumpToChannelListener *parent, QString start_entry, int start_chan_idx, int cur_chan_idx, uint rows_disp)
Definition: guidegrid.cpp:68
GuideGrid::~GuideGrid
~GuideGrid() override
Definition: guidegrid.cpp:624
AutoDeleteDeque::end
iterator end(void)
Definition: autodeletedeque.h:51
GuideGrid::kPageDown
@ kPageDown
Definition: guidegrid.h:191
MythGestureEvent::Left
@ Left
Definition: mythgesture.h:51
MythCoreContext::GetNumSetting
int GetNumSetting(const QString &key, int defaultval=0)
Definition: mythcorecontext.cpp:936
MythScreenType::GetScreenStack
MythScreenStack * GetScreenStack() const
Definition: mythscreentype.cpp:216
mythgesture.h
A C++ ripoff of the stroke library for MythTV.
RecStatus::Offline
@ Offline
Definition: recStatus.h:44
GuideUpdateProgramRow::m_firstTime
const QDateTime m_firstTime
Definition: guidegrid.cpp:316
kOneRecord
@ kOneRecord
Definition: recordingtypes.h:27
UIUtilDisp::Assign
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
Definition: mythuiutils.h:27
GuideHelper::s_loading
static QHash< GuideGrid *, uint > s_loading
Definition: guidegrid.cpp:408
GuideHelper::m_updater
GuideUpdaterBase * m_updater
Definition: guidegrid.cpp:404
channelutil.h
ProgramInfo::m_spread
int8_t m_spread
Definition: programinfo.h:829
GuideGrid::m_player
TV * m_player
Definition: guidegrid.h:269
tvremoteutil.h
MythUIType
The base class on which all widgets and screens are based.
Definition: mythuitype.h:84
GuideGrid::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: guidegrid.cpp:661
GuideGrid::kScrollRight
@ kScrollRight
Definition: guidegrid.h:189
GuideGrid::m_channelOrdering
QString m_channelOrdering
Definition: guidegrid.h:275
MythDate::kSimplify
@ kSimplify
Do Today/Yesterday/Tomorrow transform.
Definition: mythdate.h:26
MythCoreContext::GetBoolSetting
bool GetBoolSetting(const QString &key, bool defaultval=false)
Definition: mythcorecontext.cpp:930
GuideGrid::MoveVector
MoveVector
Definition: guidegrid.h:185
GuideStatus::m_verticalLayout
const bool m_verticalLayout
Definition: guidegrid.cpp:224
AutoDeleteDeque< ProgramInfo * >
GuideGrid::moveLeftRight
void moveLeftRight(MoveVector movement)
Definition: guidegrid.cpp:2415
GuideGrid::m_changrpid
int m_changrpid
Definition: guidegrid.h:281
JumpToChannelListener::SetJumpToChannel
virtual void SetJumpToChannel(JumpToChannel *ptr)=0
ChannelGroup::ToggleChannel
static bool ToggleChannel(uint chanid, int changrpid, bool delete_chan)
Definition: channelgroup.cpp:16
channelinfo.h
GuideGrid::updateChannelsUI
void updateChannelsUI(const QVector< ChannelInfo * > &chinfos, const QVector< bool > &unavailables)
Definition: guidegrid.cpp:2111
kWeeklyRecord
@ kWeeklyRecord
Definition: recordingtypes.h:26
ProgramList
AutoDeleteDeque< ProgramInfo * > ProgramList
Definition: programinfo.h:31
GuideUpdateProgramRow::m_channelCount
const int m_channelCount
Definition: guidegrid.cpp:313
GuideGrid::m_jumpToText
MythUIText * m_jumpToText
Definition: guidegrid.h:296
GuideGrid::kDayLeft
@ kDayLeft
Definition: guidegrid.h:194
MythUIGuideGrid::getTimeCount
int getTimeCount(void) const
Definition: mythuiguidegrid.h:55
GuideUpdateChannels::GuideUpdateChannels
GuideUpdateChannels(GuideGrid *guide, uint startChan)
Definition: guidegrid.cpp:328
ProgramInfo::GetRecordingRuleType
RecordingType GetRecordingRuleType(void) const
Definition: programinfo.h:450
ChannelGroup::GetNextChannelGroup
static int GetNextChannelGroup(const ChannelGroupList &sorted, int grpid)
Definition: channelgroup.cpp:206
AutoDeleteDeque::push_back
void push_back(T info)
Definition: autodeletedeque.h:69
JumpToChannel::m_previousCurrentChannelIndex
int m_previousCurrentChannelIndex
Definition: guidegrid.h:71
JumpToChannel::ProcessEntry
bool ProcessEntry(const QStringList &actions, const QKeyEvent *e)
Definition: guidegrid.cpp:116
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:67
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythscreentype.cpp:397
TV::VolumeChange
void VolumeChange(bool Up, int NewVolume=-1)
Definition: tv_play.cpp:6904
GuideGrid::GetCurrentStartTime
QDateTime GetCurrentStartTime(void) const
Definition: guidegrid.h:132
GuideGrid::generateListings
void generateListings()
Definition: guidegrid.cpp:2224
MythConfirmationDialog
Dialog asking for user confirmation. Ok and optional Cancel button.
Definition: mythdialogbox.h:271
GuideUpdateProgramRow::m_ggProgramRect
const MythRect m_ggProgramRect
Definition: guidegrid.cpp:306
MythGestureEvent::LeftThenDown
@ LeftThenDown
Definition: mythgesture.h:66
mythcorecontext.h
MythRect::topLeft
MythPoint topLeft(void) const
Definition: mythrect.cpp:288
GuideGrid::m_jumpToChannel
JumpToChannel * m_jumpToChannel
Definition: guidegrid.h:289
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:692
MKKEY
#define MKKEY(IDX, SEL)
Definition: guidegrid.cpp:1258
cardutil.h
kOverrideRecord
@ kOverrideRecord
Definition: recordingtypes.h:28
TV::GetPlayerContext
PlayerContext * GetPlayerContext()
Return a pointer to TV::m_playerContext.
Definition: tv_play.cpp:171
MythUIGuideGrid::SetProgramInfo
void SetProgramInfo(int row, int col, QRect area, const QString &title, const QString &genre, int arrow, int recType, int recStat, bool selected)
Definition: mythuiguidegrid.cpp:679
ChannelGroup::GetChannelGroupId
static int GetChannelGroupId(const QString &changroupname)
Definition: channelgroup.cpp:253
GuideGrid::cursorLeft
void cursorLeft()
Definition: guidegrid.cpp:2335
kNotRecording
@ kNotRecording
Definition: recordingtypes.h:21
GuideUpdateProgramRow::m_result
std::list< GuideUIElement > m_result
Definition: guidegrid.cpp:322
std
Definition: mythchrono.h:23
GuideGrid::fillProgramRowInfos
void fillProgramRowInfos(int row, bool useExistingData)
Definition: guidegrid.cpp:1543
JumpToChannel::m_entry
QString m_entry
Definition: guidegrid.h:69
LoadFromProgram
bool LoadFromProgram(ProgramList &destination, const QString &where, const QString &groupBy, const QString &orderBy, const MSqlBindings &bindings, const ProgramList &schedList)
Definition: programinfo.cpp:5566
TV::UpdateChannelList
void UpdateChannelList(int GroupID)
update the channel list with channels from the selected channel group
Definition: tv_play.cpp:1307
TV::PlaybackExiting
void PlaybackExiting(TV *Player)
DialogCompletionEvent
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
Definition: mythdialogbox.h:41
MythTimeInputDialog::kAllDates
@ kAllDates
Definition: mythdialogbox.h:463
kSingleRecord
@ kSingleRecord
Definition: recordingtypes.h:22
GuideGrid::ChangeVolume
void ChangeVolume(bool Up, int NewVolume=-1)
TVPlaybackState::ChangeMuteState
void ChangeMuteState(bool CycleChannels=false)
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:133
GridTimeNormal
#define GridTimeNormal
Definition: mythuiguidegrid.h:28
epgIsVisibleCond
QWaitCondition epgIsVisibleCond
Definition: guidegrid.cpp:57
GuideUpdateProgramRow::m_currentRow
const int m_currentRow
Definition: guidegrid.cpp:311
ACTION_DAYRIGHT
#define ACTION_DAYRIGHT
Definition: tv_actions.h:10
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:73
UpdateGuideEvent::m_updater
GuideUpdaterBase * m_updater
Definition: guidegrid.cpp:351
GuideGrid::toggleGuideListing
void toggleGuideListing()
Definition: guidegrid.cpp:2206
ScheduleCommon::QuickRecord
virtual void QuickRecord(void)
Create a kSingleRecord or bring up recording dialog.
Definition: schedulecommon.cpp:153
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
ACTION_DAYLEFT
#define ACTION_DAYLEFT
Definition: tv_actions.h:9
JumpToChannel::m_previousStartChannelIndex
int m_previousStartChannelIndex
Definition: guidegrid.h:70
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:104
GuideGrid::GetSelection
ChannelInfoList GetSelection(void) const
Definition: guidegrid.cpp:1259
kState_WatchingLiveTV
@ kState_WatchingLiveTV
Watching LiveTV is the state for when we are watching a recording and the user has control over the c...
Definition: tv.h:63
PlayerContext
Definition: playercontext.h:52
MythUIButtonList::SetItemCurrent
void SetItemCurrent(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1557
GuideUpdateProgramRow::m_proglists
QVector< ProgramList * > m_proglists
Definition: guidegrid.cpp:319
GuideGrid::m_dateText
MythUIText * m_dateText
Definition: guidegrid.h:294
ACTION_PAGELEFT
#define ACTION_PAGELEFT
Definition: tv_actions.h:11
build_compdb.action
action
Definition: build_compdb.py:9
ACTION_LEFT
#define ACTION_LEFT
Definition: mythuiactions.h:18
ACTION_GUIDE
#define ACTION_GUIDE
Definition: tv_actions.h:26
GuideGrid::updateDateText
void updateDateText(void)
Definition: guidegrid.cpp:2010
GuideGrid::ChannelGroupMenu
void ChannelGroupMenu(int mode=0)
Definition: guidegrid.cpp:2238
GuideGrid::kPageLeft
@ kPageLeft
Definition: guidegrid.h:192
GuideGrid::HideTVWindow
static void HideTVWindow(void)
Definition: guidegrid.cpp:2615
MythScreenType::gestureEvent
bool gestureEvent(MythGestureEvent *event) override
Mouse click/movement handler, receives mouse gesture events from the QCoreApplication event loop.
Definition: mythscreentype.cpp:439
GuideGrid::m_channelInfoIdx
QMap< uint, uint > m_channelInfoIdx
Definition: guidegrid.h:244
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &Stackname)
Definition: mythmainwindow.cpp:322
MythDate::kDateFull
@ kDateFull
Default local time.
Definition: mythdate.h:19
kAllRecord
@ kAllRecord
Definition: recordingtypes.h:25
GuideUpdateProgramRow::m_currentStartChannel
const uint m_currentStartChannel
Definition: guidegrid.cpp:310
mythuiactions.h
ScheduleCommon::ShowChannelSearch
virtual void ShowChannelSearch(void) const
Show the channel search.
Definition: schedulecommon.cpp:119
MythScreenType::aboutToHide
virtual void aboutToHide(void)
Definition: mythscreentype.cpp:221
MThreadPool::setMaxThreadCount
void setMaxThreadCount(int maxThreadCount)
Definition: mthreadpool.cpp:527
MythGestureEvent
A custom event that represents a mouse gesture.
Definition: mythgesture.h:39
ACTION_TOGGLEFAV
#define ACTION_TOGGLEFAV
Definition: tv_actions.h:20
CopyProglist
static ProgramList * CopyProglist(ProgramList *proglist)
Definition: guidegrid.cpp:1188
GuideStatus::m_lastTime
const QDateTime m_lastTime
Definition: guidegrid.cpp:225
GuideUpdaterBase
Definition: guidegrid.cpp:228
Player
Definition: zmliveplayer.h:34
GuideHelper::m_guide
GuideGrid * m_guide
Definition: guidegrid.cpp:403
GuideGrid::kPageUp
@ kPageUp
Definition: guidegrid.h:190
GuideGrid::m_lastTime
QDateTime m_lastTime
Definition: guidegrid.h:267
GuideStatus::GuideStatus
GuideStatus(unsigned int firstRow, unsigned int numRows, QVector< int > channums, const MythRect &gg_programRect, int gg_channelCount, QDateTime currentStartTime, QDateTime currentEndTime, uint currentStartChannel, int currentRow, int currentCol, int channelCount, int timeCount, bool verticalLayout, QDateTime firstTime, QDateTime lastTime)
Definition: guidegrid.cpp:196
MythCoreContext::SaveSetting
void SaveSetting(const QString &key, int newValue)
Definition: mythcorecontext.cpp:905
GuideStatus::m_firstRow
const unsigned int m_firstRow
Definition: guidegrid.cpp:216
GuideGrid::kScrollLeft
@ kScrollLeft
Definition: guidegrid.h:188
MythGestureEvent::RightThenLeft
@ RightThenLeft
Definition: mythgesture.h:69
MythCoreContext::GetMasterHostPrefix
QString GetMasterHostPrefix(const QString &storageGroup=QString(), const QString &path=QString())
Definition: mythcorecontext.cpp:822
ACTION_VOLUMEDOWN
#define ACTION_VOLUMEDOWN
Definition: tv_actions.h:111
MythDate::kTime
@ kTime
Default local time.
Definition: mythdate.h:22
JumpToChannel::m_listener
JumpToChannelListener * m_listener
Definition: guidegrid.h:68
GuideGrid::m_programInfos
ProgInfoGuideArray m_programInfos
Definition: guidegrid.h:247
ProgramInfo::GetRecordingRuleID
uint GetRecordingRuleID(void) const
Definition: programinfo.h:448
ChannelUtil::GetNearestChannel
static int GetNearestChannel(const ChannelInfoList &list, const QString &channum)
Definition: channelutil.cpp:2310
MythScreenType::aboutToShow
virtual void aboutToShow(void)
Definition: mythscreentype.cpp:237
GuideUpdateProgramRow
Definition: guidegrid.cpp:246
MythUIImage::SetFilename
void SetFilename(const QString &filename)
Must be followed by a call to Load() to load the image.
Definition: mythuiimage.cpp:676
GuideHelper::IsLoading
static bool IsLoading(GuideGrid *guide)
Definition: guidegrid.cpp:388
GuideGrid::updateTimeout
void updateTimeout(void)
Definition: guidegrid.cpp:1336
recordingrule.h
MythGestureEvent::RightThenUp
@ RightThenUp
Definition: mythgesture.h:67
ReferenceCounter::IncrRef
virtual int IncrRef(void)
Increments reference count.
Definition: referencecounter.cpp:101
GuideGrid::moveToTime
void moveToTime(const QDateTime &datetime)
Definition: guidegrid.cpp:2470
mythmainwindow.h
ACTION_MUTEAUDIO
#define ACTION_MUTEAUDIO
Definition: tv_actions.h:106
MythTimeInputDialog
Definition: mythdialogbox.h:442
GuideHelper::Wait
static void Wait(GuideGrid *guide)
Definition: guidegrid.cpp:393
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:50
CardUtil::GetStartingChannel
static QString GetStartingChannel(uint inputid)
Definition: cardutil.cpp:1708
MythUIType::SetRedraw
void SetRedraw(void)
Definition: mythuitype.cpp:294
GuideGrid::GetProgramList
ProgramList GetProgramList(uint chanid) const
Definition: guidegrid.cpp:1166
ShowOkPopup
MythConfirmationDialog * ShowOkPopup(const QString &message, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
Definition: mythdialogbox.cpp:558
GuideGrid::fillProgramInfos
void fillProgramInfos(bool useExistingData=false)
Definition: guidegrid.cpp:1514
GuideGrid::getProgramListFromProgram
ProgramList * getProgramListFromProgram(int chanNum)
Definition: guidegrid.cpp:1519
MythObservable::removeListener
void removeListener(QObject *listener)
Remove a listener to the observable.
Definition: mythobservable.cpp:55
JumpToChannel::GetEntry
QString GetEntry(void) const
Definition: guidegrid.h:58
GuideGrid::GetChannelInfo
ChannelInfo * GetChannelInfo(uint chan_idx, int sel=-1)
Definition: guidegrid.cpp:1133
GuideGrid::m_currentRow
int m_currentRow
Definition: guidegrid.h:257
GuideGrid::FindChannel
int FindChannel(uint chanid, const QString &channum, bool exact=true) const override
Definition: guidegrid.cpp:1420
kDontRecord
@ kDontRecord
Definition: recordingtypes.h:29
MythUIStateType
This widget is used for grouping other widgets for display when a particular named state is called....
Definition: mythuistatetype.h:22
ChannelInfo::m_callSign
QString m_callSign
Definition: channelinfo.h:91
MThreadPool::start
void start(QRunnable *runnable, const QString &debugName, int priority=0)
Definition: mthreadpool.cpp:352
GuideStatus::m_currentStartTime
const QDateTime m_currentStartTime
Definition: guidegrid.cpp:220
mythscreentype.h
AutoDeleteDeque::size
size_t size(void) const
Definition: autodeletedeque.h:67
ChannelUtil::kChanOrderByChanNum
@ kChanOrderByChanNum
Definition: channelutil.h:200
MythUIStateType::DisplayState
bool DisplayState(const QString &name)
Definition: mythuistatetype.cpp:84
GuideGrid::updateInfo
void updateInfo(void)
Definition: guidegrid.cpp:2149
TV::ReturnPlayerLock
void ReturnPlayerLock()
Definition: tv_play.cpp:10154
tv_play.h
GuideHelper::run
void run(void) override
Definition: guidegrid.cpp:366
GuideGrid::updateJumpToChannel
void updateJumpToChannel(void)
Definition: guidegrid.cpp:2585
TV::GetPlayerReadLock
void GetPlayerReadLock()
Definition: tv_play.cpp:10144
TV
Control TV playback.
Definition: tv_play.h:154
ChannelInfoList
std::vector< ChannelInfo > ChannelInfoList
Definition: channelinfo.h:131
GuideGrid::GoTo
void GoTo(int start, int cur_row) override
Definition: guidegrid.cpp:2576
ProgramInfo::GetStars
float GetStars(void) const
Definition: programinfo.h:441
GuideGrid::SetJumpToChannel
void SetJumpToChannel(JumpToChannel *ptr) override
Definition: guidegrid.cpp:2601
GuideGrid::m_changrplist
ChannelGroupList m_changrplist
Definition: guidegrid.h:282