]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiDelimiter.h
Fix bug #6997
[lyx.git] / src / frontends / qt4 / GuiDelimiter.h
index b57b1c2734faa1d597345f734ab8aef6b25bb9e4..fa2ebda264632453e32bfc4908ce7bd1c780e6b5 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*-
 /**
- * \file GuiDelimiterDialog.h
+ * \file GuiDelimiter.h
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
@@ -12,8 +12,8 @@
 #ifndef GUIDELIMITERDIALOG_H
 #define GUIDELIMITERDIALOG_H
 
-#include "GuiDialogView.h"
-#include "ControlMath.h"
+#include "GuiDialog.h"
+
 #include "ui_DelimiterUi.h"
 
 class QListWidgetItem;
@@ -21,14 +21,18 @@ class QListWidgetItem;
 namespace lyx {
 namespace frontend {
 
-class ControlMath;
-class GuiDelimiter;
-
-class GuiDelimiterDialog : public QDialog, public Ui::DelimiterUi
+class GuiDelimiter : public GuiDialog, public Ui::DelimiterUi
 {
        Q_OBJECT
+
 public:
-       GuiDelimiterDialog(GuiDelimiter * form, QWidget * parent);
+       GuiDelimiter(GuiView & lv);
+
+       bool initialiseParams(std::string const &) { return true; }
+       void clearParams() {}
+       void dispatchParams() {}
+       bool isBufferDependent() const { return true; }
+
 public Q_SLOTS:
        void on_leftLW_itemActivated(QListWidgetItem *);
        void on_rightLW_itemActivated(QListWidgetItem *);
@@ -37,38 +41,17 @@ public Q_SLOTS:
        void on_matchCB_stateChanged(int);
        void on_insertPB_clicked();
        void on_sizeCO_activated(int);
+
 private:
        ///
-       char_type doMatch(char_type const symbol) const;
+       char_type doMatch(char_type const symbol);
        ///
        void updateTeXCode(int size);
-       /// owning form
-       GuiDelimiter * form_;
+
        /// TeX code that will be inserted.
        QString tex_code_;
 };
 
-
-class GuiDelimiter : public GuiView<GuiDelimiterDialog>
-{
-public:
-       friend class GuiDelimiterDialog;
-       ///
-       GuiDelimiter(GuiDialog &);
-       /// parent controller
-       ControlMath & controller()
-       { return static_cast<ControlMath &>(this->getController()); }
-       /// parent controller
-       ControlMath const & controller() const
-       { return static_cast<ControlMath const &>(this->getController()); }
-private:
-       virtual void apply() {}
-       virtual void update_contents() {}
-       /// Build the dialog.
-       virtual void build_dialog();
-};
-
-
 } // namespace frontend
 } // namespace lyx