MythTV  master
rsseditor.cpp
Go to the documentation of this file.
1 // Qt
2 #include <QDateTime>
3 #include <QDomDocument>
4 #include <QImageReader>
5 
6 // MythTV headers
7 #include <libmyth/mythcontext.h>
8 #include <libmythbase/mythdate.h>
10 #include <libmythbase/mythdirs.h>
13 #include <libmythbase/netutils.h>
14 #include <libmythbase/rssparse.h>
17 #include <libmythui/mythuibutton.h>
21 #include <libmythui/mythuiimage.h>
22 #include <libmythui/mythuitext.h>
24 
25 // RSS headers
26 #include "rsseditor.h"
27 
28 #define LOC QString("RSSEditor: ")
29 #define LOC_WARN QString("RSSEditor, Warning: ")
30 #define LOC_ERR QString("RSSEditor, Error: ")
31 
32 namespace
33 {
34  const QString CEID_NEWIMAGE = "image";
35 
36  QStringList GetSupportedImageExtensionFilter()
37  {
38  QStringList ret;
39 
40  QList<QByteArray> exts = QImageReader::supportedImageFormats();
41  for (const auto & ext : qAsConst(exts))
42  ret.append(QString("*.").append(ext));
43 
44  return ret;
45  }
46 }
47 
49 {
50  if (m_manager)
51  {
52  m_manager->disconnect();
53  m_manager->deleteLater();
54  m_manager = nullptr;
55  }
56 }
57 
59 {
60  // Load the theme for this screen
61  bool foundtheme =
62  LoadWindowFromXML("netvision-ui.xml", "rsseditpopup", this);
63 
64  if (!foundtheme)
65  return false;
66 
67  bool err = false;
68  UIUtilE::Assign(this, m_urlEdit, "url", &err);
69  UIUtilE::Assign(this, m_titleEdit, "title", &err);
70  UIUtilE::Assign(this, m_descEdit, "description", &err);
71  UIUtilE::Assign(this, m_authorEdit, "author", &err);
72  UIUtilE::Assign(this, m_download, "download", &err);
73  UIUtilE::Assign(this, m_okButton, "ok", &err);
74  UIUtilE::Assign(this, m_cancelButton, "cancel", &err);
75  UIUtilE::Assign(this, m_thumbButton, "preview_browse", &err);
76  UIUtilE::Assign(this, m_thumbImage, "preview", &err);
77 
78  if (err)
79  {
80  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'rsseditpopup'");
81  return false;
82  }
83 
87 
92 
93  if (m_editing)
94  {
96 
101 
102  QString thumb = m_site->GetImage();
103  if (!thumb.isEmpty())
104  {
105  m_thumbImage->SetFilename(thumb);
106  m_thumbImage->Load();
107  }
108 
109  if (m_site->GetDownload())
111  }
112 
113  BuildFocusList();
114 
115  return true;
116 }
117 
118 bool RSSEditPopup::keyPressEvent(QKeyEvent *event)
119 {
120  if (GetFocusWidget()->keyPressEvent(event))
121  return true;
122 
123  QStringList actions;
124  bool handled = GetMythMainWindow()->TranslateKeyPress("Internet Video",
125  event, actions);
126 
127  if (!handled && MythScreenType::keyPressEvent(event))
128  handled = true;
129 
130  return handled;
131 }
132 
134 {
135  if (m_editing)
136  {
137  QString title = m_titleEdit->GetText();
138  QString desc = m_descEdit->GetText();
139  QString author = m_authorEdit->GetText();
140  QString link = m_urlEdit->GetText();
141  QString filename = m_thumbImage->GetFilename();
142  bool download = m_download->GetCheckState() == MythUIStateType::Full;
143 
145 
146  std::shared_ptr<MythSortHelper>sh = getMythSortHelper();
147  RSSSite site(title, sh->doTitle(title), filename, VIDEO_PODCAST,
148  desc, link, author, download, MythDate::current());
149  if (insertInDB(&site))
150  emit Saving();
151  Close();
152  }
153  else
154  {
155  m_manager = new QNetworkAccessManager();
156  QUrl qurl(m_urlEdit->GetText());
157 
158  m_reply = m_manager->get(QNetworkRequest(qurl));
159 
160  connect(m_manager, &QNetworkAccessManager::finished, this,
162  }
163 }
164 
165 QUrl RSSEditPopup::redirectUrl(const QUrl& possibleRedirectUrl,
166  const QUrl& oldRedirectUrl)
167 {
168  QUrl redirectUrl;
169  if(!possibleRedirectUrl.isEmpty() && possibleRedirectUrl != oldRedirectUrl)
170  redirectUrl = possibleRedirectUrl;
171  return redirectUrl;
172 }
173 
174 void RSSEditPopup::SlotCheckRedirect(QNetworkReply* reply)
175 {
176  QVariant possibleRedirectUrl =
177  reply->attribute(QNetworkRequest::RedirectionTargetAttribute);
178 
179  QUrl urlRedirectedTo;
180  urlRedirectedTo = redirectUrl(
181  possibleRedirectUrl.toUrl(), urlRedirectedTo);
182 
183  if (!urlRedirectedTo.isEmpty())
184  {
185  m_urlEdit->SetText(urlRedirectedTo.toString());
186  m_manager->get(QNetworkRequest(urlRedirectedTo));
187  }
188  else
189  {
190 // urlRedirectedTo.clear();
191  SlotSave(reply);
192  }
193  reply->deleteLater();
194 }
195 
196 void RSSEditPopup::SlotSave(QNetworkReply* reply)
197 {
198  QDomDocument document;
199  document.setContent(reply->read(reply->bytesAvailable()), true);
200 
201  QString text = document.toString();
202 
203  QString title = m_titleEdit->GetText();
204  QString description = m_descEdit->GetText();
205  QString author = m_authorEdit->GetText();
206  QString file = m_thumbImage->GetFilename();
207 
208  LOG(VB_GENERAL, LOG_DEBUG, QString("Text to Parse: %1").arg(text));
209 
210  QDomElement root = document.documentElement();
211  QDomElement channel = root.firstChildElement ("channel");
212  if (!channel.isNull())
213  {
214  Parse parser;
215  if (title.isEmpty())
216  title = channel.firstChildElement("title").text().trimmed();
217  if (description.isEmpty())
218  description = channel.firstChildElement("description").text();
219  if (author.isEmpty())
220  author = Parse::GetAuthor(channel);
221  if (author.isEmpty())
222  author = channel.firstChildElement("managingEditor").text();
223  if (author.isEmpty())
224  author = channel.firstChildElement("webMaster").text();
225 
226  QString thumbnailURL =
227  channel.firstChildElement("image").attribute("url");
228  if (thumbnailURL.isEmpty())
229  {
230  QDomElement thumbElem = channel.firstChildElement("image");
231  if (!thumbElem.isNull())
232  thumbnailURL = thumbElem.firstChildElement("url").text();
233  }
234  if (thumbnailURL.isEmpty())
235  {
236  QDomNodeList nodes = channel.elementsByTagNameNS(
237  "http://www.itunes.com/dtds/podcast-1.0.dtd",
238  "image");
239  if (nodes.size())
240  {
241  thumbnailURL =
242  nodes.at(0).toElement().attributeNode("href").value();
243  if (thumbnailURL.isEmpty())
244  thumbnailURL = nodes.at(0).toElement().text();
245  }
246  }
247 
248  bool download = m_download->GetCheckState() == MythUIStateType::Full;
249  QString filename("");
250 
251  if (!file.isEmpty())
252  filename = file;
253  else if (!thumbnailURL.isEmpty())
254  filename = thumbnailURL;
255 
256  QString link = m_urlEdit->GetText();
257 
258  std::shared_ptr<MythSortHelper>sh = getMythSortHelper();
259  RSSSite site(title, sh->doTitle(title), filename, VIDEO_PODCAST, description, link,
260  author, download, MythDate::current());
261  if (insertInDB(&site))
262  emit Saving();
263  }
264 
265  Close();
266 }
267 
269 {
270  SelectImagePopup(GetConfDir() + "/MythNetvision" + "/sitecovers", *this,
271  CEID_NEWIMAGE);
272 }
273 
275  QObject &inst, const QString &returnEvent)
276 {
277  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
278 
279  auto *fb = new MythUIFileBrowser(popupStack, prefix);
280  fb->SetNameFilter(GetSupportedImageExtensionFilter());
281  if (fb->Create())
282  {
283  fb->SetReturnEvent(&inst, returnEvent);
284  popupStack->AddScreen(fb);
285  }
286  else
287  delete fb;
288 }
289 
290 void RSSEditPopup::customEvent(QEvent *levent)
291 {
292  if (levent->type() == DialogCompletionEvent::kEventType)
293  {
294  auto *dce = dynamic_cast<DialogCompletionEvent*>(levent);
295  if ((dce != nullptr) && (dce->GetId() == CEID_NEWIMAGE))
296  {
297  m_thumbImage->SetFilename(dce->GetResultText());
298  m_thumbImage->Load();
299  m_thumbImage->Show();
300  }
301  }
302 }
303 
305 {
306  QMutexLocker locker(&m_lock);
307 
308  if (m_changed)
309  emit ItemsChanged();
310 }
311 
313 {
314  QMutexLocker locker(&m_lock);
315 
316  // Load the theme for this screen
317  bool foundtheme = LoadWindowFromXML("netvision-ui.xml", "rsseditor", this);
318 
319  if (!foundtheme)
320  return false;
321 
322  bool err = false;
323  UIUtilE::Assign(this, m_sites, "sites", &err);
324  UIUtilE::Assign(this, m_new, "new", &err);
325  UIUtilE::Assign(this, m_delete, "delete", &err);
326  UIUtilE::Assign(this, m_edit, "edit", &err);
327 
328  UIUtilW::Assign(this, m_image, "preview");
329  UIUtilW::Assign(this, m_title, "title");
330  UIUtilW::Assign(this, m_desc, "description");
331  UIUtilW::Assign(this, m_url, "url");
332  UIUtilW::Assign(this, m_author, "author");
333 
334  if (err)
335  {
336  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'rsseditor'");
337  return false;
338  }
339 
341  this, &RSSEditor::SlotEditSite);
342 
345  connect(m_edit, &MythUIButton::Clicked,
346  this, &RSSEditor::SlotEditSite);
347  connect(m_new, &MythUIButton::Clicked,
348  this, &RSSEditor::SlotNewSite);
349 
352 
353  BuildFocusList();
354 
355  LoadData();
356 
357  if (m_sites->GetCount() == 0)
359  else
360  SlotItemChanged();
361 
362  return true;
363 }
364 
366 {
367  qDeleteAll(m_siteList);
370  if (m_sites->GetCount() == 0)
371  {
372  m_edit->SetVisible(false);
373  m_delete->SetVisible(false);
374  m_sites->SetVisible(false);
375  }
376  else
377  {
378  m_edit->SetVisible(true);
379  m_delete->SetVisible(true);
380  m_sites->SetVisible(true);
381  }
382 }
383 
384 bool RSSEditor::keyPressEvent(QKeyEvent *event)
385 {
386  if (GetFocusWidget()->keyPressEvent(event))
387  return true;
388 
389  QStringList actions;
390  bool handled = GetMythMainWindow()->TranslateKeyPress("Internet Video",
391  event, actions);
392 
393  for (int i = 0; i < actions.size() && !handled; i++)
394  {
395  QString action = actions[i];
396  handled = true;
397 
398  if (action == "DELETE" && GetFocusWidget() == m_sites)
399  {
400  SlotDeleteSite();
401  }
402  else if (action == "EDIT" && GetFocusWidget() == m_sites)
403  {
404  SlotEditSite();
405  }
406  else
407  handled = false;
408  }
409 
410 
411  if (!handled && MythScreenType::keyPressEvent(event))
412  handled = true;
413 
414  return handled;
415 }
416 
418 {
419  QMutexLocker locker(&m_lock);
420 
421  m_sites->Reset();
422 
423  for (const auto & site : qAsConst(m_siteList))
424  {
425  auto *item = new MythUIButtonListItem(m_sites, site->GetTitle());
426  item->SetText(site->GetTitle(), "title");
427  item->SetText(site->GetDescription(), "description");
428  item->SetText(site->GetURL(), "url");
429  item->SetText(site->GetAuthor(), "author");
430  item->SetData(QVariant::fromValue(site));
431  item->SetImage(site->GetImage());
432  }
433 }
434 
436 {
437  auto *site = m_sites->GetItemCurrent()->GetData().value<RSSSite*>();
438  if (site)
439  {
440  if (m_image)
441  {
442  const QString& thumb = site->GetImage();
443 
444  m_image->Reset();
445 
446  if (!thumb.isEmpty())
447  {
448  m_image->SetFilename(thumb);
449  m_image->Load();
450  }
451  }
452  if (m_title)
453  m_title->SetText(site->GetTitle());
454  if (m_desc)
455  m_desc->SetText(site->GetDescription());
456  if (m_url)
457  m_url->SetText(site->GetURL());
458  if (m_author)
459  m_author->SetText(site->GetAuthor());
460  }
461 }
462 
464 {
465  QMutexLocker locker(&m_lock);
466 
467  QString message =
468  tr("Are you sure you want to unsubscribe from this feed?");
469 
470  MythScreenStack *m_popupStack =
471  GetMythMainWindow()->GetStack("popup stack");
472 
473  auto *confirmdialog = new MythConfirmationDialog(m_popupStack,message);
474 
475  if (confirmdialog->Create())
476  {
477  m_popupStack->AddScreen(confirmdialog);
478 
479  connect(confirmdialog, &MythConfirmationDialog::haveResult,
480  this, &RSSEditor::DoDeleteSite);
481  }
482  else
483  delete confirmdialog;
484 }
485 
487 {
488  QMutexLocker locker(&m_lock);
489 
491 
492  auto *site = m_sites->GetItemCurrent()->GetData().value<RSSSite*>();
493  if (site)
494  {
495  auto *rsseditpopup =
496  new RSSEditPopup(site->GetURL(), true, mainStack, "rsseditpopup");
497 
498  if (rsseditpopup->Create())
499  {
500  connect(rsseditpopup, &RSSEditPopup::Saving, this, &RSSEditor::ListChanged);
501 
502  mainStack->AddScreen(rsseditpopup);
503  }
504  else
505  delete rsseditpopup;
506  }
507 }
508 
510 {
511  QMutexLocker locker(&m_lock);
512 
514 
515  auto *rsseditpopup = new RSSEditPopup("", false, mainStack, "rsseditpopup");
516 
517  if (rsseditpopup->Create())
518  {
519  connect(rsseditpopup, &RSSEditPopup::Saving, this, &RSSEditor::ListChanged);
520 
521  mainStack->AddScreen(rsseditpopup);
522  }
523  else
524  delete rsseditpopup;
525 }
526 
527 void RSSEditor::DoDeleteSite(bool remove)
528 {
529  QMutexLocker locker(&m_lock);
530 
531  if (!remove)
532  return;
533 
534  auto *site = m_sites->GetItemCurrent()->GetData().value<RSSSite*>();
535 
536  if (removeFromDB(site))
537  ListChanged();
538 }
539 
541 {
542  m_changed = true;
543  LoadData();
544 }
MythUIButton::Clicked
void Clicked()
RSSEditor::ItemsChanged
void ItemsChanged(void)
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:318
MythUITextEdit::SetMaxLength
void SetMaxLength(int length)
Definition: mythuitextedit.cpp:192
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1587
RSSEditPopup::customEvent
void customEvent(QEvent *levent) override
Definition: rsseditor.cpp:290
mythuitext.h
RSSEditPopup::DoFileBrowser
void DoFileBrowser(void)
Definition: rsseditor.cpp:268
insertInDB
bool insertInDB(RSSSite *site)
Definition: netutils.cpp:643
RSSSite::GetDownload
const bool & GetDownload() const
Definition: rssmanager.h:66
getMythSortHelper
std::shared_ptr< MythSortHelper > getMythSortHelper(void)
Get a pointer to the MythSortHelper singleton.
Definition: mythsorthelper.cpp:133
RSSEditPopup::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: rsseditor.cpp:118
RSSEditPopup::Saving
void Saving(void)
RSSEditPopup::Create
bool Create(void) override
Definition: rsseditor.cpp:58
RSSEditor::m_lock
QRecursiveMutex m_lock
Definition: rsseditor.h:105
RSSEditPopup::SelectImagePopup
static void SelectImagePopup(const QString &prefix, QObject &inst, const QString &returnEvent)
Definition: rsseditor.cpp:274
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:386
RSSEditPopup::m_thumbButton
MythUIButton * m_thumbButton
Definition: rsseditor.h:60
MythUIImage::Load
bool Load(bool allowLoadInBackground=true, bool forceStat=false)
Load the image(s), wraps ImageLoader::LoadImage()
Definition: mythuiimage.cpp:966
MythUIButtonList::itemSelected
void itemSelected(MythUIButtonListItem *item)
rssparse.h
RSSEditor::SlotItemChanged
void SlotItemChanged()
Definition: rsseditor.cpp:435
RSSEditPopup::SlotCheckRedirect
void SlotCheckRedirect(QNetworkReply *reply)
Definition: rsseditor.cpp:174
RSSEditor::m_image
MythUIImage * m_image
Definition: rsseditor.h:115
MythConfirmationDialog::haveResult
void haveResult(bool)
mythdialogbox.h
MythScreenStack
Definition: mythscreenstack.h:16
mythdbcon.h
RSSSite::GetDescription
const QString & GetDescription() const
Definition: rssmanager.h:63
RSSEditor::SlotDeleteSite
void SlotDeleteSite(void)
Definition: rsseditor.cpp:463
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
RSSEditor::m_new
MythUIButton * m_new
Definition: rsseditor.h:111
build_compdb.parser
parser
Definition: build_compdb.py:7
MythUITextEdit::GetText
QString GetText(void) const
Definition: mythuitextedit.h:50
build_compdb.file
file
Definition: build_compdb.py:55
RSSEditPopup::m_descEdit
MythUITextEdit * m_descEdit
Definition: rsseditor.h:63
mythdirs.h
mythsorthelper.h
MythUIImage::Reset
void Reset(void) override
Reset the image back to the default defined in the theme.
Definition: mythuiimage.cpp:643
rsseditor.h
RSSEditPopup::m_download
MythUICheckBox * m_download
Definition: rsseditor.h:69
mythuibuttonlist.h
hardwareprofile.distros.mythtv_data.data_mythtv.prefix
string prefix
Definition: data_mythtv.py:40
mythuiimage.h
MythUIButtonList::GetCount
int GetCount() const
Definition: mythuibuttonlist.cpp:1652
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:14
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:113
RSSEditPopup::m_cancelButton
MythUIButton * m_cancelButton
Definition: rsseditor.h:67
Parse
Definition: rssparse.h:188
RSSEditor::m_edit
MythUIButton * m_edit
Definition: rsseditor.h:113
RSSEditor::m_delete
MythUIButton * m_delete
Definition: rsseditor.h:112
MythUIButtonListItem
Definition: mythuibuttonlist.h:41
MythUITextEdit::SetText
void SetText(const QString &text, bool moveCursor=true)
Definition: mythuitextedit.cpp:197
mythdate.h
MythUIType::Show
void Show(void)
Definition: mythuitype.cpp:1147
GetConfDir
QString GetConfDir(void)
Definition: mythdirs.cpp:256
RSSEditPopup::m_manager
QNetworkAccessManager * m_manager
Definition: rsseditor.h:71
RSSEditPopup::~RSSEditPopup
~RSSEditPopup() override
Definition: rsseditor.cpp:48
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
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:118
removeFromDB
bool removeFromDB(RSSSite *site)
Definition: netutils.cpp:686
RSSEditPopup::SlotSave
void SlotSave(QNetworkReply *reply)
Definition: rsseditor.cpp:196
RSSEditPopup::m_editing
bool m_editing
Definition: rsseditor.h:57
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:206
RSSEditPopup
Site name, URL and icon edit screen.
Definition: rsseditor.h:30
netutils.h
RSSEditor::SlotNewSite
void SlotNewSite(void)
Definition: rsseditor.cpp:509
mythuifilebrowser.h
RSSEditPopup::m_titleEdit
MythUITextEdit * m_titleEdit
Definition: rsseditor.h:62
MythUIStateType::Full
@ Full
Definition: mythuistatetype.h:25
RSSEditor::Create
bool Create(void) override
Definition: rsseditor.cpp:312
MythUIButtonListItem::GetData
QVariant GetData()
Definition: mythuibuttonlist.cpp:3665
RSSEditor::m_desc
MythUIText * m_desc
Definition: rsseditor.h:118
RSSSite::GetAuthor
const QString & GetAuthor() const
Definition: rssmanager.h:65
MythUIFileBrowser
Definition: mythuifilebrowser.h:76
UIUtilDisp::Assign
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
Definition: mythuiutils.h:27
RSSEditPopup::m_thumbImage
MythUIImage * m_thumbImage
Definition: rsseditor.h:59
RSSEditor::m_changed
bool m_changed
Definition: rsseditor.h:107
RSSEditPopup::m_urlEdit
MythUITextEdit * m_urlEdit
Definition: rsseditor.h:61
RSSEditPopup::redirectUrl
static QUrl redirectUrl(const QUrl &possibleRedirectUrl, const QUrl &oldRedirectUrl)
Definition: rsseditor.cpp:165
RSSEditPopup::ParseAndSave
void ParseAndSave(void)
Definition: rsseditor.cpp:133
RSSEditor::m_url
MythUIText * m_url
Definition: rsseditor.h:117
RSSEditor::ListChanged
void ListChanged(void)
Definition: rsseditor.cpp:540
findAllDBRSS
RSSSite::rssList findAllDBRSS()
Definition: netutils.cpp:610
RSSEditor::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: rsseditor.cpp:384
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythscreentype.cpp:404
RSSSite::GetImage
const QString & GetImage() const
Definition: rssmanager.h:61
MythConfirmationDialog
Dialog asking for user confirmation. Ok and optional Cancel button.
Definition: mythdialogbox.h:272
Parse::GetAuthor
static QString GetAuthor(const QDomElement &parent)
Definition: rssparse.cpp:977
mythuitextedit.h
MythUICheckBox::SetCheckState
void SetCheckState(MythUIStateType::StateType state)
Definition: mythuicheckbox.cpp:66
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:695
RSSEditor::fillRSSButtonList
void fillRSSButtonList()
Definition: rsseditor.cpp:417
RSSEditPopup::m_site
RSSSite * m_site
Definition: rsseditor.h:55
RSSEditPopup::m_okButton
MythUIButton * m_okButton
Definition: rsseditor.h:66
RSSEditor::m_title
MythUIText * m_title
Definition: rsseditor.h:116
RSSSite::GetTitle
const QString & GetTitle() const
Definition: rssmanager.h:59
RSSEditor::LoadData
void LoadData(void)
Definition: rsseditor.cpp:365
findByURL
RSSSite * findByURL(const QString &url, ArticleType type)
Definition: netutils.cpp:542
DialogCompletionEvent
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
Definition: mythdialogbox.h:41
RSSEditor::m_sites
MythUIButtonList * m_sites
Definition: rsseditor.h:110
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
DialogCompletionEvent::kEventType
static const Type kEventType
Definition: mythdialogbox.h:57
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
VIDEO_PODCAST
@ VIDEO_PODCAST
Definition: rssparse.h:22
RSSEditor::SlotEditSite
void SlotEditSite(void)
Definition: rsseditor.cpp:486
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:104
build_compdb.action
action
Definition: build_compdb.py:9
RSSEditor::m_author
MythUIText * m_author
Definition: rsseditor.h:119
mythuibutton.h
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &Stackname)
Definition: mythmainwindow.cpp:323
RSSEditPopup::m_urlText
QString m_urlText
Definition: rsseditor.h:56
MythUIImage::GetFilename
QString GetFilename(void)
Definition: mythuiimage.h:108
RSSEditor::~RSSEditor
~RSSEditor() override
Definition: rsseditor.cpp:304
RSSEditPopup::m_reply
QNetworkReply * m_reply
Definition: rsseditor.h:72
mythuicheckbox.h
RSSEditPopup::m_authorEdit
MythUITextEdit * m_authorEdit
Definition: rsseditor.h:64
MythUIImage::SetFilename
void SetFilename(const QString &filename)
Must be followed by a call to Load() to load the image.
Definition: mythuiimage.cpp:674
MythUICheckBox::GetCheckState
MythUIStateType::StateType GetCheckState() const
Definition: mythuicheckbox.cpp:98
mythdownloadmanager.h
RSSEditor::m_siteList
RSSSite::rssList m_siteList
Definition: rsseditor.h:109
build_compdb.filename
filename
Definition: build_compdb.py:21
mythmainwindow.h
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:52
RSSSite
Definition: rssmanager.h:25
RSSEditor::DoDeleteSite
void DoDeleteSite(bool remove)
Definition: rsseditor.cpp:527