Sayonara Player
Discnumber.h
1 /* Discnumber.h */
2 
3 /* Copyright (C) 2011-2016 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 #ifndef DISCNUMBER_H
22 #define DISCNUMBER_H
23 
24 #include "AbstractFrame.h"
25 
26 #include <QString>
27 #include <taglib/textidentificationframe.h>
28 
29 namespace ID3v2Frame
30 {
35  class Discnumber
36  {
37  public:
38 
39  quint8 disc;
40  quint8 n_discs;
41 
42  Discnumber();
43  Discnumber(quint8 disc, quint8 n_discs=1);
44  QString to_string();
45  };
46 
47 
53  public AbstractFrame<Discnumber, TagLib::ID3v2::TextIdentificationFrame>
54  {
55 
56  public:
57  DiscnumberFrame(TagLib::FileRef* file_ref);
58  ~DiscnumberFrame();
59 
60  void map_model_to_frame() override;
61  void map_frame_to_model() override;
62 
63  TagLib::ID3v2::Frame* create_id3v2_frame() override;
64  };
65 }
66 #endif // DISCNUMBER_H
The DiscnumberFrame class.
Definition: Discnumber.h:52
ID3v2Frame namespace.
Definition: AbstractFrame.h:38
The AbstractFrame class for example AbstractFrame<Discnumber, TagLib::ID3v2::TextIdentificationFrame>...
Definition: AbstractFrame.h:47
The Discnumber class.
Definition: Discnumber.h:35