kexi
KexiSimplePrintingEngine Class Reference
#include <kexisimpleprintingengine.h>
Detailed Description
An engine painting data on pages using QPainter. The engine allows for random access to any page.
Definition at line 57 of file kexisimpleprintingengine.h.
Public Slots | |
void | paintPage (int pageNumber, QPainter &painter, bool paint=true) |
Public Member Functions | |
KexiSimplePrintingEngine (const KexiSimplePrintingSettings &settings, QObject *parent) | |
~KexiSimplePrintingEngine () | |
bool | init (KexiDB::Connection &conn, KexiDB::TableOrQuerySchema &tableOrQuery, const QString &titleText, QString &errorMessage) |
void | setTitleText (const QString &titleText) |
void | calculatePagesCount (QPainter &painter) |
bool | done () |
void | clear () |
const KexiSimplePrintingSettings * | settings () const |
bool | eof () const |
uint | pagesCount () const |
uint | paintedPages () const |
Protected Member Functions | |
void | paintRecord (QPainter &painter, KexiTableItem *item, int cellMargin, double &y, uint paintedRows, bool paint, bool printing) |
Protected Attributes | |
const KexiSimplePrintingSettings * | m_settings |
QFont | m_mainFont |
QFont | m_headerFont |
QPaintDeviceMetrics | m_pdm |
double | m_dpiX |
double | m_dpiY |
uint | m_pageWidth |
uint | m_pageHeight |
uint | m_SCALE |
KexiDB::Cursor * | m_cursor |
KexiTableViewData * | m_data |
QPtrList< uint > | m_dataOffsets |
QString | m_headerText |
QString | m_dateTimeText |
uint | m_dateTimeWidth |
QRect | m_headerTextRect |
int | m_maxFieldNameWidth |
int | m_mainLineSpacing |
int | m_footerHeight |
KexiDB::QueryColumnInfo::Vector | m_fieldsExpanded |
uint | m_visibleFieldsCount |
uint | m_pagesCount |
bool | m_eof |
bool | m_paintInitialized |
double | m_leftMargin |
double | m_rightMargin |
double | m_topMargin |
double | m_bottomMargin |
double | m_fx |
double | m_fy |
Member Function Documentation
bool KexiSimplePrintingEngine::init | ( | KexiDB::Connection & | conn, | |
KexiDB::TableOrQuerySchema & | tableOrQuery, | |||
const QString & | titleText, | |||
QString & | errorMessage | |||
) |
Definition at line 136 of file kexisimpleprintingengine.cpp.
void KexiSimplePrintingEngine::calculatePagesCount | ( | QPainter & | painter | ) |
Calculates pafe count that can be later obtained using pagesCount().
Page count can depend on painter (printer/screen) and on printing settings.
Definition at line 539 of file kexisimpleprintingengine.cpp.
bool KexiSimplePrintingEngine::eof | ( | ) | const [inline] |
- Returns:
- true when all records has been painted
Definition at line 79 of file kexisimpleprintingengine.h.
uint KexiSimplePrintingEngine::pagesCount | ( | ) | const [inline] |
- Returns:
- number of pages. Can be used after calculatePagesCount().
Definition at line 82 of file kexisimpleprintingengine.h.
uint KexiSimplePrintingEngine::paintedPages | ( | ) | const [inline] |
- Returns:
- number of painted pages so far.
If eof() is true, this number is equal to total page count.
Definition at line 86 of file kexisimpleprintingengine.h.
void KexiSimplePrintingEngine::paintPage | ( | int | pageNumber, | |
QPainter & | painter, | |||
bool | paint = true | |||
) | [slot] |
Paints a page number pageNumber (counted from 0) on painter. If paint is false, drawings are only computed but not painted, so this can be used for calculating page number before printing or previewing.
- Todo:
- add setting
- Todo:
- break large records anyway...
Definition at line 202 of file kexisimpleprintingengine.cpp.
void KexiSimplePrintingEngine::paintRecord | ( | QPainter & | painter, | |
KexiTableItem * | item, | |||
int | cellMargin, | |||
double & | y, | |||
uint | paintedRows, | |||
bool | paint, | |||
bool | printing | |||
) | [protected] |
Definition at line 390 of file kexisimpleprintingengine.cpp.
Member Data Documentation
bool KexiSimplePrintingEngine::m_paintInitialized [protected] |
The documentation for this class was generated from the following files: