2009-04-09 18:55:47 +00:00
|
|
|
/*
|
2015-06-10 21:27:11 +00:00
|
|
|
* This file Copyright (C) 2009-2015 Mnemosyne LLC
|
2009-04-09 18:55:47 +00:00
|
|
|
*
|
2014-12-21 23:49:39 +00:00
|
|
|
* It may be used under the GNU GPL versions 2 or 3
|
2014-01-19 01:09:44 +00:00
|
|
|
* or any future license endorsed by Mnemosyne LLC.
|
2009-04-09 18:55:47 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2014-12-12 21:47:22 +00:00
|
|
|
#include <QApplication>
|
|
|
|
#include <QIcon>
|
2009-04-26 19:08:49 +00:00
|
|
|
#include <QMessageBox>
|
|
|
|
#include <QPushButton>
|
2009-04-09 18:55:47 +00:00
|
|
|
|
|
|
|
#include <libtransmission/transmission.h>
|
|
|
|
#include <libtransmission/version.h>
|
|
|
|
|
2015-06-10 21:27:11 +00:00
|
|
|
#include "AboutDialog.h"
|
|
|
|
#include "LicenseDialog.h"
|
2015-07-30 06:18:02 +00:00
|
|
|
#include "Utils.h"
|
2009-04-09 18:55:47 +00:00
|
|
|
|
2017-04-19 12:04:45 +00:00
|
|
|
AboutDialog::AboutDialog(QWidget* parent) :
|
2020-05-20 01:32:51 +00:00
|
|
|
BaseDialog(parent)
|
2009-04-09 18:55:47 +00:00
|
|
|
{
|
2020-05-27 21:53:12 +00:00
|
|
|
ui_.setupUi(this);
|
2013-01-26 01:19:54 +00:00
|
|
|
|
2020-05-27 21:53:12 +00:00
|
|
|
ui_.iconLabel->setPixmap(qApp->windowIcon().pixmap(48));
|
2020-05-29 17:40:07 +00:00
|
|
|
ui_.titleLabel->setText(tr("<b style='font-size:x-large'>Transmission %1</b>").arg(QStringLiteral(LONG_VERSION_STRING)));
|
2013-01-26 01:19:54 +00:00
|
|
|
|
2017-04-19 12:04:45 +00:00
|
|
|
QPushButton* b;
|
2013-01-26 01:19:54 +00:00
|
|
|
|
2020-05-27 21:53:12 +00:00
|
|
|
b = ui_.dialogButtons->addButton(tr("C&redits"), QDialogButtonBox::ActionRole);
|
2017-04-19 12:04:45 +00:00
|
|
|
connect(b, SIGNAL(clicked()), this, SLOT(showCredits()));
|
2013-01-26 01:19:54 +00:00
|
|
|
|
2020-05-27 21:53:12 +00:00
|
|
|
b = ui_.dialogButtons->addButton(tr("&License"), QDialogButtonBox::ActionRole);
|
2017-04-19 12:04:45 +00:00
|
|
|
connect(b, SIGNAL(clicked()), this, SLOT(showLicense()));
|
2013-01-26 01:19:54 +00:00
|
|
|
|
2020-05-27 21:53:12 +00:00
|
|
|
ui_.dialogButtons->button(QDialogButtonBox::Close)->setDefault(true);
|
2009-04-09 18:55:47 +00:00
|
|
|
}
|
2009-04-26 19:08:49 +00:00
|
|
|
|
2017-04-19 12:04:45 +00:00
|
|
|
void AboutDialog::showCredits()
|
2009-04-26 19:08:49 +00:00
|
|
|
{
|
2017-04-19 12:04:45 +00:00
|
|
|
QMessageBox::about(this, tr("Credits"), QString::fromUtf8(
|
2020-05-02 16:42:18 +00:00
|
|
|
"Charles Kerr (Backend; Daemon; GTK+; Qt)\n"
|
2017-04-19 12:04:45 +00:00
|
|
|
"Mitchell Livingston (OS X)\n"
|
|
|
|
"Mike Gelfand\n"));
|
2009-04-26 19:08:49 +00:00
|
|
|
}
|
2015-07-30 06:18:02 +00:00
|
|
|
|
2017-04-19 12:04:45 +00:00
|
|
|
void AboutDialog::showLicense()
|
2015-07-30 06:18:02 +00:00
|
|
|
{
|
2020-05-27 21:53:12 +00:00
|
|
|
Utils::openDialog(license_dialog_, this);
|
2015-07-30 06:18:02 +00:00
|
|
|
}
|