]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiLabel.cpp
Compil fix.
[lyx.git] / src / frontends / qt4 / GuiLabel.cpp
index d5c99a4e5a7b1af110b0f7f2e30ef4bb6f9da7c8..47564a1f05309779d754d4da402ea624a86ebf33 100644 (file)
 
 #include "GuiLabel.h"
 
-#include "support/debug.h"
+#include "FuncRequest.h"
 #include "qt_helpers.h"
 
+#include "support/debug.h"
+#include "insets/InsetCommand.h"
+
 #include <QLabel>
 #include <QPushButton>
 #include <QLineEdit>
@@ -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,6 +85,20 @@ 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); }