lyx_mirror/src/frontends/qt/InsertTableWidget.h
Jean-Marc Lasgouttes c293be56bd Rename frontend qt4 to qt
In particular, the directory frontends/qt4 is renamed to frontends/qt.

Many configurations file have to be updated. All mentions of qt4 in
the source have been audited, and changed to qt if necessary.

The only part that has not been updated is the CMake build system.
2019-07-20 23:39:40 +02:00

73 lines
1.3 KiB
C++

// -*- 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