transmission/qt/license.cc

37 lines
1.2 KiB
C++
Raw Normal View History

2009-05-08 18:52:06 +00:00
/*
* This file Copyright (C) 2009-2014 Mnemosyne LLC
2009-05-08 18:52:06 +00:00
*
* It may be used under the GNU Public License v2 or v3 licenses,
* or any future license endorsed by Mnemosyne LLC.
2009-05-08 18:52:06 +00:00
*
* $Id$
2009-05-08 18:52:06 +00:00
*/
#include <QDialogButtonBox>
#include <QPlainTextEdit>
#include <QVBoxLayout>
#include "license.h"
LicenseDialog :: LicenseDialog (QWidget * parent):
QDialog (parent, Qt::Dialog)
2009-05-08 18:52:06 +00:00
{
setWindowTitle (tr ("License"));
resize (400, 300);
QVBoxLayout * v = new QVBoxLayout (this);
2009-05-08 18:52:06 +00:00
QPlainTextEdit * t = new QPlainTextEdit (this);
t->setReadOnly (true);
t->setPlainText (
"Transmission may be used under the GNU Public License v2 or v3 licenses, or any future license endorsed by Mnemosyne LLC.\n \nPermission is granted to link the code in this release with the OpenSSL project's 'OpenSSL' library and to distribute the linked executables. Works derived from Transmission may, at their authors' discretion, keep or delete this exception.");
v->addWidget (t);
2009-05-08 18:52:06 +00:00
QDialogButtonBox * box = new QDialogButtonBox;
box->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Fixed);
box->setOrientation (Qt::Horizontal);
box->setStandardButtons (QDialogButtonBox::Close);
v->addWidget (box);
2009-05-08 18:52:06 +00:00
connect (box, SIGNAL (rejected ()), this, SLOT (hide ()));
2009-05-08 18:52:06 +00:00
}