00001 #include <qtable.h>
00002 #ifndef LTABLE_H
00003 #define LTABLE_H
00004
00005 #include <qlineedit.h>
00006
00007
00008 #include "VectorDataSource.h"
00009
00010 class LTable : public QTable
00011 {
00012 Q_OBJECT
00013 public:
00014 LTable(VectorDataSource *dSource, QWidget *parent = 0, const char *name = 0);
00015
00016 QString text(int row, int col) const;
00017 void setText(int row, int col, const QString &text);
00018 QWidget *createEditor(int row, int col, bool initFromCell) const;
00019 void setCellContentFromEditor(int row, int col);
00020 QWidget *cellWidget(int row, int col) const;
00021 void endEdit(int row, int col, bool accept, bool replace);
00022 void paintCell(QPainter *painter, int row, int col,
00023 const QRect &cr, bool selected, const QColorGroup &cg);
00024
00025 void resizeData(int) {}
00026 QTableItem *item(int, int) { return 0; }
00027 void setItem(int, int, QTableItem *) {}
00028 void clearCell(int, int) {}
00029 void insertWidget(int, int, QWidget *) {}
00030 void clearCellWidget(int, int) {}
00031
00032 private slots:
00033 void updateContents() {QTable::updateContents();}
00034
00035 private:
00036 VectorDataSource *dataSource;
00037 mutable QLineEdit *editor;
00038 };
00039
00040 #endif
00041