]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/FormCopyright.C
First attempt at converting copyright dialog to MVC architecture
[lyx.git] / src / frontends / qt2 / FormCopyright.C
1 /***************************************************************************
2                           formcopyright.cpp  -  description
3                              -------------------
4     begin                : Thu Feb 3 2000
5     copyright            : (C) 2000 by Jürgen Vigna, 2001 by Kalle Dalheimer
6     email                : kalle@klaralvdalens-datakonsult.se
7  ***************************************************************************/
8
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either version 2 of the License, or     *
14  *   (at your option) any later version.                                   *
15  *                                                                         *
16  ***************************************************************************/
17
18 #include <config.h>
19
20
21 #include "FormCopyrightDialogImpl.h"
22 #include <qlabel.h>
23 #include <qpushbutton.h>
24 #undef emit
25 #include "qt2BC.h"
26 #include "ControlCopyright.h"
27 #include "FormCopyright.h"
28
29 typedef FormCB<ControlCopyright, FormDB<FormCopyrightDialogImpl> > base_class;
30
31 FormCopyright::FormCopyright( ControlCopyright& c ) :
32     base_class( c, _( "Copyright and Warranty" ) )
33 {
34 }
35
36
37 void FormCopyright::build()
38 {
39     // PENDING(kalle) Parent???
40     dialog_.reset( new FormCopyrightDialogImpl() );
41
42     dialog_->copyrightLA->setText( controller().getCopyright().c_str() );
43     dialog_->licenseLA->setText( controller().getLicence().c_str() );
44     dialog_->disclaimerLA->setText( controller().getDisclaimer().c_str() );
45     
46     // Manage the cancel/close button
47     bc().setCancel(dialog_->okPB);
48     bc().refresh();
49 }
50
51
52