#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"), Controller(this)
+GuiVSpace::GuiVSpace(GuiView & lv)
+ : GuiDialog(lv, "vspace", qt_("Vertical Space Settings"))
{
setupUi(this);
- setViewTitle(_("Vertical Space Settings"));
- setController(this, false);
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)));
}
-void GuiVSpace::closeEvent(QCloseEvent * e)
-{
- slotClose();
- e->accept();
-}
-
-
void GuiVSpace::change_adaptor()
{
changed();
params_ = setVSpaceFromWidgets(spacingCO->currentIndex(),
valueLE, unitCO, keepCB->isChecked());
-
}
bool GuiVSpace::initialiseParams(string const & data)
{
- InsetVSpaceMailer::string2params(data, params_);
- dialog().setButtonsValid(true);
-
+ InsetVSpace::string2params(data, params_);
+ setButtonsValid(true);
return true;
}
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