class CueSheetFile;
class QApplication;
class QDir;
+class QTextCodec;
class CueSheetModel : public QAbstractItemModel
{
void getTrackIndex(int fileIndex, int trackIndex, double *startIndex, double *duration);
QString getTrackPerformer(int fileIndex, int trackIndex);
QString getTrackTitle(int fileIndex, int trackIndex);
- QString getAlbumPerformer(void) { return m_albumPerformer; }
- QString getAlbumTitle(void) { return m_albumTitle; }
+ QString getTrackGenre(int fileIndex, int trackIndex);
+ unsigned int getTrackYear(int fileIndex, int trackIndex);
+ QString getAlbumPerformer(void);
+ QString getAlbumTitle(void);
+ QString getAlbumGenre(void);
+ unsigned int getAlbumYear(void);
//Cue Sheet functions
- int loadCueSheet(const QString &cueFile, QCoreApplication *application = NULL);
+ int loadCueSheet(const QString &cueFile, QCoreApplication *application = NULL, QTextCodec *forceCodec= NULL);
private:
- int parseCueFile(QFile &cueFile, const QDir &baseDir, QCoreApplication *application);
+ int parseCueFile(QFile &cueFile, const QDir &baseDir, QCoreApplication *application, const QTextCodec *codec);
double parseTimeIndex(const QString &index);
QString indexToString(const double index) const;
+ static QMutex m_mutex;
+
QList<CueSheetFile*> m_files;
QString m_albumTitle;
QString m_albumPerformer;
+ QString m_albumGenre;
+ unsigned int m_albumYear;
const QIcon m_fileIcon;
const QIcon m_trackIcon;