/////////////////////////////////////////////////////////////////////////////// // LameXP - Audio Encoder Front-End // Copyright (C) 2004-2010 LoRd_MuldeR // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License along // with this program; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. // // http://www.gnu.org/licenses/gpl-2.0.txt /////////////////////////////////////////////////////////////////////////////// #include "Dialog_About.h" #include "Global.h" #include "Resource.h" //Qt includes #include #include #include #include //Win32 includes #include //Helper macros #define LINK(URL) QString("%2").arg(URL).arg(URL) AboutDialog::AboutDialog(QWidget *parent) : QMessageBox(parent) { QString aboutText; aboutText += "

LameXP - Audio Encoder Front-end

"; aboutText += QString("Copyright (C) 2004-%1 LoRd_MuldeR <MuldeR2@GMX.de>. Some rights reserved.
").arg(max(lamexp_version_date().year(),QDate::currentDate().year())); aboutText += QString().sprintf("Version %d.%02d %s, Build %d [%s]

", lamexp_version_major(), lamexp_version_minor(), lamexp_version_release(), lamexp_version_build(), lamexp_version_date().toString(Qt::ISODate).toLatin1().constData()); aboutText += "Please visit the official web-site at "; aboutText += LINK("http://mulder.dummwiedeutsch.de/") += " for news and updates!
"; aboutText += "

"; aboutText += "This program is free software; you can redistribute it and/or
"; aboutText += "modify it under the terms of the GNU General Public License
"; aboutText += "as published by the Free Software Foundation; either version 2
"; aboutText += "of the License, or (at your option) any later version.

"; aboutText += "This program is distributed in the hope that it will be useful,
"; aboutText += "but WITHOUT ANY WARRANTY; without even the implied warranty of
"; aboutText += "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
"; aboutText += "GNU General Public License for more details.

"; aboutText += "You should have received a copy of the GNU General Public License
"; aboutText += "along with this program; if not, write to the Free Software
"; aboutText += "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

"; aboutText += "

"; aboutText += "This software uses the 'slick' icon set by Mark James – http://www.famfamfam.com/.
"; aboutText += "Released under the Creative Commons Attribution 2.5 License.
"; setText(aboutText); setIconPixmap(dynamic_cast(QApplication::instance())->windowIcon().pixmap(QSize(64,64))); setWindowTitle("About LameXP"); QPushButton *firstButton = addButton("More About...", QMessageBox::AcceptRole); firstButton->setIcon(QIcon(":/icons/information.png")); firstButton->setMinimumWidth(120); QPushButton *secondButton = addButton("About Qt...", QMessageBox::AcceptRole); secondButton->setIcon(QIcon(":/images/Qt.svg")); secondButton->setMinimumWidth(120); QPushButton *thirdButton = addButton("Discard", QMessageBox::AcceptRole); thirdButton->setIcon(QIcon(":/icons/cross.png")); thirdButton->setMinimumWidth(90); } AboutDialog::~AboutDialog(void) { } int AboutDialog::exec() { PlaySound(MAKEINTRESOURCE(IDR_WAVE_ABOUT), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC); while(1) { switch(QMessageBox::exec()) { case 0: showMoreAbout(); break; case 1: QMessageBox::aboutQt(dynamic_cast(this->parent())); break; default: return 0; } } return 0; } void AboutDialog::showMoreAbout() { const QString li("
  • "); QString moreAboutText; moreAboutText += "

    The following third-party software is used in LameXP:

    "; moreAboutText += "
      "; moreAboutText += li + "LAME - OpenSource mp3 Encoder
      "; moreAboutText += "Released under the terms of the GNU Leser General Public License.
      "; moreAboutText += LINK("http://lame.sourceforge.net/"); moreAboutText += "
      "; moreAboutText += li + "OggEnc - Ogg Vorbis Encoder"; moreAboutText += "
      Completely open and patent-free audio encoding technology.
      "; moreAboutText += LINK("http://www.vorbis.com/"); moreAboutText += "
      "; moreAboutText += li + "Nero AAC reference MPEG-4 Encoder
      "; moreAboutText += "Freeware state-of-the-art HE-AAC encoder with 2-Pass support.
      "; moreAboutText += "(Available from vendor web-site as free download)
      "; moreAboutText += LINK("http://www.nero.com/eng/technologies-aac-codec.html/"); moreAboutText += "
      "; moreAboutText += li + "MediaInfo - Media File Analysis Tool
      "; moreAboutText += "Released under the terms of the GNU Leser General Public License.
      "; moreAboutText += LINK("http://mediainfo.sourceforge.net/"); moreAboutText += "
    "; QMessageBox *moreAboutBox = new QMessageBox(dynamic_cast(this->parent())); moreAboutBox->setText(moreAboutText); moreAboutBox->setIconPixmap(dynamic_cast(QApplication::instance())->windowIcon().pixmap(QSize(64,64))); QPushButton *closeButton = moreAboutBox->addButton("Discard", QMessageBox::AcceptRole); closeButton->setIcon(QIcon(":/icons/cross.png")); closeButton->setMinimumWidth(90); moreAboutBox->setWindowTitle("About Third-party Software"); moreAboutBox->exec(); LAMEXP_DELETE(moreAboutBox); }