#ifndef GUIERT_H
#define GUIERT_H
-#include "GuiDialog.h"
+#include "InsetParamsWidget.h"
#include "ui_ERTUi.h"
-#include "insets/InsetERT.h" // InsetERT::ERTStatus
namespace lyx {
namespace frontend {
-class GuiERT : public GuiDialog, public Ui::ERTUi
+class GuiERT : public InsetParamsWidget, public Ui::ERTUi
{
Q_OBJECT
public:
- GuiERT(GuiView & lv);
+ GuiERT(QWidget * parent = 0);
-private Q_SLOTS:
- void change_adaptor();
-
-private:
- /// Apply changes
- void applyView();
- /// update
- void updateContents();
- ///
- InsetCollapsable::CollapseStatus status() const { return status_; }
- ///
- void setStatus(InsetCollapsable::CollapseStatus status) { status_ = status; }
- ///
- bool initialiseParams(std::string const & data);
- /// clean-up on hide.
- void clearParams();
- /// clean-up on hide.
- void dispatchParams();
- ///
- bool isBufferDependent() const { return true; }
private:
- ///
- InsetCollapsable::CollapseStatus status_;
+ /// \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