lyx_mirror/src/frontends/qt4/InsertTableWidget.h
Edwin Leuven 5c8f40106a Add new tableinsertwidget
+ Remove table widget from inserttable dialog

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13972 a592a061-630c-0410-9148-cb99ea01b6c8
2006-05-31 12:53:05 +00:00

79 lines
1.6 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 "frontends/LyXView.h"
#include <QWidget>
class QSize;
namespace lyx {
namespace frontend {
class InsertTableWidget : public QWidget {
Q_OBJECT
public:
InsertTableWidget(LyXView &, FuncRequest const &, QWidget *);
signals:
//! widget is visible
void visible(bool);
public slots:
//! show the widget
void show(bool);
//! enable/disable parent
void updateParent();
protected slots:
bool event(QEvent *);
void mouseMoveEvent(QMouseEvent *);
void mouseReleaseEvent(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 tabular_insert funcrequest
FuncRequest const & func_ ;
//! the lyxview we need to dispatch the funcrequest
LyXView & lyxView_;
//! widget under mouse
bool underMouse_;
};
} // namespace frontend
} // namespace lyx
#endif // INSERTTABLEWIDGET_H