Display cover artwork in the "Meta Info" dialog.

This commit is contained in:
LoRd_MuldeR 2011-03-21 02:16:18 +01:00
parent 157542f730
commit 01b15d6f70
15 changed files with 254 additions and 6 deletions

View File

@ -192,7 +192,7 @@
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
Description="Copy plugin DLL&apos;s" Description="Copy plugin DLL&apos;s"
CommandLine="mkdir &quot;$(TargetDir)imageformats&quot;&#x0D;&#x0A;copy &quot;$(QTDIR)\plugins\imageformats\q???4.dll&quot; &quot;$(TargetDir)imageformats\&quot;&#x0D;&#x0A;" CommandLine="mkdir &quot;$(TargetDir)imageformats&quot;&#x0D;&#x0A;copy &quot;$(QTDIR)\plugins\imageformats\q???4.dll&quot; &quot;$(TargetDir)imageformats\&quot;&#x0D;&#x0A;copy &quot;$(QTDIR)\plugins\imageformats\q????4.dll&quot; &quot;$(TargetDir)imageformats\&quot;&#x0D;&#x0A;del &quot;$(TargetDir)imageformats\q???d4.dll&quot;&#x0D;&#x0A;"
/> />
</Configuration> </Configuration>
<Configuration <Configuration
@ -1791,7 +1791,7 @@
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
Description="RCC &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;" Description="RCC &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;"
CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -o &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot; -name &quot;$(SafeInputName)&quot; &quot;$(InputPath)&quot;" CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -o &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot; -name &quot;$(SafeInputName)&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
Outputs="&quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;" Outputs="&quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;"
/> />
</FileConfiguration> </FileConfiguration>
@ -1801,7 +1801,7 @@
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
Description="RCC &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;" Description="RCC &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;"
CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -o &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot; -name &quot;$(SafeInputName)&quot; &quot;$(InputPath)&quot;" CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -o &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot; -name &quot;$(SafeInputName)&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
Outputs="&quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;" Outputs="&quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;"
/> />
</FileConfiguration> </FileConfiguration>
@ -1811,7 +1811,7 @@
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
Description="RCC &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;" Description="RCC &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;"
CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -o &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot; -name &quot;$(SafeInputName)&quot; &quot;$(InputPath)&quot;" CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -o &quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot; -name &quot;$(SafeInputName)&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
Outputs="&quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;" Outputs="&quot;$(SolutionDir)tmp\RCC_$(SafeInputName).cpp&quot;"
/> />
</FileConfiguration> </FileConfiguration>

View File

@ -11,6 +11,7 @@
<li>Added an option to manually specify the number of parallel instances <li>Added an option to manually specify the number of parallel instances
<li>Added an option to select a user-defined TEMP directory <li>Added an option to select a user-defined TEMP directory
<li>Added an option to shutdown the computer as soon as all files are completed <li>Added an option to shutdown the computer as soon as all files are completed
<li>Added support for embedding cover artwork (currently with LAME only)
<li>Updated Qt runtime libraries to v4.7.2 <li>Updated Qt runtime libraries to v4.7.2
<li>Updated LAME encoder to v3.99.0.14 (2011-02-28), compiled with ICL 12.0.2 <li>Updated LAME encoder to v3.99.0.14 (2011-02-28), compiled with ICL 12.0.2
<li>Updated Vorbis encoder to v2.87 using aoTuV Beta-6.02 (2011-02-28), compiled with ICL 11.1 and MSVC 9.0 <li>Updated Vorbis encoder to v2.87 using aoTuV Beta-6.02 (2011-02-28), compiled with ICL 11.1 and MSVC 9.0

View File

@ -1232,6 +1232,10 @@
<source>Meta Information</source> <source>Meta Information</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Artwork</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Edit</source> <source>Edit</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>

View File

@ -1241,6 +1241,10 @@
<source>Close</source> <source>Close</source>
<translation>Schießen</translation> <translation>Schießen</translation>
</message> </message>
<message>
<source>Artwork</source>
<translation></translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfoDialog</name> <name>MetaInfoDialog</name>

View File

@ -1240,6 +1240,10 @@
<source>Close</source> <source>Close</source>
<translation>Cerrar</translation> <translation>Cerrar</translation>
</message> </message>
<message>
<source>Artwork</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfoDialog</name> <name>MetaInfoDialog</name>

View File

@ -1249,6 +1249,10 @@ Sélection automatique (par défaut)</translation>
<source>Close</source> <source>Close</source>
<translation>Fermer</translation> <translation>Fermer</translation>
</message> </message>
<message>
<source>Artwork</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfoDialog</name> <name>MetaInfoDialog</name>

View File

@ -1241,6 +1241,10 @@
<source>Close</source> <source>Close</source>
<translation>Chiudi</translation> <translation>Chiudi</translation>
</message> </message>
<message>
<source>Artwork</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfoDialog</name> <name>MetaInfoDialog</name>

View File

@ -1243,6 +1243,10 @@
<source>Close</source> <source>Close</source>
<translation>Закрыть</translation> <translation>Закрыть</translation>
</message> </message>
<message>
<source>Artwork</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfoDialog</name> <name>MetaInfoDialog</name>

View File

@ -1240,6 +1240,10 @@
<source>Close</source> <source>Close</source>
<translation type="unfinished">Вийти</translation> <translation type="unfinished">Вийти</translation>
</message> </message>
<message>
<source>Artwork</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfoDialog</name> <name>MetaInfoDialog</name>

View File

@ -189,8 +189,146 @@
</attribute> </attribute>
</widget> </widget>
</item> </item>
<item>
<widget class="QFrame" name="frameArtwork">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="lineWidth">
<number>1</number>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout">
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="1">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QFrame" name="frameArtworkInner">
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="labelArtwork">
<property name="text">
<string notr="true">(ARTWORK)</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="buttonArtwork">
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Artwork</string>
</property>
<property name="icon">
<iconset resource="../res/Icons.qrc">
<normaloff>:/icons/photo.png</normaloff>:/icons/photo.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item> <item>
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
@ -344,6 +482,12 @@
<include location="../res/Images.qrc"/> <include location="../res/Images.qrc"/>
<include location="../res/Images.qrc"/> <include location="../res/Images.qrc"/>
<include location="../res/Images.qrc"/> <include location="../res/Images.qrc"/>
<include location="../res/Images.qrc"/>
<include location="../res/Images.qrc"/>
<include location="../res/Images.qrc"/>
<include location="../res/Images.qrc"/>
<include location="../res/Images.qrc"/>
<include location="../res/Images.qrc"/>
</resources> </resources>
<connections> <connections>
<connection> <connection>
@ -378,5 +522,53 @@
</hint> </hint>
</hints> </hints>
</connection> </connection>
<connection>
<sender>buttonArtwork</sender>
<signal>clicked(bool)</signal>
<receiver>tableView</receiver>
<slot>setHidden(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>55</x>
<y>396</y>
</hint>
<hint type="destinationlabel">
<x>310</x>
<y>217</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonArtwork</sender>
<signal>clicked(bool)</signal>
<receiver>editButton</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>55</x>
<y>396</y>
</hint>
<hint type="destinationlabel">
<x>468</x>
<y>396</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonArtwork</sender>
<signal>clicked(bool)</signal>
<receiver>frameArtwork</receiver>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>55</x>
<y>396</y>
</hint>
<hint type="destinationlabel">
<x>310</x>
<y>360</y>
</hint>
</hints>
</connection>
</connections> </connections>
</ui> </ui>

View File

@ -62,6 +62,7 @@
<file>icons/page_white_add.png</file> <file>icons/page_white_add.png</file>
<file>icons/page_white_cd.png</file> <file>icons/page_white_cd.png</file>
<file>icons/paste_plain.png</file> <file>icons/paste_plain.png</file>
<file>icons/photo.png</file>
<file>icons/play.png</file> <file>icons/play.png</file>
<file>icons/report.png</file> <file>icons/report.png</file>
<file>icons/resultset_next.png</file> <file>icons/resultset_next.png</file>

Binary file not shown.

View File

@ -25,7 +25,7 @@
#define VER_LAMEXP_MAJOR 4 #define VER_LAMEXP_MAJOR 4
#define VER_LAMEXP_MINOR_HI 0 #define VER_LAMEXP_MINOR_HI 0
#define VER_LAMEXP_MINOR_LO 1 #define VER_LAMEXP_MINOR_LO 1
#define VER_LAMEXP_BUILD 385 #define VER_LAMEXP_BUILD 387
#define VER_LAMEXP_SUFFIX Beta-10 #define VER_LAMEXP_SUFFIX Beta-10
/* /*

View File

@ -33,6 +33,9 @@ MetaInfoDialog::MetaInfoDialog(QWidget *parent)
{ {
//Init the dialog, from the .ui file //Init the dialog, from the .ui file
setupUi(this); setupUi(this);
//Hide artwork
frameArtwork->hide();
//Fix size //Fix size
setMinimumSize(this->size()); setMinimumSize(this->size());
@ -61,9 +64,32 @@ int MetaInfoDialog::exec(AudioFileModel &audioFile, bool allowUp, bool allowDown
{ {
MetaInfoModel *model = new MetaInfoModel(&audioFile); MetaInfoModel *model = new MetaInfoModel(&audioFile);
tableView->setModel(model); tableView->setModel(model);
tableView->show();
frameArtwork->hide();
setWindowTitle(QString("Meta Information: %1").arg(QFileInfo(audioFile.filePath()).fileName())); setWindowTitle(QString("Meta Information: %1").arg(QFileInfo(audioFile.filePath()).fileName()));
editButton->setEnabled(true);
upButton->setEnabled(allowUp); upButton->setEnabled(allowUp);
downButton->setEnabled(allowDown); downButton->setEnabled(allowDown);
buttonArtwork->setChecked(false);
buttonArtwork->setEnabled(false);
if(!audioFile.fileCover().isEmpty())
{
QImage artwork;
if(artwork.load(audioFile.fileCover()))
{
if((artwork.width() > 320) || (artwork.height() > 240))
{
artwork = artwork.scaled(320, 240, Qt::KeepAspectRatio, Qt::SmoothTransformation);
}
labelArtwork->setPixmap(QPixmap::fromImage(artwork));
buttonArtwork->setEnabled(true);
}
else
{
qWarning("Error: Failed to load cover art!");
}
}
int iResult = QDialog::exec(); int iResult = QDialog::exec();

View File

@ -181,7 +181,7 @@ g_lamexp_ipc_ptr =
}; };
//Image formats //Image formats
static const char *g_lamexp_imageformats[] = {"png", "gif", "ico", "svg", NULL}; static const char *g_lamexp_imageformats[] = {"png", "jpg", "gif", "ico", "svg", NULL};
//Global locks //Global locks
static QMutex g_lamexp_message_mutex; static QMutex g_lamexp_message_mutex;