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"
27 typedef Qt2CB<ControlAboutlyx, Qt2DB<QAboutDialog> > base_class;
29 QAbout::QAbout(ControlAboutlyx & c)
30 : base_class(c, _("About LyX"))
37 dialog_.reset(new QAboutDialog());
38 connect(dialog_.get()->closePB, SIGNAL(clicked()),
39 this, SLOT(slotCancel()));
41 dialog_->copyrightLA->setText(controller().getCopyright().c_str());
42 dialog_->licenseLA->setText(controller().getLicense().c_str());
43 dialog_->disclaimerLA->setText(controller().getDisclaimer().c_str());
44 dialog_->versionLA->setText(controller().getVersion().c_str());
47 controller().getCredits(in);
49 istringstream ss(in.str().c_str());
54 while (getline(ss, s)) {
55 if (prefixIs(s, "@b"))
56 out += "<b>" + s.substr(2) + "</b>";
57 else if (prefixIs(s, "@i"))
58 out += "<i>" + s.substr(2) + "</i>";
64 dialog_->creditsTV->setText(out.c_str());
66 // Manage the cancel/close button
67 bc().setCancel(dialog_->closePB);