]> 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 7f49de22b4a67e4aeeb289f1616910caaf33e06d..20285f8daa224d5ac73959a1a91843e4584c8932 100644 (file)
 #include <config.h>
 
 #include "GuiBibitem.h"
-#include "ControlCommand.h"
 #include "qt_helpers.h"
 #include "FuncRequest.h"
 
 #include "insets/InsetCommand.h"
 
-#include <QCloseEvent>
 #include <QLineEdit>
 #include <QPushButton>
 
@@ -26,12 +24,11 @@ namespace lyx {
 namespace frontend {
 
 
-GuiBibitem::GuiBibitem(LyXView & lv)
-       : GuiDialog(lv, "bibitem"), Controller(this), params_("bibitem")
+GuiBibitem::GuiBibitem(GuiView & lv)
+       : GuiDialog(lv, "bibitem", qt_("Bibliography Entry Settings")),
+         params_(insetCode("bibitem"))
 {
        setupUi(this);
-       setViewTitle(_("Bibliography Entry Settings"));
-       setController(this, false);
 
        connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
        connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
@@ -55,13 +52,6 @@ void GuiBibitem::change_adaptor()
 }
 
 
-void GuiBibitem::closeEvent(QCloseEvent *e)
-{
-       slotClose();
-       e->accept();
-}
-
-
 void GuiBibitem::updateContents()
 {
        keyED->setText(toqstr(params_["key"]));
@@ -86,22 +76,22 @@ bool GuiBibitem::initialiseParams(std::string const & data)
 {
        // The name passed with LFUN_INSET_APPLY is also the name
        // used to identify the mailer.
-       InsetCommandMailer::string2params("bibitem", data, params_);
+       InsetCommand::string2params("bibitem", data, params_);
        return true;
 }
 
 
 void GuiBibitem::dispatchParams()
 {
-       std::string const lfun = InsetCommandMailer::params2string("bibitem", params_);
+       std::string const lfun = InsetCommand::params2string("bibitem", params_);
        dispatch(FuncRequest(getLfun(), lfun));
 }
 
 
-Dialog * createGuiBibitem(LyXView & lv) { return new GuiBibitem(lv); }
+Dialog * createGuiBibitem(GuiView & lv) { return new GuiBibitem(lv); }
 
 
 } // namespace frontend
 } // namespace lyx
 
-#include "GuiBibitem_moc.cpp"
+#include "moc_GuiBibitem.cpp"