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 
22 
23 #ifndef DISCNUMBER_H
24 #define DISCNUMBER_H
25 
26 
27 
28 #include "AbstractFrame.h"
29 
30 #include <QString>
31 #include <taglib/textidentificationframe.h>
32 
33 namespace ID3v2Frame
34 {
39  class Discnumber
40  {
41  public:
42 
43  quint8 disc;
44  quint8 n_discs;
45 
46  Discnumber();
47  Discnumber(quint8 disc, quint8 n_discs=1);
48  QString to_string();
49  };
50 
51 
57  public AbstractFrame<Discnumber, TagLib::ID3v2::TextIdentificationFrame>
58  {
59 
60  public:
61  DiscnumberFrame(TagLib::FileRef* file_ref);
62  ~DiscnumberFrame();
63 
64  void map_model_to_frame() override;
65  void map_frame_to_model() override;
66 
67  TagLib::ID3v2::Frame* create_id3v2_frame() override;
68  };
69 }
70 #endif // DISCNUMBER_H
TagLib::ID3v2::Frame * create_id3v2_frame() override
create_id3v2_frame creates new id3v2 frame if there's no frame we have to create it manually every su...
The DiscnumberFrame class.
Definition: Discnumber.h:56
void map_model_to_frame() override
map_model_to_frame maps the model to the frame and vice versa so the frame knows how to get/set data ...
ID3v2Frame namespace.
Definition: AbstractFrame.h:38
The AbstractFrame class for example AbstractFrame...
Definition: AbstractFrame.h:47
The Discnumber class.
Definition: Discnumber.h:39