25 lines
500 B
C++
25 lines
500 B
C++
#ifndef CTABLEVIEWPRINTER_H
|
|
#define CTABLEVIEWPRINTER_H
|
|
|
|
class QPointF;
|
|
class QPainter;
|
|
class QPrinter;
|
|
class QTableView;
|
|
class QAbstractItemModel;
|
|
|
|
class CTableViewPrinter
|
|
{
|
|
public:
|
|
explicit CTableViewPrinter(QTableView * view);
|
|
|
|
void print(QPrinter *printer);
|
|
void renderHeader(QPainter &painter);
|
|
void drawGridLine(QPainter *painter, const QPointF &p1, const QPointF &p2);
|
|
|
|
private:
|
|
QTableView * m_pView;
|
|
QAbstractItemModel * m_pModel;
|
|
};
|
|
|
|
#endif // CTABLEVIEWPRINTER_H
|