]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiLabel.cpp
fix completion painting for RTL (inline completion and completion list)
[lyx.git] / src / frontends / qt4 / GuiLabel.cpp
index b90723e958f6fabda1a02a3613110c6025db84e4..47564a1f05309779d754d4da402ea624a86ebf33 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,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); }