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];
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")
339 auto *sortGroupMenu =
new MythMenu(tr(
"Sort/Group Options"),
this,
341 sortGroupMenu->AddItem(tr(
"Reverse Sort Order"));
342 sortGroupMenu->AddItem(tr(
"Sort By Title"));
343 sortGroupMenu->AddItem(tr(
"Sort By Time"));
359 menu->AddItem(tr(
"Sort/Group"),
nullptr, sortGroupMenu);
390 if (!menuPopup->Create())
451 if (newview >= 0 && newview == oldview)
459 query.
prepare(
"DELETE FROM keyword "
460 "WHERE phrase = :PHRASE AND searchtype = :TYPE;");
466 "ProgLister::updateKeywordInDB -- delete", query);
474 const QString& qphrase = text;
477 query.
prepare(
"REPLACE INTO keyword (phrase, searchtype)"
478 "VALUES(:PHRASE, :TYPE );");
484 "ProgLister::updateKeywordInDB -- replace", query);
510 case plMovies: msg = tr(
"Select Rating");
break;
511 case plChannel: msg = tr(
"Select Channel");
break;
512 case plCategory: msg = tr(
"Select Category");
break;
515 .arg(tr(
"Select a search stored from"),
516 tr(
"Custom Record"));
break;
558 QString message = tr(
"Start search from date and time");
580 LOG(VB_GENERAL, LOG_WARNING,
LOC +
"No menu");
619 QStringList field = qphrase.split(
':');
620 if (field.size() != 6)
622 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Power search should have 6 fields," +
623 QString(
"\n\t\t\tnot %1 (%2)") .arg(field.size()).arg(qphrase));
627 static const std::array<QString,6> kBindingList
637 static const std::array<QString,6> kOutputList
639 "program.title LIKE :POWERTITLE ",
640 "program.subtitle LIKE :POWERSUB ",
641 "program.description LIKE :POWERDESC ",
642 "program.category_type = :POWERCATTYPE ",
643 "programgenres.genre = :POWERGENRE ",
644 "channel.callsign = :POWERCALLSIGN ",
647 for (
uint i = 0; i < (
uint) field.size(); i++)
649 if (field[i].isEmpty())
656 bindings[kBindingList[i]] =
657 (!kOutputList[i].contains(
"=")) ?
658 QString(
'%') + field[i] + QString(
'%') : field[i];
661 return output.contains(
"programgenres");
688 if (!record->LoadByProgram(pi))
694 QString message = tr(
"Delete '%1' %2 rule?")
700 popupStack, message,
true);
702 okPopup->SetReturnEvent(
this,
"deleterule");
703 okPopup->SetData(QVariant::fromValue(record));
705 if (okPopup->Create())
718 QString message = tr(
"Delete this episode of '%1'?").arg(pi->
GetTitle());
731 "DELETE FROM oldrecorded "
732 "WHERE chanid = :CHANID AND "
733 " starttime = :STARTTIME");
751 QString message = tr(
"Delete all episodes of '%1'?").arg(pi->
GetTitle());
763 query.
prepare(
"DELETE FROM oldrecorded "
764 "WHERE title = :TITLE AND future = 0");
789 message +=
"\n\n\n" + tr(
"NOTE: removing items from this list will not "
790 "delete any recordings.");
792 QString title = tr(
"Previously Recorded");
794 auto *
menu =
new MythMenu(title, message,
this,
"deletemenu");
796 menu->AddItem(tr(
"Allow this episode to re-record"));
798 menu->AddItem(tr(
"Never record this episode"));
799 menu->AddItem(tr(
"Remove this episode from the list"));
800 menu->AddItem(tr(
"Remove all episodes for this title"));
801 menu->AddItem(tr(
"Cancel"));
806 if (menuPopup->Create())
820 0,
true,
"channum, chanid");
823 for (
auto & channel : channels)
827 m_viewList.push_back(QString::number(channel.m_chanId));
836 QDateTime query_starttime =
m_startTime.addSecs(50 -
839 query.
prepare(
"SELECT g1.genre, g2.genre "
841 "JOIN programgenres g1 ON "
842 " program.chanid = g1.chanid AND "
843 " program.starttime = g1.starttime "
844 "LEFT JOIN programgenres g2 ON "
845 " g1.chanid = g2.chanid AND "
846 " g1.starttime = g2.starttime "
847 "WHERE program.endtime > :PGILSTART "
848 "GROUP BY g1.genre, g2.genre;");
849 query.
bindValue(
":PGILSTART", query_starttime);
861 QString genre1 = query.
value(0).toString();
862 if (genre1.isEmpty())
865 if (genre1 != lastGenre1)
872 QString genre2 = query.
value(1).toString();
873 if (genre2.isEmpty() || genre2 == genre1)
876 m_viewList.push_back(genre1 +
":/:" + genre2);
883 query.
prepare(
"SELECT category "
885 "WHERE program.endtime > :PGILSTART "
886 "GROUP BY category");
887 query.
bindValue(
":PGILSTART", query_starttime);
893 QString category = query.
value(0).toString();
894 if (category.isEmpty())
896 category = query.
value(0).toString();
910 query.
prepare(
"SELECT phrase FROM keyword "
911 "WHERE searchtype = :SEARCHTYPE;");
922 QString phrase = QString::fromUtf8(query.
value(0)
923 .toByteArray().constData());
924 if (phrase.isEmpty())
937 const QString& qphrase = view;
940 query2.
prepare(
"REPLACE INTO keyword (phrase, searchtype)"
941 "VALUES(:VIEW, :SEARCHTYPE );");
946 "replace keyword", query2);
956 LOG(VB_GENERAL, LOG_WARNING,
LOC + QString(
"Failed to load viewList"));
999 m_viewList.push_back(QString(
">= %1").arg(((10 - 0.5) / 10.0) - 0.001));
1001 for (
int i = 9; i > 0; i--)
1003 float stars = ((i - 0.5F ) / 10.0F) - 0.001F;
1004 m_viewList.push_back(QString(
">= %1").arg(stars));
1008 if (!view.isEmpty())
1029 query.
prepare(
"SELECT title FROM record "
1030 "WHERE recordid = :RECORDID");
1035 QString title = query.
value(0).toString();
1043 query.
prepare(
"SELECT rulename FROM customexample "
1044 "WHERE search > 0 ORDER BY rulename;");
1048 while (query.
next())
1050 QString rulename = query.
value(0).toString();
1051 if (rulename.isEmpty() || rulename.trimmed().isEmpty())
1053 rulename = query.
value(0).toString();
1058 if (!view.isEmpty())
1075 if (!view.isEmpty())
1166 bindings[
":PGILSTART"] =
1171 where =
"WHERE channel.deleted IS NULL "
1172 " AND channel.visible > 0 "
1173 " AND program.endtime > :PGILSTART "
1174 " AND (program.title = :PGILPHRASE0 OR "
1175 " (program.seriesid <> '' AND "
1176 " program.seriesid = :PGILPHRASE1)) ";
1177 bindings[
":PGILPHRASE0"] = qphrase;
1182 where =
"LEFT JOIN oldprogram ON "
1183 " oldprogram.oldtitle = program.title "
1184 "WHERE channel.deleted IS NULL "
1185 " AND channel.visible > 0 "
1186 " AND program.endtime > :PGILSTART "
1187 " AND oldprogram.oldtitle IS NULL "
1188 " AND program.manualid = 0 ";
1190 if (qphrase ==
"premieres")
1193 where +=
" ( program.originalairdate = DATE(";
1194 where +=
" CONVERT_TZ(program.starttime, 'Etc/UTC', 'SYSTEM'))";
1195 where +=
" AND (program.category = 'Special' ";
1196 where +=
" OR program.programid LIKE 'EP%0001')) ";
1197 where +=
" OR (program.category_type='movie' ";
1198 where +=
" AND program.stars > 0.5 ";
1199 where +=
" AND program.airdate >= YEAR(NOW()) - 2) ";
1202 else if (qphrase ==
"movies")
1204 where +=
" AND program.category_type = 'movie' ";
1206 else if (qphrase ==
"series")
1208 where +=
" AND program.category_type = 'series' ";
1210 else if (qphrase ==
"specials")
1212 where +=
" AND program.category_type = 'tvshow' ";
1216 where +=
" AND (program.category_type <> 'movie' ";
1217 where +=
" OR program.airdate >= YEAR(NOW()) - 3) ";
1222 where =
"WHERE channel.deleted IS NULL "
1223 " AND channel.visible > 0 "
1224 " AND program.endtime > :PGILSTART "
1225 " AND program.title LIKE :PGILLIKEPHRASE0 ";
1226 bindings[
":PGILLIKEPHRASE0"] = QString(
"%") + qphrase +
'%';
1230 where =
"WHERE channel.deleted IS NULL "
1231 " AND channel.visible > 0 "
1232 " AND program.endtime > :PGILSTART "
1233 " AND (program.title LIKE :PGILLIKEPHRASE1 "
1234 " OR program.subtitle LIKE :PGILLIKEPHRASE2 "
1235 " OR program.description LIKE :PGILLIKEPHRASE3 ) ";
1236 bindings[
":PGILLIKEPHRASE1"] = QString(
"%") + qphrase +
'%';
1237 bindings[
":PGILLIKEPHRASE2"] = QString(
"%") + qphrase +
'%';
1238 bindings[
":PGILLIKEPHRASE3"] = QString(
"%") + qphrase +
'%';
1242 where =
", people, credits "
1243 "WHERE channel.deleted IS NULL "
1244 " AND channel.visible > 0 "
1245 " AND program.endtime > :PGILSTART "
1246 " AND people.name LIKE :PGILPHRASE1 "
1247 " AND credits.person = people.person "
1248 " AND program.chanid = credits.chanid "
1249 " AND program.starttime = credits.starttime";
1250 bindings[
":PGILPHRASE1"] = qphrase;
1259 if (!powerWhere.isEmpty())
1263 where = QString(
"LEFT JOIN programgenres ON "
1264 "program.chanid = programgenres.chanid AND "
1265 "program.starttime = programgenres.starttime ");
1268 where += QString(
"WHERE channel.deleted IS NULL "
1269 " AND channel.visible > 0 "
1270 " AND program.endtime > :PGILSTART "
1271 " AND ( ") + powerWhere +
" ) ";
1278 where = QString(
"WHERE channel.deleted iS NULL "
1279 " AND channel.visible > 0 "
1280 " AND program.endtime > :PGILSTART "
1281 " AND ( %1 ) ").arg(qphrase);
1288 where =
"WHERE channel.deleted IS NULL "
1289 " AND channel.visible > 0 "
1290 " AND program.endtime > :PGILSTART "
1291 " AND channel.chanid = :PGILPHRASE2 ";
1292 bindings[
":PGILPHRASE2"] = qphrase;
1298 where =
"WHERE channel.deleted IS NULL "
1299 " AND channel.visible > 0 "
1300 " AND program.endtime > :PGILSTART "
1301 " AND program.category = :PGILPHRASE3 ";
1302 bindings[
":PGILPHRASE3"] = qphrase;
1306 where =
"JOIN programgenres g ON "
1307 " program.chanid = g.chanid AND "
1308 " program.starttime = g.starttime AND "
1309 " genre = :PGILPHRASE4 "
1310 "WHERE channel.deleted IS NULL "
1311 " AND channel.visible > 0 "
1312 " AND program.endtime > :PGILSTART ";
1313 bindings[
":PGILPHRASE4"] = qphrase;
1317 where =
"JOIN programgenres g1 ON "
1318 " program.chanid = g1.chanid AND "
1319 " program.starttime = g1.starttime AND "
1320 " g1.genre = :GENRE1 "
1321 "JOIN programgenres g2 ON "
1322 " program.chanid = g2.chanid AND "
1323 " program.starttime = g2.starttime AND "
1324 " g2.genre = :GENRE2 "
1325 "WHERE channel.deleted IS NULL "
1326 " AND channel.visible > 0 "
1327 " AND program.endtime > :PGILSTART ";
1334 where =
"WHERE channel.deleted IS NULL "
1335 " AND channel.visible > 0 "
1336 " AND program.endtime > :PGILSTART "
1337 " AND program.category_type = 'movie' "
1338 " AND program.stars " + qphrase +
' ';
1344 searchTime.setTime(QTime(searchTime.time().hour(), 0, 0));
1345 bindings[
":PGILSEARCHTIME1"] = searchTime;
1346 where =
"WHERE channel.deleted IS NULL "
1347 " AND channel.visible > 0 "
1348 " AND program.starttime >= :PGILSEARCHTIME1 ";
1351 where +=
" AND program.starttime < DATE_ADD(:PGILSEARCHTIME2, "
1352 "INTERVAL '1' HOUR) ";
1353 bindings[
":PGILSEARCHTIME2"] = bindings[
":PGILSEARCHTIME1"];
1358 where =
"JOIN recordmatch ON "
1359 " (program.starttime = recordmatch.starttime "
1360 " AND program.chanid = recordmatch.chanid) "
1361 "WHERE channel.deleted IS NULL "
1362 " AND channel.visible > 0 "
1363 " AND program.endtime > :PGILSTART "
1364 " AND recordmatch.recordid = :PGILPHRASE5 ";
1365 bindings[
":PGILPHRASE5"] = qphrase;
1370 query.
prepare(
"SELECT fromclause, whereclause FROM customexample "
1371 "WHERE rulename = :RULENAME;");
1376 QString fromc = query.
value(0).toString();
1377 QString wherec = query.
value(1).toString();
1379 where = QString(
"WHERE channel.deleted IS NULL "
1380 " AND channel.visible > 0 "
1381 " AND program.endtime > :PGILSTART "
1382 " AND ( %1 ) ").arg(wherec);
1383 if (!fromc.isEmpty())
1384 where = fromc +
' ' + where;
1391 where = QString(
"AND ( recordid = %1 OR title = :MTITLE )")
1393 bindings[
":MTITLE"] =
m_title;
1397 where = QString(
"AND title = :MTITLE ");
1398 bindings[
":MTITLE"] =
m_title;
1402 where = QString(
"AND recordid = %1 ").arg(
m_recid);
1410 selected = *selectedP;
1411 selectedP = &selected;
1443 if ((*it)->GetSortTitle() != curtitle)
1445 curtitle = (*it)->GetSortTitle();
1482 std::ranges::stable_sort(std::ranges::reverse_view(
m_itemList),
1511 pginfo.
ToMap(infoMap);
1556 ProgramInfoSortFn comp {
nullptr };
1567 bool dobreak =
false;
1583 if (item->
GetText(
"is_item_initialized").isNull())
1586 pginfo->
ToMap(infoMap);
1596 QString tempSubTitle = pginfo->GetSubtitle();
1597 if (tempSubTitle.trimmed().isEmpty())
1598 tempSubTitle = pginfo->GetTitle();
1599 item->
SetText(tempSubTitle,
"titlesubtitle", state);
1602 item->
DisplayState(QString::number(pginfo->GetStars(10)),
1608 item->
SetText(
"yes",
"is_item_initialized");
1621 tr(
"%1 of %2",
"Current position in list where %1 is the "
1622 "position, %2 is the total count")
1644 pginfo->ToMap(infoMap);
1650 tr(
"%1 of %2",
"Current position in list where %1 is the "
1651 "position, %2 is the total count")
1661 QString
rating = QString::number(pginfo->GetStars(10));
1668 bool needUpdate =
false;
1674 QString resultid = dce->GetId();
1676 int buttonnum = dce->GetResult();
1678 if (resultid ==
"sortgroupmenu")
1701 else if (resultid ==
"deletemenu")
1727 else if (resultid ==
"deleterule")
1730 if (record && buttonnum > 0 && !record->Delete())
1732 LOG(VB_GENERAL, LOG_ERR,
LOC +
1733 "Failed to delete recording rule");
1745 QString
id = slce->GetId();
1747 if (
id == objectName())
1758 auto *me =
dynamic_cast<MythEvent *
>(event);
1762 const QString& message = me->
Message();
1766 else if (message ==
"SCHEDULE_CHANGE"
1767 || message ==
"GROUPBY_CHANGE")
std::vector< ChannelInfo > ChannelInfoList
iterator erase(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