X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiWrap.cpp;h=e22be0898c2e97f599dc76aa8d8f332f3af41446;hb=b6eacd8d4f86734e8abef3335b190ce12a6a11b5;hp=ebc78bbacf398099f271bc1e045b7fa033eeeb64;hpb=c14295fbe3f78c1cf98a0255e6a918b9c87a7657;p=lyx.git diff --git a/src/frontends/qt4/GuiWrap.cpp b/src/frontends/qt4/GuiWrap.cpp index ebc78bbacf..e22be0898c 100644 --- a/src/frontends/qt4/GuiWrap.cpp +++ b/src/frontends/qt4/GuiWrap.cpp @@ -3,7 +3,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author Jürgen Spitzmüller + * \author Jürgen Spitzmüller * * Full author contact details are available in file CREDITS. */ @@ -33,10 +33,8 @@ GuiWrap::GuiWrap(GuiView & lv) { setupUi(this); - connect(restorePB, SIGNAL(clicked()), this, SLOT(slotRestore())); - connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK())); - connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply())); - connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose())); + connect(buttonBox, SIGNAL(clicked(QAbstractButton *)), + this, SLOT(slotButtonBox(QAbstractButton *))); connect(valignCO, SIGNAL(highlighted(QString)), this, SLOT(change_adaptor())); @@ -63,10 +61,10 @@ GuiWrap::GuiWrap(GuiView & lv) overhangED->setValidator(unsignedLengthValidator(overhangED)); bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy); - bc().setRestore(restorePB); - bc().setOK(okPB); - bc().setApply(applyPB); - bc().setCancel(closePB); + bc().setOK(buttonBox->button(QDialogButtonBox::Ok)); + bc().setApply(buttonBox->button(QDialogButtonBox::Apply)); + bc().setCancel(buttonBox->button(QDialogButtonBox::Cancel)); + bc().setRestore(buttonBox->button(QDialogButtonBox::Reset)); bc().addReadOnly(valignCO); bc().addReadOnly(floatCB); @@ -100,7 +98,7 @@ void GuiWrap::applyView() Length::UNIT overhangUnit = overhangUnitLC->currentLengthItem(); if (overhangED->text().isEmpty()) overhangUnit = Length::UNIT_NONE; - + params_.width = Length(width_value, widthUnit); if (overhangCB->checkState() == Qt::Checked) @@ -187,9 +185,9 @@ void GuiWrap::paramsToDialog(InsetWrapParams const & params) } -bool GuiWrap::initialiseParams(string const & data) +bool GuiWrap::initialiseParams(string const & sdata) { - InsetWrap::string2params(data, params_); + InsetWrap::string2params(sdata, params_); paramsToDialog(params_); return true; } @@ -215,4 +213,4 @@ Dialog * createGuiWrap(GuiView & lv) { return new GuiWrap(lv); } } // namespace lyx -#include "GuiWrap_moc.cpp" +#include "moc_GuiWrap.cpp"