diff --git a/include/lrdatasourcemanagerintf.h b/include/lrdatasourcemanagerintf.h index a10cb05..040dd1d 100644 --- a/include/lrdatasourcemanagerintf.h +++ b/include/lrdatasourcemanagerintf.h @@ -65,6 +65,7 @@ public: virtual VariableDataType variableDataType(const QString& name) = 0; virtual bool variableIsSystem(const QString& name) = 0; virtual IDataSource* dataSource(const QString& name) = 0; + virtual IDataSourceHolder* dataSourceHolder(const QString& name) = 0; }; } diff --git a/limereport/lrdatadesignintf.h b/limereport/lrdatadesignintf.h index 85d7957..06edc3d 100644 --- a/limereport/lrdatadesignintf.h +++ b/limereport/lrdatadesignintf.h @@ -46,42 +46,6 @@ namespace LimeReport{ class DataSourceManager; -//class IDataSource { -//public: -// enum DatasourceMode{DESIGN_MODE,RENDER_MODE}; -// typedef QSharedPointer Ptr; -// virtual ~IDataSource(){} -// virtual bool next() = 0; -// virtual bool hasNext() = 0; -// virtual bool prior() = 0; -// virtual void first() = 0; -// virtual void last() = 0; -// virtual bool bof() = 0; -// virtual bool eof() = 0; -// virtual QVariant data(const QString& columnName) = 0; -// virtual QVariant dataByKeyField(const QString& columnName, const QString& keyColumnName, QVariant keyData) = 0; -// virtual int columnCount() = 0; -// virtual QString columnNameByIndex(int columnIndex) = 0; -// virtual int columnIndexByName(QString name) = 0; -// virtual bool isInvalid() const = 0; -// virtual QString lastError() = 0; -// virtual QAbstractItemModel* model() = 0; -//}; - -//class IDataSourceHolder { -//public: -// virtual IDataSource* dataSource(IDataSource::DatasourceMode mode = IDataSource::RENDER_MODE) = 0; -// virtual QString lastError() const = 0; -// virtual bool isInvalid() const = 0; -// virtual bool isOwned() const = 0; -// virtual bool isEditable() const = 0; -// virtual bool isRemovable() const = 0; -// virtual void invalidate(IDataSource::DatasourceMode mode, bool dbWillBeClosed = false) = 0; -// virtual void update() = 0; -// virtual void clearErrors() = 0; -// virtual ~IDataSourceHolder(){} -//}; - class ModelHolder: public QObject, public IDataSourceHolder{ Q_OBJECT public: diff --git a/limereport/lrdatasourcemanagerintf.h b/limereport/lrdatasourcemanagerintf.h index a10cb05..040dd1d 100644 --- a/limereport/lrdatasourcemanagerintf.h +++ b/limereport/lrdatasourcemanagerintf.h @@ -65,6 +65,7 @@ public: virtual VariableDataType variableDataType(const QString& name) = 0; virtual bool variableIsSystem(const QString& name) = 0; virtual IDataSource* dataSource(const QString& name) = 0; + virtual IDataSourceHolder* dataSourceHolder(const QString& name) = 0; }; }