]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiLabel.cpp
GuiTabular, InsetTabular: fix http://bugzilla.lyx.org/show_bug.cgi?id=5752
[lyx.git] / src / frontends / qt4 / GuiLabel.cpp
index b90723e958f6fabda1a02a3613110c6025db84e4..8a4a7c26fa99ba6e774c6da49ff9d64b9fa5f2a4 100644 (file)
 
 #include "GuiLabel.h"
 
+#include "FuncRequest.h"
 #include "qt_helpers.h"
 
 #include "support/debug.h"
+#include "insets/InsetCommand.h"
 
 #include <QLabel>
 #include <QPushButton>
@@ -27,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);
 
@@ -82,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"