MythTV  master
netsearch.cpp
Go to the documentation of this file.
1 // qt
2 #include <QDateTime>
3 #include <QFileInfo>
4 #include <QImageReader>
5 #include <QMetaType>
6 #include <QString>
7 
8 // MythTV
9 #include <libmyth/mythcontext.h>
11 #include <libmythbase/mythdb.h>
12 #include <libmythbase/mythdbcon.h>
13 #include <libmythbase/mythdirs.h>
17 #include <libmythbase/netutils.h>
18 #include <libmythbase/remotefile.h>
19 #include <libmythbase/rssparse.h>
24 #include <libmythui/mythuiimage.h>
25 #include <libmythui/mythuitext.h>
26 
27 #include "netcommon.h"
28 #include "netsearch.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  const 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  {
154  GetLastResults();
155  }
156  else if (action == "NEXTVIEW" && m_searchResultList->GetCount() > 0 &&
158  {
159  GetMoreResults();
160  }
161  else
162  {
163  handled = false;
164  }
165  }
166 
167  if (!handled && MythScreenType::keyPressEvent(event))
168  handled = true;
169 
170  return handled;
171 }
172 
174 {
175  QString label = tr("Search Options");
176 
177  auto *menuPopup = new MythDialogBox(label, m_popupStack,
178  "mythnetvisionmenupopup");
179 
180  if (menuPopup->Create())
181  {
182  m_popupStack->AddScreen(menuPopup);
183 
184  menuPopup->SetReturnEvent(this, "options");
185 
186  if (m_searchResultList->GetCount() > 0)
187  {
188  ResultItem *item = GetStreamItem();
189  if (item)
190  {
191  if (item->GetDownloadable())
192  menuPopup->AddButton(tr("Stream Video"),
194  menuPopup->AddButton(tr("Open Web Link"), &NetSearch::ShowWebVideo);
195 
196  QString filename = GetDownloadFilename(item->GetTitle(),
197  item->GetMediaURL());
198  bool exists = false;
199 
200  if (filename.startsWith("myth://"))
202  else
204 
205  if (item->GetDownloadable() &&
207  {
208  if (exists)
209  {
210  menuPopup->AddButton(tr("Play"),
211  qOverload<>(&NetSearch::DoPlayVideo));
212  }
213  else
214  {
215  menuPopup->AddButton(tr("Save This Video"),
217  }
218  }
219 
220  if (item->GetDownloadable() &&
222  exists)
223  {
224  menuPopup->AddButton(tr("Delete"), &NetSearch::SlotDeleteVideo);
225  }
226  }
227  }
228 
229  if (m_pagenum > 1)
230  menuPopup->AddButton(tr("Previous Page"), &NetSearch::GetLastResults);
232  menuPopup->AddButton(tr("Next Page"), &NetSearch::GetMoreResults);
233  if (m_pagenum > 1 && m_prevPageToken.isEmpty())
234  menuPopup->AddButton(tr("Skip 10 Pages Back"),
237  m_nextPageToken.isEmpty())
238  menuPopup->AddButton(tr("Skip 10 Pages Forward"),
240 
241  menuPopup->AddButton(tr("Manage Search Scripts"),
243  }
244  else
245  {
246  delete menuPopup;
247  }
248 }
249 
251 {
252  m_siteList->Reset();
253 
254  for (const auto & g : std::as_const(m_grabberList))
255  {
256  auto *item = new MythUIButtonListItem(m_siteList, g->GetTitle());
257  item->SetText(g->GetTitle(), "title");
258  item->SetData(g->GetCommandline());
259  QString thumb = QString("%1mythnetvision/icons/%2")
260  .arg(GetShareDir(), g->GetImage());
261  item->SetImage(thumb);
262  }
263 }
264 
266 {
268 
269  int numScripts = m_siteList->GetCount();
270  for (int i = 0; i < numScripts; i++)
271  m_siteList->GetItemAt(i)->SetText("", "count");
272 
273  if (m_pageText)
274  m_pageText->Reset();
275 
276  m_pagenum = 1;
277  m_maxpage = 1;
278 
279  QString cmd = m_siteList->GetDataValue().toString();
280  QString grabber = m_siteList->GetItemCurrent()->GetText();
281  QString query = m_search->GetText();
282 
283  if (query.isEmpty())
284  return;
285 
286  QFileInfo fi(cmd);
287  m_currentCmd = fi.fileName();
289  m_currentSearch = query;
290 
291  QString title = tr("Searching %1 for \"%2\"...")
292  .arg(grabber, query);
293  OpenBusyPopup(title);
294 
295  if (!m_netSearch)
296  {
297  m_netSearch = new QNetworkAccessManager(this);
298  connect(m_netSearch, &QNetworkAccessManager::finished,
300  }
301 
303  QUrl req(init.toEncoded(), QUrl::TolerantMode);
304  LOG(VB_GENERAL, LOG_INFO,
305  QString("Using Search URL %1").arg(req.toString()));
306  m_reply = m_netSearch->get(QNetworkRequest(req));
307 }
308 
310 {
312 
313  m_pagenum--;
314 
315  QString title = tr("Changing to page %1 of search \"%2\"...")
316  .arg(QString::number(m_pagenum), m_currentSearch);
317  OpenBusyPopup(title);
318 
319  QString page = m_prevPageToken.isEmpty() ? QString::number(m_pagenum) :
321 
322  QUrl req =
324  m_reply = m_netSearch->get(QNetworkRequest(req));
325 }
326 
328 {
330 
331  m_pagenum++;
332 
333  QString title = tr("Changing to page %1 of search \"%2\"...")
334  .arg(QString::number(m_pagenum), m_currentSearch);
335  OpenBusyPopup(title);
336 
337  QString page = m_nextPageToken.isEmpty() ? QString::number(m_pagenum) :
339 
340  QUrl req =
342  m_reply = m_netSearch->get(QNetworkRequest(req));
343 }
344 
346 {
347  if (m_pagenum < 11)
348  m_pagenum = 2;
349  else
350  m_pagenum = m_pagenum - 10 + 1;
351 
352  GetLastResults();
353 }
354 
356 {
357  m_pagenum = m_pagenum + 10 - 1;
358 
359  GetMoreResults();
360 }
361 
363 {
364  CloseBusyPopup();
365 
366  auto *item = new Search();
367  QByteArray data = m_reply->readAll();
368  item->SetData(data);
369 
370  item->process();
371 
372  uint searchresults = item->numResults();
373  uint returned = item->numReturned();
374  uint firstitem = item->numIndex();
375 
376  m_nextPageToken = item->nextPageToken();
377  m_prevPageToken = item->prevPageToken();
378 
379  if (returned == 0)
380  return;
381 
383  SetText(QString::number(searchresults), "count");
384 
385  if (firstitem + returned == searchresults)
387  else
388  {
389  m_maxpage = searchresults / returned; // Whole pages
390  if (searchresults % returned != 0) // Partial page?
391  m_maxpage++;
392  }
393  if (m_pageText && m_maxpage > 0 && m_pagenum > 0)
394  {
395  m_pageText->SetText(QString("%1 / %2")
396  .arg(QString::number(m_pagenum),
397  QString::number(m_maxpage)));
398  }
399 
400  ResultItem::resultList list = item->GetVideoList();
401  PopulateResultList(list);
403 }
404 
406 {
407  CloseBusyPopup();
408 
409  QString message = tr("Timed out waiting for query to "
410  "finish. API might be down.");
411 
412  if (!m_okPopup)
413  {
414  m_okPopup = new MythConfirmationDialog(m_popupStack, message, false);
415 
416  if (m_okPopup->Create())
418  else
419  {
420  delete m_okPopup;
421  m_okPopup = nullptr;
422  }
423  }
424 }
425 
427 {
428  for (const auto & result : std::as_const(list))
429  {
430  const QString& title = result->GetTitle();
431  auto *item = new MythUIButtonListItem(m_searchResultList, title,
432  QVariant::fromValue(result));
433  InfoMap metadataMap;
434  result->toMap(metadataMap);
435  item->SetTextFromMap(metadataMap);
436 
437  if (!result->GetThumbnail().isEmpty())
438  {
439  QString dlfile = result->GetThumbnail();
440 
441  if (dlfile.contains("%SHAREDIR%"))
442  {
443  dlfile.replace("%SHAREDIR%", GetShareDir());
444  item->SetImage(dlfile);
445  }
446  else
447  {
448  uint pos = m_searchResultList->GetItemPos(item);
449 
450  m_imageDownload->addThumb(result->GetTitle(),
451  result->GetThumbnail(),
452  QVariant::fromValue<uint>(pos));
453  }
454  }
455  }
456 }
457 
459 {
460  return m_searchResultList->GetDataValue().value<ResultItem*>();
461 }
462 
464 {
466 
467  auto *searchedit = new SearchEditor(mainStack, "mythnetsearchedit");
468 
469  if (searchedit->Create())
470  {
471  connect(searchedit, &NetEditorBase::ItemsChanged,
472  this, &NetSearch::DoListRefresh);
473 
474  mainStack->AddScreen(searchedit);
475  }
476  else
477  {
478  delete searchedit;
479  }
480 }
481 
483 {
485  if (m_grabberList.isEmpty())
486  RunSearchEditor();
487 
488  LoadData();
489 }
490 
492 {
493  auto *item = m_searchResultList->GetDataValue().value<ResultItem*>();
494 
495  if (item && GetFocusWidget() == m_searchResultList)
496  {
498 
499  if (m_downloadable)
500  {
501  if (item->GetDownloadable())
503  else
505  }
506  }
507  else if (GetFocusWidget() == m_siteList)
508  {
510  std::shared_ptr<MythSortHelper>sh = getMythSortHelper();
511  QString title = btn->GetText();
512 
513  ResultItem res(title, sh->doTitle(title), // title, sortTitle
514  QString(), QString(), // subtitle, sortSubtitle
515  QString(), // description
516  QString(), QString(), QString(), QString(),
517  QDateTime(), nullptr, nullptr, -1, QString(), QStringList(),
518  QString(), QStringList(), 0, 0, QString(),
519  false, QStringList(), 0, 0, false);
520 
521  SetTextAndThumbnail(btn, &res);
522  }
523 }
524 
526 {
527  InfoMap metadataMap;
528  item->toMap(metadataMap);
529  SetTextFromMap(metadataMap);
530 
531  SetThumbnail(btn);
532 }
533 
535 {
536  if (m_thumbImage)
537  {
538  QString filename = btn->GetImageFilename();
539  if (filename.contains("%SHAREDIR%"))
540  filename.replace("%SHAREDIR%", GetShareDir());
541 
542  if (!filename.isEmpty())
543  {
545  m_thumbImage->Load();
546  }
547  else
548  {
549  m_thumbImage->Reset();
550  }
551  }
552 }
553 
554 void NetSearch::customEvent(QEvent *event)
555 {
556  if (event->type() == ThumbnailDLEvent::kEventType)
557  {
558  auto *tde = dynamic_cast<ThumbnailDLEvent *>(event);
559  if (tde == nullptr)
560  return;
561 
562  ThumbnailData *data = tde->m_thumb;
563  if (!data)
564  return;
565 
566  QString title = data->title;
567  QString file = data->url;
568  uint pos = data->data.value<uint>();
569 
570  if (file.isEmpty() || !((uint)m_searchResultList->GetCount() >= pos))
571  return;
572 
574 
575  if (!item)
576  return;
577 
578  if (item->GetText() == title)
579  item->SetImage(file);
580 
581  if (m_searchResultList->GetItemCurrent() == item)
582  SetThumbnail(item);
583  }
584  else
585  {
586  NetBase::customEvent(event);
587  }
588 }
MythUIButtonList::GetItemAt
MythUIButtonListItem * GetItemAt(int pos) const
Definition: mythuibuttonlist.cpp:1700
MythScreenType::LoadInBackground
void LoadInBackground(const QString &message="")
Definition: mythscreentype.cpp:283
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:317
MythUITextEdit::SetMaxLength
void SetMaxLength(int length)
Definition: mythuitextedit.cpp:193
netsearch.h
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1614
mythuitext.h
MythUIImage
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:97
GetDownloadFilename
QString GetDownloadFilename(const QString &title, const QString &url)
Definition: netutils.cpp:854
MythConfirmationDialog::Create
bool Create(void) override
Definition: mythdialogbox.cpp:456
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:65
getMythSortHelper
std::shared_ptr< MythSortHelper > getMythSortHelper(void)
Get a pointer to the MythSortHelper singleton.
Definition: mythsorthelper.cpp:129
mythdb.h
NetSearch::FillGrabberButtonList
void FillGrabberButtonList(void)
Definition: netsearch.cpp:250
NetSearch::SlotItemChanged
void SlotItemChanged(void)
Definition: netsearch.cpp:491
findAllDBSearchGrabbers
GrabberScript::scriptList findAllDBSearchGrabbers(ArticleType type)
Definition: netutils.cpp:184
NetSearch::RunSearchEditor
void RunSearchEditor() const
Definition: netsearch.cpp:463
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:460
ThumbnailDLEvent::kEventType
static const Type kEventType
Definition: metadataimagedownload.h:84
MythUIType::GetChild
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
Definition: mythuitype.cpp:138
MythUIImage::Load
bool Load(bool allowLoadInBackground=true, bool forceStat=false)
Load the image(s), wraps ImageLoader::LoadImage()
Definition: mythuiimage.cpp:971
NetSearch::SearchTimeout
void SearchTimeout(Search *item)
Definition: netsearch.cpp:405
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
GetMythXMLSearch
QUrl GetMythXMLSearch(const QString &url, const QString &query, const QString &grabber, const QString &pagenum)
Definition: netcommon.cpp:44
xbmcvfs.exists
bool exists(str path)
Definition: xbmcvfs.py:51
NetSearch::m_noSites
MythUIText * m_noSites
Definition: netsearch.h:44
MythScreenStack
Definition: mythscreenstack.h:16
mythdbcon.h
NetSearch::SetTextAndThumbnail
void SetTextAndThumbnail(MythUIButtonListItem *btn, ResultItem *item)
Definition: netsearch.cpp:525
MythUITextEdit
A text entry and edit widget.
Definition: mythuitextedit.h:34
MythScreenType::OpenBusyPopup
void OpenBusyPopup(const QString &message="")
Definition: mythscreentype.cpp:317
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
MetadataImageDownload::addThumb
void addThumb(QString title, QString url, QVariant data)
Definition: metadataimagedownload.cpp:36
NetBase::customEvent
void customEvent(QEvent *event) override
Definition: netbase.cpp:222
MythUITextEdit::GetText
QString GetText(void) const
Definition: mythuitextedit.h:50
build_compdb.file
file
Definition: build_compdb.py:55
searcheditor.h
mythdirs.h
mythsorthelper.h
NetSearch::ShowMenu
void ShowMenu(void) override
Definition: netsearch.cpp:173
netcommon.h
MythUIImage::Reset
void Reset(void) override
Reset the image back to the default defined in the theme.
Definition: mythuiimage.cpp:644
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:46
mythuiimage.h
MythUIButtonList::GetCount
int GetCount() const
Definition: mythuibuttonlist.cpp:1679
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:110
mythsystemlegacy.h
NetBase::DoPlayVideo
void DoPlayVideo()
Definition: netbase.cpp:317
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:3319
NetSearch::Create
bool Create(void) override
Definition: netsearch.cpp:40
MythUIButtonList::GetItemPos
int GetItemPos(MythUIButtonListItem *item) const
Definition: mythuibuttonlist.cpp:1722
NetBase::m_popupStack
MythScreenStack * m_popupStack
Definition: netbase.h:48
MythUIButtonListItem
Definition: mythuibuttonlist.h:41
NetSearch::m_mythXML
QString m_mythXML
Definition: netsearch.h:57
NetSearch::SearchFinished
void SearchFinished(void)
Definition: netsearch.cpp:362
NetSearch::SkipPagesForward
void SkipPagesForward()
Definition: netsearch.cpp:355
NetSearch::m_progress
MythUIProgressBar * m_progress
Definition: netsearch.h:46
NetSearch::m_pageText
MythUIText * m_pageText
Definition: netsearch.h:43
MythSortHelper::doTitle
QString doTitle(const QString &title) const
Create the sortable form of an title string.
Definition: mythsorthelper.cpp:163
NetSearch::~NetSearch
~NetSearch() override
Definition: netsearch.cpp:98
MythUIButtonList::itemClicked
void itemClicked(MythUIButtonListItem *item)
MythMainWindow::TranslateKeyPress
bool TranslateKeyPress(const QString &Context, QKeyEvent *Event, QStringList &Actions, bool AllowJumps=true)
Get a list of actions for a keypress in the given context.
Definition: mythmainwindow.cpp:1111
ThumbnailData::url
QString url
Definition: metadataimagedownload.h:15
remotefile.h
NetSearch::customEvent
void customEvent(QEvent *levent) override
Definition: netsearch.cpp:554
MythUIButtonList::GetCurrentPos
int GetCurrentPos() const
Definition: mythuibuttonlist.h:240
metadataimagedownload.h
MythUIProgressBar
Progress bar widget.
Definition: mythuiprogressbar.h:12
NetBase::m_grabberList
GrabberScript::scriptList m_grabberList
Definition: netbase.h:53
netgrabbermanager.h
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:115
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:166
GetMythXMLURL
QString GetMythXMLURL(void)
Definition: netcommon.cpp:35
GetShareDir
QString GetShareDir(void)
Definition: mythdirs.cpp:254
NetBase::m_imageDownload
MetadataImageDownload * m_imageDownload
Definition: netbase.h:50
NetSearch::GetMoreResults
void GetMoreResults()
Definition: netsearch.cpp:327
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:203
NetSearch::GetStreamItem
ResultItem * GetStreamItem() override
Definition: netsearch.cpp:458
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:70
NetEditorBase::ItemsChanged
void ItemsChanged(void)
MythUIButtonList::GetDataValue
QVariant GetDataValue() const
Definition: mythuibuttonlist.cpp:1643
NetSearch::m_netSearch
QNetworkAccessManager * m_netSearch
Definition: netsearch.h:49
storagegroup.h
ResultItem::toMap
void toMap(InfoMap &metadataMap)
Definition: rssparse.cpp:70
NetSearch::m_maxpage
uint m_maxpage
Definition: netsearch.h:56
NetBase::StreamWebVideo
void StreamWebVideo(void)
Definition: netbase.cpp:85
Search
Definition: netgrabbermanager.h:143
NetSearch::DoListRefresh
void DoListRefresh()
Definition: netsearch.cpp:482
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:3368
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythscreentype.cpp:401
NetSearch::PopulateResultList
void PopulateResultList(const ResultItem::resultList &list)
Definition: netsearch.cpp:426
MythConfirmationDialog
Dialog asking for user confirmation. Ok and optional Cancel button.
Definition: mythdialogbox.h:272
SearchEditor
Definition: searcheditor.h:9
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:701
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:3479
ResultItem
Definition: rssparse.h:109
NetSearch::SkipPagesBack
void SkipPagesBack()
Definition: netsearch.cpp:345
NetSearch::SetThumbnail
void SetThumbnail(MythUIButtonListItem *btn)
Definition: netsearch.cpp:534
NetSearch::m_currentSearch
QString m_currentSearch
Definition: netsearch.h:52
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:115
MythUIType::SetVisible
virtual void SetVisible(bool visible)
Definition: mythuitype.cpp:1105
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:116
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:104
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:47
NetBase
Definition: netbase.h:18
NetSearch::m_currentCmd
QString m_currentCmd
Definition: netsearch.h:54
MythUIButtonListItem::GetImageFilename
QString GetImageFilename(const QString &name="") const
Definition: mythuibuttonlist.cpp:3573
VIDEO_FILE
@ VIDEO_FILE
Definition: rssparse.h:21
MythUIImage::SetFilename
void SetFilename(const QString &filename)
Must be followed by a call to Load() to load the image.
Definition: mythuiimage.cpp:677
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:191
MythUIProgressBar::SetVisible
void SetVisible(bool visible) override
Definition: mythuiprogressbar.cpp:193
build_compdb.filename
filename
Definition: build_compdb.py:21
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:52
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:265
videoutils.h
MythScreenType::CloseBusyPopup
void CloseBusyPopup(void)
Definition: mythscreentype.cpp:335
MythUIStateType
This widget is used for grouping other widgets for display when a particular named state is called....
Definition: mythuistatetype.h:22
NetBase::DoDownloadAndPlay
void DoDownloadAndPlay(void)
Definition: netbase.cpp:281
NetSearch::GetLastResults
void GetLastResults()
Definition: netsearch.cpp:309
MythUIStateType::DisplayState
bool DisplayState(const QString &name)
Definition: mythuistatetype.cpp:84
ResultItem::GetMediaURL
const QString & GetMediaURL() const
Definition: rssparse.h:141
uint
unsigned int uint
Definition: freesurround.h:24