]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/QAbout.C
Get rid of the static_casts.
[lyx.git] / src / frontends / qt2 / QAbout.C
index 3684c53aac967e8a91d5eace40e6a22801917afe..0bf9ab2b8dd538cf311c6ab77162a66744c9c044 100644 (file)
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "support/lstrings.h"
 #include "Lsstream.h"
 #include "debug.h"
-#include "gettext.h"
+#include "qt_helpers.h"
 #include "LyXView.h"
-#include "ButtonControllerBase.h"
+#include "ButtonController.h"
 #include "ControlAboutlyx.h"
 
 #include <qlabel.h>
 
 using std::getline;
 
-typedef Qt2CB<ControlAboutlyx, Qt2DB<QAboutDialog> > base_class;
+typedef QController<ControlAboutlyx, QView<QAboutDialog> > base_class;
 
 
-QAbout::QAbout()
-       : base_class(_("About LyX"))
+QAbout::QAbout(Dialog & parent)
+       : base_class(parent, _("About LyX"))
 {
 }
 
@@ -47,13 +44,13 @@ void QAbout::build_dialog()
        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 1
@@ -100,7 +97,7 @@ void QAbout::build_dialog()
        }
 #endif
 
-       dialog_->creditsTV->setText(out.str().c_str());
+       dialog_->creditsTV->setText(toqstr(out.str()));
 
        // try to resize to a good size
        dialog_->copyright->hide();
@@ -109,6 +106,6 @@ void QAbout::build_dialog()
        dialog_->setMinimumSize(dialog_->sizeHint());
 
        // Manage the cancel/close button
-       bc().setCancel(dialog_->closePB);
+       bcview().setCancel(dialog_->closePB);
        bc().refresh();
 }