Changeset View
Changeset View
Standalone View
Standalone View
src/common/KReportData.h
Show All 23 Lines | |||||
24 | #include "config-kreport.h" | 24 | #include "config-kreport.h" | ||
25 | 25 | | |||
26 | /** @brief Abstraction of report data source | 26 | /** @brief Abstraction of report data source | ||
27 | */ | 27 | */ | ||
28 | class KREPORT_EXPORT KReportData | 28 | class KREPORT_EXPORT KReportData | ||
29 | { | 29 | { | ||
30 | 30 | | |||
31 | public: | 31 | public: | ||
32 | KReportData(); | ||||
32 | virtual ~KReportData(); | 33 | virtual ~KReportData(); | ||
33 | 34 | | |||
34 | //! Describes sorting for single field | 35 | //! Describes sorting for single field | ||
35 | /*! By default the order is ascending. */ | 36 | /*! By default the order is ascending. */ | ||
36 | class KREPORT_EXPORT SortedField | 37 | class KREPORT_EXPORT SortedField | ||
37 | { | 38 | { | ||
38 | public: | 39 | public: | ||
39 | SortedField(); | 40 | SortedField(); | ||
40 | QString field; | 41 | ~SortedField(); | ||
41 | Qt::SortOrder order; | 42 | SortedField& operator=(const SortedField &other); | ||
43 | void setField(const QString &field); | ||||
44 | void setOrder(Qt::SortOrder order); | ||||
45 | QString field() const; | ||||
46 | QString field(); | ||||
staniek: Sorry, missed it, this method not needed. | |||||
47 | Qt::SortOrder order() const; | ||||
48 | Qt::SortOrder order(); | ||||
staniek: Sorry, missed it, this method not needed. | |||||
49 | | ||||
50 | private: | ||||
51 | class Private; | ||||
52 | Private * const d; | ||||
42 | }; | 53 | }; | ||
43 | 54 | | |||
44 | //! Open the dataset | 55 | //! Open the dataset | ||
45 | virtual bool open() = 0; | 56 | virtual bool open() = 0; | ||
46 | 57 | | |||
47 | //! Close the dataset | 58 | //! Close the dataset | ||
48 | virtual bool close() = 0; | 59 | virtual bool close() = 0; | ||
49 | 60 | | |||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | 118 | #endif | |||
112 | //! Return a list of data source names possible for advanced controls. | 123 | //! Return a list of data source names possible for advanced controls. | ||
113 | //! Returns dataSources() by default | 124 | //! Returns dataSources() by default | ||
114 | virtual QStringList dataSourceNames() const; | 125 | virtual QStringList dataSourceNames() const; | ||
115 | 126 | | |||
116 | //! Creates a new instance with data source. Default implementation returns @c nullptr. | 127 | //! Creates a new instance with data source. Default implementation returns @c nullptr. | ||
117 | //! @a source is implementation-specific identifier. | 128 | //! @a source is implementation-specific identifier. | ||
118 | //! Owner of the returned pointer is the caller. | 129 | //! Owner of the returned pointer is the caller. | ||
119 | virtual KReportData* create(const QString &source) const Q_REQUIRED_RESULT; | 130 | virtual KReportData* create(const QString &source) const Q_REQUIRED_RESULT; | ||
131 | | ||||
132 | private: | ||||
133 | Q_DISABLE_COPY(KReportData) | ||||
134 | class Private; | ||||
135 | Private * const d; | ||||
120 | }; | 136 | }; | ||
121 | 137 | | |||
122 | #endif | 138 | #endif |
Sorry, missed it, this method not needed.