24 if (!LoadWindowFromXML(
"schedule-ui.xml",
"schedulediff",
this))
35 LOG(VB_GENERAL, LOG_ERR,
"Cannot load screen 'schedulediff'");
45 m_titleText->SetText(m_title);
99 message +=
" " + QObject::tr(
"The following programs will be recorded " 100 "instead:") +
"\n\n";
103 for (; it != m_recListAfter.end(); ++it)
115 message += QString(
"%1 - %2 %3\n")
117 .toLocalTime().toString(timeFormat))
119 .toLocalTime().toString(timeFormat))
125 QString title = QObject::tr(
"Program Status");
128 "statusdialog",
true);
132 dlg->AddButton(QObject::tr(
"OK"));
183 QDateTime recstartts;
189 std::stable_sort(m_recListBefore.begin(), m_recListBefore.end(),
191 std::stable_sort(m_recListAfter.begin(), m_recListAfter.end(),
196 auto it = m_recListBefore.begin();
197 while (it != m_recListBefore.end())
199 if ((*it)->GetRecordingEndTime() >= now ||
200 (*it)->GetScheduledEndTime() >= now)
206 it = m_recListBefore.erase(it);
210 it = m_recListAfter.begin();
211 while (it != m_recListAfter.end())
213 if ((*it)->GetRecordingEndTime() >= now ||
214 (*it)->GetScheduledEndTime() >= now)
220 it = m_recListAfter.erase(it);
224 auto pb = m_recListBefore.begin();
225 auto pa = m_recListAfter.begin();
229 while (pa != m_recListAfter.end() || pb != m_recListBefore.end())
231 s.
m_before = (pb != m_recListBefore.end()) ? *pb :
nullptr;
232 s.
m_after = (pa != m_recListAfter.end()) ? *pa :
nullptr;
234 if (pa == m_recListAfter.end())
238 else if (pb == m_recListBefore.end())
268 m_recList.push_back(s);
276 for (
size_t i = 0; i < m_recList.size(); i++)
284 qVariantFromValue(pginfo));
287 pginfo->
ToMap(infoMap);
291 item->DisplayState(state,
"status");
292 item->SetTextFromMap(infoMap, state);
299 item->SetText(
"-",
"statusbefore");
306 item->SetText(
"-",
"statusafter");
311 if (m_recList.empty())
312 m_noChangesText->Show();
314 m_noChangesText->Hide();
327 pginfo->
ToMap(infoMap);
328 SetTextFromMap(infoMap);
334 int pos = m_conflictList->GetCurrentPos();
335 if (pos >= (
int)m_recList.size())
bool keyPressEvent(QKeyEvent *) override
Key event handler.
uint GetInputID(void) const
void updateInfo(MythUIButtonListItem *item)
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...
bool TranslateKeyPress(const QString &context, QKeyEvent *e, QStringList &actions, bool allowJumps=true)
Get a list of actions for a keypress in the given context.
QHash< QString, QString > InfoMap
Basic menu dialog, message and a list of options.
static QString toDescription(Type, RecordingType, const QDateTime &recstartts)
Converts "recstatus" into a long human readable description.
QString toString(Verbosity v=kLongDescription, const QString &sep=":", const QString &grp="\"") const
MythScreenStack * GetStack(const QString &stackname)
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
int GetRecordingPriority(void) const
static QString toUIState(Type)
typename List::const_iterator const_iterator
void Init(void) override
Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in...
Holds information on recordings and videos.
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
QString GetChannelSchedulingID(void) const
This is the unique programming identifier of a channel.
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
QString GetSetting(const QString &key, const QString &defaultval="")
void showStatus(MythUIButtonListItem *item)
static QString toString(Type, uint id)
Converts "recstatus" into a short (unreadable) string.
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
bool Create(void) override
MythMainWindow * GetMythMainWindow(void)
bool keyPressEvent(QKeyEvent *) override
Key event handler.
#define LOG(_MASK_, _LEVEL_, _STRING_)
RecStatus::Type GetRecordingStatus(void) const
RecordingType GetRecordingRuleType(void) const
bool LoadFromScheduler(AutoDeleteDeque< TYPE * > &destination, bool &hasConflicts, QString altTable="", int recordid=-1)
QDateTime GetRecordingStartTime(void) const
Approximate time the recording started.
static void showStatus(void)
QDateTime GetRecordingEndTime(void) const
Approximate time the recording should have ended, did end, or is intended to end.
ProgramInfo * CurrentProgram(void)
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
static bool comp_recstart_less_than(const ProgramInfo *a, const ProgramInfo *b)
static int comp_recstart(const ProgramInfo *a, const ProgramInfo *b)