KReportDataSource
#include <KReportDataSource.h>
Classes | |
class | SortedField |
Public Member Functions | |
virtual void | addCondition (const QString &field, const QVariant &value, const QString &relation=QLatin1String("=")) |
virtual qint64 | at () const =0 |
virtual bool | close ()=0 |
virtual KReportDataSource * | create (const QString &source) const |
virtual QString | dataSourceCaption (const QString &dataSourceName) const |
virtual QStringList | dataSourceNames () const =0 |
virtual QStringList | fieldKeys () const |
virtual QStringList | fieldNames () const =0 |
virtual int | fieldNumber (const QString &field) const =0 |
virtual bool | moveFirst ()=0 |
virtual bool | moveLast ()=0 |
virtual bool | moveNext ()=0 |
virtual bool | movePrevious ()=0 |
virtual bool | open ()=0 |
virtual qint64 | recordCount () const =0 |
virtual void | setSorting (const QList< SortedField > &sorting) |
virtual QString | sourceClass () const |
virtual QString | sourceName () const |
virtual QVariant | value (const QString &field) const =0 |
virtual QVariant | value (int pos) const =0 |
Detailed Description
Abstraction of report data source.
A data source provides data to the report engine, usually from a database, but could also be implemented for text and other file formats
Definition at line 32 of file KReportDataSource.h.
Constructor & Destructor Documentation
◆ KReportDataSource()
KReportDataSource::KReportDataSource | ( | ) |
Definition at line 100 of file KReportDataSource.cpp.
◆ ~KReportDataSource()
|
virtual |
Definition at line 104 of file KReportDataSource.cpp.
Member Function Documentation
◆ addCondition()
|
virtual |
Adds a condition to the data source.
Definition at line 129 of file KReportDataSource.cpp.
◆ at()
|
pure virtual |
Return the current position in the dataset.
◆ close()
|
pure virtual |
Close the dataset.
◆ create()
|
virtual |
Creates a new instance with data source.
Default implementation returns nullptr
. source is implementation-specific identifier. Owner of the returned pointer is the caller.
Definition at line 146 of file KReportDataSource.cpp.
◆ dataSourceCaption()
Return data source caption for specified dataSourceName It is possibly translated.
As such it is suitable for use in GUIs. Default implementation just returns dataSourceName.
Definition at line 141 of file KReportDataSource.cpp.
◆ dataSourceNames()
|
pure virtual |
Return a list of data source names available for this data source Works after the source is opened.
Definition at line 136 of file KReportDataSource.cpp.
◆ fieldKeys()
|
virtual |
Return the list of field keys. Returns fieldNames() by default.
Definition at line 109 of file KReportDataSource.cpp.
◆ fieldNames()
|
pure virtual |
Return the list of field names.
◆ fieldNumber()
|
pure virtual |
Return the index number of the field given by nane field.
◆ moveFirst()
|
pure virtual |
Move to the first record.
◆ moveLast()
|
pure virtual |
Move to the last record.
◆ moveNext()
|
pure virtual |
Move to the next record.
◆ movePrevious()
|
pure virtual |
Move to the previous record.
◆ open()
|
pure virtual |
Open the dataset.
◆ recordCount()
|
pure virtual |
Return the total number of records.
◆ setSorting()
|
virtual |
Sets the sorting for the data Should be called before open() so that the data source can be edited accordingly Default impl does nothing.
Definition at line 124 of file KReportDataSource.cpp.
◆ sourceClass()
|
virtual |
- Returns
- the class name of this source
Definition at line 119 of file KReportDataSource.cpp.
◆ sourceName()
|
virtual |
Return the name of this source.
Definition at line 114 of file KReportDataSource.cpp.
◆ value() [1/2]
Return the value of the field fir the given name for the current record.
◆ value() [2/2]
|
pure virtual |
Return the value of the field at the given position for the current record.
The documentation for this class was generated from the following files:
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.