3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
6 * \author Kalle Dalheimer <kalle@klaralvdalens-datakonsult.se>
11 #include "support/lstrings.h"
15 #include "QAboutDialog.h"
18 #include <qpushbutton.h>
19 #include <qtextview.h>
20 #include "QtLyXView.h"
22 #include "ButtonControllerBase.h"
24 #include "ControlAboutlyx.h"
29 typedef Qt2CB<ControlAboutlyx, Qt2DB<QAboutDialog> > base_class;
31 QAbout::QAbout(ControlAboutlyx & c)
32 : base_class(c, _("About LyX"))
37 void QAbout::build_dialog()
39 dialog_.reset(new QAboutDialog());
40 connect(dialog_.get()->closePB, SIGNAL(clicked()),
41 this, SLOT(slotClose()));
43 dialog_->copyrightLA->setText(controller().getCopyright().c_str());
44 dialog_->licenseLA->setText(controller().getLicense().c_str());
45 dialog_->disclaimerLA->setText(controller().getDisclaimer().c_str());
46 dialog_->versionLA->setText(controller().getVersion().c_str());
49 controller().getCredits(in);
51 istringstream ss(in.str().c_str());
56 while (getline(ss, s)) {
57 if (prefixIs(s, "@b"))
58 out += "<b>" + s.substr(2) + "</b>";
59 else if (prefixIs(s, "@i"))
60 out += "<i>" + s.substr(2) + "</i>";
66 dialog_->creditsTV->setText(out.c_str());
68 // Manage the cancel/close button
69 bc().setCancel(dialog_->closePB);