2009-04-09 18:55:47 +00:00
|
|
|
/*
|
2014-01-19 01:09:44 +00:00
|
|
|
* This file Copyright (C) 2009-2014 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
|
|
|
*
|
2009-05-31 19:33:48 +00:00
|
|
|
* $Id$
|
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>
|
|
|
|
|
|
|
|
#include "about.h"
|
2009-05-08 18:52:06 +00:00
|
|
|
#include "license.h"
|
2009-04-09 18:55:47 +00:00
|
|
|
|
2014-12-12 23:05:10 +00:00
|
|
|
AboutDialog::AboutDialog (QWidget * parent):
|
2013-01-26 01:19:54 +00:00
|
|
|
QDialog (parent, Qt::Dialog),
|
|
|
|
myLicenseDialog (new LicenseDialog (this))
|
2009-04-09 18:55:47 +00:00
|
|
|
{
|
2014-12-25 19:39:45 +00:00
|
|
|
ui.setupUi (this);
|
2013-01-26 01:19:54 +00:00
|
|
|
|
2014-12-27 14:07:14 +00:00
|
|
|
ui.iconLabel->setPixmap (qApp->windowIcon ().pixmap (48));
|
2015-01-04 12:47:07 +00:00
|
|
|
ui.titleLabel->setText (tr ("<b style='font-size:x-large'>Transmission %1</b>").arg (QString::fromUtf8 (LONG_VERSION_STRING)));
|
2013-01-26 01:19:54 +00:00
|
|
|
|
|
|
|
QPushButton * b;
|
|
|
|
|
|
|
|
b = new QPushButton (tr ("C&redits"), this);
|
2014-12-25 19:39:45 +00:00
|
|
|
ui.dialogButtons->addButton (b, QDialogButtonBox::ActionRole);
|
2013-01-26 01:19:54 +00:00
|
|
|
connect (b, SIGNAL (clicked ()), this, SLOT (showCredits ()));
|
|
|
|
|
|
|
|
b = new QPushButton (tr ("&License"), this);
|
2014-12-25 19:39:45 +00:00
|
|
|
ui.dialogButtons->addButton (b, QDialogButtonBox::ActionRole);
|
2013-01-26 01:19:54 +00:00
|
|
|
connect (b, SIGNAL (clicked ()), myLicenseDialog, SLOT (show ()));
|
|
|
|
|
2014-12-25 19:39:45 +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
|
|
|
|
|
|
|
void
|
2014-12-12 23:05:10 +00:00
|
|
|
AboutDialog::showCredits ()
|
2009-04-26 19:08:49 +00:00
|
|
|
{
|
2013-01-26 01:19:54 +00:00
|
|
|
QMessageBox::about (
|
|
|
|
this,
|
|
|
|
tr ("Credits"),
|
2013-07-27 21:58:14 +00:00
|
|
|
QString::fromUtf8 ("Jordan Lee (Backend; Daemon; GTK+; Qt)\n"
|
2013-01-26 01:19:54 +00:00
|
|
|
"Michell Livingston (OS X)\n"));
|
2009-04-26 19:08:49 +00:00
|
|
|
}
|