MythTV  master
mythnewseditor.h
Go to the documentation of this file.
1 #ifndef MYTHNEWSEDITOR_H
2 #define MYTHNEWSEDITOR_H
3 
4 // Qt headers
5 #include <QtGlobal>
6 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
7 #include <QMutex>
8 #else
9 #include <QRecursiveMutex>
10 #endif
11 #include <QString>
12 
13 // MythTV headers
15 
16 class MythUIText;
17 class MythUITextEdit;
18 class MythUIButton;
19 class MythUICheckBox;
20 class NewsSite;
21 
26 {
27  Q_OBJECT
28 
29  public:
30  MythNewsEditor(NewsSite *site, bool edit, MythScreenStack *parent,
31  const QString &name = "MythNewsEditor");
32  ~MythNewsEditor() override;
33 
34  bool Create(void) override; // MythScreenType
35  bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
36 
37  private:
38 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
39  mutable QMutex m_lock {QMutex::Recursive};
40 #else
41  mutable QRecursiveMutex m_lock;
42 #endif
43  NewsSite *m_site {nullptr};
44  QString m_siteName;
45  bool m_editing;
46 
47  MythUIText *m_titleText {nullptr};
52 
56 
59 
61 
62  private slots:
63  void Save(void);
64 };
65 
66 #endif /* MYTHNEWSEDITOR_H */
MythNewsEditor::m_nameLabelText
MythUIText * m_nameLabelText
Definition: mythnewseditor.h:48
MythNewsEditor::m_iconLabelText
MythUIText * m_iconLabelText
Definition: mythnewseditor.h:50
MythNewsEditor
Definition: mythnewseditor.h:25
MythNewsEditor::m_titleText
MythUIText * m_titleText
Definition: mythnewseditor.h:47
MythNewsEditor::Create
bool Create(void) override
Definition: mythnewseditor.cpp:44
MythNewsEditor::m_iconEdit
MythUITextEdit * m_iconEdit
Definition: mythnewseditor.h:55
MythNewsEditor::MythNewsEditor
MythNewsEditor(NewsSite *site, bool edit, MythScreenStack *parent, const QString &name="MythNewsEditor")
Creates a new MythNewsEditor Screen.
Definition: mythnewseditor.cpp:29
MythScreenStack
Definition: mythscreenstack.h:16
MythUITextEdit
A text entry and edit widget.
Definition: mythuitextedit.h:34
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
MythNewsEditor::m_podcastCheck
MythUICheckBox * m_podcastCheck
Definition: mythnewseditor.h:60
MythNewsEditor::m_urlLabelText
MythUIText * m_urlLabelText
Definition: mythnewseditor.h:49
MythNewsEditor::m_lock
QRecursiveMutex m_lock
Definition: mythnewseditor.h:41
MythNewsEditor::m_okButton
MythUIButton * m_okButton
Definition: mythnewseditor.h:57
MythUIButton
A single button widget.
Definition: mythuibutton.h:21
MythNewsEditor::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythnewseditor.cpp:110
MythNewsEditor::Save
void Save(void)
Definition: mythnewseditor.cpp:124
MythNewsEditor::m_editing
bool m_editing
Definition: mythnewseditor.h:45
MythUICheckBox
A checkbox widget supporting three check states - on,off,half and two conditions - selected and unsel...
Definition: mythuicheckbox.h:15
NewsSite
Definition: newssite.h:54
MythNewsEditor::m_nameEdit
MythUITextEdit * m_nameEdit
Definition: mythnewseditor.h:53
MythNewsEditor::m_site
NewsSite * m_site
Definition: mythnewseditor.h:43
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
MythNewsEditor::m_siteName
QString m_siteName
Definition: mythnewseditor.h:44
MythNewsEditor::m_urlEdit
MythUITextEdit * m_urlEdit
Definition: mythnewseditor.h:54
MythNewsEditor::m_cancelButton
MythUIButton * m_cancelButton
Definition: mythnewseditor.h:58
MythNewsEditor::~MythNewsEditor
~MythNewsEditor() override
Definition: mythnewseditor.cpp:39
mythscreentype.h
MythNewsEditor::m_podcastLabelText
MythUIText * m_podcastLabelText
Definition: mythnewseditor.h:51