]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiHSpace.h
Consider class-provided citation engines
[lyx.git] / src / frontends / qt4 / GuiHSpace.h
index ef4d214c7420856274e06bedfa3c51f9c748b835..9be11ab6896c92eeceed25c6432add9bc633e36f 100644 (file)
@@ -4,7 +4,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Jürgen Spitzmüller
+ * \author Jürgen Spitzmüller
  *
  * Full author contact details are available in file CREDITS.
  */
 #ifndef GUIHSPACE_H
 #define GUIHSPACE_H
 
-#include "GuiDialog.h"
+#include "InsetParamsWidget.h"
 #include "ui_HSpaceUi.h"
-#include "insets/InsetSpace.h"
 
 namespace lyx {
 namespace frontend {
 
-class GuiHSpace : public GuiDialog, public Ui::HSpaceUi
+class GuiHSpace : public InsetParamsWidget, public Ui::HSpaceUi
 {
        Q_OBJECT
 
 public:
-       GuiHSpace(GuiView & lv);
+       GuiHSpace(bool math_mode, QWidget * parent = 0);
 
 private Q_SLOTS:
        ///
-       void change_adaptor();
+       void changedSlot();
        ///
-       void enableWidgets(int);
-       ///
-       void patternChanged();
+       void enableWidgets() const;
 
 private:
-       /// Apply from dialog
-       void applyView();
-       /// Update the dialog
-       void updateContents();
-       ///
-       bool isValid();
-       ///
-       bool initialiseParams(std::string const & data);
-       /// clean-up on hide.
-       void clearParams();
-       /// clean-up on hide.
-       void dispatchParams();
-       ///
-       bool isBufferDependent() const { return true; }
-
+       /// \name InsetParamsWidget inherited methods
+       //@{
+       InsetCode insetCode() const { return math_mode_ ? MATH_SPACE_CODE : SPACE_CODE; }
+       FuncCode creationCode() const { return LFUN_INSET_INSERT; }
+       QString dialogTitle() const { return qt_("Horizontal Space Settings"); }
+       void paramsToDialog(Inset const *);
+       docstring dialogToParams() const;
+       bool checkWidgets(bool readonly) const;
+       //@}
        ///
-       InsetSpaceParams params_;
+       bool const math_mode_;
 };
 
 } // namespace frontend