]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/InsertTableWidget.h
header cleanup
[lyx.git] / src / frontends / qt4 / InsertTableWidget.h
1 // -*- C++ -*-
2 /**
3  * \file InsertTableWidget.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Edwin Leuven
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12
13 #ifndef INSERTTABLEWIDGET_H
14 #define INSERTTABLEWIDGET_H
15
16 #include <QWidget>
17
18 namespace lyx {
19 namespace frontend {
20
21 class GuiView;
22
23 class InsertTableWidget : public QWidget {
24         Q_OBJECT
25 public:
26
27         InsertTableWidget(GuiView &, QWidget *);
28
29 Q_SIGNALS:
30         //! widget is visible
31         void visible(bool);
32
33 public Q_SLOTS:
34         //! show the widget
35         void show(bool);
36         //! enable/disable parent
37         void updateParent();
38
39 protected Q_SLOTS:
40         void mouseMoveEvent(QMouseEvent *);
41         void mouseReleaseEvent(QMouseEvent *);
42         void mousePressEvent(QMouseEvent *);
43         void paintEvent(QPaintEvent *);
44
45 private:
46         //! update the geometry
47         void resetGeometry();
48         //! initialize parameters to default values
49         void init();
50         //! draw the grid
51         void drawGrid(int rows, int cols, Qt::GlobalColor color);
52
53         //! colwidth in pixels
54         int colwidth_;
55         //! rowheight in pixels
56         int rowheight_;
57         //! total rows
58         int rows_;
59         //! total cols
60         int cols_;
61         //! row of pointer
62         int bottom_;
63         //! column of pointer
64         int right_;
65         //! the lyxview we need to dispatch the funcrequest
66         GuiView & lyxView_;
67         //! widget under mouse
68         bool underMouse_;
69 };
70
71 } // namespace frontend
72 } // namespace lyx
73
74 #endif // INSERTTABLEWIDGET_H