Updated Opus encoder/decoder libraries to v1.3-RC2 (2018-09-27) and Opus-Tools to...
[LameXP.git] / src / Model_MetaInfo.h
blob1c60773a36010eb6a0bfeb149a57da09df27433a
1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2018 LoRd_MuldeR <MuldeR2@GMX.de>
4 //
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, but always including the *additional*
9 // restrictions defined in the "License.txt" file.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with this program; if not, write to the Free Software Foundation, Inc.,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 // http://www.gnu.org/licenses/gpl-2.0.txt
21 ///////////////////////////////////////////////////////////////////////////////
23 #pragma once
25 #include "Model_AudioFile.h"
27 #include <QAbstractTableModel>
28 #include <QIcon>
30 class MetaInfoModel : public QAbstractTableModel
32 Q_OBJECT
34 public:
35 MetaInfoModel(AudioFileModel *file);
36 MetaInfoModel(AudioFileModel_MetaInfo *metaInfo);
37 ~MetaInfoModel(void);
39 //Model functions
40 int columnCount(const QModelIndex &parent = QModelIndex()) const;
41 int rowCount(const QModelIndex &parent = QModelIndex()) const;
42 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
43 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
44 bool setData (const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
45 Qt::ItemFlags flags(const QModelIndex &index) const;
46 void editItem(const QModelIndex &index, QWidget *parent);
47 void editArtwork(const QString &imagePath);
48 void assignInfoFrom(const AudioFileModel &file);
49 void clearData(bool clearMetaOnly = false);
51 private:
52 const unsigned int m_offset;
54 AudioFileModel *const m_fullInfo;
55 AudioFileModel_MetaInfo *const m_metaInfo;
57 QString m_textNotSpecified;
58 QString m_textUnknown;