9#include <QCoreApplication>
33#define LOC QString("ProgLister: ")
34#define LOC_WARN QString("ProgLister, Warning: ")
35#define LOC_ERR QString("ProgLister, Error: ")
38 const QString & extraArg)
41 auto *vsb =
new ProgLister(mainStack,
static_cast<TV*
>(player),
45 mainStack->
AddScreen(vsb, (player ==
nullptr));
53 QString view, QString extraArg,
54 QDateTime selectedTime) :
57 m_extraArg(
std::move(extraArg)),
59 m_searchTime(m_startTime),
60 m_selectedTime(
std::move(selectedTime)),
61 m_channelOrdering(
gCoreContext->GetSetting(
"ChannelOrdering",
"channum")),
62 m_view(
std::move(view))
67 query.
prepare(
"SELECT COUNT(*) FROM program WHERE stars > 0");
71 if (query.
value(0).toInt() == 0)
98 m_searchTime(m_startTime),
99 m_channelOrdering(
gCoreContext->GetSetting(
"ChannelOrdering",
"channum")),
128 m_title(
std::move(title)),
130 m_searchTime(m_startTime),
131 m_channelOrdering(
gCoreContext->GetSetting(
"ChannelOrdering",
"channum")),
132 m_view(
"reverse time"),
175 LOG(VB_GENERAL, LOG_ERR,
"Cannot load screen 'programlist'");
207 case plTitle: value = tr(
"Program Listings");
break;
214 case plSQLSearch: value = tr(
"Power Search");
break;
215 case plRecordid: value = tr(
"Rule Search");
break;
216 case plCategory: value = tr(
"Category Search");
break;
217 case plChannel: value = tr(
"Channel Search");
break;
218 case plMovies: value = tr(
"Movie Search");
break;
219 case plTime: value = tr(
"Time Search");
break;
221 default: value = tr(
"Unknown Search");
break;
245 QCoreApplication::postEvent(
this, slce);
263 "TV Frontend", e, actions);
265 bool needUpdate =
false;
266 for (
uint i = 0; i <
uint(actions.size()) && !handled; ++i)
268 const QString&
action = actions[i];
273 else if (
action ==
"NEXTVIEW")
275 else if (
action ==
"CUSTOMEDIT")
277 else if (
action ==
"EDIT")
279 else if (
action ==
"DELETE")
287 else if (
action ==
"GUIDE")
291 else if (
action ==
"TOGGLERECORD")
338 auto *sortGroupMenu =
new MythMenu(tr(
"Sort/Group Options"),
this,
340 sortGroupMenu->AddItem(tr(
"Reverse Sort Order"));
341 sortGroupMenu->AddItem(tr(
"Sort By Title"));
342 sortGroupMenu->AddItem(tr(
"Sort By Time"));
358 menu->AddItem(tr(
"Sort/Group"),
nullptr, sortGroupMenu);
389 if (!menuPopup->Create())
450 if (newview >= 0 && newview == oldview)
458 query.
prepare(
"DELETE FROM keyword "
459 "WHERE phrase = :PHRASE AND searchtype = :TYPE;");
465 "ProgLister::updateKeywordInDB -- delete", query);
473 const QString& qphrase = text;
476 query.
prepare(
"REPLACE INTO keyword (phrase, searchtype)"
477 "VALUES(:PHRASE, :TYPE );");
483 "ProgLister::updateKeywordInDB -- replace", query);
509 case plMovies: msg = tr(
"Select Rating");
break;
510 case plChannel: msg = tr(
"Select Channel");
break;
511 case plCategory: msg = tr(
"Select Category");
break;
514 .arg(tr(
"Select a search stored from"),
515 tr(
"Custom Record"));
break;
557 QString message = tr(
"Start search from date and time");
579 LOG(VB_GENERAL, LOG_WARNING,
LOC +
"No menu");
618 QStringList field = qphrase.split(
':');
619 if (field.size() != 6)
621 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Power search should have 6 fields," +
622 QString(
"\n\t\t\tnot %1 (%2)") .arg(field.size()).arg(qphrase));
626 static const std::array<QString,6> kBindingList
636 static const std::array<QString,6> kOutputList
638 "program.title LIKE :POWERTITLE ",
639 "program.subtitle LIKE :POWERSUB ",
640 "program.description LIKE :POWERDESC ",
641 "program.category_type = :POWERCATTYPE ",
642 "programgenres.genre = :POWERGENRE ",
643 "channel.callsign = :POWERCALLSIGN ",
646 for (
uint i = 0; i < (
uint) field.size(); i++)
648 if (field[i].isEmpty())
655 bindings[kBindingList[i]] =
656 (!kOutputList[i].contains(
"=")) ?
657 QString(
'%') + field[i] + QString(
'%') : field[i];
660 return output.contains(
"programgenres");
687 if (!record->LoadByProgram(pi))
693 QString message = tr(
"Delete '%1' %2 rule?")
699 popupStack, message,
true);
701 okPopup->SetReturnEvent(
this,
"deleterule");
702 okPopup->SetData(QVariant::fromValue(record));
704 if (okPopup->Create())
717 QString message = tr(
"Delete this episode of '%1'?").arg(pi->
GetTitle());
730 "DELETE FROM oldrecorded "
731 "WHERE chanid = :CHANID AND "
732 " starttime = :STARTTIME");
750 QString message = tr(
"Delete all episodes of '%1'?").arg(pi->
GetTitle());
762 query.
prepare(
"DELETE FROM oldrecorded "
763 "WHERE title = :TITLE AND future = 0");
788 message +=
"\n\n\n" + tr(
"NOTE: removing items from this list will not "
789 "delete any recordings.");
791 QString title = tr(
"Previously Recorded");
793 auto *
menu =
new MythMenu(title, message,
this,
"deletemenu");
795 menu->AddItem(tr(
"Allow this episode to re-record"));
797 menu->AddItem(tr(
"Never record this episode"));
798 menu->AddItem(tr(
"Remove this episode from the list"));
799 menu->AddItem(tr(
"Remove all episodes for this title"));
800 menu->AddItem(tr(
"Cancel"));
805 if (menuPopup->Create())
819 0,
true,
"channum, chanid");
822 for (
auto & channel : channels)
826 m_viewList.push_back(QString::number(channel.m_chanId));
835 QDateTime query_starttime =
m_startTime.addSecs(50 -
838 query.
prepare(
"SELECT g1.genre, g2.genre "
840 "JOIN programgenres g1 ON "
841 " program.chanid = g1.chanid AND "
842 " program.starttime = g1.starttime "
843 "LEFT JOIN programgenres g2 ON "
844 " g1.chanid = g2.chanid AND "
845 " g1.starttime = g2.starttime "
846 "WHERE program.endtime > :PGILSTART "
847 "GROUP BY g1.genre, g2.genre;");
848 query.
bindValue(
":PGILSTART", query_starttime);
860 QString genre1 = query.
value(0).toString();
861 if (genre1.isEmpty())
864 if (genre1 != lastGenre1)
871 QString genre2 = query.
value(1).toString();
872 if (genre2.isEmpty() || genre2 == genre1)
875 m_viewList.push_back(genre1 +
":/:" + genre2);
882 query.
prepare(
"SELECT category "
884 "WHERE program.endtime > :PGILSTART "
885 "GROUP BY category");
886 query.
bindValue(
":PGILSTART", query_starttime);
892 QString category = query.
value(0).toString();
893 if (category.isEmpty())
895 category = query.
value(0).toString();
909 query.
prepare(
"SELECT phrase FROM keyword "
910 "WHERE searchtype = :SEARCHTYPE;");
921 QString phrase = QString::fromUtf8(query.
value(0)
922 .toByteArray().constData());
923 if (phrase.isEmpty())
936 const QString& qphrase = view;
939 query2.
prepare(
"REPLACE INTO keyword (phrase, searchtype)"
940 "VALUES(:VIEW, :SEARCHTYPE );");
945 "replace keyword", query2);
955 LOG(VB_GENERAL, LOG_WARNING,
LOC + QString(
"Failed to load viewList"));
998 m_viewList.push_back(QString(
">= %1").arg(((10 - 0.5) / 10.0) - 0.001));
1000 for (
int i = 9; i > 0; i--)
1002 float stars = ((i - 0.5F ) / 10.0F) - 0.001F;
1003 m_viewList.push_back(QString(
">= %1").arg(stars));
1007 if (!view.isEmpty())
1028 query.
prepare(
"SELECT title FROM record "
1029 "WHERE recordid = :RECORDID");
1034 QString title = query.
value(0).toString();
1042 query.
prepare(
"SELECT rulename FROM customexample "
1043 "WHERE search > 0 ORDER BY rulename;");
1047 while (query.
next())
1049 QString rulename = query.
value(0).toString();
1050 if (rulename.isEmpty() || rulename.trimmed().isEmpty())
1052 rulename = query.
value(0).toString();
1057 if (!view.isEmpty())
1074 if (!view.isEmpty())
1165 bindings[
":PGILSTART"] =
1170 where =
"WHERE channel.deleted IS NULL "
1171 " AND channel.visible > 0 "
1172 " AND program.endtime > :PGILSTART "
1173 " AND (program.title = :PGILPHRASE0 OR "
1174 " (program.seriesid <> '' AND "
1175 " program.seriesid = :PGILPHRASE1)) ";
1176 bindings[
":PGILPHRASE0"] = qphrase;
1181 where =
"LEFT JOIN oldprogram ON "
1182 " oldprogram.oldtitle = program.title "
1183 "WHERE channel.deleted IS NULL "
1184 " AND channel.visible > 0 "
1185 " AND program.endtime > :PGILSTART "
1186 " AND oldprogram.oldtitle IS NULL "
1187 " AND program.manualid = 0 ";
1189 if (qphrase ==
"premieres")
1192 where +=
" ( program.originalairdate = DATE(";
1193 where +=
" CONVERT_TZ(program.starttime, 'Etc/UTC', 'SYSTEM'))";
1194 where +=
" AND (program.category = 'Special' ";
1195 where +=
" OR program.programid LIKE 'EP%0001')) ";
1196 where +=
" OR (program.category_type='movie' ";
1197 where +=
" AND program.stars > 0.5 ";
1198 where +=
" AND program.airdate >= YEAR(NOW()) - 2) ";
1201 else if (qphrase ==
"movies")
1203 where +=
" AND program.category_type = 'movie' ";
1205 else if (qphrase ==
"series")
1207 where +=
" AND program.category_type = 'series' ";
1209 else if (qphrase ==
"specials")
1211 where +=
" AND program.category_type = 'tvshow' ";
1215 where +=
" AND (program.category_type <> 'movie' ";
1216 where +=
" OR program.airdate >= YEAR(NOW()) - 3) ";
1221 where =
"WHERE channel.deleted IS NULL "
1222 " AND channel.visible > 0 "
1223 " AND program.endtime > :PGILSTART "
1224 " AND program.title LIKE :PGILLIKEPHRASE0 ";
1225 bindings[
":PGILLIKEPHRASE0"] = QString(
"%") + qphrase +
'%';
1229 where =
"WHERE channel.deleted IS NULL "
1230 " AND channel.visible > 0 "
1231 " AND program.endtime > :PGILSTART "
1232 " AND (program.title LIKE :PGILLIKEPHRASE1 "
1233 " OR program.subtitle LIKE :PGILLIKEPHRASE2 "
1234 " OR program.description LIKE :PGILLIKEPHRASE3 ) ";
1235 bindings[
":PGILLIKEPHRASE1"] = QString(
"%") + qphrase +
'%';
1236 bindings[
":PGILLIKEPHRASE2"] = QString(
"%") + qphrase +
'%';
1237 bindings[
":PGILLIKEPHRASE3"] = QString(
"%") + qphrase +
'%';
1241 where =
", people, credits "
1242 "WHERE channel.deleted IS NULL "
1243 " AND channel.visible > 0 "
1244 " AND program.endtime > :PGILSTART "
1245 " AND people.name LIKE :PGILPHRASE1 "
1246 " AND credits.person = people.person "
1247 " AND program.chanid = credits.chanid "
1248 " AND program.starttime = credits.starttime";
1249 bindings[
":PGILPHRASE1"] = qphrase;
1258 if (!powerWhere.isEmpty())
1262 where = QString(
"LEFT JOIN programgenres ON "
1263 "program.chanid = programgenres.chanid AND "
1264 "program.starttime = programgenres.starttime ");
1267 where += QString(
"WHERE channel.deleted IS NULL "
1268 " AND channel.visible > 0 "
1269 " AND program.endtime > :PGILSTART "
1270 " AND ( ") + powerWhere +
" ) ";
1277 where = QString(
"WHERE channel.deleted iS NULL "
1278 " AND channel.visible > 0 "
1279 " AND program.endtime > :PGILSTART "
1280 " AND ( %1 ) ").arg(qphrase);
1287 where =
"WHERE channel.deleted IS NULL "
1288 " AND channel.visible > 0 "
1289 " AND program.endtime > :PGILSTART "
1290 " AND channel.chanid = :PGILPHRASE2 ";
1291 bindings[
":PGILPHRASE2"] = qphrase;
1297 where =
"WHERE channel.deleted IS NULL "
1298 " AND channel.visible > 0 "
1299 " AND program.endtime > :PGILSTART "
1300 " AND program.category = :PGILPHRASE3 ";
1301 bindings[
":PGILPHRASE3"] = qphrase;
1305 where =
"JOIN programgenres g ON "
1306 " program.chanid = g.chanid AND "
1307 " program.starttime = g.starttime AND "
1308 " genre = :PGILPHRASE4 "
1309 "WHERE channel.deleted IS NULL "
1310 " AND channel.visible > 0 "
1311 " AND program.endtime > :PGILSTART ";
1312 bindings[
":PGILPHRASE4"] = qphrase;
1316 where =
"JOIN programgenres g1 ON "
1317 " program.chanid = g1.chanid AND "
1318 " program.starttime = g1.starttime AND "
1319 " g1.genre = :GENRE1 "
1320 "JOIN programgenres g2 ON "
1321 " program.chanid = g2.chanid AND "
1322 " program.starttime = g2.starttime AND "
1323 " g2.genre = :GENRE2 "
1324 "WHERE channel.deleted IS NULL "
1325 " AND channel.visible > 0 "
1326 " AND program.endtime > :PGILSTART ";
1333 where =
"WHERE channel.deleted IS NULL "
1334 " AND channel.visible > 0 "
1335 " AND program.endtime > :PGILSTART "
1336 " AND program.category_type = 'movie' "
1337 " AND program.stars " + qphrase +
' ';
1343 searchTime.setTime(QTime(searchTime.time().hour(), 0, 0));
1344 bindings[
":PGILSEARCHTIME1"] = searchTime;
1345 where =
"WHERE channel.deleted IS NULL "
1346 " AND channel.visible > 0 "
1347 " AND program.starttime >= :PGILSEARCHTIME1 ";
1350 where +=
" AND program.starttime < DATE_ADD(:PGILSEARCHTIME2, "
1351 "INTERVAL '1' HOUR) ";
1352 bindings[
":PGILSEARCHTIME2"] = bindings[
":PGILSEARCHTIME1"];
1357 where =
"JOIN recordmatch ON "
1358 " (program.starttime = recordmatch.starttime "
1359 " AND program.chanid = recordmatch.chanid) "
1360 "WHERE channel.deleted IS NULL "
1361 " AND channel.visible > 0 "
1362 " AND program.endtime > :PGILSTART "
1363 " AND recordmatch.recordid = :PGILPHRASE5 ";
1364 bindings[
":PGILPHRASE5"] = qphrase;
1369 query.
prepare(
"SELECT fromclause, whereclause FROM customexample "
1370 "WHERE rulename = :RULENAME;");
1375 QString fromc = query.
value(0).toString();
1376 QString wherec = query.
value(1).toString();
1378 where = QString(
"WHERE channel.deleted IS NULL "
1379 " AND channel.visible > 0 "
1380 " AND program.endtime > :PGILSTART "
1381 " AND ( %1 ) ").arg(wherec);
1382 if (!fromc.isEmpty())
1383 where = fromc +
' ' + where;
1390 where = QString(
"AND ( recordid = %1 OR title = :MTITLE )")
1392 bindings[
":MTITLE"] =
m_title;
1396 where = QString(
"AND title = :MTITLE ");
1397 bindings[
":MTITLE"] =
m_title;
1401 where = QString(
"AND recordid = %1 ").arg(
m_recid);
1409 selected = *selectedP;
1410 selectedP = &selected;
1442 if ((*it)->GetSortTitle() != curtitle)
1444 curtitle = (*it)->GetSortTitle();
1510 pginfo.
ToMap(infoMap);
1555 ProgramInfoSortFn comp {
nullptr };
1566 bool dobreak =
false;
1582 if (item->
GetText(
"is_item_initialized").isNull())
1585 pginfo->
ToMap(infoMap);
1595 QString tempSubTitle = pginfo->GetSubtitle();
1596 if (tempSubTitle.trimmed().isEmpty())
1597 tempSubTitle = pginfo->GetTitle();
1598 item->
SetText(tempSubTitle,
"titlesubtitle", state);
1601 item->
DisplayState(QString::number(pginfo->GetStars(10)),
1607 item->
SetText(
"yes",
"is_item_initialized");
1620 tr(
"%1 of %2",
"Current position in list where %1 is the "
1621 "position, %2 is the total count")
1643 pginfo->ToMap(infoMap);
1649 tr(
"%1 of %2",
"Current position in list where %1 is the "
1650 "position, %2 is the total count")
1660 QString
rating = QString::number(pginfo->GetStars(10));
1667 bool needUpdate =
false;
1673 QString resultid = dce->GetId();
1675 int buttonnum = dce->GetResult();
1677 if (resultid ==
"sortgroupmenu")
1700 else if (resultid ==
"deletemenu")
1726 else if (resultid ==
"deleterule")
1729 if (record && buttonnum > 0 && !record->Delete())
1731 LOG(VB_GENERAL, LOG_ERR,
LOC +
1732 "Failed to delete recording rule");
1744 QString
id = slce->GetId();
1746 if (
id == objectName())
1757 auto *me =
dynamic_cast<MythEvent *
>(event);
1761 const QString& message = me->
Message();
1765 else if (message ==
"SCHEDULE_CHANGE"
1766 || message ==
"GROUPBY_CHANGE")
std::vector< ChannelInfo > ChannelInfoList
iterator erase(iterator it)
reverse_iterator rend(void)
reverse_iterator rbegin(void)
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 int 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