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  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"),
188  menuPopup->AddButton(tr("Open Web Link"), &NetSearch::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  qOverload<>(&NetSearch::DoPlayVideo));
206  }
207  else
208  {
209  menuPopup->AddButton(tr("Save This Video"),
211  }
212  }
213 
214  if (item->GetDownloadable() &&
216  exists)
217  {
218  menuPopup->AddButton(tr("Delete"), &NetSearch::SlotDeleteVideo);
219  }
220  }
221  }
222 
223  if (m_pagenum > 1)
224  menuPopup->AddButton(tr("Previous Page"), &NetSearch::GetLastResults);
226  menuPopup->AddButton(tr("Next Page"), &NetSearch::GetMoreResults);
227  if (m_pagenum > 1 && m_prevPageToken.isEmpty())
228  menuPopup->AddButton(tr("Skip 10 Pages Back"),
231  m_nextPageToken.isEmpty())
232  menuPopup->AddButton(tr("Skip 10 Pages Forward"),
234 
235  menuPopup->AddButton(tr("Manage Search Scripts"),
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")
252  .arg(GetShareDir(), 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();
281  m_currentSearch = query;
282 
283  QString title = tr("Searching %1 for \"%2\"...")
284  .arg(grabber, query);
285  OpenBusyPopup(title);
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), m_currentSearch);
309  OpenBusyPopup(title);
310 
311  QString page = m_prevPageToken.isEmpty() ? QString::number(m_pagenum) :
313 
314  QUrl req =
316  m_reply = m_netSearch->get(QNetworkRequest(req));
317 }
318 
320 {
322 
323  m_pagenum++;
324 
325  QString title = tr("Changing to page %1 of search \"%2\"...")
326  .arg(QString::number(m_pagenum), m_currentSearch);
327  OpenBusyPopup(title);
328 
329  QString page = m_nextPageToken.isEmpty() ? QString::number(m_pagenum) :
331 
332  QUrl req =
334  m_reply = m_netSearch->get(QNetworkRequest(req));
335 }
336 
338 {
339  if (m_pagenum < 11)
340  m_pagenum = 2;
341  else
342  m_pagenum = m_pagenum - 10 + 1;
343 
344  GetLastResults();
345 }
346 
348 {
349  m_pagenum = m_pagenum + 10 - 1;
350 
351  GetMoreResults();
352 }
353 
355 {
356  CloseBusyPopup();
357 
358  auto *item = new Search();
359  QByteArray data = m_reply->readAll();
360  item->SetData(data);
361 
362  item->process();
363 
364  uint searchresults = item->numResults();
365  uint returned = item->numReturned();
366  uint firstitem = item->numIndex();
367 
368  m_nextPageToken = item->nextPageToken();
369  m_prevPageToken = item->prevPageToken();
370 
371  if (returned == 0)
372  return;
373 
375  SetText(QString::number(searchresults), "count");
376 
377  if (firstitem + returned == searchresults)
379  else
380  {
381  m_maxpage = searchresults / returned; // Whole pages
382  if (searchresults % returned != 0) // Partial page?
383  m_maxpage++;
384  }
385  if (m_pageText && m_maxpage > 0 && m_pagenum > 0)
386  {
387  m_pageText->SetText(QString("%1 / %2")
388  .arg(QString::number(m_pagenum),
389  QString::number(m_maxpage)));
390  }
391 
392  ResultItem::resultList list = item->GetVideoList();
393  PopulateResultList(list);
395 }
396 
398 {
399  CloseBusyPopup();
400 
401  QString message = tr("Timed out waiting for query to "
402  "finish. API might be down.");
403 
404  if (!m_okPopup)
405  {
406  m_okPopup = new MythConfirmationDialog(m_popupStack, message, false);
407 
408  if (m_okPopup->Create())
410  else
411  {
412  delete m_okPopup;
413  m_okPopup = nullptr;
414  }
415  }
416 }
417 
419 {
420  for (const auto & result : qAsConst(list))
421  {
422  QString title = result->GetTitle();
423  auto *item = new MythUIButtonListItem(m_searchResultList, title,
424  QVariant::fromValue(result));
425  InfoMap metadataMap;
426  result->toMap(metadataMap);
427  item->SetTextFromMap(metadataMap);
428 
429  if (!result->GetThumbnail().isEmpty())
430  {
431  QString dlfile = result->GetThumbnail();
432 
433  if (dlfile.contains("%SHAREDIR%"))
434  {
435  dlfile.replace("%SHAREDIR%", GetShareDir());
436  item->SetImage(dlfile);
437  }
438  else
439  {
440  uint pos = m_searchResultList->GetItemPos(item);
441 
442  m_imageDownload->addThumb(result->GetTitle(),
443  result->GetThumbnail(),
444  QVariant::fromValue<uint>(pos));
445  }
446  }
447  }
448 }
449 
451 {
452  return m_searchResultList->GetDataValue().value<ResultItem*>();
453 }
454 
456 {
458 
459  auto *searchedit = new SearchEditor(mainStack, "mythnetsearchedit");
460 
461  if (searchedit->Create())
462  {
463  connect(searchedit, &NetEditorBase::ItemsChanged,
464  this, &NetSearch::DoListRefresh);
465 
466  mainStack->AddScreen(searchedit);
467  }
468  else
469  delete searchedit;
470 }
471 
473 {
475  if (m_grabberList.isEmpty())
476  RunSearchEditor();
477 
478  LoadData();
479 }
480 
482 {
483  auto *item = m_searchResultList->GetDataValue().value<ResultItem*>();
484 
485  if (item && GetFocusWidget() == m_searchResultList)
486  {
488 
489  if (m_downloadable)
490  {
491  if (item->GetDownloadable())
493  else
495  }
496  }
497  else if (GetFocusWidget() == m_siteList)
498  {
500  std::shared_ptr<MythSortHelper>sh = getMythSortHelper();
501  QString title = btn->GetText();
502 
503  ResultItem res(title, sh->doTitle(title), // title, sortTitle
504  QString(), QString(), // subtitle, sortSubtitle
505  QString(), // description
506  QString(), QString(), QString(), QString(),
507  QDateTime(), nullptr, nullptr, -1, QString(), QStringList(),
508  QString(), QStringList(), 0, 0, QString(),
509  false, QStringList(), 0, 0, false);
510 
511  SetTextAndThumbnail(btn, &res);
512  }
513 }
514 
516 {
517  InfoMap metadataMap;
518  item->toMap(metadataMap);
519  SetTextFromMap(metadataMap);
520 
521  SetThumbnail(btn);
522 }
523 
525 {
526  if (m_thumbImage)
527  {
528  QString filename = btn->GetImageFilename();
529  if (filename.contains("%SHAREDIR%"))
530  filename.replace("%SHAREDIR%", GetShareDir());
531 
532  if (!filename.isEmpty())
533  {
535  m_thumbImage->Load();
536  }
537  else
538  m_thumbImage->Reset();
539  }
540 }
541 
542 void NetSearch::customEvent(QEvent *event)
543 {
544  if (event->type() == ThumbnailDLEvent::kEventType)
545  {
546  auto *tde = dynamic_cast<ThumbnailDLEvent *>(event);
547  if (tde == nullptr)
548  return;
549 
550  ThumbnailData *data = tde->m_thumb;
551  if (!data)
552  return;
553 
554  QString title = data->title;
555  QString file = data->url;
556  uint pos = data->data.value<uint>();
557 
558  if (file.isEmpty() || !((uint)m_searchResultList->GetCount() >= pos))
559  return;
560 
562 
563  if (!item)
564  return;
565 
566  if (item->GetText() == title)
567  item->SetImage(file);
568 
569  if (m_searchResultList->GetItemCurrent() == item)
570  SetThumbnail(item);
571  }
572  else
573  NetBase::customEvent(event);
574 }
MythUIButtonList::GetItemAt
MythUIButtonListItem * GetItemAt(int pos) const
Definition: mythuibuttonlist.cpp:1673
MythScreenType::LoadInBackground
void LoadInBackground(const QString &message="")
Definition: mythscreentype.cpp:286
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:318
MythUITextEdit::SetMaxLength
void SetMaxLength(int length)
Definition: mythuitextedit.cpp:192
netsearch.h
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1587
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:452
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:82
getMythSortHelper
std::shared_ptr< MythSortHelper > getMythSortHelper(void)
Get a pointer to the MythSortHelper singleton.
Definition: mythsorthelper.cpp:133
mythdb.h
NetSearch::FillGrabberButtonList
void FillGrabberButtonList(void)
Definition: netsearch.cpp:242
NetSearch::SlotItemChanged
void SlotItemChanged(void)
Definition: netsearch.cpp:481
findAllDBSearchGrabbers
GrabberScript::scriptList findAllDBSearchGrabbers(ArticleType type)
Definition: netutils.cpp:184
NetSearch::RunSearchEditor
void RunSearchEditor() const
Definition: netsearch.cpp:455
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:454
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:133
MythUIImage::Load
bool Load(bool allowLoadInBackground=true, bool forceStat=false)
Load the image(s), wraps ImageLoader::LoadImage()
Definition: mythuiimage.cpp:966
NetSearch::SearchTimeout
void SearchTimeout(Search *item)
Definition: netsearch.cpp:397
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
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:515
MythUITextEdit
A text entry and edit widget.
Definition: mythuitextedit.h:34
MythScreenType::OpenBusyPopup
void OpenBusyPopup(const QString &message="")
Definition: mythscreentype.cpp:320
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:220
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:167
netcommon.h
MythUIImage::Reset
void Reset(void) override
Reset the image back to the default defined in the theme.
Definition: mythuiimage.cpp:643
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:1652
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:113
mythsystemlegacy.h
NetBase::DoPlayVideo
void DoPlayVideo()
Definition: netbase.cpp:319
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:3268
NetSearch::Create
bool Create(void) override
Definition: netsearch.cpp:40
MythUIButtonList::GetItemPos
int GetItemPos(MythUIButtonListItem *item) const
Definition: mythuibuttonlist.cpp:1695
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:354
NetSearch::SkipPagesForward
void SkipPagesForward()
Definition: netsearch.cpp:347
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)
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:542
MythUIButtonList::GetCurrentPos
int GetCurrentPos() const
Definition: mythuibuttonlist.h:238
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:118
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:319
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:206
NetSearch::GetStreamItem
ResultItem * GetStreamItem() override
Definition: netsearch.cpp:450
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:1616
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:85
uint
unsigned int uint
Definition: compat.h:81
Search
Definition: netgrabbermanager.h:153
NetSearch::DoListRefresh
void DoListRefresh()
Definition: netsearch.cpp:472
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:3315
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:404
NetSearch::PopulateResultList
void PopulateResultList(const ResultItem::resultList &list)
Definition: netsearch.cpp:418
MythConfirmationDialog
Dialog asking for user confirmation. Ok and optional Cancel button.
Definition: mythdialogbox.h:272
SearchEditor
Definition: searcheditor.h:9
VIDEO_FILE
@ VIDEO_FILE
Definition: rssparse.h:21
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:695
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:3429
ResultItem
Definition: rssparse.h:109
NetSearch::SkipPagesBack
void SkipPagesBack()
Definition: netsearch.cpp:337
NetSearch::SetThumbnail
void SetThumbnail(MythUIButtonListItem *btn)
Definition: netsearch.cpp:524
NetSearch::m_currentSearch
QString m_currentSearch
Definition: netsearch.h:52
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:132
MythUIType::SetVisible
virtual void SetVisible(bool visible)
Definition: mythuitype.cpp:1108
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:3523
MythUIImage::SetFilename
void SetFilename(const QString &filename)
Must be followed by a call to Load() to load the image.
Definition: mythuiimage.cpp:674
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:196
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:257
videoutils.h
MythScreenType::CloseBusyPopup
void CloseBusyPopup(void)
Definition: mythscreentype.cpp:338
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: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