]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiBibitem.cpp
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiBibitem.cpp
index 0e13e49426f1499307ca02d8e2c4d202a84ed1bb..20285f8daa224d5ac73959a1a91843e4584c8932 100644 (file)
@@ -14,6 +14,8 @@
 #include "qt_helpers.h"
 #include "FuncRequest.h"
 
+#include "insets/InsetCommand.h"
+
 #include <QLineEdit>
 #include <QPushButton>
 
@@ -23,7 +25,8 @@ namespace frontend {
 
 
 GuiBibitem::GuiBibitem(GuiView & lv)
-       : GuiCommand(lv, "bibitem", qt_("Bibliography Entry Settings"))
+       : GuiDialog(lv, "bibitem", qt_("Bibliography Entry Settings")),
+         params_(insetCode("bibitem"))
 {
        setupUi(this);
 
@@ -69,10 +72,26 @@ bool GuiBibitem::isValid()
 }
 
 
+bool GuiBibitem::initialiseParams(std::string const & data)
+{
+       // The name passed with LFUN_INSET_APPLY is also the name
+       // used to identify the mailer.
+       InsetCommand::string2params("bibitem", data, params_);
+       return true;
+}
+
+
+void GuiBibitem::dispatchParams()
+{
+       std::string const lfun = InsetCommand::params2string("bibitem", params_);
+       dispatch(FuncRequest(getLfun(), lfun));
+}
+
+
 Dialog * createGuiBibitem(GuiView & lv) { return new GuiBibitem(lv); }
 
 
 } // namespace frontend
 } // namespace lyx
 
-#include "GuiBibitem_moc.cpp"
+#include "moc_GuiBibitem.cpp"