]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiLabel.h
Fix bug #6997
[lyx.git] / src / frontends / qt4 / GuiLabel.h
index 64a9a0e8a1fa1bfb3a9ab9f86df474fd0bbf4f00..d616cbf1f5c5228f3a47026e3d70061f21209e31 100644 (file)
 #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() const;
+       bool initialiseParams(std::string const &);
+       //@}
 };
 
 } // namespace frontend