MythTV  master
netsearch.cpp
Go to the documentation of this file.
1 // qt
2 #include <QString>
3 #include <QMetaType>
4 #include <QDateTime>
5 #include <QFileInfo>
6 #include <QImageReader>
7 
8 // myth
9 #include <mythdb.h>
10 #include <mythcontext.h>
11 #include <mythdbcon.h>
12 #include <mythdirs.h>
13 #include <mythsystemlegacy.h>
14 #include <mythprogressdialog.h>
15 #include <storagegroup.h>
16 #include <remotefile.h>
17 #include <netgrabbermanager.h>
18 #include <netutils.h>
20 #include <metadata/videoutils.h>
21 #include <rssparse.h>
22 #include <mythcoreutil.h>
23 #include <mythuitext.h>
24 #include <mythuiimage.h>
25 #include <mythsorthelper.h>
26 
27 #include "netsearch.h"
28 #include "netcommon.h"
29 #include "rsseditor.h"
30 #include "searcheditor.h"
31 
32 // ---------------------------------------------------
33 
34 NetSearch::NetSearch(MythScreenStack *parent, const char *name)
35  : NetBase(parent, name),
36  m_mythXML(GetMythXMLURL())
37 {
38 }
39 
41 {
42  // Load the theme for this screen
43  bool foundtheme = LoadWindowFromXML("netvision-ui.xml", "netsearch", this);
44 
45  if (!foundtheme)
46  return false;
47 
48  m_siteList = dynamic_cast<MythUIButtonList *> (GetChild("sites"));
49  m_searchResultList = dynamic_cast<MythUIButtonList *> (GetChild("results"));
50 
51  m_pageText = dynamic_cast<MythUIText *> (GetChild("page"));
52  m_noSites = dynamic_cast<MythUIText *> (GetChild("nosites"));
53 
54  m_thumbImage = dynamic_cast<MythUIImage *> (GetChild("preview"));
55 
56  m_downloadable = dynamic_cast<MythUIStateType *> (GetChild("downloadable"));
57 
58  m_progress = dynamic_cast<MythUIProgressBar *> (GetChild("progress"));
59 
60  if (m_progress)
61  m_progress->SetVisible(false);
62 
63  if (m_noSites)
64  m_noSites->SetVisible(false);
65 
66  m_search = dynamic_cast<MythUITextEdit *> (GetChild("search"));
67 
69  {
70  LOG(VB_GENERAL, LOG_ERR, "Theme is missing critical theme elements.");
71  return false;
72  }
73 
74  m_search->SetMaxLength(255);
75 
76  // UI Hookups
80  this, &NetSearch::DoSearch);
85 
87 
89 
90  return true;
91 }
92 
94 {
96 }
97 
99 {
100  if (m_netSearch)
101  {
102  m_netSearch->disconnect();
103  m_netSearch->deleteLater();
104  m_netSearch = nullptr;
105  }
106 }
107 
109 {
111 
112  if (m_grabberList.count() == 0 && m_noSites)
113  m_noSites->SetVisible(true);
114  else if (m_noSites)
115  m_noSites->SetVisible(false);
116 
117  if (m_grabberList.isEmpty())
118  RunSearchEditor();
119 }
120 
121 bool NetSearch::keyPressEvent(QKeyEvent *event)
122 {
123  if (GetFocusWidget()->keyPressEvent(event))
124  return true;
125 
126  QStringList actions;
127  bool handled = GetMythMainWindow()->TranslateKeyPress("Internet Video",
128  event, actions);
129 
130  for (int i = 0; i < actions.size() && !handled; i++)
131  {
132  QString action = actions[i];
133  handled = true;
134 
135  if (action == "MENU")
136  ShowMenu();
137  else if (action == "PAGELEFT" && m_pagenum > 1)
138  {
139  if (m_prevPageToken.isEmpty())
140  SkipPagesBack();
141  else
142  GetLastResults();
143  }
144  else if (action == "PAGERIGHT" && m_searchResultList->GetCount() > 0 &&
145  m_pagenum + 10 < m_maxpage)
146  {
147  if (m_nextPageToken.isEmpty())
149  else
150  GetMoreResults();
151  }
152  else if (action == "PREVVIEW" && m_pagenum > 1)
153  GetLastResults();
154  else if (action == "NEXTVIEW" && m_searchResultList->GetCount() > 0 &&
156  GetMoreResults();
157  else
158  handled = false;
159  }
160 
161  if (!handled && MythScreenType::keyPressEvent(event))
162  handled = true;
163 
164  return handled;
165 }
166 
168 {
169  QString label = tr("Search Options");
170 
171  auto *menuPopup = new MythDialogBox(label, m_popupStack,
172  "mythnetvisionmenupopup");
173 
174  if (menuPopup->Create())
175  {
176  m_popupStack->AddScreen(menuPopup);
177 
178  menuPopup->SetReturnEvent(this, "options");
179 
180  if (m_searchResultList->GetCount() > 0)
181  {
182  ResultItem *item = GetStreamItem();
183  if (item)
184  {
185  if (item->GetDownloadable())
186  menuPopup->AddButton(tr("Stream Video"),
187  SLOT(StreamWebVideo()));
188  menuPopup->AddButton(tr("Open Web Link"), SLOT(ShowWebVideo()));
189 
190  QString filename = GetDownloadFilename(item->GetTitle(),
191  item->GetMediaURL());
192  bool exists = false;
193 
194  if (filename.startsWith("myth://"))
195  exists = RemoteFile::Exists(filename);
196  else
197  exists = QFile::exists(filename);
198 
199  if (item->GetDownloadable() &&
201  {
202  if (exists)
203  {
204  menuPopup->AddButton(tr("Play"),
205  SLOT(DoPlayVideo(filename)));
206  }
207  else
208  {
209  menuPopup->AddButton(tr("Save This Video"),
210  SLOT(DoDownloadAndPlay()));
211  }
212  }
213 
214  if (item->GetDownloadable() &&
216  exists)
217  {
218  menuPopup->AddButton(tr("Delete"), SLOT(SlotDeleteVideo()));
219  }
220  }
221  }
222 
223  if (m_pagenum > 1)
224  menuPopup->AddButton(tr("Previous Page"), SLOT(GetLastResults()));
226  menuPopup->AddButton(tr("Next Page"), SLOT(GetMoreResults()));
227  if (m_pagenum > 1 && m_prevPageToken.isEmpty())
228  menuPopup->AddButton(tr("Skip 10 Pages Back"),
229  SLOT(SkipPagesBack()));
231  m_nextPageToken.isEmpty())
232  menuPopup->AddButton(tr("Skip 10 Pages Forward"),
233  SLOT(SkipPagesForward()));
234 
235  menuPopup->AddButton(tr("Manage Search Scripts"),
236  SLOT(RunSearchEditor()));
237  }
238  else
239  delete menuPopup;
240 }
241 
243 {
244  m_siteList->Reset();
245 
246  for (const auto & g : qAsConst(m_grabberList))
247  {
248  auto *item = new MythUIButtonListItem(m_siteList, g->GetTitle());
249  item->SetText(g->GetTitle(), "title");
250  item->SetData(g->GetCommandline());
251  QString thumb = QString("%1mythnetvision/icons/%2").arg(GetShareDir())
252  .arg(g->GetImage());
253  item->SetImage(thumb);
254  }
255 }
256 
258 {
260 
261  int numScripts = m_siteList->GetCount();
262  for (int i = 0; i < numScripts; i++)
263  m_siteList->GetItemAt(i)->SetText("", "count");
264 
265  if (m_pageText)
266  m_pageText->Reset();
267 
268  m_pagenum = 1;
269  m_maxpage = 1;
270 
271  QString cmd = m_siteList->GetDataValue().toString();
272  QString grabber = m_siteList->GetItemCurrent()->GetText();
273  QString query = m_search->GetText();
274 
275  if (query.isEmpty())
276  return;
277 
278  QFileInfo fi(cmd);
279  m_currentCmd = fi.fileName();
282 
283  QString title = tr("Searching %1 for \"%2\"...")
284  .arg(grabber).arg(query);
286 
287  if (!m_netSearch)
288  {
289  m_netSearch = new QNetworkAccessManager(this);
290  connect(m_netSearch, &QNetworkAccessManager::finished,
292  }
293 
295  QUrl req(init.toEncoded(), QUrl::TolerantMode);
296  LOG(VB_GENERAL, LOG_INFO,
297  QString("Using Search URL %1").arg(req.toString()));
298  m_reply = m_netSearch->get(QNetworkRequest(req));
299 }
300 
302 {
304 
305  m_pagenum--;
306 
307  QString title = tr("Changing to page %1 of search \"%2\"...")
308  .arg(QString::number(m_pagenum))
309  .arg(m_currentSearch);
311 
312  QString page = m_prevPageToken.isEmpty() ? QString::number(m_pagenum) :
314 
315  QUrl req =
317  m_reply = m_netSearch->get(QNetworkRequest(req));
318 }
319 
321 {
323 
324  m_pagenum++;
325 
326  QString title = tr("Changing to page %1 of search \"%2\"...")
327  .arg(QString::number(m_pagenum))
328  .arg(m_currentSearch);
330 
331  QString page = m_nextPageToken.isEmpty() ? QString::number(m_pagenum) :
333 
334  QUrl req =
336  m_reply = m_netSearch->get(QNetworkRequest(req));
337 }
338 
340 {
341  if (m_pagenum < 11)
342  m_pagenum = 2;
343  else
344  m_pagenum = m_pagenum - 10 + 1;
345 
346  GetLastResults();
347 }
348 
350 {
351  m_pagenum = m_pagenum + 10 - 1;
352 
353  GetMoreResults();
354 }
355 
357 {
358  CloseBusyPopup();
359 
360  auto *item = new Search();
361  QByteArray data = m_reply->readAll();
362  item->SetData(data);
363 
364  item->process();
365 
366  uint searchresults = item->numResults();
367  uint returned = item->numReturned();
368  uint firstitem = item->numIndex();
369 
370  m_nextPageToken = item->nextPageToken();
371  m_prevPageToken = item->prevPageToken();
372 
373  if (returned == 0)
374  return;
375 
377  SetText(QString::number(searchresults), "count");
378 
379  if (firstitem + returned == searchresults)
381  else
382  {
383  m_maxpage = searchresults / returned; // Whole pages
384  if (searchresults % returned != 0) // Partial page?
385  m_maxpage++;
386  }
387  if (m_pageText && m_maxpage > 0 && m_pagenum > 0)
388  {
389  m_pageText->SetText(QString("%1 / %2")
390  .arg(QString::number(m_pagenum))
391  .arg(QString::number(m_maxpage)));
392  }
393 
394  ResultItem::resultList list = item->GetVideoList();
395  PopulateResultList(list);
397 }
398 
400 {
401  CloseBusyPopup();
402 
403  QString message = tr("Timed out waiting for query to "
404  "finish. API might be down.");
405 
406  if (!m_okPopup)
407  {
408  m_okPopup = new MythConfirmationDialog(m_popupStack, message, false);
409 
410  if (m_okPopup->Create())
412  else
413  {
414  delete m_okPopup;
415  m_okPopup = nullptr;
416  }
417  }
418 }
419 
421 {
422  for (const auto & result : qAsConst(list))
423  {
424  QString title = result->GetTitle();
426  QVariant::fromValue(result));
427  InfoMap metadataMap;
428  result->toMap(metadataMap);
429  item->SetTextFromMap(metadataMap);
430 
431  if (!result->GetThumbnail().isEmpty())
432  {
433  QString dlfile = result->GetThumbnail();
434 
435  if (dlfile.contains("%SHAREDIR%"))
436  {
437  dlfile.replace("%SHAREDIR%", GetShareDir());
438  item->SetImage(dlfile);
439  }
440  else
441  {
442  uint pos = m_searchResultList->GetItemPos(item);
443 
444  m_imageDownload->addThumb(result->GetTitle(),
445  result->GetThumbnail(),
446  QVariant::fromValue<uint>(pos));
447  }
448  }
449  }
450 }
451 
453 {
454  return m_searchResultList->GetDataValue().value<ResultItem*>();
455 }
456 
458 {
460 
461  auto *searchedit = new SearchEditor(mainStack, "mythnetsearchedit");
462 
463  if (searchedit->Create())
464  {
465  connect(searchedit, &NetEditorBase::ItemsChanged,
466  this, &NetSearch::DoListRefresh);
467 
468  mainStack->AddScreen(searchedit);
469  }
470  else
471  delete searchedit;
472 }
473 
475 {
477  if (m_grabberList.isEmpty())
478  RunSearchEditor();
479 
480  LoadData();
481 }
482 
484 {
485  auto *item = m_searchResultList->GetDataValue().value<ResultItem*>();
486 
487  if (item && GetFocusWidget() == m_searchResultList)
488  {
490 
491  if (m_downloadable)
492  {
493  if (item->GetDownloadable())
495  else
497  }
498  }
499  else if (GetFocusWidget() == m_siteList)
500  {
502  std::shared_ptr<MythSortHelper>sh = getMythSortHelper();
503  QString title = btn->GetText();
504 
505  ResultItem res(title, sh->doTitle(title), // title, sortTitle
506  QString(), QString(), // subtitle, sortSubtitle
507  QString(), // description
508  QString(), QString(), QString(), QString(),
509  QDateTime(), nullptr, nullptr, -1, QString(), QStringList(),
510  QString(), QStringList(), 0, 0, QString(),
511  false, QStringList(), 0, 0, false);
512 
513  SetTextAndThumbnail(btn, &res);
514  }
515 }
516 
518 {
519  InfoMap metadataMap;
520  item->toMap(metadataMap);
521  SetTextFromMap(metadataMap);
522 
523  SetThumbnail(btn);
524 }
525 
527 {
528  if (m_thumbImage)
529  {
530  QString filename = btn->GetImageFilename();
531  if (filename.contains("%SHAREDIR%"))
532  filename.replace("%SHAREDIR%", GetShareDir());
533 
534  if (!filename.isEmpty())
535  {
537  m_thumbImage->Load();
538  }
539  else
540  m_thumbImage->Reset();
541  }
542 }
543 
544 void NetSearch::customEvent(QEvent *event)
545 {
546  if (event->type() == ThumbnailDLEvent::kEventType)
547  {
548  auto *tde = dynamic_cast<ThumbnailDLEvent *>(event);
549  if (tde == nullptr)
550  return;
551 
552  ThumbnailData *data = tde->m_thumb;
553  if (!data)
554  return;
555 
556  QString title = data->title;
557  QString file = data->url;
558  uint pos = data->data.value<uint>();
559 
560  if (file.isEmpty() || !((uint)m_searchResultList->GetCount() >= pos))
561  return;
562 
564 
565  if (!item)
566  return;
567 
568  if (item->GetText() == title)
569  item->SetImage(file);
570 
571  if (m_searchResultList->GetItemCurrent() == item)
572  SetThumbnail(item);
573  }
574  else
575  NetBase::customEvent(event);
576 }
MythUIButtonList::GetItemAt
MythUIButtonListItem * GetItemAt(int pos) const
Definition: mythuibuttonlist.cpp:1676
MythScreenType::LoadInBackground
void LoadInBackground(const QString &message="")
Definition: mythscreentype.cpp:302
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:321
MythUITextEdit::SetMaxLength
void SetMaxLength(int length)
Definition: mythuitextedit.cpp:211
netsearch.h
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1590
mythuitext.h
MythUIImage
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:98
GetDownloadFilename
QString GetDownloadFilename(const QString &title, const QString &url)
Definition: netutils.cpp:855
MythConfirmationDialog::Create
bool Create(void) override
Definition: mythdialogbox.cpp:440
MythUIText::Reset
void Reset(void) override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuitext.cpp:84
getMythSortHelper
std::shared_ptr< MythSortHelper > getMythSortHelper(void)
Get a pointer to the MythSortHelper singleton.
Definition: mythsorthelper.cpp:132
mythdb.h
NetSearch::FillGrabberButtonList
void FillGrabberButtonList(void)
Definition: netsearch.cpp:242
NetSearch::SlotItemChanged
void SlotItemChanged(void)
Definition: netsearch.cpp:483
findAllDBSearchGrabbers
GrabberScript::scriptList findAllDBSearchGrabbers(ArticleType type)
Definition: netutils.cpp:184
NetSearch::RunSearchEditor
void RunSearchEditor() const
Definition: netsearch.cpp:457
NetSearch::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: netsearch.cpp:121
RemoteFile::Exists
static bool Exists(const QString &url, struct stat *fileinfo)
Definition: remotefile.cpp:461
title
QString title
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:636
MythMainWindow::TranslateKeyPress
bool TranslateKeyPress(const QString &context, QKeyEvent *e, QStringList &actions, bool allowJumps=true)
Get a list of actions for a keypress in the given context.
Definition: mythmainwindow.cpp:1139
MythUIType::GetChild
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
Definition: mythuitype.cpp:131
MythUIImage::Load
bool Load(bool allowLoadInBackground=true, bool forceStat=false)
Load the image(s), wraps ImageLoader::LoadImage()
Definition: mythuiimage.cpp:968
NetSearch::SearchTimeout
void SearchTimeout(Search *item)
Definition: netsearch.cpp:399
NetBase::SlotDeleteVideo
void SlotDeleteVideo(void)
Definition: netbase.cpp:182
MythUIButtonList::itemSelected
void itemSelected(MythUIButtonListItem *item)
NetSearch::m_okPopup
MythConfirmationDialog * m_okPopup
Definition: netsearch.h:47
rssparse.h
NetSearch::m_pagenum
uint m_pagenum
Definition: netsearch.h:55
mythcoreutil.h
ResultItem::GetTitle
const QString & GetTitle() const
Definition: rssparse.h:134
NetBase::DoPlayVideo
void DoPlayVideo(const QString &filename)
Definition: netbase.cpp:310
GetMythXMLSearch
QUrl GetMythXMLSearch(const QString &url, const QString &query, const QString &grabber, const QString &pagenum)
Definition: netcommon.cpp:41
NetSearch::m_noSites
MythUIText * m_noSites
Definition: netsearch.h:44
MythScreenStack
Definition: mythscreenstack.h:16
arg
arg(title).arg(filename).arg(doDelete))
mythdbcon.h
NetSearch::SetTextAndThumbnail
void SetTextAndThumbnail(MythUIButtonListItem *btn, ResultItem *item)
Definition: netsearch.cpp:517
MythUITextEdit
A text entry and edit widget.
Definition: mythuitextedit.h:33
MythScreenType::OpenBusyPopup
void OpenBusyPopup(const QString &message="")
Definition: mythscreentype.cpp:336
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
MetadataImageDownload::addThumb
void addThumb(QString title, QString url, QVariant data)
Definition: metadataimagedownload.cpp:35
NetBase::customEvent
void customEvent(QEvent *event) override
Definition: netbase.cpp:220
MythUITextEdit::GetText
QString GetText(void) const
Definition: mythuitextedit.h:47
build_compdb.file
file
Definition: build_compdb.py:55
searcheditor.h
mythdirs.h
mythsorthelper.h
NetSearch::ShowMenu
void ShowMenu(void) override
Definition: netsearch.cpp:167
netcommon.h
MythUIImage::Reset
void Reset(void) override
Reset the image back to the default defined in the theme.
Definition: mythuiimage.cpp:645
NetSearch::m_prevPageToken
QString m_prevPageToken
Definition: netsearch.h:62
NetSearch::Load
void Load() override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
Definition: netsearch.cpp:93
NetSearch::m_currentGrabber
int m_currentGrabber
Definition: netsearch.h:53
rsseditor.h
NetBase::m_thumbImage
MythUIImage * m_thumbImage
Definition: netbase.h:45
mythuiimage.h
MythUIButtonList::GetCount
int GetCount() const
Definition: mythuibuttonlist.cpp:1655
mythprogressdialog.h
NetSearch::m_siteList
MythUIButtonList * m_siteList
Definition: netsearch.h:40
ThumbnailData::title
QString title
Definition: metadataimagedownload.h:13
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:112
mythsystemlegacy.h
NetSearch::LoadData
void LoadData(void) override
Definition: netsearch.cpp:108
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
MythUIButtonListItem::SetText
void SetText(const QString &text, const QString &name="", const QString &state="")
Definition: mythuibuttonlist.cpp:3264
NetSearch::Create
bool Create(void) override
Definition: netsearch.cpp:40
MythUIButtonList::GetItemPos
int GetItemPos(MythUIButtonListItem *item) const
Definition: mythuibuttonlist.cpp:1698
NetBase::m_popupStack
MythScreenStack * m_popupStack
Definition: netbase.h:47
MythUIButtonListItem
Definition: mythuibuttonlist.h:28
NetSearch::m_mythXML
QString m_mythXML
Definition: netsearch.h:57
NetSearch::SearchFinished
void SearchFinished(void)
Definition: netsearch.cpp:356
ThumbnailDLEvent::kEventType
static Type kEventType
Definition: metadataimagedownload.h:84
NetSearch::SkipPagesForward
void SkipPagesForward()
Definition: netsearch.cpp:349
NetSearch::m_progress
MythUIProgressBar * m_progress
Definition: netsearch.h:46
NetSearch::m_pageText
MythUIText * m_pageText
Definition: netsearch.h:43
NetSearch::~NetSearch
~NetSearch() override
Definition: netsearch.cpp:98
MythUIButtonList::itemClicked
void itemClicked(MythUIButtonListItem *item)
ThumbnailData::url
QString url
Definition: metadataimagedownload.h:15
remotefile.h
NetSearch::customEvent
void customEvent(QEvent *levent) override
Definition: netsearch.cpp:544
MythUIButtonList::GetCurrentPos
int GetCurrentPos() const
Definition: mythuibuttonlist.h:190
metadataimagedownload.h
MythUIProgressBar
Progress bar widget.
Definition: mythuiprogressbar.h:13
NetBase::m_grabberList
GrabberScript::scriptList m_grabberList
Definition: netbase.h:52
netgrabbermanager.h
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:117
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:138
GetMythXMLURL
QString GetMythXMLURL(void)
Definition: netcommon.cpp:32
GetShareDir
QString GetShareDir(void)
Definition: mythdirs.cpp:222
NetBase::m_imageDownload
MetadataImageDownload * m_imageDownload
Definition: netbase.h:49
NetSearch::GetMoreResults
void GetMoreResults()
Definition: netsearch.cpp:320
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:222
NetSearch::GetStreamItem
ResultItem * GetStreamItem() override
Definition: netsearch.cpp:452
NetSearch::m_searchResultList
MythUIButtonList * m_searchResultList
Definition: netsearch.h:39
NetSearch::m_nextPageToken
QString m_nextPageToken
Definition: netsearch.h:61
netutils.h
MythUIComposite::SetTextFromMap
virtual void SetTextFromMap(const InfoMap &infoMap)
Definition: mythuicomposite.cpp:9
ThumbnailDLEvent
Definition: metadataimagedownload.h:71
filename
QString filename
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:637
NetEditorBase::ItemsChanged
void ItemsChanged(void)
MythUIButtonList::GetDataValue
QVariant GetDataValue() const
Definition: mythuibuttonlist.cpp:1619
NetSearch::m_netSearch
QNetworkAccessManager * m_netSearch
Definition: netsearch.h:49
storagegroup.h
ResultItem::toMap
void toMap(InfoMap &metadataMap)
Definition: rssparse.cpp:74
NetSearch::m_maxpage
uint m_maxpage
Definition: netsearch.h:56
NetBase::StreamWebVideo
void StreamWebVideo(void)
Definition: netbase.cpp:86
uint
unsigned int uint
Definition: compat.h:140
Search
Definition: netgrabbermanager.h:138
NetSearch::DoListRefresh
void DoListRefresh()
Definition: netsearch.cpp:474
ThumbnailData::data
QVariant data
Definition: metadataimagedownload.h:14
NetSearch::NetSearch
NetSearch(MythScreenStack *parent, const char *name=nullptr)
Definition: netsearch.cpp:34
MythUIButtonListItem::GetText
QString GetText(const QString &name="") const
Definition: mythuibuttonlist.cpp:3305
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:29
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythscreentype.cpp:414
NetSearch::PopulateResultList
void PopulateResultList(const ResultItem::resultList &list)
Definition: netsearch.cpp:420
MythConfirmationDialog
Dialog asking for user confirmation.
Definition: mythdialogbox.h:222
SearchEditor
Definition: searcheditor.h:10
VIDEO_FILE
@ VIDEO_FILE
Definition: rssparse.h:21
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:692
MythUIButtonListItem::SetImage
void SetImage(MythImage *image, const QString &name="")
Sets an image directly, should only be used in special circumstances since it bypasses the cache.
Definition: mythuibuttonlist.cpp:3398
ResultItem
Definition: rssparse.h:110
NetSearch::SkipPagesBack
void SkipPagesBack()
Definition: netsearch.cpp:339
NetSearch::SetThumbnail
void SetThumbnail(MythUIButtonListItem *btn)
Definition: netsearch.cpp:526
NetSearch::m_currentSearch
QString m_currentSearch
Definition: netsearch.h:52
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:134
MythUIType::SetVisible
virtual void SetVisible(bool visible)
Definition: mythuitype.cpp:1086
mythcontext.h
NetSearch::m_search
MythUITextEdit * m_search
Definition: netsearch.h:41
MythUIButtonList::Reset
void Reset() override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuibuttonlist.cpp:114
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:105
build_compdb.action
action
Definition: build_compdb.py:9
NetBase::ShowWebVideo
void ShowWebVideo(void)
Definition: netbase.cpp:105
ResultItem::resultList
QList< ResultItem * > resultList
Definition: rssparse.h:114
NetBase::m_downloadable
MythUIStateType * m_downloadable
Definition: netbase.h:46
NetBase
Definition: netbase.h:19
NetSearch::m_currentCmd
QString m_currentCmd
Definition: netsearch.h:54
MythUIButtonListItem::GetImageFilename
QString GetImageFilename(const QString &name="") const
Definition: mythuibuttonlist.cpp:3486
MythUIImage::SetFilename
void SetFilename(const QString &filename)
Must be followed by a call to Load() to load the image.
Definition: mythuiimage.cpp:676
ThumbnailData
Definition: metadataimagedownload.h:12
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition: mythuibuttonlist.h:144
MythUIProgressBar::SetVisible
void SetVisible(bool visible) override
Definition: mythuiprogressbar.cpp:186
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:49
query
MSqlQuery query(MSqlQuery::InitCon())
ResultItem::GetDownloadable
const bool & GetDownloadable() const
Definition: rssparse.h:154
NetSearch::m_reply
QNetworkReply * m_reply
Definition: netsearch.h:50
NetSearch::DoSearch
void DoSearch(void)
Definition: netsearch.cpp:257
videoutils.h
MythScreenType::CloseBusyPopup
void CloseBusyPopup(void)
Definition: mythscreentype.cpp:354
MythUIStateType
This widget is used for grouping other widgets for display when a particular named state is called.
Definition: mythuistatetype.h:23
NetBase::DoDownloadAndPlay
void DoDownloadAndPlay(void)
Definition: netbase.cpp:283
NetSearch::GetLastResults
void GetLastResults()
Definition: netsearch.cpp:301
MythUIStateType::DisplayState
bool DisplayState(const QString &name)
Definition: mythuistatetype.cpp:84
ResultItem::GetMediaURL
const QString & GetMediaURL() const
Definition: rssparse.h:141