diff --git a/src/QUSongSupport.cpp b/src/QUSongSupport.cpp index 2a92110..58a336f 100644 --- a/src/QUSongSupport.cpp +++ b/src/QUSongSupport.cpp @@ -14,6 +14,7 @@ QStringList QUSongSupport::availableTags() { QStringList result; result << ENCODING_TAG; + result << VERSION_TAG; result << TITLE_TAG; result << ARTIST_TAG; result << LANGUAGE_TAG; @@ -23,9 +24,16 @@ QStringList QUSongSupport::availableTags() { result << CREATOR_TAG; result << TAGS_TAG; result << MP3_TAG; + result << AUDIO_TAG; + result << AUDIOURL_TAG; + result << VOCALS_TAG; + result << INSTRUMENTAL_TAG; result << COVER_TAG; + result << COVERURL_TAG; result << BACKGROUND_TAG; + result << BACKGROUNDURL_TAG; result << VIDEO_TAG; + result << VIDEOURL_TAG; result << VIDEOGAP_TAG; result << START_TAG; result << END_TAG; diff --git a/src/resources/UltraStar-Manager.qrc b/src/resources/UltraStar-Manager.qrc index 801a22a..05c35da 100644 --- a/src/resources/UltraStar-Manager.qrc +++ b/src/resources/UltraStar-Manager.qrc @@ -274,6 +274,7 @@ writeID3.png sync.png tags.png + format_version.png save_big.png diff --git a/src/resources/format_version.png b/src/resources/format_version.png new file mode 100644 index 0000000..71582cb Binary files /dev/null and b/src/resources/format_version.png differ diff --git a/src/song/QUSongFile.h b/src/song/QUSongFile.h index b1b3ffc..8e3d6fe 100644 --- a/src/song/QUSongFile.h +++ b/src/song/QUSongFile.h @@ -61,15 +61,23 @@ class QUSongFile: public QUSongInterface { static bool equal(QUSongFile *s1, QUSongFile *s2); public slots: + QString version() const {return _info.value(VERSION_TAG, QString(N_A));} QString artist() const {return _info.value(ARTIST_TAG, QString(N_A));} QString title() const {return _info.value(TITLE_TAG, QString(N_A));} QString mp3() const {return _info.value(MP3_TAG, QString(N_A));} + QString audio() const {return _info.value(AUDIO_TAG, QString(N_A));} + QString audiourl() const {return _info.value(AUDIOURL_TAG, QString(N_A));} + QString vocals() const {return _info.value(VOCALS_TAG, QString(N_A));} + QString instrumental() const {return _info.value(INSTRUMENTAL_TAG, QString(N_A));} QString bpm() const {return _info.value(BPM_TAG, QString(N_A));} QString gap() const {return _info.value(GAP_TAG, QString(N_A));} QString video() const {return _info.value(VIDEO_TAG, QString(N_A));} + QString videourl() const {return _info.value(VIDEOURL_TAG, QString(N_A));} QString videogap() const {return _info.value(VIDEOGAP_TAG, QString(N_A));} QString cover() const {return _info.value(COVER_TAG, QString(N_A));} + QString coverurl() const {return _info.value(COVERURL_TAG, QString(N_A));} QString background() const {return _info.value(BACKGROUND_TAG, QString(N_A));} + QString backgroundurl() const {return _info.value(BACKGROUNDURL_TAG, QString(N_A));} QString start() const {return _info.value(START_TAG, QString(N_A));} QString language() const {return _info.value(LANGUAGE_TAG, QString(N_A));} QString relative() const {return _info.value(RELATIVE_TAG, QString(N_A));} diff --git a/src/song/QUSongInterface.h b/src/song/QUSongInterface.h index 804d4df..99839fb 100644 --- a/src/song/QUSongInterface.h +++ b/src/song/QUSongInterface.h @@ -10,6 +10,7 @@ class QString; class QFileInfo; #define ENCODING_TAG "ENCODING" +#define VERSION_TAG "VERSION" #define TITLE_TAG "TITLE" #define ARTIST_TAG "ARTIST" #define LANGUAGE_TAG "LANGUAGE" @@ -19,9 +20,16 @@ class QFileInfo; #define CREATOR_TAG "CREATOR" #define TAGS_TAG "TAGS" #define MP3_TAG "MP3" +#define AUDIO_TAG "AUDIO" +#define AUDIOURL_TAG "AUDIOURL" +#define VOCALS_TAG "VOCALS" +#define INSTRUMENTAL_TAG "INSTRUMENTAL" #define COVER_TAG "COVER" +#define COVERURL_TAG "COVERURL" #define BACKGROUND_TAG "BACKGROUND" +#define BACKGROUNDURL_TAG "BACKGROUNDURL" #define VIDEO_TAG "VIDEO" +#define VIDEOURL_TAG "VIDEOURL" #define VIDEOGAP_TAG "VIDEOGAP" #define START_TAG "START" #define END_TAG "END" diff --git a/src/songdetails/QUDetailItem.cpp b/src/songdetails/QUDetailItem.cpp index 385d54f..5801e0c 100644 --- a/src/songdetails/QUDetailItem.cpp +++ b/src/songdetails/QUDetailItem.cpp @@ -52,6 +52,8 @@ void QUDetailItem::reset() { if(QString::compare(_tag, ENCODING_TAG) == 0) { _flagsForSingleSong = Qt::NoItemFlags; + } else if(QString::compare(_tag, VERSION_TAG) == 0) { + _flagsForSingleSong = Qt::NoItemFlags; // } else if(QString::compare(_tag, TITLE_TAG) == 0) { } else if(QString::compare(_tag, ARTIST_TAG) == 0) { _flagsForMultipleSongs = Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable; diff --git a/src/songdetails/QUDetailsTable.cpp b/src/songdetails/QUDetailsTable.cpp index b8f6826..34c4912 100644 --- a/src/songdetails/QUDetailsTable.cpp +++ b/src/songdetails/QUDetailsTable.cpp @@ -41,6 +41,7 @@ void QUDetailsTable::initTagColumn() { unsigned row = 0; this->initSeparator(tr("Information"), row++); this->setItem(row++, 0, new QUTagItem(QIcon(":/control/encoding.png"), tr("Encoding"))); + this->setItem(row++, 0, new QUTagItem(QIcon(":/types/format_version.png"), tr("Version"))); this->setItem(row++, 0, new QUTagItem(QIcon(":/types/font.png"), tr("Title"))); this->setItem(row++, 0, new QUTagItem(QIcon(":/types/user.png"), tr("Artist"))); this->setItem(row++, 0, new QUTagItem(QIcon(":/types/language.png"), tr("Language"))); @@ -55,10 +56,19 @@ void QUDetailsTable::initTagColumn() { this->initSeparator(tr("Files"), row++); this->setItem(row++, 0, new QUTagItem(QIcon(":/types/music.png"), tr("MP3"))); + this->setItem(row++, 0, new QUTagItem(QIcon(":/types/music.png"), tr("Audio"))); + this->setItem(row++, 0, new QUTagItem(QIcon(":/types/music.png"), tr("Vocals"))); + this->setItem(row++, 0, new QUTagItem(QIcon(":/types/music.png"), tr("Instrumental"))); this->setItem(row++, 0, new QUTagItem(QIcon(":/types/cover.png"), tr("Cover"))); this->setItem(row++, 0, new QUTagItem(QIcon(":/types/background.png"), tr("Background"))); this->setItem(row++, 0, new QUTagItem(QIcon(":/types/video.png"), tr("Video"))); + this->initSeparator(tr("URLs"), row++); + this->setItem(row++, 0, new QUTagItem(QIcon(":/types/music.png"), tr("Audio URL"))); + this->setItem(row++, 0, new QUTagItem(QIcon(":/types/cover.png"), tr("Cover URL"))); + this->setItem(row++, 0, new QUTagItem(QIcon(":/types/background.png"), tr("Background URL"))); + this->setItem(row++, 0, new QUTagItem(QIcon(":/types/video.png"), tr("Video URL"))); + this->initSeparator(tr("Control"), row++); this->setItem(row++, 0, new QUTagItem(QIcon(":/types/videogap.png"), tr("Videogap"))); this->setItem(row++, 0, new QUTagItem(QIcon(":/types/start.png"), tr("Start"))); @@ -92,6 +102,7 @@ void QUDetailsTable::initValueColumn() { /* separator here - skip a row */ row++; this->setItem(row++, 1, new QUDetailItem(ENCODING_TAG)); + this->setItem(row++, 1, new QUDetailItem(VERSION_TAG)); this->setItem(row++, 1, new QUDetailItem(TITLE_TAG)); this->setItem(row++, 1, new QUDetailItem(ARTIST_TAG)); this->setItem(row++, 1, new QUDetailItem(LANGUAGE_TAG)); @@ -107,10 +118,20 @@ void QUDetailsTable::initValueColumn() { /* separator here - skip a row */ row++; this->setItem(row++, 1, new QUDetailItem(MP3_TAG)); + this->setItem(row++, 1, new QUDetailItem(AUDIO_TAG)); + this->setItem(row++, 1, new QUDetailItem(VOCALS_TAG)); + this->setItem(row++, 1, new QUDetailItem(INSTRUMENTAL_TAG)); this->setItem(row++, 1, new QUDetailItem(COVER_TAG)); this->setItem(row++, 1, new QUDetailItem(BACKGROUND_TAG)); this->setItem(row++, 1, new QUDetailItem(VIDEO_TAG)); + /* separator here - skip a row */ + row++; + this->setItem(row++, 1, new QUDetailItem(AUDIOURL_TAG)); + this->setItem(row++, 1, new QUDetailItem(COVERURL_TAG)); + this->setItem(row++, 1, new QUDetailItem(BACKGROUNDURL_TAG)); + this->setItem(row++, 1, new QUDetailItem(VIDEOURL_TAG)); + /* separator here - skip a row */ row++; this->setItem(row++, 1, new QUDetailItem(VIDEOGAP_TAG));