transmission/qt/license.cc

43 lines
1.7 KiB
C++
Raw Normal View History

2009-05-08 18:52:06 +00:00
/*
2009-12-05 02:19:24 +00:00
* This file Copyright (C) 2009 Mnemosyne LLC
2009-05-08 18:52:06 +00:00
*
* This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
* the Transmission project.
*
* $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 )
{
setWindowTitle( tr( "License" ) );
resize( 400, 300 );
QVBoxLayout * v = new QVBoxLayout( this );
QPlainTextEdit * t = new QPlainTextEdit( this );
t->setReadOnly( true );
t->setPlainText(
"The OS X client, CLI client, and parts of libtransmission are licensed under the terms of the MIT license.\n\n"
"The Transmission daemon, GTK+ client, Qt client, Web client, and most of libtransmission are licensed under the terms of the GNU GPL version 2, with two special exceptions:\n\n"
"1. The MIT-licensed portions of Transmission listed above are exempt from GPLv2 clause 2(b) and may retain their MIT license.\n\n"
"2. Permission 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." );
2009-05-08 18:52:06 +00:00
v->addWidget( t );
QDialogButtonBox * box = new QDialogButtonBox;
box->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
box->setOrientation( Qt::Horizontal );
box->setStandardButtons( QDialogButtonBox::Close );
v->addWidget( box );
connect( box, SIGNAL(rejected()), this, SLOT(hide()) );
}