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