2014-02-26 03:58:19 +01:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Simple x264 Launcher
|
2016-01-01 23:59:55 +01:00
|
|
|
// Copyright (C) 2004-2016 LoRd_MuldeR <MuldeR2@GMX.de>
|
2014-02-26 03:58:19 +01:00
|
|
|
//
|
|
|
|
// 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 "win_about.h"
|
2015-02-01 16:33:31 +01:00
|
|
|
#include "UIC_win_about.h"
|
2014-02-26 03:58:19 +01:00
|
|
|
|
2015-02-08 21:14:21 +01:00
|
|
|
//Internal
|
2014-02-26 03:58:19 +01:00
|
|
|
#include "global.h"
|
|
|
|
|
2015-02-08 21:14:21 +01:00
|
|
|
//MUtils
|
|
|
|
#include <MUtils/Version.h>
|
|
|
|
|
|
|
|
//Qt
|
2014-02-26 03:58:19 +01:00
|
|
|
#include <QProcess>
|
|
|
|
#include <QScrollBar>
|
|
|
|
#include <QDate>
|
|
|
|
#include <QTimer>
|
|
|
|
#include <QMessageBox>
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Constructor & Destructor
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
AboutDialog::AboutDialog(QWidget *parent)
|
|
|
|
:
|
|
|
|
QDialog(parent),
|
|
|
|
ui(new Ui::AboutDialog())
|
|
|
|
{
|
|
|
|
//Init the dialog, from the .ui file
|
|
|
|
ui->setupUi(this);
|
|
|
|
setWindowFlags(windowFlags() | Qt::Tool);
|
|
|
|
|
|
|
|
//Fill in the template text
|
|
|
|
ui->labelAbout->setText(
|
|
|
|
ui->labelAbout->text().arg(
|
|
|
|
QString().sprintf("%u.%02u.%u", x264_version_major(),
|
|
|
|
x264_version_minor(),
|
|
|
|
x264_version_build()),
|
2015-02-08 21:14:21 +01:00
|
|
|
QString::number(qMax(MUtils::Version::app_build_date().year(),QDate::currentDate().year())),
|
|
|
|
MUtils::Version::app_build_date().toString(Qt::ISODate),
|
|
|
|
MUtils::Version::app_build_time().toString(Qt::ISODate),
|
|
|
|
MUtils::Version::compiler_version(),
|
|
|
|
MUtils::Version::compiler_arch(),
|
2014-02-26 15:34:56 +01:00
|
|
|
QString::fromLatin1(QT_VERSION_STR)
|
2014-02-26 03:58:19 +01:00
|
|
|
)
|
|
|
|
);
|
|
|
|
|
2014-02-26 15:34:56 +01:00
|
|
|
//Enable hover
|
|
|
|
ui->labelGPL->setAttribute(Qt::WA_Hover, true);
|
|
|
|
((QWidget*)ui->labelGPL->parent())->setAttribute(Qt::WA_Hover, true);
|
|
|
|
((QWidget*)ui->labelGPL->parent()->parent())->setAttribute(Qt::WA_Hover, true);
|
|
|
|
|
2014-02-26 03:58:19 +01:00
|
|
|
//Switch to first tab
|
|
|
|
ui->tabWidget->setCurrentIndex(ui->tabWidget->indexOf(ui->tabAbout));
|
|
|
|
|
|
|
|
//Connect button
|
|
|
|
connect(ui->aboutQtButton, SIGNAL(clicked()), this, SLOT(showAboutQt()));
|
|
|
|
}
|
|
|
|
|
|
|
|
AboutDialog::~AboutDialog(void)
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Public Functions
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/*None*/
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Events
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
void AboutDialog::showEvent(QShowEvent *event)
|
|
|
|
{
|
2014-02-26 15:34:56 +01:00
|
|
|
QDialog::showEvent(event);
|
|
|
|
|
|
|
|
//Fix dialog size - need to do this in Show event
|
2014-02-26 03:58:19 +01:00
|
|
|
const QSize hint = sizeHint();
|
|
|
|
setFixedSize(hint.isValid() ? hint : size());
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Slots
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
void AboutDialog::showAboutQt(void)
|
|
|
|
{
|
|
|
|
QMessageBox::aboutQt(this);
|
|
|
|
}
|