X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiLabel.cpp;h=8a4a7c26fa99ba6e774c6da49ff9d64b9fa5f2a4;hb=e029b216b7e56ce3a41ef0b853045c37c7d155d8;hp=d5c99a4e5a7b1af110b0f7f2e30ef4bb6f9da7c8;hpb=ba76bf5eb85db5a10839fccee3430d906d3f7b70;p=lyx.git diff --git a/src/frontends/qt4/GuiLabel.cpp b/src/frontends/qt4/GuiLabel.cpp index d5c99a4e5a..8a4a7c26fa 100644 --- a/src/frontends/qt4/GuiLabel.cpp +++ b/src/frontends/qt4/GuiLabel.cpp @@ -12,9 +12,12 @@ #include "GuiLabel.h" -#include "support/debug.h" +#include "FuncRequest.h" #include "qt_helpers.h" +#include "support/debug.h" +#include "insets/InsetCommand.h" + #include #include #include @@ -26,12 +29,13 @@ namespace frontend { ///////////////////////////////////////////////////////////////// // -// Base implementation +// GuiLabel // ///////////////////////////////////////////////////////////////// GuiLabel::GuiLabel(GuiView & lv) - : GuiCommand(lv, "label", qt_("Label")) + : GuiDialog(lv, "label", qt_("Label")), + params_(insetCode("label")) { setupUi(this); @@ -81,10 +85,24 @@ bool GuiLabel::isValid() } +bool GuiLabel::initialiseParams(std::string const & data) +{ + InsetCommand::string2params("label", data, params_); + return true; +} + + +void GuiLabel::dispatchParams() +{ + std::string const lfun = InsetCommand::params2string("label", params_); + dispatch(FuncRequest(getLfun(), lfun)); +} + + Dialog * createGuiLabel(GuiView & lv) { return new GuiLabel(lv); } } // namespace frontend } // namespace lyx -#include "GuiLabel_moc.cpp" +#include "moc_GuiLabel.cpp"