3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
6 * \author Kalle Dalheimer <kalle@klaralvdalens-datakonsult.se>
11 #include "support/lstrings.h"
16 #include "ButtonControllerBase.h"
17 #include "ControlAboutlyx.h"
20 #include <qpushbutton.h>
21 #include <qtextview.h>
23 #include "QAboutDialog.h"
29 typedef Qt2CB<ControlAboutlyx, Qt2DB<QAboutDialog> > base_class;
32 : base_class(_("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_->copyright->setText(controller().getCopyright().c_str());
44 dialog_->copyright->append("\n");
45 dialog_->copyright->append(controller().getLicense().c_str());
46 dialog_->copyright->append("\n");
47 dialog_->copyright->append(controller().getDisclaimer().c_str());
49 dialog_->versionLA->setText(controller().getVersion().c_str());
52 controller().getCredits(in);
54 istringstream ss(in.str().c_str());
59 while (getline(ss, s)) {
60 if (prefixIs(s, "@b"))
61 out += "<b>" + s.substr(2) + "</b>";
62 else if (prefixIs(s, "@i"))
63 out += "<i>" + s.substr(2) + "</i>";
69 dialog_->creditsTV->setText(out.c_str());
71 // Manage the cancel/close button
72 bc().setCancel(dialog_->closePB);