Scribus
Open source desktop publishing at your fingertips
collapsedtablepainter.h
1 /*
2 Copyright (C) 2011 Elvis Stansvik <elvstone@gmail.com>
3 
4 For general Scribus (>=1.3.2) copyright and licensing information please refer
5 to the COPYING file provided with the program. Following this notice may exist
6 a copyright and/or license notice that predates the release of Scribus 1.3.2
7 for which a new license (GPL+exception) is in place.
8 */
9 #ifndef COLLAPSEDTABLEPAINTER_H
10 #define COLLAPSEDTABLEPAINTER_H
11 
12 #include <QtGlobal>
13 
14 #include "tablepainter.h"
15 #include "tableborder.h"
16 
17 class PageItem_Table;
18 class TableCell;
19 class ScPainter;
20 
25 {
26 public:
29 
31  virtual void paintTable(ScPainter* p);
32 
33 private:
35  void paintTableFill(ScPainter* p) const;
37  void paintCellLeftBorders(const TableCell& cell, ScPainter* p) const;
39  void paintCellRightBorders(const TableCell& cell, ScPainter* p) const;
41  void paintCellTopBorders(const TableCell& cell, ScPainter* p) const;
43  void paintCellBottomBorders(const TableCell& cell, ScPainter* p) const;
45  void paintCellFill(const TableCell& cell, ScPainter* p) const;
46 
54  void paintBorder(const TableBorder& border, const QPointF& start, const QPointF& end,
55  const QPointF& startOffsetFactors, const QPointF& endOffsetFactors, ScPainter *p) const;
56 
58  void paintGridLine(const QPointF& start, const QPointF& end, ScPainter *p) const;
59 
60 };
61 
62 #endif // COLLAPSEDTABLEPAINTER_H
virtual void paintTable(ScPainter *p)
Paints the table using p and returns the table offset.
Definition: collapsedtablepainter.cpp:25
Definition: tablepainter.h:21
CollapsedTablePainter(PageItem_Table *table)
Creates a new collapsed table painter configured to paint table.
Definition: collapsedtablepainter.h:28
Definition: tableborder.h:86
Definition: scpainter.h:33
PageItem_Table * table() const
Returns the table this table painter is configured to paint.
Definition: tablepainter.h:32
Definition: tablecell.h:97
Definition: collapsedtablepainter.h:24
Definition: pageitem_table.h:49