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 
37  {
38  QStringList ret;
39 
40  QList<QByteArray> exts = QImageReader::supportedImageFormats();
41  for (const auto & ext : std::as_const(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 #if QT_VERSION < QT_VERSION_CHECK(6,5,0)
200  document.setContent(reply->read(reply->bytesAvailable()), true);
201 #else
202  document.setContent(reply->read(reply->bytesAvailable()),
203  QDomDocument::ParseOption::UseNamespaceProcessing);
204 #endif
205 
206  QString text = document.toString();
207 
208  QString title = m_titleEdit->GetText();
209  QString description = m_descEdit->GetText();
210  QString author = m_authorEdit->GetText();
211  QString file = m_thumbImage->GetFilename();
212 
213  LOG(VB_GENERAL, LOG_DEBUG, QString("Text to Parse: %1").arg(text));
214 
215  QDomElement root = document.documentElement();
216  QDomElement channel = root.firstChildElement ("channel");
217  if (!channel.isNull())
218  {
219  Parse parser;
220  if (title.isEmpty())
221  title = channel.firstChildElement("title").text().trimmed();
222  if (description.isEmpty())
223  description = channel.firstChildElement("description").text();
224  if (author.isEmpty())
225  author = Parse::GetAuthor(channel);
226  if (author.isEmpty())
227  author = channel.firstChildElement("managingEditor").text();
228  if (author.isEmpty())
229  author = channel.firstChildElement("webMaster").text();
230 
231  QString thumbnailURL =
232  channel.firstChildElement("image").attribute("url");
233  if (thumbnailURL.isEmpty())
234  {
235  QDomElement thumbElem = channel.firstChildElement("image");
236  if (!thumbElem.isNull())
237  thumbnailURL = thumbElem.firstChildElement("url").text();
238  }
239  if (thumbnailURL.isEmpty())
240  {
241  QDomNodeList nodes = channel.elementsByTagNameNS(
242  "http://www.itunes.com/dtds/podcast-1.0.dtd",
243  "image");
244  if (nodes.size())
245  {
246  thumbnailURL =
247  nodes.at(0).toElement().attributeNode("href").value();
248  if (thumbnailURL.isEmpty())
249  thumbnailURL = nodes.at(0).toElement().text();
250  }
251  }
252 
253  bool download = m_download->GetCheckState() == MythUIStateType::Full;
254  QString filename("");
255 
256  if (!file.isEmpty())
257  filename = file;
258  else if (!thumbnailURL.isEmpty())
259  filename = thumbnailURL;
260 
261  QString link = m_urlEdit->GetText();
262 
263  std::shared_ptr<MythSortHelper>sh = getMythSortHelper();
264  RSSSite site(title, sh->doTitle(title), filename, VIDEO_PODCAST, description, link,
265  author, download, MythDate::current());
266  if (insertInDB(&site))
267  emit Saving();
268  }
269 
270  Close();
271 }
272 
274 {
275  SelectImagePopup(GetConfDir() + "/MythNetvision" + "/sitecovers", *this,
276  CEID_NEWIMAGE);
277 }
278 
280  QObject &inst, const QString &returnEvent)
281 {
282  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
283 
284  auto *fb = new MythUIFileBrowser(popupStack, prefix);
285  fb->SetNameFilter(GetSupportedImageExtensionFilter());
286  if (fb->Create())
287  {
288  fb->SetReturnEvent(&inst, returnEvent);
289  popupStack->AddScreen(fb);
290  }
291  else
292  {
293  delete fb;
294  }
295 }
296 
297 void RSSEditPopup::customEvent(QEvent *levent)
298 {
299  if (levent->type() == DialogCompletionEvent::kEventType)
300  {
301  auto *dce = dynamic_cast<DialogCompletionEvent*>(levent);
302  if ((dce != nullptr) && (dce->GetId() == CEID_NEWIMAGE))
303  {
304  m_thumbImage->SetFilename(dce->GetResultText());
305  m_thumbImage->Load();
306  m_thumbImage->Show();
307  }
308  }
309 }
310 
312 {
313  QMutexLocker locker(&m_lock);
314 
315  if (m_changed)
316  emit ItemsChanged();
317 }
318 
320 {
321  QMutexLocker locker(&m_lock);
322 
323  // Load the theme for this screen
324  bool foundtheme = LoadWindowFromXML("netvision-ui.xml", "rsseditor", this);
325 
326  if (!foundtheme)
327  return false;
328 
329  bool err = false;
330  UIUtilE::Assign(this, m_sites, "sites", &err);
331  UIUtilE::Assign(this, m_new, "new", &err);
332  UIUtilE::Assign(this, m_delete, "delete", &err);
333  UIUtilE::Assign(this, m_edit, "edit", &err);
334 
335  UIUtilW::Assign(this, m_image, "preview");
336  UIUtilW::Assign(this, m_title, "title");
337  UIUtilW::Assign(this, m_desc, "description");
338  UIUtilW::Assign(this, m_url, "url");
339  UIUtilW::Assign(this, m_author, "author");
340 
341  if (err)
342  {
343  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'rsseditor'");
344  return false;
345  }
346 
348  this, &RSSEditor::SlotEditSite);
349 
352  connect(m_edit, &MythUIButton::Clicked,
353  this, &RSSEditor::SlotEditSite);
354  connect(m_new, &MythUIButton::Clicked,
355  this, &RSSEditor::SlotNewSite);
356 
359 
360  BuildFocusList();
361 
362  LoadData();
363 
364  if (m_sites->GetCount() == 0)
366  else
367  SlotItemChanged();
368 
369  return true;
370 }
371 
373 {
374  qDeleteAll(m_siteList);
377  if (m_sites->GetCount() == 0)
378  {
379  m_edit->SetVisible(false);
380  m_delete->SetVisible(false);
381  m_sites->SetVisible(false);
382  }
383  else
384  {
385  m_edit->SetVisible(true);
386  m_delete->SetVisible(true);
387  m_sites->SetVisible(true);
388  }
389 }
390 
391 bool RSSEditor::keyPressEvent(QKeyEvent *event)
392 {
393  if (GetFocusWidget()->keyPressEvent(event))
394  return true;
395 
396  QStringList actions;
397  bool handled = GetMythMainWindow()->TranslateKeyPress("Internet Video",
398  event, actions);
399 
400  for (int i = 0; i < actions.size() && !handled; i++)
401  {
402  const QString& action = actions[i];
403  handled = true;
404 
405  if (action == "DELETE" && GetFocusWidget() == m_sites)
406  {
407  SlotDeleteSite();
408  }
409  else if (action == "EDIT" && GetFocusWidget() == m_sites)
410  {
411  SlotEditSite();
412  }
413  else
414  {
415  handled = false;
416  }
417  }
418 
419 
420  if (!handled && MythScreenType::keyPressEvent(event))
421  handled = true;
422 
423  return handled;
424 }
425 
427 {
428  QMutexLocker locker(&m_lock);
429 
430  m_sites->Reset();
431 
432  for (const auto & site : std::as_const(m_siteList))
433  {
434  auto *item = new MythUIButtonListItem(m_sites, site->GetTitle());
435  item->SetText(site->GetTitle(), "title");
436  item->SetText(site->GetDescription(), "description");
437  item->SetText(site->GetURL(), "url");
438  item->SetText(site->GetAuthor(), "author");
439  item->SetData(QVariant::fromValue(site));
440  item->SetImage(site->GetImage());
441  }
442 }
443 
445 {
446  auto *site = m_sites->GetItemCurrent()->GetData().value<RSSSite*>();
447  if (site)
448  {
449  if (m_image)
450  {
451  const QString& thumb = site->GetImage();
452 
453  m_image->Reset();
454 
455  if (!thumb.isEmpty())
456  {
457  m_image->SetFilename(thumb);
458  m_image->Load();
459  }
460  }
461  if (m_title)
462  m_title->SetText(site->GetTitle());
463  if (m_desc)
464  m_desc->SetText(site->GetDescription());
465  if (m_url)
466  m_url->SetText(site->GetURL());
467  if (m_author)
468  m_author->SetText(site->GetAuthor());
469  }
470 }
471 
473 {
474  QMutexLocker locker(&m_lock);
475 
476  QString message =
477  tr("Are you sure you want to unsubscribe from this feed?");
478 
479  MythScreenStack *m_popupStack =
480  GetMythMainWindow()->GetStack("popup stack");
481 
482  auto *confirmdialog = new MythConfirmationDialog(m_popupStack,message);
483 
484  if (confirmdialog->Create())
485  {
486  m_popupStack->AddScreen(confirmdialog);
487 
488  connect(confirmdialog, &MythConfirmationDialog::haveResult,
489  this, &RSSEditor::DoDeleteSite);
490  }
491  else
492  {
493  delete confirmdialog;
494  }
495 }
496 
498 {
499  QMutexLocker locker(&m_lock);
500 
502 
503  auto *site = m_sites->GetItemCurrent()->GetData().value<RSSSite*>();
504  if (site)
505  {
506  auto *rsseditpopup =
507  new RSSEditPopup(site->GetURL(), true, mainStack, "rsseditpopup");
508 
509  if (rsseditpopup->Create())
510  {
511  connect(rsseditpopup, &RSSEditPopup::Saving, this, &RSSEditor::ListChanged);
512 
513  mainStack->AddScreen(rsseditpopup);
514  }
515  else
516  {
517  delete rsseditpopup;
518  }
519  }
520 }
521 
523 {
524  QMutexLocker locker(&m_lock);
525 
527 
528  auto *rsseditpopup = new RSSEditPopup("", false, mainStack, "rsseditpopup");
529 
530  if (rsseditpopup->Create())
531  {
532  connect(rsseditpopup, &RSSEditPopup::Saving, this, &RSSEditor::ListChanged);
533 
534  mainStack->AddScreen(rsseditpopup);
535  }
536  else
537  {
538  delete rsseditpopup;
539  }
540 }
541 
542 void RSSEditor::DoDeleteSite(bool remove)
543 {
544  QMutexLocker locker(&m_lock);
545 
546  if (!remove)
547  return;
548 
549  auto *site = m_sites->GetItemCurrent()->GetData().value<RSSSite*>();
550 
551  if (removeFromDB(site))
552  ListChanged();
553 }
554 
556 {
557  m_changed = true;
558  LoadData();
559 }
MythUIButton::Clicked
void Clicked()
RSSEditor::ItemsChanged
void ItemsChanged(void)
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:317
MythUITextEdit::SetMaxLength
void SetMaxLength(int length)
Definition: mythuitextedit.cpp:193
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1614
RSSEditPopup::customEvent
void customEvent(QEvent *levent) override
Definition: rsseditor.cpp:297
mythuitext.h
RSSEditPopup::DoFileBrowser
void DoFileBrowser(void)
Definition: rsseditor.cpp:273
insertInDB
bool insertInDB(RSSSite *site)
Definition: netutils.cpp:643
RSSSite::GetDownload
const bool & GetDownload() const
Definition: rssmanager.h:62
getMythSortHelper
std::shared_ptr< MythSortHelper > getMythSortHelper(void)
Get a pointer to the MythSortHelper singleton.
Definition: mythsorthelper.cpp:129
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:98
RSSEditPopup::SelectImagePopup
static void SelectImagePopup(const QString &prefix, QObject &inst, const QString &returnEvent)
Definition: rsseditor.cpp:279
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:383
RSSEditPopup::m_thumbButton
MythUIButton * m_thumbButton
Definition: rsseditor.h:56
MythUIImage::Load
bool Load(bool allowLoadInBackground=true, bool forceStat=false)
Load the image(s), wraps ImageLoader::LoadImage()
Definition: mythuiimage.cpp:971
MythUIButtonList::itemSelected
void itemSelected(MythUIButtonListItem *item)
rssparse.h
RSSEditor::SlotItemChanged
void SlotItemChanged()
Definition: rsseditor.cpp:444
RSSEditPopup::SlotCheckRedirect
void SlotCheckRedirect(QNetworkReply *reply)
Definition: rsseditor.cpp:174
RSSEditor::m_image
MythUIImage * m_image
Definition: rsseditor.h:107
MythConfirmationDialog::haveResult
void haveResult(bool)
mythdialogbox.h
MythScreenStack
Definition: mythscreenstack.h:16
mythdbcon.h
RSSSite::GetDescription
const QString & GetDescription() const
Definition: rssmanager.h:59
RSSEditor::SlotDeleteSite
void SlotDeleteSite(void)
Definition: rsseditor.cpp:472
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
RSSEditor::m_new
MythUIButton * m_new
Definition: rsseditor.h:103
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:59
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
anonymous_namespace{rsseditor.cpp}::GetSupportedImageExtensionFilter
QStringList GetSupportedImageExtensionFilter()
Definition: rsseditor.cpp:36
rsseditor.h
RSSEditPopup::m_download
MythUICheckBox * m_download
Definition: rsseditor.h:65
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:1679
anonymous_namespace{rsseditor.cpp}::CEID_NEWIMAGE
const QString CEID_NEWIMAGE
Definition: rsseditor.cpp:34
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:15
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:110
RSSEditPopup::m_cancelButton
MythUIButton * m_cancelButton
Definition: rsseditor.h:63
Parse
Definition: rssparse.h:188
RSSEditor::m_edit
MythUIButton * m_edit
Definition: rsseditor.h:105
RSSEditor::m_delete
MythUIButton * m_delete
Definition: rsseditor.h:104
MythUIButtonListItem
Definition: mythuibuttonlist.h:41
MythUITextEdit::SetText
void SetText(const QString &text, bool moveCursor=true)
Definition: mythuitextedit.cpp:198
mythdate.h
MythUIType::Show
void Show(void)
Definition: mythuitype.cpp:1144
MythSortHelper::doTitle
QString doTitle(const QString &title) const
Create the sortable form of an title string.
Definition: mythsorthelper.cpp:163
GetConfDir
QString GetConfDir(void)
Definition: mythdirs.cpp:263
RSSEditPopup::m_manager
QNetworkAccessManager * m_manager
Definition: rsseditor.h:67
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:115
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:53
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:203
RSSEditPopup
Site name, URL and icon edit screen.
Definition: rsseditor.h:26
netutils.h
RSSEditor::SlotNewSite
void SlotNewSite(void)
Definition: rsseditor.cpp:522
mythuifilebrowser.h
RSSEditPopup::m_titleEdit
MythUITextEdit * m_titleEdit
Definition: rsseditor.h:58
RSSEditor::Create
bool Create(void) override
Definition: rsseditor.cpp:319
MythUIButtonListItem::GetData
QVariant GetData()
Definition: mythuibuttonlist.cpp:3715
RSSEditor::m_desc
MythUIText * m_desc
Definition: rsseditor.h:110
RSSSite::GetAuthor
const QString & GetAuthor() const
Definition: rssmanager.h:61
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:55
RSSEditor::m_changed
bool m_changed
Definition: rsseditor.h:99
RSSEditPopup::m_urlEdit
MythUITextEdit * m_urlEdit
Definition: rsseditor.h:57
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:109
RSSEditor::ListChanged
void ListChanged(void)
Definition: rsseditor.cpp:555
VIDEO_PODCAST
@ VIDEO_PODCAST
Definition: rssparse.h:22
findAllDBRSS
RSSSite::rssList findAllDBRSS()
Definition: netutils.cpp:610
RSSEditor::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: rsseditor.cpp:391
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythscreentype.cpp:401
RSSSite::GetImage
const QString & GetImage() const
Definition: rssmanager.h:57
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:973
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:701
RSSEditor::fillRSSButtonList
void fillRSSButtonList()
Definition: rsseditor.cpp:426
RSSEditPopup::m_site
RSSSite * m_site
Definition: rsseditor.h:51
RSSEditPopup::m_okButton
MythUIButton * m_okButton
Definition: rsseditor.h:62
RSSEditor::m_title
MythUIText * m_title
Definition: rsseditor.h:108
RSSSite::GetTitle
const QString & GetTitle() const
Definition: rssmanager.h:55
RSSEditor::LoadData
void LoadData(void)
Definition: rsseditor.cpp:372
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:102
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
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
RSSEditor::SlotEditSite
void SlotEditSite(void)
Definition: rsseditor.cpp:497
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:111
mythuibutton.h
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &Stackname)
Definition: mythmainwindow.cpp:322
RSSEditPopup::m_urlText
QString m_urlText
Definition: rsseditor.h:52
MythUIImage::GetFilename
QString GetFilename(void)
Definition: mythuiimage.h:108
MythUIStateType::Full
@ Full
Definition: mythuistatetype.h:27
RSSEditor::~RSSEditor
~RSSEditor() override
Definition: rsseditor.cpp:311
RSSEditPopup::m_reply
QNetworkReply * m_reply
Definition: rsseditor.h:68
mythuicheckbox.h
RSSEditPopup::m_authorEdit
MythUITextEdit * m_authorEdit
Definition: rsseditor.h:60
MythUIImage::SetFilename
void SetFilename(const QString &filename)
Must be followed by a call to Load() to load the image.
Definition: mythuiimage.cpp:677
MythUICheckBox::GetCheckState
MythUIStateType::StateType GetCheckState() const
Definition: mythuicheckbox.cpp:98
mythdownloadmanager.h
RSSEditor::m_siteList
RSSSite::rssList m_siteList
Definition: rsseditor.h:101
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:21
RSSEditor::DoDeleteSite
void DoDeleteSite(bool remove)
Definition: rsseditor.cpp:542