MythTV  master
viewscheduled.cpp
Go to the documentation of this file.
1 // Qt
2 #include <QCoreApplication>
3 
4 // MythTV
7 #include "libmythbase/programtypes.h" // for RecStatus, etc
8 #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  if (pginfo == nullptr)
272  {
273  pit = m_recList.erase(pit);
274  continue;
275  }
276 
277  pginfo->CalculateRecordedProgress();
278 
279  const RecStatus::Type recstatus = pginfo->GetRecordingStatus();
280  if ((pginfo->GetRecordingEndTime() >= now ||
281  pginfo->GetScheduledEndTime() >= now ||
282  recstatus == RecStatus::Recording ||
283  recstatus == RecStatus::Tuning ||
284  recstatus == RecStatus::Failing) &&
285  (m_showAll ||
286  (recstatus >= RecStatus::Pending &&
287  recstatus <= RecStatus::WillRecord) ||
288  recstatus == RecStatus::DontRecord ||
289  (recstatus == RecStatus::TooManyRecordings &&
290  ++toomanycounts[pginfo->GetRecordingRuleID()] <= 1) ||
291  (recstatus > RecStatus::TooManyRecordings &&
292  recstatus != RecStatus::Repeat &&
293  recstatus != RecStatus::NeverRecord)))
294  {
295  m_inputref[pginfo->GetInputID()]++;
296  if (pginfo->GetInputID() > m_maxinput)
297  m_maxinput = pginfo->GetInputID();
298 
299  QDate date = pginfo->GetRecordingStartTime().toLocalTime().date();
300  m_recgroupList[date].push_back(pginfo);
301  m_recgroupList[date].setAutoDelete(false);
302 
303  m_recgroupList[m_defaultGroup].push_back(pginfo);
304 
305  ++pit;
306  }
307  else
308  {
309  pit = m_recList.erase(pit);
310  continue;
311  }
312  }
313 
314  if (m_groupList)
315  {
316  QString label;
317  QMap<QDate,ProgramList>::iterator dateit = m_recgroupList.begin();
318  while (dateit != m_recgroupList.end())
319  {
320  if (dateit.key().isNull())
321  label = tr("All");
322  else
323  label = MythDate::toString(
324  dateit.key(), MythDate::kDateFull | MythDate::kSimplify);
325 
327  QVariant::fromValue(dateit.key()));
328  ++dateit;
329  }
330 
331  // Restore group
332  if (m_recgroupList.contains(group))
333  m_currentGroup = group;
334  else
336 
337  m_groupList->SetValueByData(QVariant::fromValue(m_currentGroup));
338  }
339 
340  FillList();
341 
342  // Restore position after a list update
343  if (!callsign.isEmpty())
344  {
346 
347  int listPos = ((int) plist.size()) - 1;
348  for (int i = listPos; i >= 0; --i)
349  {
350  ProgramInfo *pginfo = plist[i];
351  if (pginfo == nullptr)
352  continue;
353  if (callsign == pginfo->GetChannelSchedulingID() &&
354  startts == pginfo->GetScheduledStartTime())
355  {
356  listPos = i;
357  break;
358  }
359  if (recstartts <= pginfo->GetRecordingStartTime())
360  listPos = i;
361  }
363  }
364 
365  m_inFill = false;
366  m_needFill = false;
367 }
368 
369 
371 {
372  if (!item || m_recList.empty())
373  return;
374 
375  auto group = item->GetData().value<QDate>();
376 
377  m_currentGroup = group;
378 
379  if (!m_inFill)
380  FillList();
381 }
382 
384  ProgramInfo *pginfo) const
385 {
386  QString state;
387 
388  const RecStatus::Type recstatus = pginfo->GetRecordingStatus();
389  if (recstatus == RecStatus::Recording ||
390  recstatus == RecStatus::Tuning)
391  state = "running";
392  else if (recstatus == RecStatus::Conflict ||
393  recstatus == RecStatus::Offline ||
394  recstatus == RecStatus::TunerBusy ||
395  recstatus == RecStatus::Failed ||
396  recstatus == RecStatus::Failing ||
397  recstatus == RecStatus::Aborted ||
398  recstatus == RecStatus::Missed)
399  state = "error";
400  else if (recstatus == RecStatus::WillRecord ||
401  recstatus == RecStatus::Pending)
402  {
403  if (m_curinput == 0 || pginfo->GetInputID() == m_curinput)
404  {
405  if (pginfo->GetRecordingPriority2() < 0)
406  state = "warning";
407  else
408  state = "normal";
409  }
410  }
411  else if (recstatus == RecStatus::Repeat ||
412  recstatus == RecStatus::NeverRecord ||
413  recstatus == RecStatus::DontRecord ||
414  (recstatus != RecStatus::DontRecord &&
415  recstatus <= RecStatus::EarlierShowing))
416  state = "disabled";
417  else
418  state = "warning";
419 
420  InfoMap infoMap;
421  pginfo->ToMap(infoMap);
422  item->SetTextFromMap(infoMap, state);
423 
424  item->SetProgress2(0, 100, pginfo->GetRecordedPercent());
425 
426  QString rating = QString::number(pginfo->GetStars(10));
427  item->DisplayState(rating, "ratingstate");
428  item->DisplayState(state, "status");
429 }
430 
432 {
434 
435  MythUIText *norecordingText = dynamic_cast<MythUIText*>
436  (GetChild("norecordings_info"));
437 
438  if (norecordingText)
439  norecordingText->SetVisible(m_recList.empty());
440 
441  if (m_recList.empty())
442  return;
443 
444  ProgramList plist;
445 
446  if (!m_recgroupList.contains(m_currentGroup))
448 
450 
451  auto pit = plist.begin();
452  while (pit != plist.end())
453  {
454  ProgramInfo *pginfo = *pit;
455  if (pginfo)
456  {
457  auto *item = new MythUIButtonListItem(m_schedulesList,"",
458  QVariant::fromValue(pginfo));
459  UpdateUIListItem(item, pginfo);
460  }
461  ++pit;
462  }
463 
464  MythUIText *statusText = dynamic_cast<MythUIText*>(GetChild("status"));
465  if (statusText)
466  {
467  if (m_conflictBool)
468  {
469  // Find first conflict and store in m_conflictDate field
470  for (auto & conflict : plist)
471  {
472  if (conflict->GetRecordingStatus() == RecStatus::Conflict)
473  {
474  m_conflictDate = conflict->GetRecordingStartTime()
475  .toLocalTime().date();
476  break;
477  }
478  }
479 
480  // TODO: This can be templated instead of hardcoding
481  // Conflict/No Conflict
482  QString cstring = tr("Conflict %1")
485 
486  statusText->SetText(cstring);
487  }
488  else
489  statusText->SetText(tr("No Conflicts"));
490  }
491 
492  MythUIText *filterText = dynamic_cast<MythUIText*>(GetChild("filter"));
493  if (filterText)
494  {
495  if (m_showAll)
496  filterText->SetText(tr("All"));
497  else
498  filterText->SetText(tr("Important"));
499  }
500 }
501 
502 // Called whenever a new recording is selected from the list of
503 // recordings. This function updates the screen with the information
504 // on the newly selected recording.
506 {
507  if (!item)
508  return;
509 
510  auto *pginfo = item->GetData().value<ProgramInfo*> ();
511  if (pginfo)
512  {
513  InfoMap infoMap;
514  pginfo->ToMap(infoMap);
515  SetTextFromMap(infoMap);
516  if (m_progressBar != nullptr)
517  m_progressBar->Set(0, 100, pginfo->GetRecordedPercent());
518 
519  MythUIStateType *ratingState = dynamic_cast<MythUIStateType*>
520  (GetChild("ratingstate"));
521  if (ratingState)
522  {
523  QString rating = QString::number(pginfo->GetStars(10));
524  ratingState->DisplayState(rating);
525  }
526  }
527 }
528 
530 {
532 
533  if (!item)
534  return;
535 
536  auto *pginfo = item->GetData().value<ProgramInfo*>();
537  if (!pginfo)
538  return;
539 
540  auto *record = new RecordingRule();
541  if (!record->LoadByProgram(pginfo))
542  {
543  delete record;
544  return;
545  }
546 
547  QString message = tr("Delete '%1' %2 rule?")
548  .arg(record->m_title, toString(pginfo->GetRecordingRuleType()));
549 
550  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
551 
552  auto *okPopup = new MythConfirmationDialog(popupStack, message, true);
553 
554  okPopup->SetReturnEvent(this, "deleterule");
555  okPopup->SetData(QVariant::fromValue(record));
556 
557  if (okPopup->Create())
558  popupStack->AddScreen(okPopup);
559  else
560  delete okPopup;
561 }
562 
564 {
565  m_showAll = all;
566  m_needFill = true;
567 }
568 
570 {
571  m_needFill = true;
572 
573  m_curinput++;
574  while (m_curinput <= m_maxinput)
575  {
576  if (m_inputref[m_curinput] > 0)
577  return;
578  m_curinput++;
579  }
580  m_curinput = 0;
581 }
582 
584 {
585  if (m_player)
586  emit m_player->RequestEmbedding(true);
587 }
588 
589 void ViewScheduled::customEvent(QEvent *event)
590 {
591  if (event->type() == MythEvent::kMythEventMessage)
592  {
593  auto *me = dynamic_cast<MythEvent *>(event);
594  if (me == nullptr)
595  return;
596 
597  const QString& message = me->Message();
598  if (message == "SCHEDULE_CHANGE")
599  {
600  m_needFill = true;
601 
602  if (m_inEvent)
603  return;
604 
605  m_inEvent = true;
606 
607  LoadList();
608 
609  m_inEvent = false;
610  }
611  else if (message.startsWith("UPDATE_FILE_SIZE"))
612  {
613  QStringList tokens = message.simplified().split(" ");
614  if (tokens.size() < 3)
615  return;
616 
617  bool ok {false};
618  uint recordingID = tokens[1].toUInt();
619  uint64_t filesize = tokens[2].toLongLong(&ok);
620 
621  // Locate program
622  auto pit = m_recList.begin();
623  while (pit != m_recList.end())
624  {
625  ProgramInfo* pginfo = *pit;
626  if (pginfo && pginfo->GetRecordingID() == recordingID)
627  {
628  // Update size & progress
629  pginfo->SetFilesize(filesize);
630  uint current = pginfo->GetRecordedPercent();
631  pginfo->CalculateRecordedProgress();
632  if (pginfo->GetRecordedPercent() != current)
633  {
634  // Update display, if it's shown
635  MythUIButtonListItem *item =
637  GetItemByData(QVariant::fromValue(pginfo));
638  if (item)
639  {
640  UpdateUIListItem(item, pginfo);
641 
642  // Update selected item if necessary
643  MythUIButtonListItem *selected =
645  if (item == selected)
646  updateInfo(selected);
647  }
648  }
649  break;
650  }
651  ++pit;
652  }
653  }
654  }
655  else if (event->type() == DialogCompletionEvent::kEventType)
656  {
657  auto *dce = (DialogCompletionEvent*)(event);
658 
659  QString resultid = dce->GetId();
660  QString resulttext = dce->GetResultText();
661  int buttonnum = dce->GetResult();
662 
663  if (resultid == "deleterule")
664  {
665  auto *record = dce->GetData().value<RecordingRule *>();
666  if (record)
667  {
668  if (buttonnum > 0)
669  {
670  if (!record->Delete())
671  LOG(VB_GENERAL, LOG_ERR,
672  "Failed to delete recording rule");
673  }
674  delete record;
675  }
676 
677  EmbedTVWindow();
678  }
679  else if (resultid == "menu")
680  {
681  if (resulttext == tr("Show Important"))
682  {
683  setShowAll(false);
684  }
685  else if (resulttext == tr("Show All"))
686  {
687  setShowAll(true);
688  }
689  else if (resulttext == tr("Program Details"))
690  {
691  ShowDetails();
692  }
693  else if (resulttext == tr("Program Guide"))
694  {
695  ShowGuide();
696  }
697  else if (resulttext == tr("Channel Search"))
698  {
700  }
701  else if (resulttext == tr("Upcoming by title"))
702  {
703  ShowUpcoming();
704  }
705  else if (resulttext == tr("Upcoming scheduled"))
706  {
708  }
709  else if (resulttext == tr("Previously Recorded"))
710  {
711  ShowPrevious();
712  }
713  else if (resulttext == tr("Custom Edit"))
714  {
715  EditCustom();
716  }
717  else if (resulttext == tr("Delete Rule"))
718  {
719  deleteRule();
720  }
721  else if (resulttext == tr("Show Inputs"))
722  {
723  viewInputs();
724  }
725 
726  if (m_needFill)
727  LoadList();
728  }
729  else
731  }
732 }
733 
735 {
737  return item ? item->GetData().value<ProgramInfo*>() : nullptr;
738 }
MythScreenType::LoadInBackground
void LoadInBackground(const QString &message="")
Definition: mythscreentype.cpp:286
RecStatus::Type
Type
Definition: recordingstatus.h:15
ViewScheduled::GetCurrentProgram
ProgramInfo * GetCurrentProgram(void) const override
Definition: viewscheduled.cpp:734
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:318
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
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1587
MythUIButtonList::SetValueByData
void SetValueByData(const QVariant &data)
Definition: mythuibuttonlist.cpp:1539
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:912
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:89
MythUIButtonListItem::DisplayState
void DisplayState(const QString &state, const QString &name)
Definition: mythuibuttonlist.cpp:3554
ViewScheduled::Close
void Close(void) override
Definition: viewscheduled.cpp:112
RecStatus::NeverRecord
@ NeverRecord
Definition: recordingstatus.h:42
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:21
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
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:23
RecordingRule
Internal representation of a recording rule, mirrors the record table.
Definition: recordingrule.h:28
ViewScheduled::deleteRule
void deleteRule()
Definition: viewscheduled.cpp:529
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:39
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:30
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:36
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:1112
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:37
RecStatus::Failing
@ Failing
Definition: recordingstatus.h:17
ACTION_CHANNELSEARCH
#define ACTION_CHANNELSEARCH
Definition: tv_actions.h:28
ViewScheduled::EmbedTVWindow
void EmbedTVWindow(void)
Definition: viewscheduled.cpp:583
MythUIComposite::SetTextFromMap
virtual void SetTextFromMap(const InfoMap &infoMap)
Definition: mythuicomposite.cpp:9
ScheduleCommon
Definition: schedulecommon.h:15
RecStatus::Aborted
@ Aborted
Definition: recordingstatus.h:27
RecStatus::Conflict
@ Conflict
Definition: recordingstatus.h:38
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:1542
RecStatus::Failed
@ Failed
Definition: recordingstatus.h:22
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:3030
RecStatus::Missed
@ Missed
Definition: recordingstatus.h:26
MythUIButtonListItem::GetData
QVariant GetData()
Definition: mythuibuttonlist.cpp:3656
uint
unsigned int uint
Definition: compat.h:81
ProgramInfo::SetFilesize
virtual void SetFilesize(uint64_t sz)
Definition: programinfo.cpp:6377
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:586
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:3544
ViewScheduled::RunViewScheduled
static void * RunViewScheduled(void *player, bool showTv)
Definition: viewscheduled.cpp:25
RecStatus::Offline
@ Offline
Definition: recordingstatus.h:43
ViewScheduled::setShowAll
void setShowAll(bool all)
Definition: viewscheduled.cpp:563
MythUIButtonListItem::SetTextFromMap
void SetTextFromMap(const InfoMap &infoMap, const QString &state="")
Definition: mythuibuttonlist.cpp:3281
RecStatus::Pending
@ Pending
Definition: recordingstatus.h:16
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:29
ViewScheduled::customEvent
void customEvent(QEvent *event) override
Definition: viewscheduled.cpp:589
RecStatus::DontRecord
@ DontRecord
Definition: recordingstatus.h:32
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:687
ViewScheduled::m_inEvent
bool m_inEvent
Definition: viewscheduled.h:79
RecStatus::EarlierShowing
@ EarlierShowing
Definition: recordingstatus.h:35
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:86
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
DialogCompletionEvent::kEventType
static const Type kEventType
Definition: mythdialogbox.h:57
ProgramInfo::CalculateRecordedProgress
void CalculateRecordedProgress()
Definition: programinfo.cpp:6450
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:40
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:323
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:383
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:505
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:569
ViewScheduled::ChangeGroup
void ChangeGroup(MythUIButtonListItem *item)
Definition: viewscheduled.cpp:370
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
tv_play.h
ViewScheduled::FillList
void FillList(void)
Definition: viewscheduled.cpp:431
TV
Control TV playback.
Definition: tv_play.h:152
ProgramInfo::GetStars
float GetStars(void) const
Definition: programinfo.h:442