10#include <QCoreApplication>
34#define LOC QString("ProgLister: ")
35#define LOC_WARN QString("ProgLister, Warning: ")
36#define LOC_ERR QString("ProgLister, Error: ")
39 const QString & extraArg)
42 auto *vsb =
new ProgLister(mainStack,
static_cast<TV*
>(player),
46 mainStack->
AddScreen(vsb, (player ==
nullptr));
54 QString view, QString extraArg,
55 QDateTime selectedTime) :
58 m_extraArg(std::move(extraArg)),
60 m_searchTime(m_startTime),
61 m_selectedTime(std::move(selectedTime)),
62 m_channelOrdering(
gCoreContext->GetSetting(
"ChannelOrdering",
"channum")),
63 m_view(std::move(view))
68 query.
prepare(
"SELECT COUNT(*) FROM program WHERE stars > 0");
72 if (query.
value(0).toInt() == 0)
99 m_searchTime(m_startTime),
100 m_channelOrdering(
gCoreContext->GetSetting(
"ChannelOrdering",
"channum")),
129 m_title(std::move(title)),
131 m_searchTime(m_startTime),
132 m_channelOrdering(
gCoreContext->GetSetting(
"ChannelOrdering",
"channum")),
133 m_view(
"reverse time"),
176 LOG(VB_GENERAL, LOG_ERR,
"Cannot load screen 'programlist'");
208 case plTitle: value = tr(
"Program Listings");
break;
215 case plSQLSearch: value = tr(
"Power Search");
break;
216 case plRecordid: value = tr(
"Rule Search");
break;
217 case plCategory: value = tr(
"Category Search");
break;
218 case plChannel: value = tr(
"Channel Search");
break;
219 case plMovies: value = tr(
"Movie Search");
break;
220 case plTime: value = tr(
"Time Search");
break;
222 default: value = tr(
"Unknown Search");
break;
246 QCoreApplication::postEvent(
this, slce);
264 "TV Frontend", e, actions);
266 bool needUpdate =
false;
267 for (
uint i = 0; i <
uint(actions.size()) && !handled; ++i)
269 const QString&
action = actions[i];
272 if (
action ==
"PREVVIEW") {
274 }
else if (
action ==
"NEXTVIEW") {
276 }
else if (
action ==
"CUSTOMEDIT") {
278 }
else if (
action ==
"EDIT") {
280 }
else if (
action ==
"DELETE") {
288 }
else if (
action ==
"GUIDE") {
292 }
else if (
action ==
"TOGGLERECORD") {
340 auto *sortGroupMenu =
new MythMenu(tr(
"Sort/Group Options"),
this,
342 sortGroupMenu->AddItem(tr(
"Reverse Sort Order"));
343 sortGroupMenu->AddItem(tr(
"Sort By Title"));
344 sortGroupMenu->AddItem(tr(
"Sort By Time"));
360 menu->AddItem(tr(
"Sort/Group"),
nullptr, sortGroupMenu);
391 if (!menuPopup->Create())
452 if (newview >= 0 && newview == oldview)
460 query.
prepare(
"DELETE FROM keyword "
461 "WHERE phrase = :PHRASE AND searchtype = :TYPE;");
467 "ProgLister::updateKeywordInDB -- delete", query);
475 const QString& qphrase = text;
478 query.
prepare(
"REPLACE INTO keyword (phrase, searchtype)"
479 "VALUES(:PHRASE, :TYPE );");
485 "ProgLister::updateKeywordInDB -- replace", query);
511 case plMovies: msg = tr(
"Select Rating");
break;
512 case plChannel: msg = tr(
"Select Channel");
break;
513 case plCategory: msg = tr(
"Select Category");
break;
516 .arg(tr(
"Select a search stored from"),
517 tr(
"Custom Record"));
break;
559 QString message = tr(
"Start search from date and time");
581 LOG(VB_GENERAL, LOG_WARNING,
LOC +
"No menu");
620 QStringList field = qphrase.split(
':');
621 if (field.size() != 6)
623 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Power search should have 6 fields," +
624 QString(
"\n\t\t\tnot %1 (%2)") .arg(field.size()).arg(qphrase));
628 static const std::array<QString,6> kBindingList
638 static const std::array<QString,6> kOutputList
640 "program.title LIKE :POWERTITLE ",
641 "program.subtitle LIKE :POWERSUB ",
642 "program.description LIKE :POWERDESC ",
643 "program.category_type = :POWERCATTYPE ",
644 "programgenres.genre = :POWERGENRE ",
645 "channel.callsign = :POWERCALLSIGN ",
648 for (
uint i = 0; i < (
uint) field.size(); i++)
650 if (field[i].isEmpty())
657 bindings[kBindingList[i]] =
658 (!kOutputList[i].contains(
"=")) ?
659 QString(
'%') + field[i] + QString(
'%') : field[i];
662 return output.contains(
"programgenres");
689 if (!record->LoadByProgram(pi))
695 QString message = tr(
"Delete '%1' %2 rule?")
701 popupStack, message,
true);
703 okPopup->SetReturnEvent(
this,
"deleterule");
704 okPopup->SetData(QVariant::fromValue(record));
706 if (okPopup->Create())
719 QString message = tr(
"Delete this episode of '%1'?").arg(pi->
GetTitle());
732 "DELETE FROM oldrecorded "
733 "WHERE chanid = :CHANID AND "
734 " starttime = :STARTTIME");
752 QString message = tr(
"Delete all episodes of '%1'?").arg(pi->
GetTitle());
764 query.
prepare(
"DELETE FROM oldrecorded "
765 "WHERE title = :TITLE AND future = 0");
790 message +=
"\n\n\n" + tr(
"NOTE: removing items from this list will not "
791 "delete any recordings.");
793 QString title = tr(
"Previously Recorded");
795 auto *
menu =
new MythMenu(title, message,
this,
"deletemenu");
797 menu->AddItem(tr(
"Allow this episode to re-record"));
799 menu->AddItem(tr(
"Never record this episode"));
800 menu->AddItem(tr(
"Remove this episode from the list"));
801 menu->AddItem(tr(
"Remove all episodes for this title"));
802 menu->AddItem(tr(
"Cancel"));
807 if (menuPopup->Create())
821 0,
true,
"channum, chanid");
824 for (
auto & channel : channels)
828 m_viewList.push_back(QString::number(channel.m_chanId));
837 QDateTime query_starttime =
m_startTime.addSecs(50 -
840 query.
prepare(
"SELECT g1.genre, g2.genre "
842 "JOIN programgenres g1 ON "
843 " program.chanid = g1.chanid AND "
844 " program.starttime = g1.starttime "
845 "LEFT JOIN programgenres g2 ON "
846 " g1.chanid = g2.chanid AND "
847 " g1.starttime = g2.starttime "
848 "WHERE program.endtime > :PGILSTART "
849 "GROUP BY g1.genre, g2.genre;");
850 query.
bindValue(
":PGILSTART", query_starttime);
862 QString genre1 = query.
value(0).toString();
863 if (genre1.isEmpty())
866 if (genre1 != lastGenre1)
873 QString genre2 = query.
value(1).toString();
874 if (genre2.isEmpty() || genre2 == genre1)
877 m_viewList.push_back(genre1 +
":/:" + genre2);
884 query.
prepare(
"SELECT category "
886 "WHERE program.endtime > :PGILSTART "
887 "GROUP BY category");
888 query.
bindValue(
":PGILSTART", query_starttime);
894 QString category = query.
value(0).toString();
895 if (category.isEmpty())
897 category = query.
value(0).toString();
911 query.
prepare(
"SELECT phrase FROM keyword "
912 "WHERE searchtype = :SEARCHTYPE;");
923 QString phrase = QString::fromUtf8(query.
value(0)
924 .toByteArray().constData());
925 if (phrase.isEmpty())
938 const QString& qphrase = view;
941 query2.
prepare(
"REPLACE INTO keyword (phrase, searchtype)"
942 "VALUES(:VIEW, :SEARCHTYPE );");
947 "replace keyword", query2);
957 LOG(VB_GENERAL, LOG_WARNING,
LOC + QString(
"Failed to load viewList"));
1000 m_viewList.push_back(QString(
">= %1").arg(((10 - 0.5) / 10.0) - 0.001));
1002 for (
int i = 9; i > 0; i--)
1004 float stars = ((i - 0.5F ) / 10.0F) - 0.001F;
1005 m_viewList.push_back(QString(
">= %1").arg(stars));
1009 if (!view.isEmpty())
1030 query.
prepare(
"SELECT title FROM record "
1031 "WHERE recordid = :RECORDID");
1036 QString title = query.
value(0).toString();
1044 query.
prepare(
"SELECT rulename FROM customexample "
1045 "WHERE search > 0 ORDER BY rulename;");
1049 while (query.
next())
1051 QString rulename = query.
value(0).toString();
1052 if (rulename.isEmpty() || rulename.trimmed().isEmpty())
1054 rulename = query.
value(0).toString();
1059 if (!view.isEmpty())
1076 if (!view.isEmpty())
1170 bindings[
":PGILSTART"] =
1175 where =
"WHERE channel.deleted IS NULL "
1176 " AND channel.visible > 0 "
1177 " AND program.endtime > :PGILSTART "
1178 " AND (program.title = :PGILPHRASE0 OR "
1179 " (program.seriesid <> '' AND "
1180 " program.seriesid = :PGILPHRASE1)) ";
1181 bindings[
":PGILPHRASE0"] = qphrase;
1186 where =
"LEFT JOIN oldprogram ON "
1187 " oldprogram.oldtitle = program.title "
1188 "WHERE channel.deleted IS NULL "
1189 " AND channel.visible > 0 "
1190 " AND program.endtime > :PGILSTART "
1191 " AND oldprogram.oldtitle IS NULL "
1192 " AND program.manualid = 0 ";
1194 if (qphrase ==
"premieres")
1197 where +=
" ( program.originalairdate = DATE(";
1198 where +=
" CONVERT_TZ(program.starttime, 'Etc/UTC', 'SYSTEM'))";
1199 where +=
" AND (program.category = 'Special' ";
1200 where +=
" OR program.programid LIKE 'EP%0001')) ";
1201 where +=
" OR (program.category_type='movie' ";
1202 where +=
" AND program.stars > 0.5 ";
1203 where +=
" AND program.airdate >= YEAR(NOW()) - 2) ";
1206 else if (qphrase ==
"movies")
1208 where +=
" AND program.category_type = 'movie' ";
1210 else if (qphrase ==
"series")
1212 where +=
" AND program.category_type = 'series' ";
1214 else if (qphrase ==
"specials")
1216 where +=
" AND program.category_type = 'tvshow' ";
1220 where +=
" AND (program.category_type <> 'movie' ";
1221 where +=
" OR program.airdate >= YEAR(NOW()) - 3) ";
1226 where =
"WHERE channel.deleted IS NULL "
1227 " AND channel.visible > 0 "
1228 " AND program.endtime > :PGILSTART "
1229 " AND program.title LIKE :PGILLIKEPHRASE0 ";
1230 bindings[
":PGILLIKEPHRASE0"] = QString(
"%") + qphrase +
'%';
1234 where =
"WHERE channel.deleted IS NULL "
1235 " AND channel.visible > 0 "
1236 " AND program.endtime > :PGILSTART "
1237 " AND (program.title LIKE :PGILLIKEPHRASE1 "
1238 " OR program.subtitle LIKE :PGILLIKEPHRASE2 "
1239 " OR program.description LIKE :PGILLIKEPHRASE3 ) ";
1240 bindings[
":PGILLIKEPHRASE1"] = QString(
"%") + qphrase +
'%';
1241 bindings[
":PGILLIKEPHRASE2"] = QString(
"%") + qphrase +
'%';
1242 bindings[
":PGILLIKEPHRASE3"] = QString(
"%") + qphrase +
'%';
1246 where =
", people, credits "
1247 "WHERE channel.deleted IS NULL "
1248 " AND channel.visible > 0 "
1249 " AND program.endtime > :PGILSTART "
1250 " AND people.name LIKE :PGILPHRASE1 "
1251 " AND credits.person = people.person "
1252 " AND program.chanid = credits.chanid "
1253 " AND program.starttime = credits.starttime";
1254 bindings[
":PGILPHRASE1"] = qphrase;
1263 if (!powerWhere.isEmpty())
1267 where = QString(
"LEFT JOIN programgenres ON "
1268 "program.chanid = programgenres.chanid AND "
1269 "program.starttime = programgenres.starttime ");
1272 where += QString(
"WHERE channel.deleted IS NULL "
1273 " AND channel.visible > 0 "
1274 " AND program.endtime > :PGILSTART "
1275 " AND ( ") + powerWhere +
" ) ";
1282 where = QString(
"WHERE channel.deleted iS NULL "
1283 " AND channel.visible > 0 "
1284 " AND program.endtime > :PGILSTART "
1285 " AND ( %1 ) ").arg(qphrase);
1292 where =
"WHERE channel.deleted IS NULL "
1293 " AND channel.visible > 0 "
1294 " AND program.endtime > :PGILSTART "
1295 " AND channel.chanid = :PGILPHRASE2 ";
1296 bindings[
":PGILPHRASE2"] = qphrase;
1302 where =
"WHERE channel.deleted IS NULL "
1303 " AND channel.visible > 0 "
1304 " AND program.endtime > :PGILSTART "
1305 " AND program.category = :PGILPHRASE3 ";
1306 bindings[
":PGILPHRASE3"] = qphrase;
1310 where =
"JOIN programgenres g ON "
1311 " program.chanid = g.chanid AND "
1312 " program.starttime = g.starttime AND "
1313 " genre = :PGILPHRASE4 "
1314 "WHERE channel.deleted IS NULL "
1315 " AND channel.visible > 0 "
1316 " AND program.endtime > :PGILSTART ";
1317 bindings[
":PGILPHRASE4"] = qphrase;
1321 where =
"JOIN programgenres g1 ON "
1322 " program.chanid = g1.chanid AND "
1323 " program.starttime = g1.starttime AND "
1324 " g1.genre = :GENRE1 "
1325 "JOIN programgenres g2 ON "
1326 " program.chanid = g2.chanid AND "
1327 " program.starttime = g2.starttime AND "
1328 " g2.genre = :GENRE2 "
1329 "WHERE channel.deleted IS NULL "
1330 " AND channel.visible > 0 "
1331 " AND program.endtime > :PGILSTART ";
1338 where =
"WHERE channel.deleted IS NULL "
1339 " AND channel.visible > 0 "
1340 " AND program.endtime > :PGILSTART "
1341 " AND program.category_type = 'movie' "
1342 " AND program.stars " + qphrase +
' ';
1348 searchTime.setTime(QTime(searchTime.time().hour(), 0, 0));
1349 bindings[
":PGILSEARCHTIME1"] = searchTime;
1350 where =
"WHERE channel.deleted IS NULL "
1351 " AND channel.visible > 0 "
1352 " AND program.starttime >= :PGILSEARCHTIME1 ";
1355 where +=
" AND program.starttime < DATE_ADD(:PGILSEARCHTIME2, "
1356 "INTERVAL '1' HOUR) ";
1357 bindings[
":PGILSEARCHTIME2"] = bindings[
":PGILSEARCHTIME1"];
1362 where =
"JOIN recordmatch ON "
1363 " (program.starttime = recordmatch.starttime "
1364 " AND program.chanid = recordmatch.chanid) "
1365 "WHERE channel.deleted IS NULL "
1366 " AND channel.visible > 0 "
1367 " AND program.endtime > :PGILSTART "
1368 " AND recordmatch.recordid = :PGILPHRASE5 ";
1369 bindings[
":PGILPHRASE5"] = qphrase;
1374 query.
prepare(
"SELECT fromclause, whereclause FROM customexample "
1375 "WHERE rulename = :RULENAME;");
1380 QString fromc = query.
value(0).toString();
1381 QString wherec = query.
value(1).toString();
1383 where = QString(
"WHERE channel.deleted IS NULL "
1384 " AND channel.visible > 0 "
1385 " AND program.endtime > :PGILSTART "
1386 " AND ( %1 ) ").arg(wherec);
1387 if (!fromc.isEmpty())
1388 where = fromc +
' ' + where;
1395 where = QString(
"AND ( recordid = %1 OR title = :MTITLE )")
1397 bindings[
":MTITLE"] =
m_title;
1401 where = QString(
"AND title = :MTITLE ");
1402 bindings[
":MTITLE"] =
m_title;
1406 where = QString(
"AND recordid = %1 ").arg(
m_recid);
1414 selected = *selectedP;
1415 selectedP = &selected;
1447 if ((*it)->GetSortTitle() != curtitle)
1449 curtitle = (*it)->GetSortTitle();
1486 std::ranges::stable_sort(std::ranges::reverse_view(
m_itemList),
1515 pginfo.
ToMap(infoMap);
1562 ProgramInfoSortFn comp {
nullptr };
1573 bool dobreak =
false;
1589 if (item->
GetText(
"is_item_initialized").isNull())
1592 pginfo->
ToMap(infoMap);
1602 QString tempSubTitle = pginfo->GetSubtitle();
1603 if (tempSubTitle.trimmed().isEmpty())
1604 tempSubTitle = pginfo->GetTitle();
1605 item->
SetText(tempSubTitle,
"titlesubtitle", state);
1608 item->
DisplayState(QString::number(pginfo->GetStars(10)),
1614 item->
SetText(
"yes",
"is_item_initialized");
1627 tr(
"%1 of %2",
"Current position in list where %1 is the "
1628 "position, %2 is the total count")
1650 pginfo->ToMap(infoMap);
1656 tr(
"%1 of %2",
"Current position in list where %1 is the "
1657 "position, %2 is the total count")
1667 QString
rating = QString::number(pginfo->GetStars(10));
1674 bool needUpdate =
false;
1680 QString resultid = dce->GetId();
1682 int buttonnum = dce->GetResult();
1684 if (resultid ==
"sortgroupmenu")
1707 else if (resultid ==
"deletemenu")
1733 else if (resultid ==
"deleterule")
1736 if (record && buttonnum > 0 && !record->Delete())
1738 LOG(VB_GENERAL, LOG_ERR,
LOC +
1739 "Failed to delete recording rule");
1751 QString
id = slce->GetId();
1753 if (
id == objectName())
1764 auto *me =
dynamic_cast<MythEvent *
>(event);
1768 const QString& message = me->
Message();
1772 else if (message ==
"SCHEDULE_CHANGE"
1773 || message ==
"GROUPBY_CHANGE")
1781#include "moc_proglist.cpp"
std::vector< ChannelInfo > ChannelInfoList
iterator erase(const iterator &it)
void setAutoDelete(bool auto_delete)
static void SortChannels(ChannelInfoList &list, const QString &order, bool eliminate_duplicates=false)
static ChannelInfoList GetChannels(uint sourceid, bool visible_only, const QString &group_by=QString(), uint channel_groupid=0)
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
static const Type kEventType
QSqlQuery wrapper that fetches a DB connection from the connection pool.
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
QVariant value(int i) const
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Dialog asking for user confirmation.
static void DBError(const QString &where, const MSqlQuery &query)
Basic menu dialog, message and a list of options.
This class is used as a container for messages.
const QString & Message() const
static const Type kMythEventMessage
MythScreenStack * GetMainStack()
bool TranslateKeyPress(const QString &Context, QKeyEvent *Event, QStringList &Actions, bool AllowJumps=true)
Get a list of actions for a keypress in the given context.
MythScreenStack * GetStack(const QString &Stackname)
void addListener(QObject *listener)
Add a listener to the observable.
void removeListener(QObject *listener)
Remove a listener to the observable.
virtual void PopScreen(MythScreenType *screen=nullptr, bool allowFade=true, bool deleteScreen=true)
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Screen in which all other widgets are contained and rendered.
void LoadInBackground(const QString &message="")
virtual bool Create(void)
void BuildFocusList(void)
MythUIType * GetFocusWidget(void) const
MythScreenStack * GetScreenStack() const
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
void CloseBusyPopup(void)
virtual void SetTextFromMap(const InfoMap &infoMap)
virtual void ResetMap(const InfoMap &infoMap)
Provide a dialog to quickly find an entry in a list.
This widget is used for grouping other widgets for display when a particular named state is called.
bool DisplayState(const QString &name)
void Reset(void) override
Reset the widget to it's original state, should not reset changes made by the theme.
virtual void SetText(const QString &text)
virtual void SetVisible(bool visible)
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
static QString toString(ProgGroupBy::Type groupBy)
void HandleVisible(MythUIButtonListItem *item)
void ShowChooseViewMenu(void)
MythUIText * m_groupByText
void SortList(SortBy sortby, bool reverseSort)
QStringList m_viewTextList
MythUIButtonList * m_progList
SortBy GetSortBy(void) const
void SwitchToNextView(void)
void customEvent(QEvent *event) override
void DeleteOldSeries(bool ok)
MythUIText * m_positionText
void SetViewFromList(const QString &item)
static void * RunProgramList(void *player, ProgListType pltype, const QString &extraArg)
void FillItemList(bool restorePosition, bool updateDisp=true)
void ShowDeleteOldEpisodeMenu(void)
void HandleSelected(MythUIButtonListItem *item)
void FillViewList(const QString &view)
void UpdateButtonList(void)
void ShowOldRecordedMenu(void)
void RestoreSelection(const ProgramInfo *selected, int selectedOffset)
MythUIText * m_curviewText
static bool PowerStringToSQL(const QString &qphrase, QString &output, MSqlBindings &bindings)
void SetViewFromTime(QDateTime searchTime)
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
ProgLister(MythScreenStack *parent, ProgListType pltype, QString view, QString extraArg, QDateTime selectedTime=QDateTime())
~ProgLister(void) override
MythUIText * m_messageText
friend class PowerSearchPopup
void ShowDeleteItemMenu(void)
QString m_channelOrdering
void Close(void) override
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
bool Create(void) override
RecSearchType m_searchType
void UpdateKeywordInDB(const QString &text, const QString &oldValue)
ProgramList m_itemListSave
void ShowDeleteOldSeriesMenu(void)
void ShowDeleteRuleMenu(void)
void UpdateDisplay(const ProgramInfo *selected=nullptr)
ProgramInfo * GetCurrentProgram(void) const override
void ShowMenu(void) override
void DeleteOldEpisode(bool ok)
void ClearCurrentProgramInfo(void)
void SwitchToPreviousView(void)
Holds information on recordings and videos.
uint GetChanID(void) const
This is the unique key used in the database to locate tuning information.
uint GetRecordingRuleID(void) const
QString toString(Verbosity v=kLongDescription, const QString &sep=":", const QString &grp="\"") const
QString GetProgramID(void) const
QString GetSortSubtitle(void) const
QString GetDescription(void) const
QString GetTitle(void) const
QDateTime GetScheduledStartTime(void) const
The scheduled start time of program.
bool IsDuplicate(void) const
QString GetSortTitle(void) const
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...
RecStatus::Type GetRecordingStatus(void) const
void SetProgramID(const QString &id)
RecordingType GetRecordingRuleType(void) const
static QString toUIState(RecStatus::Type recstatus)
Holds information on a TV Program one might wish to record.
void SetDupHistory(void)
Set the duplicate flag in oldrecorded.
void ForgetHistory(void)
Forget the recording of a program so it will be recorded again.
static const QRegularExpression kReLeadingAnd
Internal representation of a recording rule, mirrors the record table.
virtual int DecrRef(void)
Decrements reference count and deletes on 0.
virtual int IncrRef(void)
Increments reference count.
virtual void EditScheduled(void)
Creates a dialog for editing the recording schedule.
virtual void EditRecording(bool may_watch_now=false)
Creates a dialog for editing the recording status, blocking until user leaves dialog.
static ProgGroupBy::Type GetProgramListGroupBy(void)
virtual void ShowDetails(void) const
Show the Program Details screen.
virtual void AddGroupMenuItems(MythMenu *sortGroupMenu)
void customEvent(QEvent *event) override
virtual void EditCustom(void)
Creates a dialog for creating a custom recording rule.
virtual void ShowGuide(void) const
Show the program guide.
virtual void QuickRecord(void)
Create a kSingleRecord or bring up recording dialog.
virtual void ShowUpcoming(void) const
Show the upcoming recordings for this title.
virtual void ShowChannelSearch(void) const
Show the channel search.
virtual void ShowPrevious(void) const
Show the previous recordings for this recording rule.
static void RescheduleCheck(const RecordingInfo &recinfo, const QString &why)
Event that can be dispatched from a MythScreenType when it has completed loading.
static const Type kEventType
void RequestEmbedding(bool Embed, const QRect &Rect={}, const QStringList &Data={})
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
void MSqlAddMoreBindings(MSqlBindings &output, MSqlBindings &addfrom)
Add the entries in addfrom to the map in output.
QMap< QString, QVariant > MSqlBindings
typedef for a map of string -> string bindings for generic queries.
MythConfirmationDialog * ShowOkPopup(const QString &message, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
MythMainWindow * GetMythMainWindow(void)
static MythThemedMenu * menu
QHash< QString, QString > InfoMap
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
@ kDateTimeFull
Default local time.
@ kSimplify
Do Today/Yesterday/Tomorrow transform.
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
MBASE_PUBLIC std::strong_ordering naturalCompare(const QString &_a, const QString &_b, Qt::CaseSensitivity caseSensitivity=Qt::CaseSensitive)
This method chops the input a and b into pieces of digits and non-digits (a1.05 becomes a | 1 | .
def rating(profile, smoonURL, gate)
static bool plPrevTitleSort(const ProgramInfo *a, const ProgramInfo *b)
static bool plTitleSort(const ProgramInfo *a, const ProgramInfo *b)
static bool plTimeSort(const ProgramInfo *a, const ProgramInfo *b)
bool LoadFromOldRecorded(ProgramList &destination, const QString &sql, const MSqlBindings &bindings)
bool LoadFromProgram(ProgramList &destination, const QString &where, const QString &groupBy, const QString &orderBy, const MSqlBindings &bindings, const ProgramList &schedList)
bool LoadFromScheduler(AutoDeleteDeque< TYPE * > &destination, bool &hasConflicts, const QString &altTable="", int recordid=-1)
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
#define ACTION_CHANNELSEARCH
VERBOSE_PREAMBLE Most true