]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiVSpace.cpp
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[lyx.git] / src / frontends / qt4 / GuiVSpace.cpp
index 282fa2331016f537bbe3ce71f0107d94577b01ad..e5abcd2117301b0866959f19e0935490d1b8600f 100644 (file)
 #include "LyXRC.h" // to set the default length values
 #include "Spacing.h"
 #include "FuncRequest.h"
+
 #include "insets/InsetVSpace.h"
 
+#include "support/gettext.h"
 #include "support/lstrings.h"
 
 #include <QCheckBox>
-#include <QCloseEvent>
 #include <QLineEdit>
 #include <QPushButton>
 #include <QValidator>
 
-using std::string;
-
+using namespace std;
 
 namespace lyx {
 namespace frontend {
 
-GuiVSpace::GuiVSpace(LyXView & lv)
-       : GuiDialog(lv, "vspace")
+GuiVSpace::GuiVSpace(GuiView & lv)
+       : GuiDialog(lv, "vspace", qt_("Vertical Space Settings"))
 {
        setupUi(this);
-       setViewTitle(_("Vertical Space Settings"));
 
        connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
        connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
        connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
 
-       connect(spacingCO, SIGNAL(highlighted(const QString &)),
+       connect(spacingCO, SIGNAL(highlighted(QString)),
                this, SLOT(change_adaptor()));
-       connect(valueLE, SIGNAL(textChanged(const QString &)),
+       connect(valueLE, SIGNAL(textChanged(QString)),
                this, SLOT(change_adaptor()));
        connect(spacingCO, SIGNAL(activated(int)),
                this, SLOT(enableCustom(int)));
@@ -83,13 +82,6 @@ GuiVSpace::GuiVSpace(LyXView & lv)
 }
 
 
-void GuiVSpace::closeEvent(QCloseEvent * e)
-{
-       slotClose();
-       e->accept();
-}
-
-
 void GuiVSpace::change_adaptor()
 {
        changed();
@@ -166,7 +158,6 @@ void GuiVSpace::applyView()
 
        params_ = setVSpaceFromWidgets(spacingCO->currentIndex(),
                        valueLE, unitCO, keepCB->isChecked()); 
-
 }
 
 
@@ -178,9 +169,8 @@ void GuiVSpace::updateContents()
 
 bool GuiVSpace::initialiseParams(string const & data)
 {
-       InsetVSpaceMailer::string2params(data, params_);
-       dialog().setButtonsValid(true);
-
+       InsetVSpace::string2params(data, params_);
+       setButtonsValid(true);
        return true;
 }
 
@@ -193,11 +183,11 @@ void GuiVSpace::clearParams()
 
 void GuiVSpace::dispatchParams()
 {
-       dispatch(FuncRequest(getLfun(), InsetVSpaceMailer::params2string(params_)));
+       dispatch(FuncRequest(getLfun(), InsetVSpace::params2string(params_)));
 }
 
 
-Dialog * createGuiVSpace(LyXView & lv) { return new GuiVSpace(lv); }
+Dialog * createGuiVSpace(GuiView & lv) { return new GuiVSpace(lv); }
 
 
 } // namespace frontend