Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/reports/kexisourceselector.h
Show All 36 Lines | |||||
37 | class KexiSourceSelector : public QWidget | 37 | class KexiSourceSelector : public QWidget | ||
38 | { | 38 | { | ||
39 | Q_OBJECT | 39 | Q_OBJECT | ||
40 | public: | 40 | public: | ||
41 | explicit KexiSourceSelector(KexiProject* project, QWidget* parent = 0); | 41 | explicit KexiSourceSelector(KexiProject* project, QWidget* parent = 0); | ||
42 | ~KexiSourceSelector(); | 42 | ~KexiSourceSelector(); | ||
43 | 43 | | |||
44 | KReportDataSource* createDataSource() const Q_REQUIRED_RESULT; | 44 | KReportDataSource* createDataSource() const Q_REQUIRED_RESULT; | ||
45 | void setConnectionData(const QDomElement &c); | 45 | | ||
46 | QDomElement connectionData(); | 46 | QDomElement connectionData(); | ||
47 | 47 | | |||
48 | //! @return name plugin ID of selected item (a table or a query). Can return an empty string. | ||||
49 | QString selectedPluginId() const; | ||||
50 | | ||||
51 | //! @return name of selected table or query. | ||||
52 | QString selectedName() const; | ||||
53 | | ||||
54 | //! \return true if the current selection is valid | ||||
55 | bool isSelectionValid() const; | ||||
56 | | ||||
57 | public Q_SLOTS: | ||||
58 | /*! Sets item for data source described by \a pluginId and \a name. | ||||
59 | If \a pluginId is empty, either "org.kexi-project.table" and "org.kexi-project.query" are tried. */ | ||||
60 | void setDataSource(const QString& pluginId, const QString& name); | ||||
61 | | ||||
48 | Q_SIGNALS: | 62 | Q_SIGNALS: | ||
49 | void dataSourceChanged(); | 63 | void dataSourceChanged(); | ||
50 | 64 | | |||
51 | private: | 65 | private: | ||
52 | class Private; | 66 | class Private; | ||
53 | Private * const d; | 67 | Private * const d; | ||
54 | }; | 68 | }; | ||
55 | 69 | | |||
56 | #endif // KEXISOURCESELECTOR_H | 70 | #endif // KEXISOURCESELECTOR_H |