KReport
17 #include "KReportScriptSection.h"
19 #include "KReportScriptLine.h"
20 #include "KReportItemBase.h"
21 #include "KReportPluginManager.h"
22 #include "KReportPluginInterface.h"
23 #include "KReportItemLine.h"
24 #include "KReportSectionData.h"
25 #include "kreport_debug.h"
40 QColor Section::backgroundColor()
const
42 return m_section->backgroundColor();
45 void Section::setBackgroundColor(
const QColor &c)
47 m_section->setBackgroundColor(c);
50 qreal Section::height()
const
52 return m_section->height();
55 void Section::setHeight(qreal h)
57 m_section->setHeight(h);
62 return m_section->objectName();
65 QObject* Section::objectByNumber(
int i)
67 if (m_section->object(i)->typeName() ==
QLatin1String(
"line")) {
68 return new Scripting::Line(
dynamic_cast<KReportItemLine*
>(m_section->object(i)));
74 QObject *obj = plugin->createScriptInstance(m_section->object(i));
80 kreportWarning() <<
"Encountered unknown node while parsing section: " << m_section->object(i)->typeName();
89 for (
int i = 0; i < m_section->objects().count(); ++i) {
90 if (m_section->object(i)->entityName() == n) {
91 return objectByNumber(i);
97 void Section::initialize(
const QJSValue &s)
102 void Section::eventOnRender()
104 if (m_scriptObject.isObject() && m_scriptObject.hasProperty(
QLatin1String(
"OnRender")))
Line item script interface.
KReportSectionData is used to store the information about a specific report section.
Manager class for finding and loading available plugins.
Field item script interface.
QJSValue property(const QString &name) const const
QJSValue call(const QJSValueList &args)
An interface for plugins delivering KReport elements.
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
KDE's Doxygen guidelines are available online.