KReportDesign
#include <KReportDesign.h>
Public Member Functions | |
void | addSection (const KReportSection §ion) |
KReportElement | createElement (const QString &typeName, QString *errorMessage) |
bool | hasSection (KReportSection::Type type) const |
QPageLayout | pageLayout () const |
KReportSection | section (KReportSection::Type type) const |
bool | setContent (const QString &text, KReportDesignReadingStatus *status=nullptr) |
void | setPageLayout (const QPageLayout &pageLayout) |
void | setTitle (const QString &title) |
QString | title () const |
QString | toString (int indent=1) const |
Static Public Member Functions | |
static QPageLayout | defaultPageLayout () |
static void | setDefaultPageLayout (const QPageLayout &pageLayout) |
Detailed Description
The KReportDesign class represents a report design in .kreport format.
Definition at line 76 of file KReportDesign.h.
Constructor & Destructor Documentation
◆ KReportDesign()
KReportDesign::KReportDesign | ( | ) |
Definition at line 130 of file KReportDesign.cpp.
◆ ~KReportDesign()
KReportDesign::~KReportDesign | ( | ) |
Definition at line 135 of file KReportDesign.cpp.
Member Function Documentation
◆ addSection()
void KReportDesign::addSection | ( | const KReportSection & | section | ) |
Add section section. Previous section of the same type is removed from this design.
Definition at line 227 of file KReportDesign.cpp.
◆ createElement()
KReportElement KReportDesign::createElement | ( | const QString & | typeName, |
QString * | errorMessage ) |
Creates and returns report element of type typeName On success errorMessage is cleared, on failure it is set to a nonempty value.
Definition at line 192 of file KReportDesign.cpp.
◆ defaultPageLayout()
|
static |
- Returns
- default page layout that is used for creating new report designs
Attributes that are specified in the design format:
- margins: by default equal to equivalent of 1cm in points (QPageLayout::Point).
- mode: by default QPageLayout::StandardMode
- orientation: by default QPageLayout::Portrait
- pageSize: by default equal to default page size of the default printer (QPrinterInfo::defaultPrinter().defaultPageSize()). If there is no default printer, A4 size is used. Passing invalid page size restores defaults explained in documentation of QPageLayout defaultPageLayout().
Other attributes are ignored by the design format. In particular units for margins and pageSize are always QPageLayout::Point.
Definition at line 240 of file KReportDesign.cpp.
◆ hasSection()
bool KReportDesign::hasSection | ( | KReportSection::Type | type | ) | const |
- Returns
- true if this design has section defined of type type
Definition at line 206 of file KReportDesign.cpp.
◆ pageLayout()
QPageLayout KReportDesign::pageLayout | ( | ) | const |
- Returns
- page layout for this design
Definition at line 171 of file KReportDesign.cpp.
◆ section()
KReportSection KReportDesign::section | ( | KReportSection::Type | type | ) | const |
- Returns
- section of type type
Definition at line 215 of file KReportDesign.cpp.
◆ setContent()
bool KReportDesign::setContent | ( | const QString & | text, |
KReportDesignReadingStatus * | status = nullptr ) |
Reads the XML document in .kreport format from the string text.
- Returns
- true if the content was successfully parsed On failure false is returned and if status is provided, it is updated accordingly.
Definition at line 140 of file KReportDesign.cpp.
◆ setDefaultPageLayout()
|
static |
Sets default page layout to pageLayout This information is used when a new report design is created.
Definition at line 255 of file KReportDesign.cpp.
◆ setPageLayout()
void KReportDesign::setPageLayout | ( | const QPageLayout & | pageLayout | ) |
Sets the page layout to pageLayout.
- Note
- Calling this method does not alter page layouts of existing KReportDesign objects.
Definition at line 186 of file KReportDesign.cpp.
◆ setTitle()
void KReportDesign::setTitle | ( | const QString & | title | ) |
Sets title for this design to title.
Definition at line 181 of file KReportDesign.cpp.
◆ title()
QString KReportDesign::title | ( | ) | const |
- Returns
- title for this design
Definition at line 176 of file KReportDesign.cpp.
◆ toString()
QString KReportDesign::toString | ( | int | indent = 1 | ) | const |
Converts the report document back to its textual representation.
Definition at line 164 of file KReportDesign.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.