X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FInsertTableWidget.h;h=36e6dfa9e10b03429d69c8cf43eea7ffccf25866;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=176ed9541727c788bf7709a1a5aaddb1b83c6d1f;hpb=73a4be7143725e0348dce5a16f1bb949ac61f4c8;p=lyx.git diff --git a/src/frontends/qt4/InsertTableWidget.h b/src/frontends/qt4/InsertTableWidget.h index 176ed95417..36e6dfa9e1 100644 --- a/src/frontends/qt4/InsertTableWidget.h +++ b/src/frontends/qt4/InsertTableWidget.h @@ -1,74 +1,74 @@ -// -*- 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 "frontends/LyXView.h" -#include - -namespace lyx { -namespace frontend { - - -class InsertTableWidget : public QWidget { - Q_OBJECT -public: - - InsertTableWidget(LyXView &, QWidget *); - -signals: - //! widget is visible - void visible(bool); - -public slots: - //! show the widget - void show(bool); - //! enable/disable parent - void updateParent(); - -protected 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_; - //! the lyxview we need to dispatch the funcrequest - LyXView & lyxView_; - //! widget under mouse - bool underMouse_; -}; - -} // namespace frontend -} // namespace lyx - -#endif // INSERTTABLEWIDGET_H +// -*- 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 + +namespace lyx { +namespace frontend { + +class GuiView; + +class InsertTableWidget : public QWidget { + Q_OBJECT +public: + + InsertTableWidget(GuiView &, 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_; + //! the lyxview we need to dispatch the funcrequest + GuiView & lyxView_; + //! widget under mouse + bool underMouse_; +}; + +} // namespace frontend +} // namespace lyx + +#endif // INSERTTABLEWIDGET_H