MythTV  master
lyricsview.h
Go to the documentation of this file.
1 #ifndef LYRICSVIEW_H_
2 #define LYRICSVIEW_H_
3 
4 // qt
5 #include <QEvent>
6 #include <QVector>
7 
8 // myth
9 #include <mythscreentype.h>
10 #include <musicmetadata.h>
11 #include <lyricsdata.h>
12 
13 // mythmusic
14 #include <musiccommon.h>
15 
16 
17 class LyricsView : public MusicCommon
18 {
19  Q_OBJECT
20 
21  public:
22  LyricsView(MythScreenStack *parent, MythScreenType *parentScreen);
23  ~LyricsView(void) override;
24 
25  bool Create(void) override; // MythScreenType
26  bool keyPressEvent(QKeyEvent *event) override; // MusicCommon
27 
28  void ShowMenu(void) override; // MusicCommon
29 
30  protected:
31  void customEvent(QEvent *event) override; // MusicCommon
32 
33  private:
34  void findLyrics(const QString &grabber="ALL");
35  void showLyrics(void);
36  void saveLyrics(void);
37  void editLyrics(void);
38  void showMessage(const QString &message);
40 
41  private slots:
42  void setLyricTime(void);
43  void editFinished(bool result);
44  void lyricStatusChanged(LyricsData::Status status, const QString &message);
45 
46  private:
52 
53  LyricsData *m_lyricData {nullptr};
54 
55  bool m_autoScroll {true};
56 };
57 
59 {
60 
61  Q_OBJECT
62 
63  public:
64 
65  EditLyricsDialog(MythScreenStack *parent, LyricsData *sourceData);
66  ~EditLyricsDialog() override = default;
67 
68  bool Create(void) override; // MythScreenType
69  bool keyPressEvent(QKeyEvent *e) override; // MythScreenType
70 
71  signals:
72  void haveResult(bool ok);
73 
74  public slots:
75  void okPressed(void);
76  void cancelPressed(void);
77  void saveEdits(bool ok);
78  void syncronizedChanged(bool syncronized);
79 
80  private:
81  void loadLyrics(void);
82  bool somethingChanged(void);
83 
85 
94 };
95 
96 #endif
This widget is used for grouping other widgets for display when a particular named state is called.
MythUIButtonList * m_lyricsList
Definition: lyricsview.h:47
unsigned int slots[4]
Definition: element.c:38
void customEvent(QEvent *event) override
Definition: lyricsview.cpp:95
void lyricStatusChanged(LyricsData::Status status, const QString &message)
Definition: lyricsview.cpp:388
MythUIText * m_statusText
Definition: lyricsview.h:48
MythUIText * m_bufferStatus
Definition: lyricsview.h:50
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
A checkbox widget supporting three check states - on,off,half and two conditions - selected and unsel...
LyricsData * m_lyricData
Definition: lyricsview.h:53
MythUIButton * m_cancelButton
Definition: lyricsview.h:92
EditLyricsDialog(MythScreenStack *parent, LyricsData *sourceData)
Definition: lyricsview.cpp:493
bool somethingChanged(void)
Definition: lyricsview.cpp:589
MythUITextEdit * m_lyricsEdit
Definition: lyricsview.h:91
MythUICheckBox * m_syncronizedCheck
Definition: lyricsview.h:87
void haveResult(bool ok)
LyricsData * m_sourceData
Definition: lyricsview.h:84
void editFinished(bool result)
Definition: lyricsview.cpp:484
void loadLyrics(void)
Definition: lyricsview.cpp:564
MythUITextEdit * m_grabberEdit
Definition: lyricsview.h:86
MythUIStateType * m_loadingState
Definition: lyricsview.h:49
MythUITextEdit * m_artistEdit
Definition: lyricsview.h:89
MythMenu * createFindLyricsMenu(void)
Definition: lyricsview.cpp:257
void showLyrics(void)
Definition: lyricsview.cpp:439
void editLyrics(void)
Definition: lyricsview.cpp:469
A text entry and edit widget.
bool Create(void) override
Definition: lyricsview.cpp:500
void saveLyrics(void)
Definition: lyricsview.cpp:463
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: lyricsview.cpp:274
void saveEdits(bool ok)
Definition: lyricsview.cpp:644
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
void findLyrics(const QString &grabber="ALL")
Definition: lyricsview.cpp:351
bool Create(void) override
Definition: lyricsview.cpp:58
MythUITextEdit * m_albumEdit
Definition: lyricsview.h:90
A single button widget.
Definition: mythuibutton.h:21
void setLyricTime(void)
Definition: lyricsview.cpp:329
~LyricsView(void) override
Definition: lyricsview.cpp:47
LyricsView(MythScreenStack *parent, MythScreenType *parentScreen)
Definition: lyricsview.cpp:39
MythUIProgressBar * m_bufferProgress
Definition: lyricsview.h:51
void showMessage(const QString &message)
Definition: lyricsview.cpp:422
MythUIButton * m_okButton
Definition: lyricsview.h:93
MythUITextEdit * m_titleEdit
Definition: lyricsview.h:88
void okPressed(void)
Definition: lyricsview.cpp:619
void cancelPressed(void)
Definition: lyricsview.cpp:656
bool m_autoScroll
Definition: lyricsview.h:55
void ShowMenu(void) override
Definition: lyricsview.cpp:220
Screen in which all other widgets are contained and rendered.
void syncronizedChanged(bool syncronized)
Definition: lyricsview.cpp:582
Progress bar widget.
bool keyPressEvent(QKeyEvent *e) override
Key event handler.
Definition: lyricsview.cpp:540
~EditLyricsDialog() override=default