#ifndef GUIERT_H
#define GUIERT_H
-#include "GuiDialogView.h"
-#include "ControlERT.h"
+#include "InsetParamsWidget.h"
#include "ui_ERTUi.h"
-#include <QDialog>
-
namespace lyx {
namespace frontend {
-class GuiERT;
-
-class GuiERTDialog : public QDialog, public Ui::ERTUi
+class GuiERT : public InsetParamsWidget, public Ui::ERTUi
{
Q_OBJECT
-public:
- GuiERTDialog(GuiERT * form);
-protected Q_SLOTS:
- virtual void change_adaptor();
-protected:
- virtual void closeEvent(QCloseEvent * e);
-private:
- GuiERT * form_;
-};
-
-class GuiERT : public GuiView<GuiERTDialog>
-{
public:
- /// constructor
- GuiERT(GuiDialog &);
- /// parent controller
- ControlERT & controller()
- { return static_cast<ControlERT &>(this->getController()); }
- /// parent controller
- ControlERT const & controller() const
- { return static_cast<ControlERT const &>(this->getController()); }
+ GuiERT(QWidget * parent = 0);
+
private:
- friend class GuiERTDialog;
- /// Apply changes
- virtual void apply();
- /// update
- virtual void update_contents();
- /// build the dialog
- virtual void build_dialog();
+ /// \name InsetParamsWidget inherited methods
+ //@{
+ InsetCode insetCode() const { return ERT_CODE; }
+ FuncCode creationCode() const { return LFUN_INSET_INSERT; }
+ void paramsToDialog(Inset const *);
+ docstring dialogToParams() const;
+ //@}
};
} // namespace frontend