KD Reports  1.5
 All Classes Namespaces Functions Enumerations Enumerator Pages
Public Member Functions | List of all members
KDReports::TableElement Class Reference

#include <KDReportsTableElement.h>

Inheritance diagram for KDReports::TableElement:
Inheritance graph
[legend]
Collaboration diagram for KDReports::TableElement:
Collaboration graph
[legend]

Public Member Functions

 TableElement ()
 
 ~TableElement ()
 
 TableElement (const TableElement &other)
 
TableElementoperator= (const TableElement &other)
 
void setHeaderRowCount (int count)
 
int headerRowCount () const
 
void setHeaderColumnCount (int count)
 
int headerColumnCount () const
 
Cellcell (int row, int column)
 
- Public Member Functions inherited from KDReports::AbstractTableElement
void setBorder (qreal border)
 
qreal border () const
 
void setBorderBrush (const QBrush &brush)
 
QBrush borderBrush () const
 
void setPadding (qreal padding)
 
qreal padding () const
 
void setWidth (qreal width, Unit unit=Millimeters)
 
qreal width () const
 
Unit unit () const
 
void setDefaultFont (const QFont &font)
 
 AbstractTableElement (const AbstractTableElement &other)
 
AbstractTableElementoperator= (const AbstractTableElement &other)
 
- Public Member Functions inherited from KDReports::Element
virtual ~Element ()
 
void setBackground (const QBrush &brush)
 
QBrush background () const
 

Additional Inherited Members

- Protected Member Functions inherited from KDReports::AbstractTableElement
 AbstractTableElement ()
 
 ~AbstractTableElement ()
 
- Protected Member Functions inherited from KDReports::Element
 Element ()
 
 Element (const Element &other)
 
Elementoperator= (const Element &other)
 

Detailed Description

The KDReports::TableElement class represents a table in the report. Use cell() to provide the contents for each cell of the table.

Use AutoTableElement instead if you have the data in a QAbstractItemModel.

Constructor & Destructor Documentation

KDReports::TableElement::TableElement ( )

Creates an empty table. Text and other content can be added to the table cells using the cell() method. This must be done before the table is added to the report.

KDReports::TableElement::~TableElement ( )

Destructor. Deletes internal data.

KDReports::TableElement::TableElement ( const TableElement other)

Copies a table element. Settings and cell elements are copied over.

Member Function Documentation

Cell& KDReports::TableElement::cell ( int  row,
int  column 
)

Returns the reference to a cell in the table.

Parameters
rownumber, starting from 0
columnnumber, starting from 0
int KDReports::TableElement::headerColumnCount ( ) const
Returns
table header columns count.
Since
1.4
int KDReports::TableElement::headerRowCount ( ) const
Returns
table header rows count.
Since
1.4
TableElement& KDReports::TableElement::operator= ( const TableElement other)

Copies the settings and cell elements from another table element.

void KDReports::TableElement::setHeaderColumnCount ( int  count)

Declares the first count columns of the table as table header. The table header columns get repeated when a table is broken into multiple pages horizontally (see Report::setTableBreakingEnabled). The default number of header rows is 0.

Since
1.1
void KDReports::TableElement::setHeaderRowCount ( int  count)

Declares the first count rows of the table as table header. The table header rows get repeated when a table is broken across a page boundary. The default number of header rows is 0.


The documentation for this class was generated from the following file:

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-reports/