X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiWrap.cpp;h=c2e53575f80adc2fe4e5ee590084bfe6e0338bee;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=743235f39e741a9edff5f33c2a00f8cd6d562e59;hpb=bcf91dd85c09e82585c13603c5b2308260edd9fd;p=lyx.git diff --git a/src/frontends/qt4/GuiWrap.cpp b/src/frontends/qt4/GuiWrap.cpp index 743235f39e..c2e53575f8 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. */ @@ -149,15 +149,15 @@ void GuiWrap::applyView() } -void GuiWrap::updateContents() +void GuiWrap::paramsToDialog(InsetWrapParams const & params) { // 0pt is a legal width now, it yields a // wrapfloat just wide enough for the contents. - Length len_w = params_.width; + Length len_w = params.width; widthED->setText(QString::number(len_w.value())); widthUnitLC->setCurrentItem(len_w.unit()); - Length len_o(params_.overhang); + Length len_o(params.overhang); overhangED->setText(QString::number(len_o.value())); overhangUnitLC->setCurrentItem(len_o.unit()); if (len_o.value() == 0) @@ -165,31 +165,32 @@ void GuiWrap::updateContents() else overhangCB->setCheckState(Qt::Checked); - linesSB->setValue(params_.lines); - if (params_.lines == 0) + linesSB->setValue(params.lines); + if (params.lines == 0) linesCB->setCheckState(Qt::Unchecked); else linesCB->setCheckState(Qt::Checked); int item = 0; - if (params_.placement == "i" || params_.placement == "I") + if (params.placement == "i" || params.placement == "I") item = 1; - else if (params_.placement == "l" || params_.placement == "L") + else if (params.placement == "l" || params.placement == "L") item = 2; - else if (params_.placement == "r" || params_.placement == "R") + else if (params.placement == "r" || params.placement == "R") item = 3; valignCO->setCurrentIndex(item); - if (params_.placement == "O" || params_.placement == "I" - || params_.placement == "L" || params_.placement == "R") + if (params.placement == "O" || params.placement == "I" + || params.placement == "L" || params.placement == "R") floatCB->setCheckState(Qt::Checked); } bool GuiWrap::initialiseParams(string const & data) { - InsetWrapMailer::string2params(data, params_); + InsetWrap::string2params(data, params_); + paramsToDialog(params_); return true; } @@ -202,7 +203,7 @@ void GuiWrap::clearParams() void GuiWrap::dispatchParams() { - string const lfun = InsetWrapMailer::params2string(params_); + string const lfun = InsetWrap::params2string(params_); dispatch(FuncRequest(getLfun(), lfun)); } @@ -214,4 +215,4 @@ Dialog * createGuiWrap(GuiView & lv) { return new GuiWrap(lv); } } // namespace lyx -#include "GuiWrap_moc.cpp" +#include "moc_GuiWrap.cpp"