1 /* 2 * This file is part of Auralquiz 3 * Copyright 2011-2017 JanKusanagi JRR <jancoding@gmx.com> 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. 9 * 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. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the 17 * Free Software Foundation, Inc., 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . 19 */ 20 21 #ifndef MUSICANALYZER_H 22 #define MUSICANALYZER_H 23 24 #include <QObject> 25 #include <QFile> 26 #include <QDirIterator> 27 #include <QProgressDialog> 28 #include <QApplication> 29 #include <QMessageBox> 30 31 #include <QDebug> 32 33 // GCC 4.7 requires this 34 #include <unistd.h> 35 36 // TagLib -> libtaglib-devel 37 #include <taglib/fileref.h> 38 #include <taglib/tag.h> 39 //#include <taglib/tstring.h> 40 41 42 43 class MusicAnalyzer : public QWidget 44 { 45 Q_OBJECT 46 47 public: 48 explicit MusicAnalyzer(QString musicDir, QString dataDir, 49 QStringList *musicFiles, QWidget *parent = 0); 50 ~MusicAnalyzer(); 51 52 void setMusicDirectory(QString musicDir); 53 54 void storeMetadataCache(); 55 56 signals: 57 void setStartGameButton(bool enabledState, 58 QString text, 59 QString tooltip); 60 61 public slots: 62 void loadSongList(); 63 void createSongList(); 64 65 private: 66 QString musicDirectory; 67 QString dataDirectory; 68 69 70 // tmp! ? 71 QStringList *musicFiles; 72 73 }; 74 75 #endif // MUSICANALYZER_H 76