transmission/qt/about.cc

52 lines
1.4 KiB
C++
Raw Normal View History

2009-04-09 18:55:47 +00:00
/*
* This file Copyright (C) 2009-2014 Mnemosyne LLC
2009-04-09 18:55:47 +00:00
*
* It may be used under the GNU GPL versions 2 or 3
* or any future license endorsed by Mnemosyne LLC.
2009-04-09 18:55:47 +00:00
*
* $Id$
2009-04-09 18:55:47 +00:00
*/
#include <QApplication>
#include <QIcon>
#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
AboutDialog::AboutDialog (QWidget * parent):
QDialog (parent, Qt::Dialog),
myLicenseDialog (new LicenseDialog (this))
2009-04-09 18:55:47 +00:00
{
ui.setupUi (this);
ui.iconLabel->setPixmap (qApp->windowIcon ().pixmap (48));
ui.titleLabel->setText (tr ("<b style='font-size:x-large'>Transmission %1</b>").arg (QString::fromUtf8 (LONG_VERSION_STRING)));
QPushButton * b;
b = new QPushButton (tr ("C&redits"), this);
ui.dialogButtons->addButton (b, QDialogButtonBox::ActionRole);
connect (b, SIGNAL (clicked ()), this, SLOT (showCredits ()));
b = new QPushButton (tr ("&License"), this);
ui.dialogButtons->addButton (b, QDialogButtonBox::ActionRole);
connect (b, SIGNAL (clicked ()), myLicenseDialog, SLOT (show ()));
ui.dialogButtons->button (QDialogButtonBox::Close)->setDefault (true);
2009-04-09 18:55:47 +00:00
}
void
AboutDialog::showCredits ()
{
QMessageBox::about (
this,
tr ("Credits"),
2013-07-27 21:58:14 +00:00
QString::fromUtf8 ("Jordan Lee (Backend; Daemon; GTK+; Qt)\n"
"Michell Livingston (OS X)\n"));
}