MythTV  master
neteditorbase.h
Go to the documentation of this file.
1 #ifndef NETEDITORBASE_H
2 #define NETEDITORBASE_H
3 
4 // Qt headers
5 #include <QString>
6 #include <QDomDocument>
7 #include <QNetworkRequest>
8 #include <QNetworkReply>
9 #include <QNetworkAccessManager>
10 
11 // MythTV headers
12 #include <mythscreentype.h>
13 #include <netgrabbermanager.h>
14 #include <mythscreentype.h>
15 #include <mythprogressdialog.h>
16 
17 class MythUIButtonList;
18 
23 {
24  Q_OBJECT
25 
26  public:
27  NetEditorBase(MythScreenStack *parent, const QString &name);
28  ~NetEditorBase() override;
29 
30  bool Create(void) override; // MythScreenType
31  bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
32 
33  private:
34  void LoadData(void);
35  void FillGrabberButtonList();
36  void ParsedData();
37 
42 
43  QNetworkAccessManager *m_manager {nullptr};
44  QNetworkReply *m_reply {nullptr};
45  bool m_changed {false};
46 
47  protected:
48  void CreateBusyDialog(const QString& title);
49 
50  virtual bool InsertInDB(GrabberScript *script) = 0;
51  virtual bool RemoveFromDB(GrabberScript *script) = 0;
52  virtual bool FindGrabberInDB(const QString &filename) = 0;
53  virtual bool Matches(bool search, bool tree) = 0;
54 
55  signals:
56  void ItemsChanged(void);
57 
58  public slots:
59  void SlotLoadedData(void);
60  void ToggleItem(MythUIButtonListItem *item);
61 };
62 
63 #endif /* NETEDITORBASE_H */
NetEditorBase::m_manager
QNetworkAccessManager * m_manager
Definition: neteditorbase.h:43
NetEditorBase::m_busyPopup
MythUIBusyDialog * m_busyPopup
Definition: neteditorbase.h:40
NetEditorBase::RemoveFromDB
virtual bool RemoveFromDB(GrabberScript *script)=0
NetEditorBase::FillGrabberButtonList
void FillGrabberButtonList()
Definition: neteditorbase.cpp:192
NetEditorBase::~NetEditorBase
~NetEditorBase() override
Definition: neteditorbase.cpp:31
NetEditorBase::Matches
virtual bool Matches(bool search, bool tree)=0
NetEditorBase::FindGrabberInDB
virtual bool FindGrabberInDB(const QString &filename)=0
title
QString title
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:633
NetEditorBase::m_popupStack
MythScreenStack * m_popupStack
Definition: neteditorbase.h:41
MythScreenStack
Definition: mythscreenstack.h:16
NetEditorBase::InsertInDB
virtual bool InsertInDB(GrabberScript *script)=0
slots
unsigned int slots[4]
Definition: element.cpp:38
NetEditorBase::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: neteditorbase.cpp:88
NetEditorBase::SlotLoadedData
void SlotLoadedData(void)
Definition: neteditorbase.cpp:103
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
mythprogressdialog.h
GrabberScript::scriptList
QList< GrabberScript * > scriptList
Definition: netgrabbermanager.h:46
MythUIButtonListItem
Definition: mythuibuttonlist.h:28
NetEditorBase::NetEditorBase
NetEditorBase(MythScreenStack *parent, const QString &name)
Creates a new NetEditorBase Screen.
Definition: neteditorbase.cpp:24
NetEditorBase::ParsedData
void ParsedData()
Definition: neteditorbase.cpp:162
NetEditorBase::CreateBusyDialog
void CreateBusyDialog(const QString &title)
Definition: neteditorbase.cpp:173
NetEditorBase::m_grabbers
MythUIButtonList * m_grabbers
Definition: neteditorbase.h:39
netgrabbermanager.h
NetEditorBase::ToggleItem
void ToggleItem(MythUIButtonListItem *item)
Definition: neteditorbase.cpp:222
NetEditorBase::m_changed
bool m_changed
Definition: neteditorbase.h:45
filename
QString filename
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:634
NetEditorBase::ItemsChanged
void ItemsChanged(void)
GrabberScript
Definition: netgrabbermanager.h:17
MythUIBusyDialog
Definition: mythprogressdialog.h:37
NetEditorBase::m_grabberList
GrabberScript::scriptList m_grabberList
Definition: neteditorbase.h:38
NetEditorBase::m_reply
QNetworkReply * m_reply
Definition: neteditorbase.h:44
NetEditorBase::LoadData
void LoadData(void)
Definition: neteditorbase.cpp:74
NetEditorBase
Definition: neteditorbase.h:23
NetEditorBase::Create
bool Create(void) override
Definition: neteditorbase.cpp:47
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition: mythuibuttonlist.h:144
mythscreentype.h