5 * John Levon, moz@compsoc.man.ac.uk
8 /***************************************************************************
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
15 ***************************************************************************/
21 #include <qtableview.h>
23 #include "boost/utility.hpp"
26 * A simple widget for a quick "preview" in TabularCreateDialog.
27 * The user can drag on the widget to change the table dimensions.
29 class EmptyTable : public QTableView, boost::noncopyable {
32 EmptyTable(QWidget * parent = 0, const char * name = 0);
37 /// set the number of columns in the table and emit colsChanged() signal
38 void setNumberColumns(int nr_cols);
39 /// set the number of rows in the table and emit rowsChanged() signal
40 void setNumberRows(int nr_rows);
43 /// the number of columns changed
44 void colsChanged(unsigned int);
45 /// the number of rows changed
46 void rowsChanged(unsigned int);
50 virtual void paintCell(class QPainter *, int, int);
51 virtual void mouseMoveEvent(QMouseEvent *);
54 /// number of current columns
56 /// number of current rows