]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiWrap.h
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiWrap.h
index 20510448a21efe080092b22ed38a4c35a9643ea5..2cb1265d8cb49775cedf4518d256948097cba545 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 GUIWRAP_H
 #define GUIWRAP_H
 
-#include "GuiDialogView.h"
-#include "ControlWrap.h"
+#include "GuiDialog.h"
 #include "ui_WrapUi.h"
 
-#include <QDialog>
+#include "insets/InsetWrap.h"
 
 namespace lyx {
 namespace frontend {
 
-class GuiWrap;
-
-class GuiWrapDialog : public QDialog, public Ui::WrapUi
+class GuiWrap : public GuiDialog, public Ui::WrapUi
 {
        Q_OBJECT
-public:
-       GuiWrapDialog(GuiWrap * form);
-protected Q_SLOTS:
-       virtual void change_adaptor();
-protected:
-       virtual void closeEvent(QCloseEvent * e);
-private:
-       GuiWrap * form_;
-};
 
-
-class GuiWrap : public GuiView<GuiWrapDialog>
-{
 public:
-       friend class GuiWrapDialog;
+       GuiWrap(GuiView & lv);
+
+private Q_SLOTS:
+       void change_adaptor();
 
-       GuiWrap(GuiDialog &);
-       /// parent controller
-       ControlWrap & controller()
-       { return static_cast<ControlWrap &>(this->getController()); }
-       /// parent controller
-       ControlWrap const & controller() const
-       { return static_cast<ControlWrap const &>(this->getController()); }
 private:
-       /// Apply changes
-       virtual void applyView();
-       /// update
-       virtual void update_contents();
-       /// build the dialog
-       virtual void build_dialog();
+       /// Dialog inherited methods
+       //@{
+       void applyView();
+       void updateContents() {}
+       bool initialiseParams(std::string const & data);
+       void clearParams();
+       void dispatchParams();
+       bool isBufferDependent() const { return true; }
+       //@}
+
+       ///
+       void paramsToDialog(InsetWrapParams const & params);
+
+       ///
+       InsetWrapParams params_;
 };
 
 } // namespace frontend