Add lyrics to edit tag dialog

This commit is contained in:
Jonas Kvinge 2019-07-08 22:21:12 +02:00
parent afb583cff4
commit cc3d454d60
2 changed files with 177 additions and 155 deletions

View File

@ -337,6 +337,7 @@ QVariant EditTagDialog::Data::value(const Song &song, const QString &id) {
if (id == "grouping") return song.grouping();
if (id == "genre") return song.genre();
if (id == "comment") return song.comment();
if (id == "lyrics") return song.lyrics();
if (id == "track") return song.track();
if (id == "disc") return song.disc();
if (id == "year") return song.year();
@ -356,6 +357,7 @@ void EditTagDialog::Data::set_value(const QString &id, const QVariant &value) {
else if (id == "grouping") current_.set_grouping(value.toString());
else if (id == "genre") current_.set_genre(value.toString());
else if (id == "comment") current_.set_comment(value.toString());
else if (id == "lyrics") current_.set_lyrics(value.toString());
else if (id == "track") current_.set_track(value.toInt());
else if (id == "disc") current_.set_disc(value.toInt());
else if (id == "year") current_.set_year(value.toInt());

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>863</width>
<height>635</height>
<height>645</height>
</rect>
</property>
<property name="windowTitle">
@ -30,7 +30,7 @@
</widget>
<widget class="QTabWidget" name="tab_widget">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="summary_tab">
<attribute name="title">
@ -545,6 +545,69 @@
<string>Edit tags</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="9" column="1">
<widget class="QPushButton" name="fetch_tag">
<property name="text">
<string>Complete tags automatically</string>
</property>
<property name="icon">
<iconset resource="../../data/data.qrc">
<normaloff>:/pictures/musicbrainz.png</normaloff>:/pictures/musicbrainz.png</iconset>
</property>
<property name="iconSize">
<size>
<width>38</width>
<height>22</height>
</size>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="SpinBox" name="disc">
<property name="correctionMode">
<enum>QAbstractSpinBox::CorrectToNearestValue</enum>
</property>
<property name="maximum">
<number>9999</number>
</property>
<property name="has_clear_button" stdset="0">
<bool>false</bool>
</property>
<property name="has_reset_button" stdset="0">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="genre_label">
<property name="text">
<string>Genre</string>
</property>
<property name="buddy">
<cstring>genre</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="LineEdit" name="album">
<property name="has_reset_button" stdset="0">
<bool>true</bool>
</property>
<property name="has_clear_button" stdset="0">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="LineEdit" name="artist">
<property name="has_reset_button" stdset="0">
<bool>true</bool>
</property>
<property name="has_clear_button" stdset="0">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="title_label">
<property name="text">
@ -555,6 +618,26 @@
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="grouping_label">
<property name="text">
<string>Grouping</string>
</property>
<property name="buddy">
<cstring>grouping</cstring>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="album_label">
<property name="text">
<string>Album</string>
</property>
<property name="buddy">
<cstring>album</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="LineEdit" name="title">
<property name="has_reset_button" stdset="0">
@ -565,6 +648,76 @@
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="disc_label">
<property name="text">
<string>Disc</string>
</property>
<property name="buddy">
<cstring>disc</cstring>
</property>
</widget>
</item>
<item row="11" column="1" colspan="3">
<widget class="TextEdit" name="comment">
<property name="has_reset_button" stdset="0">
<bool>true</bool>
</property>
<property name="has_clear_button" stdset="0">
<bool>false</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="albumartist_label">
<property name="text">
<string>Album artist</string>
</property>
<property name="buddy">
<cstring>albumartist</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="LineEdit" name="performer">
<property name="has_reset_button" stdset="0">
<bool>true</bool>
</property>
<property name="has_clear_button" stdset="0">
<bool>false</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="composer_label">
<property name="text">
<string>Composer</string>
</property>
<property name="buddy">
<cstring>composer</cstring>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="comment_label">
<property name="text">
<string>Comment</string>
</property>
<property name="buddy">
<cstring>comment</cstring>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="LineEdit" name="grouping">
<property name="has_reset_button" stdset="0">
<bool>true</bool>
</property>
<property name="has_clear_button" stdset="0">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="track_label">
<property name="text">
@ -575,6 +728,16 @@
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="LineEdit" name="composer">
<property name="has_reset_button" stdset="0">
<bool>true</bool>
</property>
<property name="has_clear_button" stdset="0">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="SpinBox" name="track">
<property name="correctionMode">
@ -601,28 +764,8 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="LineEdit" name="artist">
<property name="has_reset_button" stdset="0">
<bool>true</bool>
</property>
<property name="has_clear_button" stdset="0">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="disc_label">
<property name="text">
<string>Disc</string>
</property>
<property name="buddy">
<cstring>disc</cstring>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="SpinBox" name="disc">
<item row="2" column="3">
<widget class="SpinBox" name="year">
<property name="correctionMode">
<enum>QAbstractSpinBox::CorrectToNearestValue</enum>
</property>
@ -637,18 +780,8 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="album_label">
<property name="text">
<string>Album</string>
</property>
<property name="buddy">
<cstring>album</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="LineEdit" name="album">
<item row="7" column="1">
<widget class="LineEdit" name="genre">
<property name="has_reset_button" stdset="0">
<bool>true</bool>
</property>
@ -667,32 +800,6 @@
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="SpinBox" name="year">
<property name="correctionMode">
<enum>QAbstractSpinBox::CorrectToNearestValue</enum>
</property>
<property name="maximum">
<number>9999</number>
</property>
<property name="has_clear_button" stdset="0">
<bool>false</bool>
</property>
<property name="has_reset_button" stdset="0">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="albumartist_label">
<property name="text">
<string>Album artist</string>
</property>
<property name="buddy">
<cstring>albumartist</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="LineEdit" name="albumartist">
<property name="has_reset_button" stdset="0">
@ -703,26 +810,6 @@
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="composer_label">
<property name="text">
<string>Composer</string>
</property>
<property name="buddy">
<cstring>composer</cstring>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="LineEdit" name="composer">
<property name="has_reset_button" stdset="0">
<bool>true</bool>
</property>
<property name="has_clear_button" stdset="0">
<bool>false</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="performer_label">
<property name="text">
@ -733,85 +820,18 @@
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="LineEdit" name="performer">
<property name="has_reset_button" stdset="0">
<bool>true</bool>
</property>
<property name="has_clear_button" stdset="0">
<bool>false</bool>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="grouping_label">
<item row="10" column="0">
<widget class="QLabel" name="label_lyrics">
<property name="text">
<string>Grouping</string>
<string>Lyrics</string>
</property>
<property name="buddy">
<cstring>grouping</cstring>
<cstring>lyrics</cstring>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="LineEdit" name="grouping">
<property name="has_reset_button" stdset="0">
<bool>true</bool>
</property>
<property name="has_clear_button" stdset="0">
<bool>false</bool>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="genre_label">
<property name="text">
<string>Genre</string>
</property>
<property name="buddy">
<cstring>genre</cstring>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="LineEdit" name="genre">
<property name="has_reset_button" stdset="0">
<bool>true</bool>
</property>
<property name="has_clear_button" stdset="0">
<bool>false</bool>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QPushButton" name="fetch_tag">
<property name="text">
<string>Complete tags automatically</string>
</property>
<property name="icon">
<iconset resource="../../data/data.qrc">
<normaloff>:/pictures/musicbrainz.png</normaloff>:/pictures/musicbrainz.png</iconset>
</property>
<property name="iconSize">
<size>
<width>38</width>
<height>22</height>
</size>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="comment_label">
<property name="text">
<string>Comment</string>
</property>
<property name="buddy">
<cstring>comment</cstring>
</property>
</widget>
</item>
<item row="11" column="1" colspan="3">
<widget class="TextEdit" name="comment">
<item row="10" column="1" colspan="3">
<widget class="TextEdit" name="lyrics">
<property name="has_reset_button" stdset="0">
<bool>true</bool>
</property>