MythTV  master
rsseditor.cpp
Go to the documentation of this file.
1 #include <QDomDocument>
2 #include <QDateTime>
3 #include <QImageReader>
4 
5 // MythTV headers
6 #include <mythuibutton.h>
7 #include <mythuibuttonlist.h>
8 #include <mythuitextedit.h>
9 #include <mythuicheckbox.h>
10 #include <mythuifilebrowser.h>
11 #include <mythmainwindow.h>
12 #include <mythdialogbox.h>
13 #include <mythuiimage.h>
14 #include <mythuitext.h>
15 #include <mythdate.h>
16 #include <mythcontext.h>
17 #include <mythdbcon.h>
18 #include <mythdirs.h>
19 #include <netutils.h>
20 #include <rssparse.h>
21 #include <mythdownloadmanager.h>
22 #include <mythsorthelper.h>
23 
24 // RSS headers
25 #include "rsseditor.h"
26 
27 #define LOC QString("RSSEditor: ")
28 #define LOC_WARN QString("RSSEditor, Warning: ")
29 #define LOC_ERR QString("RSSEditor, Error: ")
30 
31 namespace
32 {
33  const QString CEID_NEWIMAGE = "image";
34 
35  QStringList GetSupportedImageExtensionFilter()
36  {
37  QStringList ret;
38 
39  QList<QByteArray> exts = QImageReader::supportedImageFormats();
40  for (const auto & ext : qAsConst(exts))
41  ret.append(QString("*.").append(ext));
42 
43  return ret;
44  }
45 }
46 
48 {
49  if (m_manager)
50  {
51  m_manager->disconnect();
52  m_manager->deleteLater();
53  m_manager = nullptr;
54  }
55 }
56 
58 {
59  // Load the theme for this screen
60  bool foundtheme =
61  LoadWindowFromXML("netvision-ui.xml", "rsseditpopup", this);
62 
63  if (!foundtheme)
64  return false;
65 
66  bool err = false;
67  UIUtilE::Assign(this, m_urlEdit, "url", &err);
68  UIUtilE::Assign(this, m_titleEdit, "title", &err);
69  UIUtilE::Assign(this, m_descEdit, "description", &err);
70  UIUtilE::Assign(this, m_authorEdit, "author", &err);
71  UIUtilE::Assign(this, m_download, "download", &err);
72  UIUtilE::Assign(this, m_okButton, "ok", &err);
73  UIUtilE::Assign(this, m_cancelButton, "cancel", &err);
74  UIUtilE::Assign(this, m_thumbButton, "preview_browse", &err);
75  UIUtilE::Assign(this, m_thumbImage, "preview", &err);
76 
77  if (err)
78  {
79  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'rsseditpopup'");
80  return false;
81  }
82 
83  connect(m_okButton, SIGNAL(Clicked()), this, SLOT(ParseAndSave()));
84  connect(m_cancelButton, SIGNAL(Clicked()), this, SLOT(Close()));
85  connect(m_thumbButton, SIGNAL(Clicked()), this, SLOT(DoFileBrowser()));
86 
91 
92  if (m_editing)
93  {
95 
100 
101  QString thumb = m_site->GetImage();
102  if (!thumb.isEmpty())
103  {
104  m_thumbImage->SetFilename(thumb);
105  m_thumbImage->Load();
106  }
107 
108  if (m_site->GetDownload())
110  }
111 
112  BuildFocusList();
113 
114  return true;
115 }
116 
117 bool RSSEditPopup::keyPressEvent(QKeyEvent *event)
118 {
119  if (GetFocusWidget()->keyPressEvent(event))
120  return true;
121 
122  QStringList actions;
123  bool handled = GetMythMainWindow()->TranslateKeyPress("Internet Video",
124  event, actions);
125 
126  if (!handled && MythScreenType::keyPressEvent(event))
127  handled = true;
128 
129  return handled;
130 }
131 
133 {
134  if (m_editing)
135  {
136  QString title = m_titleEdit->GetText();
137  QString desc = m_descEdit->GetText();
138  QString author = m_authorEdit->GetText();
139  QString link = m_urlEdit->GetText();
140  QString filename = m_thumbImage->GetFilename();
141  bool download = m_download->GetCheckState() == MythUIStateType::Full;
142 
144 
145  std::shared_ptr<MythSortHelper>sh = getMythSortHelper();
146  RSSSite site(title, sh->doTitle(title), filename, VIDEO_PODCAST,
147  desc, link, author, download, MythDate::current());
148  if (insertInDB(&site))
149  emit Saving();
150  Close();
151  }
152  else
153  {
154  m_manager = new QNetworkAccessManager();
155  QUrl qurl(m_urlEdit->GetText());
156 
157  m_reply = m_manager->get(QNetworkRequest(qurl));
158 
159  connect(m_manager, SIGNAL(finished(QNetworkReply*)), this,
160  SLOT(SlotCheckRedirect(QNetworkReply*)));
161  }
162 }
163 
164 QUrl RSSEditPopup::redirectUrl(const QUrl& possibleRedirectUrl,
165  const QUrl& oldRedirectUrl)
166 {
167  QUrl redirectUrl;
168  if(!possibleRedirectUrl.isEmpty() && possibleRedirectUrl != oldRedirectUrl)
169  redirectUrl = possibleRedirectUrl;
170  return redirectUrl;
171 }
172 
173 void RSSEditPopup::SlotCheckRedirect(QNetworkReply* reply)
174 {
175  QVariant possibleRedirectUrl =
176  reply->attribute(QNetworkRequest::RedirectionTargetAttribute);
177 
178  QUrl urlRedirectedTo;
179  urlRedirectedTo = redirectUrl(
180  possibleRedirectUrl.toUrl(), urlRedirectedTo);
181 
182  if (!urlRedirectedTo.isEmpty())
183  {
184  m_urlEdit->SetText(urlRedirectedTo.toString());
185  m_manager->get(QNetworkRequest(urlRedirectedTo));
186  }
187  else
188  {
189 // urlRedirectedTo.clear();
190  SlotSave(reply);
191  }
192  reply->deleteLater();
193 }
194 
195 void RSSEditPopup::SlotSave(QNetworkReply* reply)
196 {
197  QDomDocument document;
198  document.setContent(reply->read(reply->bytesAvailable()), true);
199 
200  QString text = document.toString();
201 
202  QString title = m_titleEdit->GetText();
203  QString description = m_descEdit->GetText();
204  QString author = m_authorEdit->GetText();
205  QString file = m_thumbImage->GetFilename();
206 
207  LOG(VB_GENERAL, LOG_DEBUG, QString("Text to Parse: %1").arg(text));
208 
209  QDomElement root = document.documentElement();
210  QDomElement channel = root.firstChildElement ("channel");
211  if (!channel.isNull())
212  {
213  Parse parser;
214  if (title.isEmpty())
215  title = channel.firstChildElement("title").text().trimmed();
216  if (description.isEmpty())
217  description = channel.firstChildElement("description").text();
218  if (author.isEmpty())
219  author = Parse::GetAuthor(channel);
220  if (author.isEmpty())
221  author = channel.firstChildElement("managingEditor").text();
222  if (author.isEmpty())
223  author = channel.firstChildElement("webMaster").text();
224 
225  QString thumbnailURL =
226  channel.firstChildElement("image").attribute("url");
227  if (thumbnailURL.isEmpty())
228  {
229  QDomElement thumbElem = channel.firstChildElement("image");
230  if (!thumbElem.isNull())
231  thumbnailURL = thumbElem.firstChildElement("url").text();
232  }
233  if (thumbnailURL.isEmpty())
234  {
235  QDomNodeList nodes = channel.elementsByTagNameNS(
236  "http://www.itunes.com/dtds/podcast-1.0.dtd",
237  "image");
238  if (nodes.size())
239  {
240  thumbnailURL =
241  nodes.at(0).toElement().attributeNode("href").value();
242  if (thumbnailURL.isEmpty())
243  thumbnailURL = nodes.at(0).toElement().text();
244  }
245  }
246 
247  bool download = m_download->GetCheckState() == MythUIStateType::Full;
248  QDateTime updated = MythDate::current();
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 
340  connect(m_sites, SIGNAL(itemClicked(MythUIButtonListItem*)),
341  this, SLOT(SlotEditSite(void)));
342 
343  connect(m_delete, SIGNAL(Clicked(void)),
344  SLOT(SlotDeleteSite(void)));
345  connect(m_edit, SIGNAL(Clicked(void)),
346  SLOT(SlotEditSite(void)));
347  connect(m_new, SIGNAL(Clicked(void)),
348  SLOT(SlotNewSite(void)));
349 
350  connect(m_sites, SIGNAL(itemSelected(MythUIButtonListItem *)),
351  SLOT(SlotItemChanged(void)));
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, SIGNAL(haveResult(bool)),
480  SLOT(DoDeleteSite(bool)));
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, SIGNAL(Saving()), this, SLOT(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, SIGNAL(Saving()), this, SLOT(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 }
RSSEditor::ItemsChanged
void ItemsChanged(void)
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:304
MythUITextEdit::SetMaxLength
void SetMaxLength(int length)
Definition: mythuitextedit.cpp:211
channel
QDomElement channel
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:498
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1590
RSSEditPopup::customEvent
void customEvent(QEvent *levent) override
Definition: rsseditor.cpp:290
root
QDomElement root
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:653
mythuitext.h
RSSEditPopup::DoFileBrowser
void DoFileBrowser(void)
Definition: rsseditor.cpp:268
insertInDB
bool insertInDB(RSSSite *site)
Definition: netutils.cpp:644
RSSSite::GetDownload
const bool & GetDownload() const
Definition: mythrssmanager.h:60
getMythSortHelper
std::shared_ptr< MythSortHelper > getMythSortHelper(void)
Get a pointer to the MythSortHelper singleton.
Definition: mythsorthelper.cpp:126
RSSEditPopup::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: rsseditor.cpp:117
RSSEditPopup::Saving
void Saving(void)
RSSEditPopup::Create
bool Create(void) override
Definition: rsseditor.cpp:57
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:402
RSSEditPopup::m_thumbButton
MythUIButton * m_thumbButton
Definition: rsseditor.h:57
title
QString title
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:633
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:1106
MythUIImage::Load
bool Load(bool allowLoadInBackground=true, bool forceStat=false)
Load the image(s), wraps ImageLoader::LoadImage()
Definition: mythuiimage.cpp:967
DialogCompletionEvent::kEventType
static Type kEventType
Definition: mythdialogbox.h:57
rssparse.h
RSSEditor::SlotItemChanged
void SlotItemChanged()
Definition: rsseditor.cpp:435
RSSEditPopup::SlotCheckRedirect
void SlotCheckRedirect(QNetworkReply *reply)
Definition: rsseditor.cpp:173
RSSEditor::m_image
MythUIImage * m_image
Definition: rsseditor.h:108
mythdialogbox.h
MythScreenStack
Definition: mythscreenstack.h:15
arg
arg(title).arg(filename).arg(doDelete))
mythdbcon.h
RSSSite::GetDescription
const QString & GetDescription() const
Definition: mythrssmanager.h:57
RSSEditor::SlotDeleteSite
void SlotDeleteSite(void)
Definition: rsseditor.cpp:463
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
RSSEditor::m_new
MythUIButton * m_new
Definition: rsseditor.h:104
build_compdb.parser
parser
Definition: build_compdb.py:7
MythUITextEdit::GetText
QString GetText(void) const
Definition: mythuitextedit.h:47
build_compdb.file
file
Definition: build_compdb.py:55
RSSEditPopup::m_descEdit
MythUITextEdit * m_descEdit
Definition: rsseditor.h:60
mythdirs.h
mythsorthelper.h
MythUIImage::Reset
void Reset(void) override
Reset the image back to the default defined in the theme.
Definition: mythuiimage.cpp:644
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &stackname)
Definition: mythmainwindow.cpp:309
rsseditor.h
RSSEditPopup::m_download
MythUICheckBox * m_download
Definition: rsseditor.h:66
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:1655
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:10
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:112
RSSEditPopup::m_cancelButton
MythUIButton * m_cancelButton
Definition: rsseditor.h:64
Parse
Definition: rssparse.h:188
RSSEditor::m_edit
MythUIButton * m_edit
Definition: rsseditor.h:106
RSSEditor::m_delete
MythUIButton * m_delete
Definition: rsseditor.h:105
MythUIButtonListItem
Definition: mythuibuttonlist.h:27
MythUITextEdit::SetText
void SetText(const QString &text, bool moveCursor=true)
Definition: mythuitextedit.cpp:216
mythdate.h
MythUIType::Show
void Show(void)
Definition: mythuitype.cpp:1118
GetConfDir
QString GetConfDir(void)
Definition: mythdirs.cpp:224
RSSEditPopup::m_manager
QNetworkAccessManager * m_manager
Definition: rsseditor.h:68
RSSEditPopup::~RSSEditPopup
~RSSEditPopup() override
Definition: rsseditor.cpp:47
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:117
removeFromDB
bool removeFromDB(RSSSite *site)
Definition: netutils.cpp:686
RSSEditPopup::SlotSave
void SlotSave(QNetworkReply *reply)
Definition: rsseditor.cpp:195
RSSEditPopup::m_editing
bool m_editing
Definition: rsseditor.h:54
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:222
RSSEditPopup
Site name, URL and icon edit screen.
Definition: rsseditor.h:27
netutils.h
RSSEditor::SlotNewSite
void SlotNewSite(void)
Definition: rsseditor.cpp:509
filename
QString filename
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:634
mythuifilebrowser.h
RSSEditPopup::m_titleEdit
MythUITextEdit * m_titleEdit
Definition: rsseditor.h:59
MythUIStateType::Full
@ Full
Definition: mythuistatetype.h:25
RSSEditor::Create
bool Create(void) override
Definition: rsseditor.cpp:312
MythUIButtonListItem::GetData
QVariant GetData()
Definition: mythuibuttonlist.cpp:3588
RSSEditor::m_desc
MythUIText * m_desc
Definition: rsseditor.h:111
RSSSite::GetAuthor
const QString & GetAuthor() const
Definition: mythrssmanager.h:59
MythUIFileBrowser
Definition: mythuifilebrowser.h:80
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:56
RSSEditor::m_changed
bool m_changed
Definition: rsseditor.h:100
RSSEditPopup::m_urlEdit
MythUITextEdit * m_urlEdit
Definition: rsseditor.h:58
RSSEditPopup::redirectUrl
static QUrl redirectUrl(const QUrl &possibleRedirectUrl, const QUrl &oldRedirectUrl)
Definition: rsseditor.cpp:164
RSSEditPopup::ParseAndSave
void ParseAndSave(void)
Definition: rsseditor.cpp:132
RSSEditor::m_url
MythUIText * m_url
Definition: rsseditor.h:110
RSSEditor::ListChanged
void ListChanged(void)
Definition: rsseditor.cpp:540
findAllDBRSS
RSSSite::rssList findAllDBRSS()
Definition: netutils.cpp:611
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:414
RSSSite::GetImage
const QString & GetImage() const
Definition: mythrssmanager.h:55
MythConfirmationDialog
Dialog asking for user confirmation. Ok and optional Cancel button.
Definition: mythdialogbox.h:221
Parse::GetAuthor
static QString GetAuthor(const QDomElement &parent)
Definition: rssparse.cpp:974
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:692
RSSEditor::fillRSSButtonList
void fillRSSButtonList()
Definition: rsseditor.cpp:417
RSSEditPopup::m_site
RSSSite * m_site
Definition: rsseditor.h:52
RSSEditPopup::m_okButton
MythUIButton * m_okButton
Definition: rsseditor.h:63
RSSEditor::m_title
MythUIText * m_title
Definition: rsseditor.h:109
RSSSite::GetTitle
const QString & GetTitle() const
Definition: mythrssmanager.h:53
RSSEditor::LoadData
void LoadData(void)
Definition: rsseditor.cpp:365
findByURL
RSSSite * findByURL(const QString &url, ArticleType type)
Definition: netutils.cpp:543
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:103
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:135
MythUIType::SetVisible
virtual void SetVisible(bool visible)
Definition: mythuitype.cpp:1080
mythcontext.h
MythUIButtonList::Reset
void Reset() override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuibuttonlist.cpp:113
VIDEO_PODCAST
@ VIDEO_PODCAST
Definition: rssparse.h:22
RSSEditor::SlotEditSite
void SlotEditSite(void)
Definition: rsseditor.cpp:486
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:107
build_compdb.action
action
Definition: build_compdb.py:9
RSSEditor::m_author
MythUIText * m_author
Definition: rsseditor.h:112
mythuibutton.h
RSSEditPopup::m_urlText
QString m_urlText
Definition: rsseditor.h:53
RSSEditor::m_lock
QMutex m_lock
Definition: rsseditor.h:99
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:69
mythuicheckbox.h
RSSEditPopup::m_authorEdit
MythUITextEdit * m_authorEdit
Definition: rsseditor.h:61
MythUIImage::SetFilename
void SetFilename(const QString &filename)
Must be followed by a call to Load() to load the image.
Definition: mythuiimage.cpp:675
MythUICheckBox::GetCheckState
MythUIStateType::StateType GetCheckState() const
Definition: mythuicheckbox.cpp:98
mythdownloadmanager.h
RSSEditor::m_siteList
RSSSite::rssList m_siteList
Definition: rsseditor.h:102
mythmainwindow.h
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:49
RSSSite
Definition: mythrssmanager.h:19
RSSEditor::DoDeleteSite
void DoDeleteSite(bool remove)
Definition: rsseditor.cpp:527