2009-05-08 18:52:06 +00:00
/*
2014-01-19 01:09:44 +00:00
* This file Copyright ( C ) 2009 - 2014 Mnemosyne LLC
2009-05-08 18:52:06 +00:00
*
2014-01-19 01:09:44 +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
*
2009-05-31 19:33:48 +00:00
* $ Id $
2009-05-08 18:52:06 +00:00
*/
# include <QDialogButtonBox>
# include <QPlainTextEdit>
# include <QVBoxLayout>
# include "license.h"
2013-02-03 19:40:20 +00:00
LicenseDialog : : LicenseDialog ( QWidget * parent ) :
QDialog ( parent , Qt : : Dialog )
2009-05-08 18:52:06 +00:00
{
2013-02-03 19:40:20 +00:00
setWindowTitle ( tr ( " License " ) ) ;
resize ( 400 , 300 ) ;
QVBoxLayout * v = new QVBoxLayout ( this ) ;
2009-05-08 18:52:06 +00:00
2013-02-03 19:40:20 +00:00
QPlainTextEdit * t = new QPlainTextEdit ( this ) ;
t - > setReadOnly ( true ) ;
t - > setPlainText (
2014-01-19 01:09:44 +00:00
" Transmission may be used under the GNU Public License v2 or v3 licenses, or any future license endorsed by Mnemosyne LLC. \n \n 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. " ) ;
2013-02-03 19:40:20 +00:00
v - > addWidget ( t ) ;
2009-05-08 18:52:06 +00:00
2013-02-03 19:40:20 +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
2013-02-03 19:40:20 +00:00
connect ( box , SIGNAL ( rejected ( ) ) , this , SLOT ( hide ( ) ) ) ;
2009-05-08 18:52:06 +00:00
}