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) {
617KReportPreRenderer::KReportPreRenderer(const QDomElement &document) : d(new KReportPreRendererPrivate(this))
620 connect(d, &KReportPreRendererPrivate::finishedAllASyncItems, this, &KReportPreRenderer::finishedAllASyncItems);
Base class for items that are drawn asyncronously due to unknown loading times.
Definition KReportAsyncItemBase.h:29
virtual qint64 recordCount() const =0
Return the total number of records.
Top level report document definition. A KReportDocment defines the design of a document,...
Definition KReportDocument.h:42
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
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
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
Takes a report definition and prerenders the result to an ORODocument that can be used to pass to any...
Definition KReportPreRenderer.h:44
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
void setDataSource(KReportDataSource *dataSource)
Sets data source to data, takes ownership.
Definition KReportPreRenderer.cpp:655
KReportSectionData is used to store the information about a specific report section.
Definition KReportSectionData.h:45
Represents a single document containing one or more OROPage elements.
Definition KReportRenderObjects.h:50
Represents a single page in a document and may contain zero or more OROPrimitive objects all of which...
Definition KReportRenderObjects.h:168
Represents the basic primitive with a position and type. Other primitives are subclasses with a defin...
Definition KReportRenderObjects.h:234
Represents a single a single row in a document and may contain zero or more OROPrimitives.
Definition KReportRenderObjects.h:198
A text box primitive it defines a box region and text that will be rendered inside that region,...
Definition KReportRenderObjects.h:264
Q_SCRIPTABLE CaptureState status()
KREPORT_EXPORT QPageSize::PageSizeId pageSize(const QString &key)
Definition KReportPageSize.cpp:114
QAction * lastPage(const QObject *recvr, const char *slot, QObject *parent)
QString name(StandardAction id)
QString label(StandardShortcut id)
QString tagName() const const
void append(QList< T > &&value)
const_reference at(qsizetype i) const const
qsizetype count() const const
T & last()
qsizetype size() const const
T value(qsizetype i) const const
Portrait
qreal height() const const
qreal width() const const
bool isNull() const const
NoPen
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
T value() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.