-// -*- C++ -*-\r
-/**\r
- * \file InsertTableWidget.h\r
- * This file is part of LyX, the document processor.\r
- * Licence details can be found in the file COPYING.\r
- *\r
- * \author Edwin Leuven\r
- *\r
- * Full author contact details are available in file CREDITS.\r
- */\r
-\r
-\r
-#ifndef INSERTTABLEWIDGET_H\r
-#define INSERTTABLEWIDGET_H\r
-\r
-#include "frontends/LyXView.h"\r
-#include <QWidget>\r
-\r
-class QSize;\r
-\r
-namespace lyx {\r
-namespace frontend {\r
-\r
-\r
-class InsertTableWidget : public QWidget {\r
- Q_OBJECT\r
-public:\r
-\r
- InsertTableWidget(LyXView &, FuncRequest const &, QWidget *);\r
-\r
-signals:\r
- //! widget is visible\r
- void visible(bool);\r
-\r
-public slots:\r
- //! show the widget\r
- void show(bool);\r
- //! enable/disable parent\r
- void updateParent();\r
-\r
-protected slots:\r
- bool event(QEvent *);\r
- void mouseMoveEvent(QMouseEvent *);\r
- void mouseReleaseEvent(QMouseEvent *);\r
- void paintEvent(QPaintEvent *);\r
- \r
-private:\r
- //! update the geometry\r
- void resetGeometry();\r
- //! initialize parameters to default values\r
- void init();\r
- //! draw the grid\r
- void drawGrid(int rows, int cols, Qt::GlobalColor color);\r
-\r
- //! colwidth in pixels\r
- int colwidth_;\r
- //! rowheight in pixels\r
- int rowheight_;\r
- //! total rows\r
- int rows_;\r
- //! total cols\r
- int cols_;\r
- //! row of pointer\r
- int bottom_;\r
- //! column of pointer\r
- int right_; \r
- //! the tabular_insert funcrequest\r
- FuncRequest const & func_ ;\r
- //! the lyxview we need to dispatch the funcrequest\r
- LyXView & lyxView_;\r
- //! widget under mouse\r
- bool underMouse_;\r
-};\r
-\r
-} // namespace frontend\r
-} // namespace lyx\r
-\r
-#endif // INSERTTABLEWIDGET_H\r
+// -*- C++ -*-
+/**
+ * \file InsertTableWidget.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Edwin Leuven
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+
+#ifndef INSERTTABLEWIDGET_H
+#define INSERTTABLEWIDGET_H
+
+#include <QWidget>
+
+namespace lyx {
+namespace frontend {
+
+class GuiView;
+
+class InsertTableWidget : public QWidget {
+ Q_OBJECT
+public:
+
+ InsertTableWidget(QWidget *);
+
+Q_SIGNALS:
+ //! widget is visible
+ void visible(bool);
+
+public Q_SLOTS:
+ //! show the widget
+ void show(bool);
+ //! enable/disable parent
+ void updateParent();
+
+protected Q_SLOTS:
+ void mouseMoveEvent(QMouseEvent *);
+ void mouseReleaseEvent(QMouseEvent *);
+ void mousePressEvent(QMouseEvent *);
+ void paintEvent(QPaintEvent *);
+
+private:
+ //! update the geometry
+ void resetGeometry();
+ //! initialize parameters to default values
+ void init();
+ //! draw the grid
+ void drawGrid(int rows, int cols, Qt::GlobalColor color);
+
+ //! colwidth in pixels
+ int colwidth_;
+ //! rowheight in pixels
+ int rowheight_;
+ //! total rows
+ int rows_;
+ //! total cols
+ int cols_;
+ //! row of pointer
+ int bottom_;
+ //! column of pointer
+ int right_;
+ //! widget under mouse
+ bool underMouse_;
+};
+
+} // namespace frontend
+} // namespace lyx
+
+#endif // INSERTTABLEWIDGET_H