Sayonara Player
GUI_Lyrics.h
1 /* GUI_Lyrics.h */
2 
3 /* Copyright (C) 2011-2017 Lucio Carreras
4  *
5  * This file is part of sayonara player
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11 
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16 
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 
22 
23 #ifndef GUI_LYRICS_H
24 #define GUI_LYRICS_H
25 
26 #include <QWidget>
27 #include "Helper/Pimpl.h"
28 #include "GUI/Helper/SayonaraWidget/SayonaraWidget.h"
29 
30 class MetaData;
31 namespace Ui {
32  class GUI_Lyrics;
33 }
34 
35 class GUI_Lyrics :
36  public SayonaraWidget
37 {
38  Q_OBJECT
39 
40 signals:
41  void sig_closed();
42 
43 public:
44  explicit GUI_Lyrics(QWidget *parent = nullptr);
45  ~GUI_Lyrics();
46 
47  void set_metadata(const MetaData& md);
48 
49 private:
50  PIMPL(GUI_Lyrics)
51  Ui::GUI_Lyrics *ui=nullptr;
52 
53  void guess_artist_and_title(const MetaData& md);
54  void init();
55 
56  void zoom(qreal font_size);
57 
58 private slots:
59  void zoom_in();
60  void zoom_out();
61 
62  void lyrics_fetched();
63  void lyric_server_changed(int idx);
64 
65  void lyric_search_button_pressed();
66  void switch_pressed();
67  void prepare_lyrics();
68 
69  void language_changed() override;
70 
71 protected:
72  void showEvent(QShowEvent* e) override;
73  void wheelEvent(QWheelEvent* e) override;
74  void keyPressEvent(QKeyEvent* e) override;
75 };
76 
77 
78 #endif // GUI_LYRICS_H
Definition: ui_GUI_SomaFM.h:216
The MetaData class MetaDataHelper.
Definition: MetaData.h:55
Definition: GUI_Lyrics.h:35
Widget with Settings connection. Also contains triggers for language_changed() and skin_changed() wi...
Definition: SayonaraWidget.h:36
Definition: ui_GUI_Lyrics.h:213