Go to the documentation of this file.
32 LOG(VB_GENERAL, LOG_ERR,
"Cannot load screen 'phrasepopup'");
48 for (
const QString& item : std::as_const(
m_list))
135 QString text =
m_list[view];
136 const QString& qphrase = text;
139 query.
prepare(
"DELETE FROM keyword "
140 "WHERE phrase = :PHRASE AND searchtype = :TYPE;");
151 if (view < m_parent->m_curView)
168 if (text.trimmed().isEmpty())
173 LOG(VB_GENERAL, LOG_ERR,
"Unknown search in ProgLister");
185 fromgenre = QString(
"LEFT JOIN programgenres ON "
186 "program.chanid = programgenres.chanid AND "
187 "program.starttime = programgenres.starttime ");
198 record->LoadBySearch(
m_searchType, text, what, fromgenre);
202 if (schededit->Create())
229 LOG(VB_GENERAL, LOG_ERR,
"Cannot load screen 'powersearchpopup'");
236 for (
const QString &item : std::as_const(
m_list))
294 QString currentItem =
":::::";
301 if (!popup->Create())
319 QString text =
m_list[view];
320 const QString& qphrase = text;
323 query.
prepare(
"DELETE FROM keyword "
324 "WHERE phrase = :PHRASE AND searchtype = :TYPE;");
335 if (view < m_parent->m_curView)
352 if (text.trimmed().isEmpty())
357 LOG(VB_GENERAL, LOG_ERR,
"Unknown search in ProgLister");
370 "LEFT JOIN programgenres ON "
371 "program.chanid = programgenres.chanid AND "
372 "program.starttime = programgenres.starttime ");
383 record->LoadBySearch(
m_searchType, text, what, fromgenre);
387 if (schededit->Create())
403 QString ¤tValue)
410 if (field.count() != 6)
412 LOG(VB_GENERAL, LOG_ERR, QString(
"Error. PowerSearch %1 has %2 fields")
434 LOG(VB_GENERAL, LOG_ERR,
"Cannot load screen 'editpowersearchpopup'");
507 query.
prepare(
"SELECT genre FROM programgenres GROUP BY genre;");
513 QString category = query.
value(0).toString();
514 if (category.isEmpty() || category.trimmed().isEmpty())
516 category = query.
value(0).toString();
519 if (category == field[4])
526 "ChannelOrdering",
"channum");
535 for (
auto & channel : channels)
546 channel.ToMap(chanmap);
547 item->SetTextFromMap(chanmap);
550 if (channel.m_callSign == field[5])
void Reset(void) override
Reset the widget to it's original state, should not reset changes made by the theme.
QMap< QString, QVariant > MSqlBindings
typedef for a map of string -> string bindings for generic queries.
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
QSqlQuery wrapper that fetches a DB connection from the connection pool.
MythScreenStack * GetMainStack()
QVariant value(int i) const
Internal representation of a recording rule, mirrors the record table.
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Screen in which all other widgets are contained and rendered.
QStringList m_viewTextList
QString GetText(void) const
void UpdateKeywordInDB(const QString &text, const QString &oldValue)
QHash< QString, QString > InfoMap
static void SortChannels(ChannelInfoList &list, const QString &order, bool eliminate_duplicates=false)
void SetText(const QString &text, bool moveCursor=true)
bool SetFocusWidget(MythUIType *widget=nullptr)
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
static void DBError(const QString &where, const MSqlQuery &query)
void FillViewList(const QString &view)
void BuildFocusList(void)
void SetEnabled(bool enable)
static bool PowerStringToSQL(const QString &qphrase, QString &output, MSqlBindings &bindings)
static ChannelInfoList GetChannels(uint sourceid, bool visible_only, const QString &group_by=QString(), uint channel_groupid=0)
void MSqlEscapeAsAQuery(QString &query, const MSqlBindings &bindings)
Given a partial query string and a bindings object, escape the string.
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
void SetViewFromList(const QString &item)
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
virtual void SetText(const QString &text)
MythMainWindow * GetMythMainWindow(void)
MythScreenStack * GetStack(const QString &Stackname)
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Construct a recording schedule.
QString GetSetting(const QString &key, const QString &defaultval="")
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
std::vector< ChannelInfo > ChannelInfoList