]> git.lyx.org Git - features.git/commitdiff
some refactoring
authorAndré Pönitz <poenitz@gmx.net>
Sun, 7 Oct 2007 14:44:41 +0000 (14:44 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Sun, 7 Oct 2007 14:44:41 +0000 (14:44 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20820 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiBibitem.cpp
src/frontends/qt4/GuiBibitem.h

index 7f49de22b4a67e4aeeb289f1616910caaf33e06d..6ae2b30c0760e7afdad936cde053ead819e0073f 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>
@@ -27,11 +24,10 @@ namespace frontend {
 
 
 GuiBibitem::GuiBibitem(LyXView & lv)
-       : GuiDialog(lv, "bibitem"), Controller(this), params_("bibitem")
+       : GuiCommand(lv, "bibitem")
 {
        setupUi(this);
        setViewTitle(_("Bibliography Entry Settings"));
-       setController(this, false);
 
        connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
        connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
@@ -82,22 +78,6 @@ 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.
-       InsetCommandMailer::string2params("bibitem", data, params_);
-       return true;
-}
-
-
-void GuiBibitem::dispatchParams()
-{
-       std::string const lfun = InsetCommandMailer::params2string("bibitem", params_);
-       dispatch(FuncRequest(getLfun(), lfun));
-}
-
-
 Dialog * createGuiBibitem(LyXView & lv) { return new GuiBibitem(lv); }
 
 
index 7308a6ea07ceaef26069a764f4e6d5f2985ffc0c..5429fef80686f194a697cffb48546f950b18eaab 100644 (file)
@@ -23,7 +23,7 @@
 namespace lyx {
 namespace frontend {
 
-class GuiBibitem : public GuiDialog, public Ui::BibitemUi, public Controller
+class GuiBibitem : public GuiCommand, public Ui::BibitemUi
 {
        Q_OBJECT
 
@@ -36,8 +36,6 @@ private Q_SLOTS:
 private:
        ///
        void closeEvent(QCloseEvent * e);
-       /// parent controller
-       Controller & controller() { return *this; }
 
 private:
        ///
@@ -46,18 +44,6 @@ private:
        void applyView();
        /// update
        void updateContents();
-       ///
-       bool initialiseParams(std::string const & data);
-       /// clean-up on hide.
-       void clearParams() { params_.clear(); }
-       /// clean-up on hide.
-       void dispatchParams();
-       ///
-       bool isBufferDependent() const { return true; }
-
-private:
-       ///
-       InsetCommandParams params_;
 };
 
 } // namespace frontend