KReport
KReportPreRenderer.cpp
96 else if (lastPage == true && m_reportDocument->section(KReportSectionData::Type::PageHeaderLast))
98 else if ((m_pageCounter % 2) == 1 && m_reportDocument->section(KReportSectionData::Type::PageHeaderOdd))
100 else if ((m_pageCounter % 2) == 0 && m_reportDocument->section(KReportSectionData::Type::PageHeaderEven))
111 retval = renderSectionSize(* (m_reportDocument->section(KReportSectionData::Type::PageFooterLast)));
112 else if (m_pageCounter == 1 && m_reportDocument->section(KReportSectionData::Type::PageFooterFirst))
113 retval = renderSectionSize(* (m_reportDocument->section(KReportSectionData::Type::PageFooterFirst)));
114 else if ((m_pageCounter % 2) == 1 && m_reportDocument->section(KReportSectionData::Type::PageFooterOdd))
115 retval = renderSectionSize(* (m_reportDocument->section(KReportSectionData::Type::PageFooterOdd)));
116 else if ((m_pageCounter % 2) == 0 && m_reportDocument->section(KReportSectionData::Type::PageFooterEven))
117 retval = renderSectionSize(* (m_reportDocument->section(KReportSectionData::Type::PageFooterEven)));
119 retval = renderSectionSize(* (m_reportDocument->section(KReportSectionData::Type::PageFooterAny)));
134 m_yOffset = offset - renderSectionSize(* (m_reportDocument->section(KReportSectionData::Type::PageFooterLast)));
135 retval = renderSection(* (m_reportDocument->section(KReportSectionData::Type::PageFooterLast)));
136 } else if (m_pageCounter == 1 && m_reportDocument->section(KReportSectionData::Type::PageFooterFirst)) {
138 m_yOffset = offset - renderSectionSize(* (m_reportDocument->section(KReportSectionData::Type::PageFooterFirst)));
139 retval = renderSection(* (m_reportDocument->section(KReportSectionData::Type::PageFooterFirst)));
140 } else if ((m_pageCounter % 2) == 1 && m_reportDocument->section(KReportSectionData::Type::PageFooterOdd)) {
142 m_yOffset = offset - renderSectionSize(* (m_reportDocument->section(KReportSectionData::Type::PageFooterOdd)));
144 } else if ((m_pageCounter % 2) == 0 && m_reportDocument->section(KReportSectionData::Type::PageFooterEven)) {
146 m_yOffset = offset - renderSectionSize(* (m_reportDocument->section(KReportSectionData::Type::PageFooterEven)));
147 retval = renderSection(* (m_reportDocument->section(KReportSectionData::Type::PageFooterEven)));
150 m_yOffset = offset - renderSectionSize(* (m_reportDocument->section(KReportSectionData::Type::PageFooterAny)));
233 if (renderSectionSize(*(grp->groupFooter)) + finishCurPageSize(false) + m_bottomMargin + m_yOffset >= m_maxHeight)
251 if (renderSectionSize(*(grp->groupHeader)) + finishCurPageSize(false) + m_bottomMargin + m_yOffset >= m_maxHeight) {
279 if (renderSectionSize(*(grp->groupFooter)) + finishCurPageSize(false) + m_bottomMargin + m_yOffset >= m_maxHeight)
309 const int itemHeight = ob->renderSimpleData(nullptr, nullptr, offset, itemData, m_scriptHandler);
326 emit(renderingSection(const_cast<KReportSectionData*>(§ionData), m_page, QPointF(m_leftMargin, m_yOffset)));
339 qreal w = m_page->document()->pageLayout().fullRectPixels(KReportPrivate::dpiX()).width() - m_page->document()->pageLayout().marginsPixels(KReportPrivate::dpiX()).right() - m_leftMargin;
355 asyncManager->addItem(async_ob, m_page, sec, offset, async_ob->realItemData(itemData), m_scriptHandler);
385 connect(this, SIGNAL(enteredGroup(QString,QVariant)), m_scriptHandler, SLOT(slotEnteredGroup(QString,QVariant)));
387 connect(this, SIGNAL(exitedGroup(QString,QVariant)), m_scriptHandler, SLOT(slotExitedGroup(QString,QVariant)));
389 connect(this, SIGNAL(renderingSection(KReportSectionData*,OROPage*,QPointF)), m_scriptHandler, SLOT(slotEnteredSection(KReportSectionData*,OROPage*,QPointF)));
443 //kreportDebug() << "Margins:" << m_topMargin << m_bottomMargin << m_rightMargin << m_leftMargin;
456 m_reportDocument->pageLayout().setPageSize(QPageSize(KReportPageSize::pageSize(label.paper())));
459 QSizeF pageSizePx = m_reportDocument->pageLayout().fullRectPixels(KReportPrivate::dpiX()).size();
570 if (renderSectionSize(*(m_reportDocument->section(KReportSectionData::Type::ReportFooter))) + finishCurPageSize(true) + m_bottomMargin + m_yOffset >= m_maxHeight) {
617 KReportPreRenderer::KReportPreRenderer(const QDomElement &document) : d(new KReportPreRendererPrivate(this))
void append(const T &value)
bool isNull() const const
qreal height() const const
virtual int renderSimpleData(OROPage *page, OROSection *section, const QPointF &offset, const QVariant &data, KReportScriptHandler *script)
Render the item into a primitive which is used by the second stage renderer.
Definition: KReportItemBase.cpp:146
A text box primitive it defines a box region and text that will be rendered inside that region,...
Definition: KReportRenderObjects.h:263
void setName(const QString &)
Set the name of the report so that it can be used internally by the script engine.
Definition: KReportPreRenderer.cpp:628
QString tagName() const const
int count(const T &value) const const
T value() const const
Takes a report definition and prerenders the result to an ORODocument that can be used to pass to any...
Definition: KReportPreRenderer.h:43
virtual int renderReportData(OROPage *page, OROSection *section, const QPointF &offset, KReportDataSource *dataSource, KReportScriptHandler *script)
Render a complex item that uses a sub query as a data source.
Definition: KReportItemBase.cpp:157
void setDataSource(KReportDataSource *dataSource)
Sets data source to data, takes ownership.
Definition: KReportPreRenderer.cpp:655
int width() const const
KReportSectionData is used to store the information about a specific report section.
Definition: KReportSectionData.h:44
Represents a single page in a document and may contain zero or more OROPrimitive objects all of which...
Definition: KReportRenderObjects.h:167
int size() const const
Represents a single document containing one or more OROPage elements.
Definition: KReportRenderObjects.h:49
Portrait
const T & at(int i) const const
Q_SCRIPTABLE CaptureState status()
T & last()
QString label(StandardShortcut id)
Represents a single a single row in a document and may contain zero or more OROPrimitives.
Definition: KReportRenderObjects.h:197
QRect fullRectPoints() const const
QString name(StandardShortcut id)
Represents the basic primitive with a position and type. Other primitives are subclasses with a defin...
Definition: KReportRenderObjects.h:233
QAction * lastPage(const QObject *recvr, const char *slot, QObject *parent)
virtual qint64 recordCount() const =0
Return the total number of records.
Base class for items that are drawn asyncronously due to unknown loading times.
Definition: KReportAsyncItemBase.h:28
Top level report document definition. A KReportDocment defines the design of a document,...
Definition: KReportDocument.h:41
NoPen
T value(int i) const const
virtual bool supportsSubQuery() const
Override if the item uses a sub query and linked fields, such as a chart or sub-report.
Definition: KReportItemBase.cpp:185
qreal width() const const
KREPORT_EXPORT QPageSize::PageSizeId pageSize(const QString &key)
Definition: KReportPageSize.cpp:114
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:17:37 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:17:37 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.