Added some more "special" application icons.

This commit is contained in:
LoRd_MuldeR 2011-12-24 20:04:49 +01:00
parent dce362c997
commit 30f1795d32
12 changed files with 77 additions and 10 deletions

View File

@ -973,6 +973,7 @@ del "$(TargetDir)imageformats\q???d4.dll"
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\rcc.exe" -o "$(SolutionDir)tmp\QRC_%(Filename).cpp" -name "%(Filename)" "%(FullPath)" <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\rcc.exe" -o "$(SolutionDir)tmp\QRC_%(Filename).cpp" -name "%(Filename)" "%(FullPath)"
</Command> </Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\QRC_%(Filename).cpp;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\QRC_%(Filename).cpp;%(Outputs)</Outputs>
<SubType>Designer</SubType>
</CustomBuild> </CustomBuild>
<CustomBuild Include="res\Images.qrc"> <CustomBuild Include="res\Images.qrc">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">RCC "$(SolutionDir)tmp\QRC_%(Filename).cpp"</Message> <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">RCC "$(SolutionDir)tmp\QRC_%(Filename).cpp"</Message>

View File

@ -2854,17 +2854,17 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="789"/> <location filename="../../src/Global.cpp" line="843"/>
<source>Executable &apos;%1&apos; requires Qt v%2, but found Qt v%3.</source> <source>Executable &apos;%1&apos; requires Qt v%2, but found Qt v%3.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="794"/> <location filename="../../src/Global.cpp" line="848"/>
<source>Executable &apos;%1&apos; was built for Qt &apos;%2&apos;, but found Qt &apos;%3&apos;.</source> <source>Executable &apos;%1&apos; was built for Qt &apos;%2&apos;, but found Qt &apos;%3&apos;.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="803"/> <location filename="../../src/Global.cpp" line="857"/>
<source>Executable &apos;%1&apos; requires Windows 2000 or later.</source> <source>Executable &apos;%1&apos; requires Windows 2000 or later.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -2854,17 +2854,17 @@
<translation type="unfinished">Plik wykonywalny &apos;%1&apos; nie działa w trybie kompatybilności z Windows.</translation> <translation type="unfinished">Plik wykonywalny &apos;%1&apos; nie działa w trybie kompatybilności z Windows.</translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="789"/> <location filename="../../src/Global.cpp" line="843"/>
<source>Executable &apos;%1&apos; requires Qt v%2, but found Qt v%3.</source> <source>Executable &apos;%1&apos; requires Qt v%2, but found Qt v%3.</source>
<translation type="unfinished">Plik wykonywalny &apos;%1&apos; wymaga Qt v%2, znaleziono jednak Qt v%3.</translation> <translation type="unfinished">Plik wykonywalny &apos;%1&apos; wymaga Qt v%2, znaleziono jednak Qt v%3.</translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="794"/> <location filename="../../src/Global.cpp" line="848"/>
<source>Executable &apos;%1&apos; was built for Qt &apos;%2&apos;, but found Qt &apos;%3&apos;.</source> <source>Executable &apos;%1&apos; was built for Qt &apos;%2&apos;, but found Qt &apos;%3&apos;.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="803"/> <location filename="../../src/Global.cpp" line="857"/>
<source>Executable &apos;%1&apos; requires Windows 2000 or later.</source> <source>Executable &apos;%1&apos; requires Windows 2000 or later.</source>
<translation type="unfinished">Plik wykonywalny &apos;%1&apos; wymaga do uruchomienia Windows 2000 lub nowszego.</translation> <translation type="unfinished">Plik wykonywalny &apos;%1&apos; wymaga do uruchomienia Windows 2000 lub nowszego.</translation>
</message> </message>

View File

@ -156,7 +156,7 @@
<string/> <string/>
</property> </property>
<property name="pixmap"> <property name="pixmap">
<pixmap resource="../res/Icons.qrc">:/MainIcon.png</pixmap> <pixmap resource="../res/Icons.qrc">:/MainIcon1.png</pixmap>
</property> </property>
<property name="scaledContents"> <property name="scaledContents">
<bool>true</bool> <bool>true</bool>

View File

@ -2,8 +2,11 @@
<RCC version="1.0"> <RCC version="1.0">
<qresource> <qresource>
<file>MainIcon.ico</file> <file>MainIcon.ico</file>
<file>MainIcon.png</file> <file>MainIcon1.png</file>
<file>MainIcon2.png</file> <file>MainIcon2.png</file>
<file>MainIcon3.png</file>
<file>MainIcon4.png</file>
<file>MainIcon5.png</file>
<file>icons/add.png</file> <file>icons/add.png</file>
<file>icons/accept.png</file> <file>icons/accept.png</file>
<file>icons/application_view_list.png</file> <file>icons/application_view_list.png</file>

View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

BIN
res/MainIcon3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
res/MainIcon4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
res/MainIcon5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 4 #define VER_LAMEXP_MINOR_LO 4
#define VER_LAMEXP_TYPE Alpha #define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 12 #define VER_LAMEXP_PATCH 12
#define VER_LAMEXP_BUILD 837 #define VER_LAMEXP_BUILD 842
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Tool versions (minimum expected versions!) // Tool versions (minimum expected versions!)

View File

@ -113,6 +113,9 @@ ProcessingDialog::ProcessingDialog(FileListModel *fileListModel, AudioFileModel
setupUi(this); setupUi(this);
setWindowFlags(windowFlags() ^ Qt::WindowContextHelpButtonHint); setWindowFlags(windowFlags() ^ Qt::WindowContextHelpButtonHint);
//Update header icon
label_headerIcon->setPixmap(QApplication::windowIcon().pixmap(label_headerIcon->pixmap()->size()));
//Setup version info //Setup version info
label_versionInfo->setText(QString().sprintf("v%d.%02d %s (Build %d)", lamexp_version_major(), lamexp_version_minor(), lamexp_version_release(), lamexp_version_build())); label_versionInfo->setText(QString().sprintf("v%d.%02d %s (Build %d)", lamexp_version_major(), lamexp_version_minor(), lamexp_version_release(), lamexp_version_build()));
label_versionInfo->installEventFilter(this); label_versionInfo->installEventFilter(this);

View File

@ -706,6 +706,60 @@ static bool lamexp_check_compatibility_mode(const char *exportName, const char *
return true; return true;
} }
/*
* Computus according to H. Lichtenberg
*/
static bool lamexp_computus(const QDate &date)
{
int X = date.year();
int A = X % 19;
int K = X / 100;
int M = 15 + (3*K + 3) / 4 - (8*K + 13) / 25;
int D = (19*A + M) % 30;
int S = 2 - (3*K + 3) / 4;
int R = D / 29 + (D / 28 - D / 29) * (A / 11);
int OG = 21 + D - R;
int SZ = 7 - (X + X / 4 + S) % 7;
int OE = 7 - (OG - SZ) % 7;
int OS = (OG + OE);
if(OS > 31)
{
return (date.month() == 4) && (date.day() == (OS - 31));
}
else
{
return (date.month() == 3) && (date.day() == OS);
}
}
/*
* Initialize app icon
*/
static QIcon lamexp_init_icon(const QDate &date, const QTime &time)
{
if(((date.month() == 1) && (date.day() == 1)) || ((date.month() == 12) && (date.day() == 31) && (time.hour() > 20)))
{
return QIcon(":/MainIcon5.png");
}
else if(((date.month() == 10) && (date.day() == 31)) || ((date.month() == 11) && (date.day() == 1) && (time.hour() < 7)))
{
return QIcon(":/MainIcon4.png");
}
else if(lamexp_computus(date))
{
return QIcon(":/MainIcon3.png");
}
else if((date.month() == 12) && (date.day() >= 24) && (date.day() <= 26))
{
return QIcon(":/MainIcon2.png");
}
else
{
return QIcon(":/MainIcon1.png");
}
}
/* /*
* Check for process elevation * Check for process elevation
*/ */
@ -840,14 +894,20 @@ bool lamexp_init_qt(int argc, char* argv[])
ntdll.unload(); ntdll.unload();
} }
for(int test = 2000; test < 2031; test++)
{
lamexp_computus(QDate(test, 1, 1));
}
//Create Qt application instance and setup version info //Create Qt application instance and setup version info
QDate date = QDate::currentDate(); QDate date = QDate::currentDate();
QTime time = QTime::currentTime();
QApplication *application = new QApplication(argc, argv); QApplication *application = new QApplication(argc, argv);
application->setApplicationName("LameXP - Audio Encoder Front-End"); application->setApplicationName("LameXP - Audio Encoder Front-End");
application->setApplicationVersion(QString().sprintf("%d.%02d.%04d", lamexp_version_major(), lamexp_version_minor(), lamexp_version_build())); application->setApplicationVersion(QString().sprintf("%d.%02d.%04d", lamexp_version_major(), lamexp_version_minor(), lamexp_version_build()));
application->setOrganizationName("LoRd_MuldeR"); application->setOrganizationName("LoRd_MuldeR");
application->setOrganizationDomain("mulder.at.gg"); application->setOrganizationDomain("mulder.at.gg");
application->setWindowIcon((date.month() == 12 && date.day() >= 24 && date.day() <= 26) ? QIcon(":/MainIcon2.png") : QIcon(":/MainIcon.png")); application->setWindowIcon(lamexp_init_icon(date, time));
//Set text Codec for locale //Set text Codec for locale
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8")); QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));