3 * Copyright 2001 The LyX Team.
4 * See the file COPYING.
6 * \author Edwin Leuven, leuven@fee.uva.nl
7 * \author Angus Leeming, a.leeming@.ac.uk
8 * \author Kalle Dalheimer, kalle@klaralvdalens-datakonsult.se
12 #pragma implementation
18 #include "FormCreditsDialogImpl.h"
19 #include <qtextview.h>
20 #include <qpushbutton.h>
24 #include "ControlCredits.h"
25 #include "FormCredits.h"
30 typedef Qt2CB<ControlCredits, Qt2DB<FormCreditsDialogImpl> > base_class;
32 FormCredits::FormCredits(ControlCredits & c)
33 : base_class(c, _("Credits"))
37 void FormCredits::build()
39 // PENDING(kalle) Parent?
40 dialog_.reset(new FormCreditsDialogImpl( this ));
42 // Manage the cancel/close button
43 bc().setCancel(dialog_->okPB);
47 QString xformscredits = controller().getCredits( ss ).str().c_str();
48 QStringList xformslist = QStringList::split( '\n', controller().getCredits( ss ).str().c_str(), true );
49 for( QStringList::Iterator it = xformslist.begin(); it != xformslist.end(); ++it ) {
51 if( line.left( 2 ) == "@b" )
52 dialog_->creditsTV->append( "<b>" + line.mid( 2 ) + "</b>" );
53 else if( line.left( 2 ) == "@i" )
54 dialog_->creditsTV->append( "<i>" + line.mid( 2 ) + "</i>" );
56 dialog_->creditsTV->append( line );