#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>
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()));
}
-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); }
namespace lyx {
namespace frontend {
-class GuiBibitem : public GuiDialog, public Ui::BibitemUi, public Controller
+class GuiBibitem : public GuiCommand, public Ui::BibitemUi
{
Q_OBJECT
private:
///
void closeEvent(QCloseEvent * e);
- /// parent controller
- Controller & controller() { return *this; }
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