]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiVSpace.h
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiVSpace.h
index 9cc1f74a7a86364ff9be78faf8dda10fe0c3c0b9..93a6319fe92fc9317657877791ce399bb899d9e6 100644 (file)
@@ -4,69 +4,56 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author André Pönitz
+ * \author André Pönitz
  * \author Angus Leeming
- * \author Jürgen Spitzmüller
+ * \author Jürgen Spitzmüller
+ * \author Edwin Leuven
  *
  * Full author contact details are available in file CREDITS.
  */
 
-#ifndef QVSPACE_H
-#define QVSPACE_H
+#ifndef GUIVSPACE_H
+#define GUIVSPACE_H
 
-#include "GuiDialogView.h"
-#include "ControlVSpace.h"
+#include "GuiDialog.h"
 #include "ui_VSpaceUi.h"
-
-#include <QDialog>
+#include "VSpace.h"
 
 namespace lyx {
 namespace frontend {
 
-class GuiVSpace;
-
-class GuiVSpaceDialog : public QDialog, public Ui::VSpaceUi
+class GuiVSpace : public GuiDialog, public Ui::VSpaceUi
 {
        Q_OBJECT
 
 public:
-       GuiVSpaceDialog(GuiVSpace * form);
+       GuiVSpace(GuiView & lv);
 
-public Q_SLOTS:
+private Q_SLOTS:
+       ///
        void change_adaptor();
-
-protected Q_SLOTS:
-       void closeEvent(QCloseEvent *);
+       ///
        void enableCustom(int);
 
 private:
-       GuiVSpace * form_;
-};
-
-
-class GuiVSpace : public GuiView<GuiVSpaceDialog>
-{
-public:
-       ///
-       friend class GuiVSpaceDialog;
-       ///
-       GuiVSpace(Dialog &);
-       /// parent controller
-       ControlVSpace & controller()
-       { return static_cast<ControlVSpace &>(this->getController()); }
-       /// parent controller
-       ControlVSpace const & controller() const
-       { return static_cast<ControlVSpace const &>(this->getController()); }
-private:
-       /// Build the dialog
-       virtual void build_dialog();
        /// Apply from dialog
-       virtual void apply();
+       void applyView();
        /// Update the dialog
-       virtual void update_contents();
+       void updateContents();
+       ///
+       bool initialiseParams(std::string const & data);
+       /// clean-up on hide.
+       void clearParams();
+       /// clean-up on hide.
+       void dispatchParams();
+       ///
+       bool isBufferDependent() const { return true; }
+
+       ///
+       VSpace params_;
 };
 
 } // namespace frontend
 } // namespace lyx
 
-#endif //QVSPACE_H
+#endif // GUIVSPACE_H