mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
Format MetdataEditorDlg window title.
Added bitrate to MetadataEditorDlg. Align tag editing fields to left.
This commit is contained in:
@@ -119,7 +119,7 @@ ContextMenu::setQueries( const QList<Tomahawk::query_ptr>& queries )
|
|||||||
Tomahawk::result_ptr result = m_queries.first()->results().first();
|
Tomahawk::result_ptr result = m_queries.first()->results().first();
|
||||||
if ( result->collection() && result->collection()->source() &&
|
if ( result->collection() && result->collection()->source() &&
|
||||||
result->collection()->source()->isLocal() ) {
|
result->collection()->source()->isLocal() ) {
|
||||||
m_sigmap->setMapping( addAction( tr( "Edit Metadata") ), ActionEditMetadata );
|
m_sigmap->setMapping( addAction( tr( "Properties") ), ActionEditMetadata );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
@@ -39,13 +39,14 @@ MetadataEditor::MetadataEditor( Tomahawk::result_ptr result, QWidget *parent )
|
|||||||
, m_result( result )
|
, m_result( result )
|
||||||
{
|
{
|
||||||
ui->setupUi( this );
|
ui->setupUi( this );
|
||||||
setWindowTitle( QString( result->track() + tr( " Properties" ) ) );
|
setWindowTitle( QString( result->track() + tr( " - Properties" ) ) );
|
||||||
setAttribute( Qt::WA_DeleteOnClose );
|
setAttribute( Qt::WA_DeleteOnClose );
|
||||||
|
|
||||||
setTitle( result->track() );
|
setTitle( result->track() );
|
||||||
setArtist( result->artist()->name() );
|
setArtist( result->artist()->name() );
|
||||||
setAlbum( result->album()->name() );
|
setAlbum( result->album()->name() );
|
||||||
setDiscNumber( result->albumpos() );
|
setDiscNumber( result->albumpos() );
|
||||||
|
setBitrate( result->bitrate() );
|
||||||
|
|
||||||
connect( ui->buttonBox, SIGNAL( accepted() ), SLOT( writeMetadata() ) );
|
connect( ui->buttonBox, SIGNAL( accepted() ), SLOT( writeMetadata() ) );
|
||||||
connect( ui->buttonBox, SIGNAL( rejected() ), SLOT( close() ) );
|
connect( ui->buttonBox, SIGNAL( rejected() ), SLOT( close() ) );
|
||||||
@@ -117,3 +118,9 @@ MetadataEditor::setDiscNumber( unsigned int num )
|
|||||||
ui->discNumberSpinBox->setValue( num );
|
ui->discNumberSpinBox->setValue( num );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
MetadataEditor::setBitrate( unsigned int bitrate )
|
||||||
|
{
|
||||||
|
ui->bitrateLabel->setNum( (int) bitrate );
|
||||||
|
}
|
||||||
|
@@ -50,6 +50,7 @@ private slots:
|
|||||||
void setArtist( const QString& artist );
|
void setArtist( const QString& artist );
|
||||||
void setAlbum( const QString& album );
|
void setAlbum( const QString& album );
|
||||||
void setDiscNumber( unsigned int num );
|
void setDiscNumber( unsigned int num );
|
||||||
|
void setBitrate( unsigned int num );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MetadataEditor* ui;
|
Ui::MetadataEditor* ui;
|
||||||
|
@@ -42,7 +42,7 @@
|
|||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLineEdit" name="titleLineEdit">
|
<widget class="QLineEdit" name="titleLineEdit">
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>Title...</string>
|
<string>Title...</string>
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
<item row="5" column="1">
|
<item row="5" column="1">
|
||||||
<widget class="QLineEdit" name="artistLineEdit">
|
<widget class="QLineEdit" name="artistLineEdit">
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>Artist...</string>
|
<string>Artist...</string>
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
<item row="9" column="1">
|
<item row="9" column="1">
|
||||||
<widget class="QLineEdit" name="albumLineEdit">
|
<widget class="QLineEdit" name="albumLineEdit">
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>Album...</string>
|
<string>Album...</string>
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
<enum>Qt::LeftToRight</enum>
|
<enum>Qt::LeftToRight</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="buttonSymbols">
|
<property name="buttonSymbols">
|
||||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||||
@@ -112,6 +112,20 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="13" column="0">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Bitrate:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="13" column="1">
|
||||||
|
<widget class="QLabel" name="bitrateLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Reference in New Issue
Block a user