mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 22:41:09 +00:00
some refactoring
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20820 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
99c9b0fbcf
commit
4b510c9b7c
@ -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); }
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user