4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Jürgen Spitzmüller
10 * Full author contact details are available in file CREDITS.
16 #include <QTableWidget>
24 * A simple widget for a quick "preview" in TabularCreateDialog.
25 * The user can drag on the widget to change the table dimensions.
27 class EmptyTable : public QTableWidget {
30 EmptyTable(QWidget * parent = 0, int rows = 5, int columns = 5);
32 QSize sizeHint() const override;
34 /// set the number of columns in the table and emit colsChanged() signal
35 void setNumberColumns(int nr_cols);
36 /// set the number of rows in the table and emit rowsChanged() signal
37 void setNumberRows(int nr_rows);
39 /// the number of columns changed
40 void colsChanged(int);
41 /// the number of rows changed
42 void rowsChanged(int);
45 virtual void paintCell(class QPainter *, int, int);
46 void mouseMoveEvent(QMouseEvent *) override;
48 /// Reset all the cell size to default
49 virtual void resetCellSize();