]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiFloat.cpp
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiFloat.cpp
index 6b8abe01078688d1e205b74df284cd455f46aab7..773a7f0ba88dacb917789f8c568614f59adf8b4d 100644 (file)
 
 #include "insets/InsetFloat.h"
 
-#include <QCloseEvent>
 #include <QPushButton>
 
-using std::string;
-
+using namespace std;
 
 namespace lyx {
 namespace frontend {
 
-GuiFloat::GuiFloat(LyXView & lv)
-       : GuiDialog(lv, "float"), Controller(this)
+GuiFloat::GuiFloat(GuiView & lv)
+       : GuiDialog(lv, "float", qt_("Float Settings"))
 {
-       setController(this, false);
-       setViewTitle(_("Float Settings"));
-
        setupUi(this);
+       
        connect(restorePB, SIGNAL(clicked()), this, SLOT(slotRestore()));
        connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
        connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
@@ -62,13 +58,6 @@ void GuiFloat::change_adaptor()
 }
 
 
-void GuiFloat::closeEvent(QCloseEvent * e)
-{
-       slotClose();
-       e->accept();
-}
-
-
 void GuiFloat::updateContents()
 {
        floatFP->set(params_);
@@ -83,7 +72,7 @@ void GuiFloat::applyView()
 
 bool GuiFloat::initialiseParams(string const & data)
 {
-       InsetFloatMailer::string2params(data, params_);
+       InsetFloat::string2params(data, params_);
        return true;
 }
 
@@ -96,14 +85,14 @@ void GuiFloat::clearParams()
 
 void GuiFloat::dispatchParams()
 {
-       dispatch(FuncRequest(getLfun(), InsetFloatMailer::params2string(params_)));
+       dispatch(FuncRequest(getLfun(), InsetFloat::params2string(params_)));
 }
 
 
-Dialog * createGuiFloat(LyXView & lv) { return new GuiFloat(lv); }
+Dialog * createGuiFloat(GuiView & lv) { return new GuiFloat(lv); }
 
 
 } // namespace frontend
 } // namespace lyx
 
-#include "GuiFloat_moc.cpp"
+#include "moc_GuiFloat.cpp"