MythTV
master
mythplugins
mythnetvision
mythnetvision
rsseditor.h
Go to the documentation of this file.
1
#ifndef RSSEDITOR_H
2
#define RSSEDITOR_H
3
4
#include <utility>
5
6
// Qt headers
7
#include <QDomDocument>
8
#include <QRecursiveMutex>
9
#include <QNetworkAccessManager>
10
#include <QNetworkReply>
11
#include <QNetworkRequest>
12
#include <QString>
13
14
// MythTV headers
15
#include <
libmythbase/rssmanager.h
>
16
#include <
libmythui/mythscreentype.h
>
17
18
class
MythUITextEdit
;
19
class
MythUIButton
;
20
class
MythUICheckBox
;
21
class
RSSSite
;
22
26
class
RSSEditPopup
:
public
MythScreenType
27
{
28
Q_OBJECT
29
30
public
:
38
RSSEditPopup
(QString url,
bool
edit,
MythScreenStack
*parent,
39
const
QString &name =
"RSSEditPopup"
)
40
:
MythScreenType
(parent, name),
41
m_urlText
(
std
::move(url)),
m_editing
(edit) {}
42
~RSSEditPopup
()
override
;
43
44
bool
Create
(
void
)
override
;
// MythScreenType
45
bool
keyPressEvent
(QKeyEvent *event)
override
;
// MythScreenType
46
47
private
:
48
static
QUrl
redirectUrl
(
const
QUrl& possibleRedirectUrl,
49
const
QUrl& oldRedirectUrl) ;
50
51
RSSSite
*
m_site
{
nullptr
};
52
QString
m_urlText
;
53
bool
m_editing
;
54
55
MythUIImage
*
m_thumbImage
{
nullptr
};
56
MythUIButton
*
m_thumbButton
{
nullptr
};
57
MythUITextEdit
*
m_urlEdit
{
nullptr
};
58
MythUITextEdit
*
m_titleEdit
{
nullptr
};
59
MythUITextEdit
*
m_descEdit
{
nullptr
};
60
MythUITextEdit
*
m_authorEdit
{
nullptr
};
61
62
MythUIButton
*
m_okButton
{
nullptr
};
63
MythUIButton
*
m_cancelButton
{
nullptr
};
64
65
MythUICheckBox
*
m_download
{
nullptr
};
66
67
QNetworkAccessManager *
m_manager
{
nullptr
};
68
QNetworkReply *
m_reply
{
nullptr
};
69
70
signals:
71
void
Saving
(
void
);
72
73
private
slots:
74
void
SlotCheckRedirect
(QNetworkReply* reply);
75
void
ParseAndSave
(
void
);
76
void
SlotSave
(QNetworkReply *reply);
77
void
DoFileBrowser
(
void
);
78
static
void
SelectImagePopup
(
const
QString &
prefix
,
79
QObject &inst,
80
const
QString &returnEvent);
81
void
customEvent
(QEvent *levent)
override
;
// MythUIType
82
};
83
84
class
RSSEditor
:
public
MythScreenType
85
{
86
Q_OBJECT
87
88
public
:
89
explicit
RSSEditor
(
MythScreenStack
*parent,
const
QString &name =
"RSSEditor"
)
90
:
MythScreenType
(parent, name) {}
91
~RSSEditor
()
override
;
92
93
bool
Create
(
void
)
override
;
// MythScreenType
94
bool
keyPressEvent
(QKeyEvent *event)
override
;
// MythScreenType
95
96
private
:
97
void
fillRSSButtonList
();
98
mutable
QRecursiveMutex
m_lock
;
99
bool
m_changed
{
false
};
100
101
RSSSite::rssList
m_siteList
;
102
MythUIButtonList
*
m_sites
{
nullptr
};
103
MythUIButton
*
m_new
{
nullptr
};
104
MythUIButton
*
m_delete
{
nullptr
};
105
MythUIButton
*
m_edit
{
nullptr
};
106
107
MythUIImage
*
m_image
{
nullptr
};
108
MythUIText
*
m_title
{
nullptr
};
109
MythUIText
*
m_url
{
nullptr
};
110
MythUIText
*
m_desc
{
nullptr
};
111
MythUIText
*
m_author
{
nullptr
};
112
113
signals:
114
void
ItemsChanged
(
void
);
115
116
public
slots:
117
void
SlotItemChanged
();
118
void
LoadData
(
void
);
119
120
void
SlotDeleteSite
(
void
);
121
void
DoDeleteSite
(
bool
remove);
122
void
SlotEditSite
(
void
);
123
void
SlotNewSite
(
void
);
124
void
ListChanged
(
void
);
125
};
126
127
#endif
/* RSSEDITOR_H */
MythScreenStack
Definition:
mythscreenstack.h:17
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition:
mythscreentype.h:46
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition:
mythuibuttonlist.h:193
MythUIButton
A single button widget.
Definition:
mythuibutton.h:22
MythUICheckBox
A checkbox widget supporting three check states - on,off,half and two conditions - selected and unsel...
Definition:
mythuicheckbox.h:16
MythUIImage
Image widget, displays a single image or multiple images in sequence.
Definition:
mythuiimage.h:98
MythUITextEdit
A text entry and edit widget.
Definition:
mythuitextedit.h:35
MythUIText
All purpose text widget, displays a text string.
Definition:
mythuitext.h:29
RSSEditPopup
Site name, URL and icon edit screen.
Definition:
rsseditor.h:27
RSSEditPopup::ParseAndSave
void ParseAndSave(void)
Definition:
rsseditor.cpp:133
RSSEditPopup::redirectUrl
static QUrl redirectUrl(const QUrl &possibleRedirectUrl, const QUrl &oldRedirectUrl)
Definition:
rsseditor.cpp:165
RSSEditPopup::m_site
RSSSite * m_site
Definition:
rsseditor.h:51
RSSEditPopup::m_thumbButton
MythUIButton * m_thumbButton
Definition:
rsseditor.h:56
RSSEditPopup::m_reply
QNetworkReply * m_reply
Definition:
rsseditor.h:68
RSSEditPopup::m_manager
QNetworkAccessManager * m_manager
Definition:
rsseditor.h:67
RSSEditPopup::~RSSEditPopup
~RSSEditPopup() override
Definition:
rsseditor.cpp:48
RSSEditPopup::Create
bool Create(void) override
Definition:
rsseditor.cpp:58
RSSEditPopup::m_cancelButton
MythUIButton * m_cancelButton
Definition:
rsseditor.h:63
RSSEditPopup::RSSEditPopup
RSSEditPopup(QString url, bool edit, MythScreenStack *parent, const QString &name="RSSEditPopup")
Creates a new RSS Edit Popup.
Definition:
rsseditor.h:38
RSSEditPopup::customEvent
void customEvent(QEvent *levent) override
Definition:
rsseditor.cpp:297
RSSEditPopup::m_urlText
QString m_urlText
Definition:
rsseditor.h:52
RSSEditPopup::Saving
void Saving(void)
RSSEditPopup::m_descEdit
MythUITextEdit * m_descEdit
Definition:
rsseditor.h:59
RSSEditPopup::m_download
MythUICheckBox * m_download
Definition:
rsseditor.h:65
RSSEditPopup::SelectImagePopup
static void SelectImagePopup(const QString &prefix, QObject &inst, const QString &returnEvent)
Definition:
rsseditor.cpp:279
RSSEditPopup::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition:
rsseditor.cpp:118
RSSEditPopup::m_editing
bool m_editing
Definition:
rsseditor.h:53
RSSEditPopup::SlotCheckRedirect
void SlotCheckRedirect(QNetworkReply *reply)
Definition:
rsseditor.cpp:174
RSSEditPopup::SlotSave
void SlotSave(QNetworkReply *reply)
Definition:
rsseditor.cpp:196
RSSEditPopup::m_thumbImage
MythUIImage * m_thumbImage
Definition:
rsseditor.h:55
RSSEditPopup::m_okButton
MythUIButton * m_okButton
Definition:
rsseditor.h:62
RSSEditPopup::DoFileBrowser
void DoFileBrowser(void)
Definition:
rsseditor.cpp:273
RSSEditPopup::m_urlEdit
MythUITextEdit * m_urlEdit
Definition:
rsseditor.h:57
RSSEditPopup::m_titleEdit
MythUITextEdit * m_titleEdit
Definition:
rsseditor.h:58
RSSEditPopup::m_authorEdit
MythUITextEdit * m_authorEdit
Definition:
rsseditor.h:60
RSSEditor
Definition:
rsseditor.h:85
RSSEditor::LoadData
void LoadData(void)
Definition:
rsseditor.cpp:372
RSSEditor::m_siteList
RSSSite::rssList m_siteList
Definition:
rsseditor.h:101
RSSEditor::Create
bool Create(void) override
Definition:
rsseditor.cpp:319
RSSEditor::m_image
MythUIImage * m_image
Definition:
rsseditor.h:107
RSSEditor::fillRSSButtonList
void fillRSSButtonList()
Definition:
rsseditor.cpp:426
RSSEditor::m_sites
MythUIButtonList * m_sites
Definition:
rsseditor.h:102
RSSEditor::m_new
MythUIButton * m_new
Definition:
rsseditor.h:103
RSSEditor::SlotItemChanged
void SlotItemChanged()
Definition:
rsseditor.cpp:444
RSSEditor::m_edit
MythUIButton * m_edit
Definition:
rsseditor.h:105
RSSEditor::m_lock
QRecursiveMutex m_lock
Definition:
rsseditor.h:98
RSSEditor::m_changed
bool m_changed
Definition:
rsseditor.h:99
RSSEditor::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition:
rsseditor.cpp:391
RSSEditor::m_desc
MythUIText * m_desc
Definition:
rsseditor.h:110
RSSEditor::m_delete
MythUIButton * m_delete
Definition:
rsseditor.h:104
RSSEditor::RSSEditor
RSSEditor(MythScreenStack *parent, const QString &name="RSSEditor")
Definition:
rsseditor.h:89
RSSEditor::SlotEditSite
void SlotEditSite(void)
Definition:
rsseditor.cpp:497
RSSEditor::SlotDeleteSite
void SlotDeleteSite(void)
Definition:
rsseditor.cpp:472
RSSEditor::m_author
MythUIText * m_author
Definition:
rsseditor.h:111
RSSEditor::ItemsChanged
void ItemsChanged(void)
RSSEditor::DoDeleteSite
void DoDeleteSite(bool remove)
Definition:
rsseditor.cpp:542
RSSEditor::m_url
MythUIText * m_url
Definition:
rsseditor.h:109
RSSEditor::~RSSEditor
~RSSEditor() override
Definition:
rsseditor.cpp:311
RSSEditor::m_title
MythUIText * m_title
Definition:
rsseditor.h:108
RSSEditor::SlotNewSite
void SlotNewSite(void)
Definition:
rsseditor.cpp:522
RSSEditor::ListChanged
void ListChanged(void)
Definition:
rsseditor.cpp:555
RSSSite
Definition:
rssmanager.h:22
RSSSite::rssList
QList< RSSSite * > rssList
Definition:
rssmanager.h:53
mythscreentype.h
hardwareprofile.distros.mythtv_data.data_mythtv.prefix
string prefix
Definition:
data_mythtv.py:37
std
STL namespace.
rssmanager.h
Generated on Sun Dec 14 2025 03:16:28 for MythTV by
1.9.4