Sayonara Player
Lyrics.h
1 /* Lyrics.h */
2 
3 /* Copyright (C) 2011-2019 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 LYRICS_H
24 #define LYRICS_H
25 
26 #include "Utils/Pimpl.h"
27 
28 #include <QObject>
29 
30 class Lyrics :
31  public QObject
32 {
33  Q_OBJECT
34  PIMPL(Lyrics)
35 
36 signals:
37  void sig_lyrics_fetched();
38 
39 public:
40  explicit Lyrics(QObject* parent=nullptr);
41  ~Lyrics();
42 
43  QStringList servers() const;
44  void set_metadata(const MetaData& md);
45  bool fetch_lyrics(const QString& artist, const QString& title, int server_index);
46  bool save_lyrics(const QString& plain_text);
47 
48  QString artist() const;
49  QString title() const;
50  QString lyric_header() const;
51  QString local_lyric_header() const;
52  QString lyrics() const;
53  QString local_lyrics() const;
54 
55  bool is_lyric_valid() const;
56  bool is_lyric_tag_available() const;
57  bool is_lyric_tag_supported() const;
58 
59 private slots:
60  void lyrics_fetched();
61 
62 
63 };
64 
65 #endif // LYRICS_H
The MetaData class.
Definition: MetaData.h:44
Definition: Lyrics.h:30