#ifndef GUILABEL_H
#define GUILABEL_H
-#include "GuiDialog.h"
#include "ui_LabelUi.h"
-#include "insets/InsetCommandParams.h"
+#include "InsetParamsWidget.h"
namespace lyx {
namespace frontend {
-class GuiLabel : public GuiDialog, public Ui::LabelUi
+class GuiLabel : public InsetParamsWidget, public Ui::LabelUi
{
Q_OBJECT
public:
- GuiLabel(GuiView & lv);
-
-private Q_SLOTS:
- void change_adaptor();
- void reject();
-
-private:
- ///
- bool isValid();
- /// Apply changes
- 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; }
- ///
- void enableView(bool enable);
- ///
- bool canApply() const { return true; }
+ GuiLabel(QWidget * parent = 0);
private:
- ///
- InsetCommandParams params_;
+ /// \name InsetParamsWidget inherited methods
+ //@{
+ InsetCode insetCode() const { return LABEL_CODE; }
+ FuncCode creationCode() const { return LFUN_INSET_INSERT; }
+ void paramsToDialog(Inset const *);
+ docstring dialogToParams() const;
+ bool checkWidgets(bool readonly) const;
+ bool initialiseParams(std::string const &);
+ //@}
};
} // namespace frontend