MythTV  master
viewscheduled.cpp
Go to the documentation of this file.
1 // C++
2 #include <algorithm>
3 
4 // Qt
5 #include <QCoreApplication>
6 
7 // MythTV
10 #include "libmythbase/programtypes.h" // for RecStatus, etc
11 #include "libmythbase/recordingtypes.h" // for toString
12 #include "libmythbase/remoteutil.h"
15 #include "libmythtv/tv_actions.h" // for ACTION_CHANNELSEARCH
16 #include "libmythtv/tv_play.h"
22 #include "libmythui/mythuitext.h"
23 
24 // mythFrontend
25 #include "guidegrid.h"
26 #include "viewscheduled.h"
27 
28 void *ViewScheduled::RunViewScheduled(void *player, bool showTV)
29 {
31  auto *vsb = new ViewScheduled(mainStack, static_cast<TV*>(player), showTV);
32 
33  if (vsb->Create())
34  mainStack->AddScreen(vsb, (player == nullptr));
35  else
36  delete vsb;
37 
38  return nullptr;
39 }
40 
41 ViewScheduled::ViewScheduled(MythScreenStack *parent, TV* player, bool /*showTV*/)
42  : ScheduleCommon(parent, "ViewScheduled"),
43  m_showAll(!gCoreContext->GetBoolSetting("ViewSchedShowLevel", false)),
44  m_player(player)
45 {
47  if (m_player)
48  m_player->IncrRef();
49 }
50 
52 {
54  gCoreContext->SaveBoolSetting("ViewSchedShowLevel", !m_showAll);
55 
56  // if we have a player, we need to tell we are done
57  if (m_player)
58  {
59  emit m_player->RequestEmbedding(false);
60  m_player->DecrRef();
61  }
62 }
63 
65 {
66  if (!LoadWindowFromXML("schedule-ui.xml", "viewscheduled", this))
67  return false;
68 
69  m_groupList = dynamic_cast<MythUIButtonList *> (GetChild("groups"));
70  m_schedulesList = dynamic_cast<MythUIButtonList *> (GetChild("schedules"));
71  m_progressBar = dynamic_cast<MythUIProgressBar *>(GetChild("recordedprogressbar"));
72 
73  if (!m_schedulesList)
74  {
75  LOG(VB_GENERAL, LOG_ERR, "Theme is missing critical theme elements.");
76  return false;
77  }
78 
82  this, qOverload<MythUIButtonListItem*>(&ViewScheduled::EditRecording));
83 
84  m_schedulesList->SetLCDTitles(tr("Scheduled Recordings"),
85  "shortstarttimedate|channel|titlesubtitle|card");
86  m_schedulesList->SetSearchFields("titlesubtitle");
87 
88  if (m_groupList)
89  {
94  m_groupList->SetLCDTitles(tr("Group List"), "");
95  }
96 
99 
100  EmbedTVWindow();
101 
102  return true;
103 }
104 
106 {
108 }
109 
111 {
112  LoadList(true);
113 }
114 
116 {
117  // don't fade the screen if we are returning to the player
118  if (m_player)
119  GetScreenStack()->PopScreen(this, false);
120  else
121  GetScreenStack()->PopScreen(this, true);
122 }
123 
125 {
126  if (GetFocusWidget() == m_groupList)
128  else if (GetFocusWidget() == m_schedulesList)
130 }
131 
132 bool ViewScheduled::keyPressEvent(QKeyEvent *event)
133 {
134  // FIXME: Blackholes keypresses, not good
135  if (m_inEvent)
136  return true;
137 
138  m_inEvent = true;
139 
140  if (GetFocusWidget()->keyPressEvent(event))
141  {
142  m_inEvent = false;
143  return true;
144  }
145 
146  QStringList actions;
147  bool handled = GetMythMainWindow()->TranslateKeyPress("TV Frontend", event,
148  actions);
149 
150  for (int i = 0; i < actions.size() && !handled; i++)
151  {
152  const QString& action = actions[i];
153  handled = true;
154 
155  if (action == "EDIT")
156  EditScheduled();
157  else if (action == "CUSTOMEDIT")
158  EditCustom();
159  else if (action == "DELETE")
160  deleteRule();
161  else if (action == "UPCOMING")
162  ShowUpcoming();
163  else if (action == "VIEWSCHEDULED")
165  else if (action == "PREVRECORDED")
166  ShowPrevious();
167  else if (action == "DETAILS" || action == "INFO")
168  ShowDetails();
169  else if (action == "GUIDE")
170  ShowGuide();
171  else if (action == ACTION_CHANNELSEARCH)
173  else if (action == "1")
174  setShowAll(true);
175  else if (action == "2")
176  setShowAll(false);
177  else if (action == "PREVVIEW" || action == "NEXTVIEW")
179  else if (action == "VIEWINPUT")
180  viewInputs();
181  else
182  handled = false;
183  }
184 
185  if (m_needFill)
186  LoadList();
187 
188  if (!handled && MythScreenType::keyPressEvent(event))
189  handled = true;
190 
191  m_inEvent = false;
192 
193  return handled;
194 }
195 
197 {
198  QString label = tr("Options");
199 
200  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
201  auto *menuPopup = new MythDialogBox(label, popupStack, "menuPopup");
202 
203  if (menuPopup->Create())
204  {
205  menuPopup->SetReturnEvent(this, "menu");
206 
207  if (m_showAll)
208  menuPopup->AddButton(tr("Show Important"));
209  else
210  menuPopup->AddButton(tr("Show All"));
211  menuPopup->AddButton(tr("Program Details"));
212  menuPopup->AddButton(tr("Program Guide"));
213  menuPopup->AddButton(tr("Channel Search"));
214  menuPopup->AddButton(tr("Upcoming by title"));
215  menuPopup->AddButton(tr("Upcoming scheduled"));
216  menuPopup->AddButton(tr("Previously Recorded"));
217  menuPopup->AddButton(tr("Custom Edit"));
218  menuPopup->AddButton(tr("Delete Rule"));
219  menuPopup->AddButton(tr("Show Inputs"));
220 
221  popupStack->AddScreen(menuPopup);
222  }
223  else
224  {
225  delete menuPopup;
226  }
227 }
228 
229 void ViewScheduled::LoadList(bool useExistingData)
230 {
231  if (m_inFill)
232  return;
233 
234  m_inFill = true;
235 
237 
238  QString callsign;
239  QDateTime startts;
240  QDateTime recstartts;
241  QDate group = m_currentGroup;
242 
243  if (currentItem)
244  {
245  auto *currentpginfo = currentItem->GetData().value<ProgramInfo*>();
246  if (currentpginfo)
247  {
248  callsign = currentpginfo->GetChannelSchedulingID();
249  startts = currentpginfo->GetScheduledStartTime();
250  recstartts = currentpginfo->GetRecordingStartTime();
251  }
252  }
253 
254  QDateTime now = MythDate::current();
255 
256  QMap<int, int> toomanycounts;
257 
259  if (m_groupList)
260  m_groupList->Reset();
261 
262  m_recgroupList.clear();
263 
264  if (!useExistingData)
266 
268  m_recgroupList[m_defaultGroup].setAutoDelete(false);
269 
270  auto pit = m_recList.begin();
271  while (pit != m_recList.end())
272  {
273  ProgramInfo *pginfo = *pit;
274  if (pginfo == nullptr)
275  {
276  pit = m_recList.erase(pit);
277  continue;
278  }
279 
280  pginfo->CalculateRecordedProgress();
281 
282  const RecStatus::Type recstatus = pginfo->GetRecordingStatus();
283  if ((pginfo->GetRecordingEndTime() >= now ||
284  pginfo->GetScheduledEndTime() >= now ||
285  recstatus == RecStatus::Recording ||
286  recstatus == RecStatus::Tuning ||
287  recstatus == RecStatus::Failing) &&
288  (m_showAll ||
289  (recstatus >= RecStatus::Pending &&
290  recstatus <= RecStatus::WillRecord) ||
291  recstatus == RecStatus::DontRecord ||
292  (recstatus == RecStatus::TooManyRecordings &&
293  ++toomanycounts[pginfo->GetRecordingRuleID()] <= 1) ||
294  (recstatus > RecStatus::TooManyRecordings &&
295  recstatus != RecStatus::Repeat &&
296  recstatus != RecStatus::NeverRecord)))
297  {
298  m_inputref[pginfo->GetInputID()]++;
299  m_maxinput = std::max(pginfo->GetInputID(), m_maxinput);
300 
301  QDate date = pginfo->GetRecordingStartTime().toLocalTime().date();
302  m_recgroupList[date].push_back(pginfo);
303  m_recgroupList[date].setAutoDelete(false);
304 
305  m_recgroupList[m_defaultGroup].push_back(pginfo);
306 
307  ++pit;
308  }
309  else
310  {
311  pit = m_recList.erase(pit);
312  continue;
313  }
314  }
315 
316  if (m_groupList)
317  {
318  QString label;
319  QMap<QDate,ProgramList>::iterator dateit = m_recgroupList.begin();
320  while (dateit != m_recgroupList.end())
321  {
322  if (dateit.key().isNull())
323  label = tr("All");
324  else
325  label = MythDate::toString(
326  dateit.key(), MythDate::kDateFull | MythDate::kSimplify);
327 
329  QVariant::fromValue(dateit.key()));
330  ++dateit;
331  }
332 
333  // Restore group
334  if (m_recgroupList.contains(group))
335  m_currentGroup = group;
336  else
338 
339  m_groupList->SetValueByData(QVariant::fromValue(m_currentGroup));
340  }
341 
342  FillList();
343 
344  // Restore position after a list update
345  if (!callsign.isEmpty())
346  {
348 
349  int listPos = ((int) plist.size()) - 1;
350  for (int i = listPos; i >= 0; --i)
351  {
352  ProgramInfo *pginfo = plist[i];
353  if (pginfo == nullptr)
354  continue;
355  if (callsign == pginfo->GetChannelSchedulingID() &&
356  startts == pginfo->GetScheduledStartTime())
357  {
358  listPos = i;
359  break;
360  }
361  if (recstartts <= pginfo->GetRecordingStartTime())
362  listPos = i;
363  }
365  }
366 
367  m_inFill = false;
368  m_needFill = false;
369 }
370 
371 
373 {
374  if (!item || m_recList.empty())
375  return;
376 
377  auto group = item->GetData().value<QDate>();
378 
379  m_currentGroup = group;
380 
381  if (!m_inFill)
382  FillList();
383 }
384 
386  ProgramInfo *pginfo) const
387 {
388  QString state;
389 
390  const RecStatus::Type recstatus = pginfo->GetRecordingStatus();
391  if (recstatus == RecStatus::Recording ||
392  recstatus == RecStatus::Tuning)
393  state = "running";
394  else if (recstatus == RecStatus::Conflict ||
395  recstatus == RecStatus::Offline ||
396  recstatus == RecStatus::TunerBusy ||
397  recstatus == RecStatus::Failed ||
398  recstatus == RecStatus::Failing ||
399  recstatus == RecStatus::Aborted ||
400  recstatus == RecStatus::Missed)
401  state = "error";
402  else if (recstatus == RecStatus::WillRecord ||
403  recstatus == RecStatus::Pending)
404  {
405  if (m_curinput == 0 || pginfo->GetInputID() == m_curinput)
406  {
407  if (pginfo->GetRecordingPriority2() < 0)
408  state = "warning";
409  else
410  state = "normal";
411  }
412  }
413  else if (recstatus == RecStatus::Repeat ||
414  recstatus == RecStatus::NeverRecord ||
415  recstatus == RecStatus::DontRecord ||
416  (recstatus != RecStatus::DontRecord &&
417  recstatus <= RecStatus::EarlierShowing))
418  {
419  state = "disabled";
420  }
421  else
422  {
423  state = "warning";
424  }
425 
426  InfoMap infoMap;
427  pginfo->ToMap(infoMap);
428  item->SetTextFromMap(infoMap, state);
429 
430  item->SetProgress2(0, 100, pginfo->GetRecordedPercent());
431 
432  QString rating = QString::number(pginfo->GetStars(10));
433  item->DisplayState(rating, "ratingstate");
434  item->DisplayState(state, "status");
435 }
436 
438 {
440 
441  MythUIText *norecordingText = dynamic_cast<MythUIText*>
442  (GetChild("norecordings_info"));
443 
444  if (norecordingText)
445  norecordingText->SetVisible(m_recList.empty());
446 
447  if (m_recList.empty())
448  return;
449 
450  ProgramList plist;
451 
452  if (!m_recgroupList.contains(m_currentGroup))
454 
456 
457  auto pit = plist.begin();
458  while (pit != plist.end())
459  {
460  ProgramInfo *pginfo = *pit;
461  if (pginfo)
462  {
463  auto *item = new MythUIButtonListItem(m_schedulesList,"",
464  QVariant::fromValue(pginfo));
465  UpdateUIListItem(item, pginfo);
466  }
467  ++pit;
468  }
469 
470  MythUIText *statusText = dynamic_cast<MythUIText*>(GetChild("status"));
471  if (statusText)
472  {
473  if (m_conflictBool)
474  {
475  // Find first conflict and store in m_conflictDate field
476  for (auto & conflict : plist)
477  {
478  if (conflict->GetRecordingStatus() == RecStatus::Conflict)
479  {
480  m_conflictDate = conflict->GetRecordingStartTime()
481  .toLocalTime().date();
482  break;
483  }
484  }
485 
486  // TODO: This can be templated instead of hardcoding
487  // Conflict/No Conflict
488  QString cstring = tr("Conflict %1")
491 
492  statusText->SetText(cstring);
493  }
494  else
495  {
496  statusText->SetText(tr("No Conflicts"));
497  }
498  }
499 
500  MythUIText *filterText = dynamic_cast<MythUIText*>(GetChild("filter"));
501  if (filterText)
502  {
503  if (m_showAll)
504  filterText->SetText(tr("All"));
505  else
506  filterText->SetText(tr("Important"));
507  }
508 }
509 
510 // Called whenever a new recording is selected from the list of
511 // recordings. This function updates the screen with the information
512 // on the newly selected recording.
514 {
515  if (!item)
516  return;
517 
518  auto *pginfo = item->GetData().value<ProgramInfo*> ();
519  if (pginfo)
520  {
521  InfoMap infoMap;
522  pginfo->ToMap(infoMap);
523  SetTextFromMap(infoMap);
524  if (m_progressBar != nullptr)
525  m_progressBar->Set(0, 100, pginfo->GetRecordedPercent());
526 
527  MythUIStateType *ratingState = dynamic_cast<MythUIStateType*>
528  (GetChild("ratingstate"));
529  if (ratingState)
530  {
531  QString rating = QString::number(pginfo->GetStars(10));
532  ratingState->DisplayState(rating);
533  }
534  }
535 }
536 
538 {
540 
541  if (!item)
542  return;
543 
544  auto *pginfo = item->GetData().value<ProgramInfo*>();
545  if (!pginfo)
546  return;
547 
548  auto *record = new RecordingRule();
549  if (!record->LoadByProgram(pginfo))
550  {
551  delete record;
552  return;
553  }
554 
555  QString message = tr("Delete '%1' %2 rule?")
556  .arg(record->m_title, toString(pginfo->GetRecordingRuleType()));
557 
558  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
559 
560  auto *okPopup = new MythConfirmationDialog(popupStack, message, true);
561 
562  okPopup->SetReturnEvent(this, "deleterule");
563  okPopup->SetData(QVariant::fromValue(record));
564 
565  if (okPopup->Create())
566  popupStack->AddScreen(okPopup);
567  else
568  delete okPopup;
569 }
570 
572 {
573  m_showAll = all;
574  m_needFill = true;
575 }
576 
578 {
579  m_needFill = true;
580 
581  m_curinput++;
582  while (m_curinput <= m_maxinput)
583  {
584  if (m_inputref[m_curinput] > 0)
585  return;
586  m_curinput++;
587  }
588  m_curinput = 0;
589 }
590 
592 {
593  if (m_player)
594  emit m_player->RequestEmbedding(true);
595 }
596 
597 void ViewScheduled::customEvent(QEvent *event)
598 {
599  if (event->type() == MythEvent::kMythEventMessage)
600  {
601  auto *me = dynamic_cast<MythEvent *>(event);
602  if (me == nullptr)
603  return;
604 
605  const QString& message = me->Message();
606  if (message == "SCHEDULE_CHANGE")
607  {
608  m_needFill = true;
609 
610  if (m_inEvent)
611  return;
612 
613  m_inEvent = true;
614 
615  LoadList();
616 
617  m_inEvent = false;
618  }
619  else if (message.startsWith("UPDATE_FILE_SIZE"))
620  {
621  QStringList tokens = message.simplified().split(" ");
622  if (tokens.size() < 3)
623  return;
624 
625  bool ok {false};
626  uint recordingID = tokens[1].toUInt();
627  uint64_t filesize = tokens[2].toLongLong(&ok);
628 
629  // Locate program
630  auto pit = m_recList.begin();
631  while (pit != m_recList.end())
632  {
633  ProgramInfo* pginfo = *pit;
634  if (pginfo && pginfo->GetRecordingID() == recordingID)
635  {
636  // Update size & progress
637  pginfo->SetFilesize(filesize);
638  uint current = pginfo->GetRecordedPercent();
639  pginfo->CalculateRecordedProgress();
640  if (pginfo->GetRecordedPercent() != current)
641  {
642  // Update display, if it's shown
643  MythUIButtonListItem *item =
645  GetItemByData(QVariant::fromValue(pginfo));
646  if (item)
647  {
648  UpdateUIListItem(item, pginfo);
649 
650  // Update selected item if necessary
651  MythUIButtonListItem *selected =
653  if (item == selected)
654  updateInfo(selected);
655  }
656  }
657  break;
658  }
659  ++pit;
660  }
661  }
662  }
663  else if (event->type() == DialogCompletionEvent::kEventType)
664  {
665  auto *dce = (DialogCompletionEvent*)(event);
666 
667  QString resultid = dce->GetId();
668  QString resulttext = dce->GetResultText();
669  int buttonnum = dce->GetResult();
670 
671  if (resultid == "deleterule")
672  {
673  auto *record = dce->GetData().value<RecordingRule *>();
674  if (record)
675  {
676  if (buttonnum > 0)
677  {
678  if (!record->Delete())
679  LOG(VB_GENERAL, LOG_ERR,
680  "Failed to delete recording rule");
681  }
682  delete record;
683  }
684 
685  EmbedTVWindow();
686  }
687  else if (resultid == "menu")
688  {
689  if (resulttext == tr("Show Important"))
690  {
691  setShowAll(false);
692  }
693  else if (resulttext == tr("Show All"))
694  {
695  setShowAll(true);
696  }
697  else if (resulttext == tr("Program Details"))
698  {
699  ShowDetails();
700  }
701  else if (resulttext == tr("Program Guide"))
702  {
703  ShowGuide();
704  }
705  else if (resulttext == tr("Channel Search"))
706  {
708  }
709  else if (resulttext == tr("Upcoming by title"))
710  {
711  ShowUpcoming();
712  }
713  else if (resulttext == tr("Upcoming scheduled"))
714  {
716  }
717  else if (resulttext == tr("Previously Recorded"))
718  {
719  ShowPrevious();
720  }
721  else if (resulttext == tr("Custom Edit"))
722  {
723  EditCustom();
724  }
725  else if (resulttext == tr("Delete Rule"))
726  {
727  deleteRule();
728  }
729  else if (resulttext == tr("Show Inputs"))
730  {
731  viewInputs();
732  }
733 
734  if (m_needFill)
735  LoadList();
736  }
737  else
738  {
740  }
741  }
742 }
743 
745 {
747  return item ? item->GetData().value<ProgramInfo*>() : nullptr;
748 }
MythScreenType::LoadInBackground
void LoadInBackground(const QString &message="")
Definition: mythscreentype.cpp:283
RecStatus::Type
Type
Definition: recordingstatus.h:16
ViewScheduled::GetCurrentProgram
ProgramInfo * GetCurrentProgram(void) const override
Definition: viewscheduled.cpp:744
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:317
TVPlaybackState::RequestEmbedding
void RequestEmbedding(bool Embed, const QRect &Rect={}, const QStringList &Data={})
ViewScheduled::m_currentGroup
QDate m_currentGroup
Definition: viewscheduled.h:87
MythDate::toString
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
Definition: mythdate.cpp:93
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1614
MythUIButtonList::SetValueByData
void SetValueByData(const QVariant &data)
Definition: mythuibuttonlist.cpp:1566
mythuitext.h
mythuiprogressbar.h
MythEvent::kMythEventMessage
static const Type kMythEventMessage
Definition: mythevent.h:79
LoadFromScheduler
bool LoadFromScheduler(AutoDeleteDeque< TYPE * > &destination, bool &hasConflicts, const QString &altTable="", int recordid=-1)
Definition: programinfo.h:916
ReferenceCounter::DecrRef
virtual int DecrRef(void)
Decrements reference count and deletes on 0.
Definition: referencecounter.cpp:125
guidegrid.h
ViewScheduled::Init
void Init(void) override
Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in...
Definition: viewscheduled.cpp:110
false
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:89
MythUIButtonListItem::DisplayState
void DisplayState(const QString &state, const QString &name)
Definition: mythuibuttonlist.cpp:3613
ViewScheduled::Close
void Close(void) override
Definition: viewscheduled.cpp:115
RecStatus::NeverRecord
@ NeverRecord
Definition: recordingstatus.h:43
ViewScheduled::m_needFill
bool m_needFill
Definition: viewscheduled.h:81
ScheduleCommon::customEvent
void customEvent(QEvent *event) override
Definition: schedulecommon.cpp:483
ViewScheduled::m_defaultGroup
QDate m_defaultGroup
Definition: viewscheduled.h:88
ViewScheduled::m_curinput
uint m_curinput
Definition: viewscheduled.h:92
RecStatus::Tuning
@ Tuning
Definition: recordingstatus.h:22
ViewScheduled::m_inputref
QMap< int, int > m_inputref
Definition: viewscheduled.h:90
MythUIType::GetChild
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
Definition: mythuitype.cpp:138
ScheduleCommon::ShowUpcomingScheduled
virtual void ShowUpcomingScheduled(void) const
Show the upcoming recordings for this recording rule.
Definition: schedulecommon.cpp:88
ProgramInfo::GetRecordingID
uint GetRecordingID(void) const
Definition: programinfo.h:450
ViewScheduled::ViewScheduled
ViewScheduled(MythScreenStack *parent, TV *player=nullptr, bool showTV=false)
Definition: viewscheduled.cpp:41
MythUIButtonList::itemSelected
void itemSelected(MythUIButtonListItem *item)
MythEvent
This class is used as a container for messages.
Definition: mythevent.h:16
AutoDeleteDeque::empty
bool empty(void) const
Definition: autodeletedeque.h:66
mythdialogbox.h
MythScreenStack
Definition: mythscreenstack.h:16
ProgramInfo::GetChannelSchedulingID
QString GetChannelSchedulingID(void) const
This is the unique programming identifier of a channel.
Definition: programinfo.h:384
RecStatus::TunerBusy
@ TunerBusy
Definition: recordingstatus.h:24
RecordingRule
Internal representation of a recording rule, mirrors the record table.
Definition: recordingrule.h:28
ViewScheduled::deleteRule
void deleteRule()
Definition: viewscheduled.cpp:537
ViewScheduled::SwitchList
void SwitchList(void)
Definition: viewscheduled.cpp:124
ScheduleCommon::ShowGuide
virtual void ShowGuide(void) const
Show the program guide.
Definition: schedulecommon.cpp:134
ViewScheduled::m_progressBar
MythUIProgressBar * m_progressBar
Definition: viewscheduled.h:75
ProgramInfo::GetScheduledEndTime
QDateTime GetScheduledEndTime(void) const
The scheduled end time of the program.
Definition: programinfo.h:398
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
mythuistatetype.h
MythUIButtonList::SetSearchFields
void SetSearchFields(const QString &fields)
Definition: mythuibuttonlist.h:256
ViewScheduled::m_showAll
bool m_showAll
Definition: viewscheduled.h:77
recordingtypes.h
ProgramInfo::GetRecordingEndTime
QDateTime GetRecordingEndTime(void) const
Approximate time the recording should have ended, did end, or is intended to end.
Definition: programinfo.h:413
remoteutil.h
mythuibuttonlist.h
ScheduleCommon::ShowDetails
virtual void ShowDetails(void) const
Show the Program Details screen.
Definition: schedulecommon.cpp:27
ViewScheduled::m_player
TV * m_player
Definition: viewscheduled.h:94
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:15
MythEvent::Message
const QString & Message() const
Definition: mythevent.h:65
ProgramInfo::GetRecordingStartTime
QDateTime GetRecordingStartTime(void) const
Approximate time the recording started.
Definition: programinfo.h:405
ScheduleCommon::EditRecording
virtual void EditRecording(bool may_watch_now=false)
Creates a dialog for editing the recording status, blocking until user leaves dialog.
Definition: schedulecommon.cpp:276
ScheduleCommon::EditScheduled
virtual void EditScheduled(void)
Creates a dialog for editing the recording schedule.
Definition: schedulecommon.cpp:168
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:110
programtypes.h
ViewScheduled::Load
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
Definition: viewscheduled.cpp:105
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
MythObservable::addListener
void addListener(QObject *listener)
Add a listener to the observable.
Definition: mythobservable.cpp:38
AutoDeleteDeque::begin
iterator begin(void)
Definition: autodeletedeque.h:50
RecStatus::WillRecord
@ WillRecord
Definition: recordingstatus.h:31
MythUIButtonListItem
Definition: mythuibuttonlist.h:41
ScheduleCommon::ShowPrevious
virtual void ShowPrevious(void) const
Show the previous recordings for this recording rule.
Definition: schedulecommon.cpp:250
ViewScheduled::m_schedulesList
MythUIButtonList * m_schedulesList
Definition: viewscheduled.h:73
RecStatus::TooManyRecordings
@ TooManyRecordings
Definition: recordingstatus.h:37
ProgramInfo::GetScheduledStartTime
QDateTime GetScheduledStartTime(void) const
The scheduled start time of program.
Definition: programinfo.h:391
ScheduleCommon::EditCustom
virtual void EditCustom(void)
Creates a dialog for creating a custom recording rule.
Definition: schedulecommon.cpp:204
mythlogging.h
ProgramInfo::GetRecordingStatus
RecStatus::Type GetRecordingStatus(void) const
Definition: programinfo.h:451
ViewScheduled::Create
bool Create(void) override
Definition: viewscheduled.cpp:64
MythUIButtonList::itemClicked
void itemClicked(MythUIButtonListItem *item)
MythMainWindow::TranslateKeyPress
bool TranslateKeyPress(const QString &Context, QKeyEvent *Event, QStringList &Actions, bool AllowJumps=true)
Get a list of actions for a keypress in the given context.
Definition: mythmainwindow.cpp:1111
tv_actions.h
MythUIProgressBar::Set
void Set(int start, int total, int used)
Definition: mythuiprogressbar.cpp:56
MythUIProgressBar
Progress bar widget.
Definition: mythuiprogressbar.h:12
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:115
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:166
ViewScheduled::m_inFill
bool m_inFill
Definition: viewscheduled.h:80
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:203
hardwareprofile.scan.rating
def rating(profile, smoonURL, gate)
Definition: scan.py:37
RecStatus::Failing
@ Failing
Definition: recordingstatus.h:18
ACTION_CHANNELSEARCH
#define ACTION_CHANNELSEARCH
Definition: tv_actions.h:28
ViewScheduled::EmbedTVWindow
void EmbedTVWindow(void)
Definition: viewscheduled.cpp:591
MythUIComposite::SetTextFromMap
virtual void SetTextFromMap(const InfoMap &infoMap)
Definition: mythuicomposite.cpp:9
ScheduleCommon
Definition: schedulecommon.h:15
RecStatus::Aborted
@ Aborted
Definition: recordingstatus.h:28
RecStatus::Conflict
@ Conflict
Definition: recordingstatus.h:39
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:1553
RecStatus::Failed
@ Failed
Definition: recordingstatus.h:23
ViewScheduled::m_recgroupList
QMap< QDate, ProgramList > m_recgroupList
Definition: viewscheduled.h:85
MythUIButtonList::SetLCDTitles
void SetLCDTitles(const QString &title, const QString &columnList="")
Definition: mythuibuttonlist.cpp:3083
RecStatus::Missed
@ Missed
Definition: recordingstatus.h:27
MythUIButtonListItem::GetData
QVariant GetData()
Definition: mythuibuttonlist.cpp:3715
ProgramInfo::SetFilesize
virtual void SetFilesize(uint64_t sz)
Definition: programinfo.cpp:6405
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:55
ViewScheduled::m_recList
ProgramList m_recList
Definition: viewscheduled.h:84
ViewScheduled::m_groupList
MythUIButtonList * m_groupList
Definition: viewscheduled.h:74
AutoDeleteDeque::end
iterator end(void)
Definition: autodeletedeque.h:51
ProgramInfo::GetRecordedPercent
uint GetRecordedPercent() const
Definition: programinfo.h:590
ViewScheduled::ShowMenu
void ShowMenu(void) override
Definition: viewscheduled.cpp:196
ViewScheduled::m_conflictDate
QDate m_conflictDate
Definition: viewscheduled.h:69
MythScreenType::GetScreenStack
MythScreenStack * GetScreenStack() const
Definition: mythscreentype.cpp:214
MythUIButtonListItem::SetProgress2
void SetProgress2(int start, int total, int used)
Definition: mythuibuttonlist.cpp:3603
ViewScheduled::RunViewScheduled
static void * RunViewScheduled(void *player, bool showTv)
Definition: viewscheduled.cpp:28
RecStatus::Offline
@ Offline
Definition: recordingstatus.h:44
ViewScheduled::setShowAll
void setShowAll(bool all)
Definition: viewscheduled.cpp:571
MythUIButtonListItem::SetTextFromMap
void SetTextFromMap(const InfoMap &infoMap, const QString &state="")
Definition: mythuibuttonlist.cpp:3338
RecStatus::Pending
@ Pending
Definition: recordingstatus.h:17
MythDate::kSimplify
@ kSimplify
Do Today/Yesterday/Tomorrow transform.
Definition: mythdate.h:26
AutoDeleteDeque< ProgramInfo * >
ProgramInfo::GetInputID
uint GetInputID(void) const
Definition: programinfo.h:467
ViewScheduled::m_maxinput
uint m_maxinput
Definition: viewscheduled.h:91
ProgramList
AutoDeleteDeque< ProgramInfo * > ProgramList
Definition: programinfo.h:31
recordinginfo.h
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:67
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythscreentype.cpp:401
RecStatus::Recording
@ Recording
Definition: recordingstatus.h:30
ViewScheduled::customEvent
void customEvent(QEvent *event) override
Definition: viewscheduled.cpp:597
RecStatus::DontRecord
@ DontRecord
Definition: recordingstatus.h:33
MythConfirmationDialog
Dialog asking for user confirmation. Ok and optional Cancel button.
Definition: mythdialogbox.h:272
mythcorecontext.h
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:701
ViewScheduled::m_inEvent
bool m_inEvent
Definition: viewscheduled.h:79
RecStatus::EarlierShowing
@ EarlierShowing
Definition: recordingstatus.h:36
DialogCompletionEvent
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
Definition: mythdialogbox.h:41
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:115
ViewScheduled::m_conflictBool
bool m_conflictBool
Definition: viewscheduled.h:68
MythUIType::SetVisible
virtual void SetVisible(bool visible)
Definition: mythuitype.cpp:1105
MythScreenStack::PopScreen
virtual void PopScreen(MythScreenType *screen=nullptr, bool allowFade=true, bool deleteScreen=true)
Definition: mythscreenstack.cpp:86
ViewScheduled::~ViewScheduled
~ViewScheduled() override
Definition: viewscheduled.cpp:51
ScheduleCommon::ShowUpcoming
virtual void ShowUpcoming(void) const
Show the upcoming recordings for this title.
Definition: schedulecommon.cpp:69
ViewScheduled::LoadList
void LoadList(bool useExistingData=false)
Definition: viewscheduled.cpp:229
DialogCompletionEvent::kEventType
static const Type kEventType
Definition: mythdialogbox.h:57
ProgramInfo::CalculateRecordedProgress
void CalculateRecordedProgress()
Definition: programinfo.cpp:6478
MythUIButtonList::Reset
void Reset() override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuibuttonlist.cpp:116
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:104
RecStatus::Repeat
@ Repeat
Definition: recordingstatus.h:41
MythUIButtonList::SetItemCurrent
void SetItemCurrent(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1581
build_compdb.action
action
Definition: build_compdb.py:9
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &Stackname)
Definition: mythmainwindow.cpp:322
MythDate::kDateFull
@ kDateFull
Default local time.
Definition: mythdate.h:19
ScheduleCommon::ShowChannelSearch
virtual void ShowChannelSearch(void) const
Show the channel search.
Definition: schedulecommon.cpp:115
ViewScheduled::UpdateUIListItem
void UpdateUIListItem(MythUIButtonListItem *item, ProgramInfo *pginfo) const
Definition: viewscheduled.cpp:385
AutoDeleteDeque::erase
iterator erase(iterator it)
Definition: autodeletedeque.h:34
ProgramInfo::GetRecordingPriority2
int GetRecordingPriority2(void) const
Definition: programinfo.h:445
ProgramInfo::GetRecordingRuleID
uint GetRecordingRuleID(void) const
Definition: programinfo.h:453
recordingrule.h
ViewScheduled::updateInfo
void updateInfo(MythUIButtonListItem *item)
Definition: viewscheduled.cpp:513
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition: mythuibuttonlist.h:191
ViewScheduled::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: viewscheduled.cpp:132
ReferenceCounter::IncrRef
virtual int IncrRef(void)
Increments reference count.
Definition: referencecounter.cpp:101
mythmainwindow.h
ViewScheduled::viewInputs
void viewInputs(void)
Definition: viewscheduled.cpp:577
ViewScheduled::ChangeGroup
void ChangeGroup(MythUIButtonListItem *item)
Definition: viewscheduled.cpp:372
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:52
MythObservable::removeListener
void removeListener(QObject *listener)
Remove a listener to the observable.
Definition: mythobservable.cpp:55
MythUIStateType
This widget is used for grouping other widgets for display when a particular named state is called....
Definition: mythuistatetype.h:22
MythCoreContext::SaveBoolSetting
void SaveBoolSetting(const QString &key, bool newValue)
Definition: mythcorecontext.h:160
AutoDeleteDeque::size
size_t size(void) const
Definition: autodeletedeque.h:67
MythUIStateType::DisplayState
bool DisplayState(const QString &name)
Definition: mythuistatetype.cpp:84
viewscheduled.h
uint
unsigned int uint
Definition: freesurround.h:24
tv_play.h
ViewScheduled::FillList
void FillList(void)
Definition: viewscheduled.cpp:437
TV
Control TV playback.
Definition: tv_play.h:154
ProgramInfo::GetStars
float GetStars(void) const
Definition: programinfo.h:446