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