Improved announce box.

This commit is contained in:
LoRd_MuldeR 2011-09-18 02:01:45 +02:00
parent daa780d90f
commit 20d2e33a7d
5 changed files with 52 additions and 26 deletions

View File

@ -1,25 +1,26 @@
<!DOCTYPE RCC>
<RCC version="1.0">
<qresource>
<file>images/Busy.gif</file>
<file>images/Cartoon.png</file>
<file>images/CD.png</file>
<file>images/Disque.png</file>
<file>images/DropBox.png</file>
<file>images/HeaderIcon_CueImport.png</file>
<file>images/HeaderIcon_LogFile.png</file>
<file>images/HeaderIcon_MetaInfo.png</file>
<file>images/Label.png</file>
<file>images/Loading.gif</file>
<file>images/Loading2.gif</file>
<file>images/Loading3.gif</file>
<file>images/Logo.png</file>
<file>images/Logo_Contributors.png</file>
<file>images/Logo_Software.png</file>
<file>images/Qt.svg</file>
<file>images/Splash.png</file>
<file>images/Thumb.png</file>
<file>images/Wizard.png</file>
<file>images/Working.gif</file>
</qresource>
<file>images/Announcement.png</file>
<file>images/Busy.gif</file>
<file>images/Cartoon.png</file>
<file>images/CD.png</file>
<file>images/Disque.png</file>
<file>images/DropBox.png</file>
<file>images/HeaderIcon_CueImport.png</file>
<file>images/HeaderIcon_LogFile.png</file>
<file>images/HeaderIcon_MetaInfo.png</file>
<file>images/Label.png</file>
<file>images/Loading.gif</file>
<file>images/Loading2.gif</file>
<file>images/Loading3.gif</file>
<file>images/Logo.png</file>
<file>images/Logo_Contributors.png</file>
<file>images/Logo_Software.png</file>
<file>images/Qt.svg</file>
<file>images/Splash.png</file>
<file>images/Thumb.png</file>
<file>images/Wizard.png</file>
<file>images/Working.gif</file>
</qresource>
</RCC>

BIN
res/images/Announcement.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View File

@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 3
#define VER_LAMEXP_TYPE Beta
#define VER_LAMEXP_PATCH 2
#define VER_LAMEXP_BUILD 687
#define VER_LAMEXP_BUILD 688
///////////////////////////////////////////////////////////////////////////////
// Tools versions

View File

@ -926,10 +926,7 @@ void MainWindow::windowShown(void)
PlaySound(MAKEINTRESOURCE(IDR_WAVE_WOOHOO), GetModuleHandle(NULL), SND_RESOURCE | SND_SYNC);
m_settings->licenseAccepted(1);
//<ANNOUNCEMENT>
QMessageBox::information(this, "We want you!", QString("<nobr>We are still looking for LameXP translators!<br><br>If you are willing to translate LameXP to your language or to complete an existing translation, please refer to:<br><tt>" + LINK("http://mulder.brhack.net/public/doc/lamexp_translate.html") + "</tt></nobr><br>"));
//</ANNOUNCEMENT>
showAnnounceBox(); /*Do NOT forget to remove this for the final release!*/
}
//Check for expiration
@ -1078,6 +1075,33 @@ void MainWindow::windowShown(void)
}
}
/*
* Show announce box
*/
void MainWindow::showAnnounceBox(void)
{
QString announceText("<nobr>We are still looking for LameXP translators!<br><br>");
announceText.append("If you are willing to translate LameXP to your language or to complete an existing translation, please refer to:<br>");
announceText.append("<tt>" + LINK("http://mulder.brhack.net/public/doc/lamexp_translate.html") + "</tt></nobr><br>");
QMessageBox *announceBox = new QMessageBox(QMessageBox::Warning, "We want you!", announceText, QMessageBox::Discard, this);
announceBox->setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint);
announceBox->setIconPixmap(QIcon(":/images/Announcement.png").pixmap(64,79));
announceBox->button(QMessageBox::Discard)->hide();
QTimer *announceTimer = new QTimer(this);
announceTimer->setSingleShot(true);
announceTimer->setInterval(8000);
connect(announceTimer, SIGNAL(timeout()), announceBox->button(QMessageBox::Discard), SLOT(show()));
announceTimer->start();
announceBox->exec();
announceTimer->stop();
LAMEXP_DELETE(announceTimer);
LAMEXP_DELETE(announceBox);
}
// =========================================================
// Main button solots
// =========================================================

View File

@ -113,6 +113,7 @@ private slots:
void restoreCursor(void);
void samplingRateChanged(int value);
void saveToSourceFolderChanged(void);
void showAnnounceBox(void);
void showDetailsButtonClicked(void);
void showDropBoxWidgetActionTriggered(bool checked);
void showFolderContextActionTriggered(void);