some refactoring

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20820 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2007-10-07 14:44:41 +00:00
parent 99c9b0fbcf
commit 4b510c9b7c
2 changed files with 2 additions and 36 deletions

View File

@ -11,12 +11,9 @@
#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); }

View 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