From 4b510c9b7cdd69cb353afe5df626dea25d8cac2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Sun, 7 Oct 2007 14:44:41 +0000 Subject: [PATCH] some refactoring git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20820 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiBibitem.cpp | 22 +--------------------- src/frontends/qt4/GuiBibitem.h | 16 +--------------- 2 files changed, 2 insertions(+), 36 deletions(-) diff --git a/src/frontends/qt4/GuiBibitem.cpp b/src/frontends/qt4/GuiBibitem.cpp index 7f49de22b4..6ae2b30c07 100644 --- a/src/frontends/qt4/GuiBibitem.cpp +++ b/src/frontends/qt4/GuiBibitem.cpp @@ -11,12 +11,9 @@ #include #include "GuiBibitem.h" -#include "ControlCommand.h" #include "qt_helpers.h" #include "FuncRequest.h" -#include "insets/InsetCommand.h" - #include #include #include @@ -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); } diff --git a/src/frontends/qt4/GuiBibitem.h b/src/frontends/qt4/GuiBibitem.h index 7308a6ea07..5429fef806 100644 --- a/src/frontends/qt4/GuiBibitem.h +++ b/src/frontends/qt4/GuiBibitem.h @@ -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