1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2011 LoRd_MuldeR <MuldeR2@GMX.de>
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License along
16 // with this program; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 // http://www.gnu.org/licenses/gpl-2.0.txt
20 ///////////////////////////////////////////////////////////////////////////////
24 #include "Model_Artwork.h"
31 class AudioFileModel
: public QObject
36 AudioFileModel(const QString
&path
= QString(), const QString
&name
= QString());
37 AudioFileModel(const AudioFileModel
&model
, bool copyMetaInfo
= true);
38 AudioFileModel
&operator=(const AudioFileModel
&model
);
39 ~AudioFileModel(void);
41 //-----------------------
43 //-----------------------
45 const QString
&filePath(void) const;
46 const QString
&fileName(void) const;
47 const QString
&fileArtist(void) const;
48 const QString
&fileAlbum(void) const;
49 const QString
&fileGenre(void) const;
50 const QString
&fileComment(void) const;
51 const QString
&fileCover(void) const;
52 unsigned int fileYear(void) const;
53 unsigned int filePosition(void) const;
54 unsigned int fileDuration(void) const;
56 const QString
&formatContainerType(void) const;
57 const QString
&formatContainerProfile(void) const;
58 const QString
&formatAudioType(void) const;
59 const QString
&formatAudioProfile(void) const;
60 const QString
&formatAudioVersion(void) const;
61 unsigned int formatAudioSamplerate(void) const;
62 unsigned int formatAudioChannels(void) const;
63 unsigned int formatAudioBitdepth(void) const;
65 const QString
fileDurationInfo(void) const;
66 const QString
formatContainerInfo(void) const;
67 const QString
formatAudioBaseInfo(void) const;
68 const QString
formatAudioCompressInfo(void) const;
70 //-----------------------
72 //-----------------------
74 void setFilePath(const QString
&path
);
75 void setFileName(const QString
&name
);
76 void setFileArtist(const QString
&artist
);
77 void setFileAlbum(const QString
&album
);
78 void setFileGenre(const QString
&genre
);
79 void setFileComment(const QString
&comment
);
80 void setFileCover(const QString
&coverFile
, bool owner
);
81 void setFileCover(const ArtworkModel
&model
);
82 void setFileYear(unsigned int year
);
83 void setFilePosition(unsigned int position
);
84 void setFileDuration(unsigned int duration
);
86 void setFormatContainerType(const QString
&type
);
87 void setFormatContainerProfile(const QString
&profile
);
88 void setFormatAudioType(const QString
&type
);
89 void setFormatAudioProfile(const QString
&profile
);
90 void setFormatAudioVersion(const QString
&version
);
91 void setFormatAudioSamplerate(unsigned int samplerate
);
92 void setFormatAudioChannels(unsigned int channels
);
93 void setFormatAudioBitdepth(unsigned int bitdepth
);
95 void updateMetaInfo(const AudioFileModel
&model
);
100 QString m_fileArtist
;
103 QString m_fileComment
;
104 ArtworkModel m_fileCover
;
105 unsigned int m_fileYear
;
106 unsigned int m_filePosition
;
107 unsigned int m_fileDuration
;
109 QString m_formatContainerType
;
110 QString m_formatContainerProfile
;
111 QString m_formatAudioType
;
112 QString m_formatAudioProfile
;
113 QString m_formatAudioVersion
;
114 unsigned int m_formatAudioSamplerate
;
115 unsigned int m_formatAudioChannels
;
116 unsigned int m_formatAudioBitdepth
;