MythTV  master
streamview.h
Go to the documentation of this file.
1 #ifndef STREAMVIEW_H_
2 #define STREAMVIEW_H_
3 
4 // qt
5 #include <QEvent>
6 #include <QVector>
7 #include <QTimer>
8 
9 // myth
10 #include <mythscreentype.h>
11 
12 // mythmusic
13 #include <musiccommon.h>
14 
15 class MythUIWebBrowser;
16 class MythUIText;
17 class MythUIProgressBar;
18 
19 class StreamView : public MusicCommon
20 {
21  Q_OBJECT
22 
23  public:
24  StreamView(MythScreenStack *parent, MythScreenType *parentScreen);
25  ~StreamView(void) override = default;
26 
27  bool Create(void) override; // MythScreenType
28  bool keyPressEvent(QKeyEvent *event) override; // MusicCommon
29 
30  void addStream(MusicMetadata *mdata);
31  void deleteStream(MusicMetadata *mdata);
32  void updateStream(MusicMetadata *mdata);
33 
34  void ShowMenu(void) override; // MusicCommon
35 
36  protected:
37  void customEvent(QEvent *event) override; // MusicCommon
38  void updateStreamList(void);
39  void editStream(void);
40  void removeStream(void);
41 
42  private slots:
44  static void streamItemVisible(MythUIButtonListItem *item);
45  void doRemoveStream(bool ok);
46 
47  private:
49  MythUIText *m_noStreams {nullptr};
52 
55 };
56 
58 {
59  Q_OBJECT
60 
61  public:
63  MusicMetadata *mdata = nullptr)
64  : MythScreenType(parentStack, "editstreampopup"),
65  m_parent(parent), m_streamMeta(mdata) {}
66 
67  bool Create() override; // MythScreenType
69 
70  private slots:
71  void searchClicked(void);
72  void saveClicked(void);
73 
74  private:
75  StreamView *m_parent {nullptr};
76 
78 
92 
96 };
97 
99 {
100  Q_OBJECT
101 
102  public:
104  : MythScreenType(parentStack, "searchstream"), m_parent(parent) {}
105 
106  bool Create() override; // MythScreenType
107 
108  private slots:
109  void doneLoading(void);
110  void updateStreams(void);
111  void doUpdateStreams(void);
113  static void streamVisible(MythUIButtonListItem *item);
114 
115  private:
116  void Load(void) override; // MythScreenType
117  static void loadStreams(void);
118  void updateBroadcasters(void);
119  void updateGenres(void);
120  void updateCountries(void);
121  void updateLanguages(void);
122 
124  QList<MusicMetadata> m_streams;
125  QStringList m_broadcasters;
126  QStringList m_genres;
127 
129  QString m_oldGenre;
130  QString m_oldChannel;
131  QString m_oldCountry;
132  QString m_oldLanguage;
133 
141 
143  bool m_updating {false};
144 };
145 #endif
StreamView::streamItemClicked
void streamItemClicked(MythUIButtonListItem *item)
Definition: streamview.cpp:491
SearchStream::m_oldLanguage
QString m_oldLanguage
Definition: streamview.h:132
StreamView::~StreamView
~StreamView(void) override=default
StreamView::updateStreamList
void updateStreamList(void)
Definition: streamview.cpp:428
StreamView::m_bufferStatus
MythUIText * m_bufferStatus
Definition: streamview.h:50
EditStreamMetadata::m_searchButton
MythUIButton * m_searchButton
Definition: streamview.h:93
SearchStream::doneLoading
void doneLoading(void)
Definition: streamview.cpp:843
EditStreamMetadata::searchClicked
void searchClicked(void)
Definition: streamview.cpp:710
StreamView::Create
bool Create(void) override
Definition: streamview.cpp:41
SearchStream::m_oldCountry
QString m_oldCountry
Definition: streamview.h:131
StreamView::ShowMenu
void ShowMenu(void) override
Definition: streamview.cpp:79
SearchStream::doUpdateStreams
void doUpdateStreams(void)
Definition: streamview.cpp:994
SearchStream
Definition: streamview.h:99
SearchStream::m_genreList
MythUIButtonList * m_genreList
Definition: streamview.h:135
SearchStream::m_oldBroadcaster
QString m_oldBroadcaster
Definition: streamview.h:128
EditStreamMetadata::m_url3Edit
MythUITextEdit * m_url3Edit
Definition: streamview.h:84
SearchStream::updateLanguages
void updateLanguages(void)
Definition: streamview.cpp:959
MythScreenStack
Definition: mythscreenstack.h:16
MythUITextEdit
A text entry and edit widget.
Definition: mythuitextedit.h:33
StreamView::doRemoveStream
void doRemoveStream(bool ok)
Definition: streamview.cpp:413
slots
unsigned int slots[4]
Definition: element.cpp:38
EditStreamMetadata::m_logourlEdit
MythUITextEdit * m_logourlEdit
Definition: streamview.h:87
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
SearchStream::m_updating
bool m_updating
Definition: streamview.h:143
StreamView::m_bufferProgress
MythUIProgressBar * m_bufferProgress
Definition: streamview.h:51
MusicMetadata
Definition: musicmetadata.h:81
EditStreamMetadata::m_url5Edit
MythUITextEdit * m_url5Edit
Definition: streamview.h:86
SearchStream::updateGenres
void updateGenres(void)
Definition: streamview.cpp:908
SearchStream::streamClicked
void streamClicked(MythUIButtonListItem *item)
Definition: streamview.cpp:852
StreamView::updateStream
void updateStream(MusicMetadata *mdata)
Definition: streamview.cpp:553
EditStreamMetadata::Create
bool Create() override
Definition: streamview.cpp:653
SearchStream::updateCountries
void updateCountries(void)
Definition: streamview.cpp:932
EditStreamMetadata::saveClicked
void saveClicked(void)
Definition: streamview.cpp:722
MythUIButtonListItem
Definition: mythuibuttonlist.h:28
SearchStream::m_countryList
MythUIButtonList * m_countryList
Definition: streamview.h:136
SearchStream::Create
bool Create() override
Definition: streamview.cpp:778
StreamView::m_streamList
MythUIButtonList * m_streamList
Definition: streamview.h:48
EditStreamMetadata::m_formatEdit
MythUITextEdit * m_formatEdit
Definition: streamview.h:88
EditStreamMetadata::m_cancelButton
MythUIButton * m_cancelButton
Definition: streamview.h:94
EditStreamMetadata::m_broadcasterEdit
MythUITextEdit * m_broadcasterEdit
Definition: streamview.h:79
EditStreamMetadata::EditStreamMetadata
EditStreamMetadata(MythScreenStack *parentStack, StreamView *parent, MusicMetadata *mdata=nullptr)
Definition: streamview.h:62
StreamView
Definition: streamview.h:20
MythUIProgressBar
Progress bar widget.
Definition: mythuiprogressbar.h:13
EditStreamMetadata::m_channelEdit
MythUITextEdit * m_channelEdit
Definition: streamview.h:80
StreamView::m_currStream
MusicMetadata * m_currStream
Definition: streamview.h:53
SearchStream::m_channelEdit
MythUITextEdit * m_channelEdit
Definition: streamview.h:138
SearchStream::m_broadcasterList
MythUIButtonList * m_broadcasterList
Definition: streamview.h:134
StreamView::m_lastStream
MusicMetadata * m_lastStream
Definition: streamview.h:54
StreamView::deleteStream
void deleteStream(MusicMetadata *mdata)
Definition: streamview.cpp:625
StreamView::streamItemVisible
static void streamItemVisible(MythUIButtonListItem *item)
Definition: streamview.cpp:499
MythUIButton
A single button widget.
Definition: mythuibutton.h:22
StreamView::addStream
void addStream(MusicMetadata *mdata)
Definition: streamview.cpp:519
SearchStream::m_streamList
MythUIButtonList * m_streamList
Definition: streamview.h:139
SearchStream::m_matchesText
MythUIText * m_matchesText
Definition: streamview.h:140
EditStreamMetadata::m_streamMeta
MusicMetadata * m_streamMeta
Definition: streamview.h:77
EditStreamMetadata::m_descEdit
MythUITextEdit * m_descEdit
Definition: streamview.h:81
EditStreamMetadata::m_languageEdit
MythUITextEdit * m_languageEdit
Definition: streamview.h:91
musiccommon.h
EditStreamMetadata::m_genreEdit
MythUITextEdit * m_genreEdit
Definition: streamview.h:89
SearchStream::updateStreams
void updateStreams(void)
Definition: streamview.cpp:986
SearchStream::updateBroadcasters
void updateBroadcasters(void)
Definition: streamview.cpp:884
SearchStream::m_languageList
MythUIButtonList * m_languageList
Definition: streamview.h:137
SearchStream::m_broadcasters
QStringList m_broadcasters
Definition: streamview.h:125
StreamView::m_noStreams
MythUIText * m_noStreams
Definition: streamview.h:49
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:29
EditStreamMetadata::changeStreamMetadata
void changeStreamMetadata(MusicMetadata *mdata)
Definition: streamview.cpp:756
StreamView::removeStream
void removeStream(void)
Definition: streamview.cpp:396
SearchStream::m_oldGenre
QString m_oldGenre
Definition: streamview.h:129
SearchStream::m_parent
EditStreamMetadata * m_parent
Definition: streamview.h:123
SearchStream::m_updateTimer
QTimer m_updateTimer
Definition: streamview.h:142
EditStreamMetadata::m_saveButton
MythUIButton * m_saveButton
Definition: streamview.h:95
StreamView::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: streamview.cpp:338
EditStreamMetadata
Definition: streamview.h:58
SearchStream::SearchStream
SearchStream(MythScreenStack *parentStack, EditStreamMetadata *parent)
Definition: streamview.h:103
SearchStream::Load
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
Definition: streamview.cpp:837
SearchStream::streamVisible
static void streamVisible(MythUIButtonListItem *item)
Definition: streamview.cpp:863
SearchStream::loadStreams
static void loadStreams(void)
Definition: streamview.cpp:879
SearchStream::m_streams
QList< MusicMetadata > m_streams
Definition: streamview.h:124
EditStreamMetadata::m_countryEdit
MythUITextEdit * m_countryEdit
Definition: streamview.h:90
MythUIWebBrowser
Web browsing widget.
Definition: mythuiwebbrowser.h:133
SearchStream::m_genres
QStringList m_genres
Definition: streamview.h:126
StreamView::editStream
void editStream(void)
Definition: streamview.cpp:380
EditStreamMetadata::m_url2Edit
MythUITextEdit * m_url2Edit
Definition: streamview.h:83
StreamView::StreamView
StreamView(MythScreenStack *parent, MythScreenType *parentScreen)
Definition: streamview.cpp:35
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition: mythuibuttonlist.h:144
EditStreamMetadata::m_url1Edit
MythUITextEdit * m_url1Edit
Definition: streamview.h:82
SearchStream::m_oldChannel
QString m_oldChannel
Definition: streamview.h:130
EditStreamMetadata::m_url4Edit
MythUITextEdit * m_url4Edit
Definition: streamview.h:85
StreamView::customEvent
void customEvent(QEvent *event) override
Definition: streamview.cpp:105
mythscreentype.h
EditStreamMetadata::m_parent
StreamView * m_parent
Definition: streamview.h:75
MusicCommon
Definition: musiccommon.h:48