lyx_mirror/src/frontends/qt3/emptytable.h
Lars Gullik Bjønnes eefc9ad640 * Rename src/frontends/qt2 to src/frontends/qt3,
update users of the dir accordingly.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13731 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-24 13:48:24 +00:00

51 lines
1.2 KiB
C++

// -*- C++ -*-
/**
* \file emptytable.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author John Levon
*
* Full author contact details are available in file CREDITS.
*/
#ifndef EMPTYTABLE_H
#define EMPTYTABLE_H
#include "qttableview.h"
/**
* A simple widget for a quick "preview" in TabularCreateDialog.
* The user can drag on the widget to change the table dimensions.
*/
class EmptyTable : public QtTableView {
Q_OBJECT
public:
EmptyTable(QWidget * parent = 0, const char * name = 0);
~EmptyTable() {}
virtual QSize sizeHint() const;
public slots:
/// set the number of columns in the table and emit colsChanged() signal
void setNumberColumns(int nr_cols);
/// set the number of rows in the table and emit rowsChanged() signal
void setNumberRows(int nr_rows);
signals:
/// the number of columns changed
void colsChanged(int);
/// the number of rows changed
void rowsChanged(int);
protected:
/// fill in a cell
virtual void paintCell(class QPainter *, int, int);
virtual void mouseMoveEvent(QMouseEvent *);
private:
/// number of current columns
unsigned int cols;
/// number of current rows
unsigned int rows;
};
#endif