]> 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 293b26e5bfc6cb03192668a1b0a697901fcc4da5..2cb1265d8cb49775cedf4518d256948097cba545 100644 (file)
@@ -4,55 +4,51 @@
  * 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 QWRAP_H
-#define QWRAP_H
+#ifndef GUIWRAP_H
+#define GUIWRAP_H
 
-#include "GuiDialogView.h"
+#include "GuiDialog.h"
 #include "ui_WrapUi.h"
 
-#include <QDialog>
-#include <QCloseEvent>
+#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 ControlWrap;
-
-class GuiWrap : public QController<ControlWrap, GuiView<GuiWrapDialog> > {
 public:
-       friend class GuiWrapDialog;
+       GuiWrap(GuiView & lv);
+
+private Q_SLOTS:
+       void change_adaptor();
 
-       GuiWrap(Dialog &);
 private:
-       /// Apply changes
-       virtual void apply();
-       /// 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
 } // namespace lyx
 
-#endif // QWRAP_H
+#endif // GUIWRAP_H