Changeset View
Changeset View
Standalone View
Standalone View
src/common/KReportDataSource.h
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Line(s) | 31 | public: | |||
---|---|---|---|---|---|
101 | //! Sets the sorting for the data | 101 | //! Sets the sorting for the data | ||
102 | //! Should be called before open() so that the data source can be edited accordingly | 102 | //! Should be called before open() so that the data source can be edited accordingly | ||
103 | //! Default impl does nothing | 103 | //! Default impl does nothing | ||
104 | virtual void setSorting(const QList<SortedField> &sorting); | 104 | virtual void setSorting(const QList<SortedField> &sorting); | ||
105 | 105 | | |||
106 | //! Adds a condition to the data source | 106 | //! Adds a condition to the data source | ||
107 | virtual void addCondition(const QString &field, const QVariant &value, const QString& relation = QLatin1String("=")); | 107 | virtual void addCondition(const QString &field, const QVariant &value, const QString& relation = QLatin1String("=")); | ||
108 | 108 | | |||
109 | //! Utility Functions | | |||
110 | //! @todo These are probably eligable to be moved into a new class | | |||
111 | | ||||
112 | #ifdef KREPORT_SCRIPTING | | |||
113 | //! Allow the reportdata implementation to return a list of possible scripts | | |||
114 | virtual QStringList scriptList() const; | | |||
115 | | ||||
116 | //! Allow the reportdata implementation to return some script code based on a specific script name | | |||
117 | //! as set in the report | | |||
118 | virtual QString scriptCode(const QString& script) const; | | |||
119 | #endif | | |||
120 | | ||||
121 | //! Return a list of data source names available for this data source | 109 | //! Return a list of data source names available for this data source | ||
122 | //! Works after the source is opened | 110 | //! Works after the source is opened | ||
123 | virtual QStringList dataSourceNames() const = 0; | 111 | virtual QStringList dataSourceNames() const = 0; | ||
124 | 112 | | |||
125 | //! Return data source caption for specified @a dataSourceName | 113 | //! Return data source caption for specified @a dataSourceName | ||
126 | //! It is possibly translated. As such it is suitable for use in GUIs. | 114 | //! It is possibly translated. As such it is suitable for use in GUIs. | ||
127 | //! Default implementation just returns @a dataSourceName. | 115 | //! Default implementation just returns @a dataSourceName. | ||
128 | virtual QString dataSourceCaption(const QString &dataSourceName) const; | 116 | virtual QString dataSourceCaption(const QString &dataSourceName) const; | ||
Show All 13 Lines |