*
* \author Kalle Dalheimer
*
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
*/
#include <config.h>
-#ifdef __GNUG__
-#pragma implementation
-#endif
+#include "QAbout.h"
+#include "QAboutDialog.h"
+#include "Qt2BC.h"
+#include "qt_helpers.h"
+
+#include "controllers/ButtonController.h"
+#include "controllers/ControlAboutlyx.h"
#include "support/lstrings.h"
-#include "Lsstream.h"
-#include "debug.h"
-#include "gettext.h"
-#include "LyXView.h"
-#include "ButtonControllerBase.h"
-#include "ControlAboutlyx.h"
+
+#include <sstream>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qtextview.h>
-#include "QAboutDialog.h"
-#include "Qt2BC.h"
-#include "QAbout.h"
+using lyx::support::prefixIs;
using std::getline;
-typedef Qt2CB<ControlAboutlyx, Qt2DB<QAboutDialog> > base_class;
+using std::istringstream;
+using std::ostringstream;
+using std::string;
+namespace lyx {
+namespace frontend {
-QAbout::QAbout()
- : base_class(_("About LyX"))
+typedef QController<ControlAboutlyx, QView<QAboutDialog> > base_class;
+
+QAbout::QAbout(Dialog & parent)
+ : base_class(parent, _("About LyX"))
{
}
connect(dialog_.get()->closePB, SIGNAL(clicked()),
this, SLOT(slotClose()));
- dialog_->copyright->setText(controller().getCopyright().c_str());
+ dialog_->copyright->setText(toqstr(controller().getCopyright()));
dialog_->copyright->append("\n");
- dialog_->copyright->append(controller().getLicense().c_str());
+ dialog_->copyright->append(toqstr(controller().getLicense()));
dialog_->copyright->append("\n");
- dialog_->copyright->append(controller().getDisclaimer().c_str());
+ dialog_->copyright->append(toqstr(controller().getDisclaimer()));
- dialog_->versionLA->setText(controller().getVersion().c_str());
+ dialog_->versionLA->setText(toqstr(controller().getVersion()));
// The code below should depend on a autoconf test. (Lgb)
-#if 0
+#if 1
// There are a lot of buggy stringstream implementations..., but the
// code below will work on all of them (I hope). The drawback with
// this solutions os the extra copying. (Lgb)
}
#endif
- dialog_->creditsTV->setText(out.str().c_str());
+ dialog_->creditsTV->setText(toqstr(out.str()));
// try to resize to a good size
dialog_->copyright->hide();
dialog_->setMinimumSize(dialog_->sizeHint());
// Manage the cancel/close button
- bc().setCancel(dialog_->closePB);
+ bcview().setCancel(dialog_->closePB);
bc().refresh();
}
+
+} // namespace frontend
+} // namespace lyx