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
17 #include "FormCreditsDialogImpl.h"
18 #include <qtextview.h>
19 #include <qpushbutton.h>
23 #include "ControlCredits.h"
24 #include "FormCredits.h"
29 typedef Qt2CB<ControlCredits, Qt2DB<FormCreditsDialogImpl> > base_class;
31 FormCredits::FormCredits(ControlCredits & c)
32 : base_class(c, _("Credits"))
36 void FormCredits::build()
38 // PENDING(kalle) Parent?
39 dialog_.reset(new FormCreditsDialogImpl( this ));
41 // Manage the cancel/close button
42 bc().setCancel(dialog_->okPB);
46 QString xformscredits = controller().getCredits( ss ).str().c_str();
47 QStringList xformslist = QStringList::split( '\n', controller().getCredits( ss ).str().c_str(), true );
48 for( QStringList::Iterator it = xformslist.begin(); it != xformslist.end(); ++it ) {
50 if( line.left( 2 ) == "@b" )
51 dialog_->creditsTV->append( "<b>" + line.mid( 2 ) + "</b>" );
52 else if( line.left( 2 ) == "@i" )
53 dialog_->creditsTV->append( "<i>" + line.mid( 2 ) + "</i>" );
55 dialog_->creditsTV->append( line );