mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-25 13:04:38 +03:00
Some additional datasource management functions have been added
This commit is contained in:
parent
75878b97a9
commit
22dd686470
@ -1797,12 +1797,28 @@ QObject* ComboBoxWrapperCreator::createWrapper(QObject *item)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DatasourceFunctions::first(const QString& datasourceName)
|
||||||
|
{
|
||||||
|
if (m_dataManager && m_dataManager->dataSource(datasourceName)){
|
||||||
|
m_dataManager->dataSource(datasourceName)->first();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool DatasourceFunctions::next(const QString &datasourceName){
|
bool DatasourceFunctions::next(const QString &datasourceName){
|
||||||
if (m_dataManager && m_dataManager->dataSource(datasourceName))
|
if (m_dataManager && m_dataManager->dataSource(datasourceName))
|
||||||
return m_dataManager->dataSource(datasourceName)->next();
|
return m_dataManager->dataSource(datasourceName)->next();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DatasourceFunctions::prior(const QString& datasourceName)
|
||||||
|
{
|
||||||
|
if (m_dataManager && m_dataManager->dataSource(datasourceName))
|
||||||
|
return m_dataManager->dataSource(datasourceName)->prior();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool DatasourceFunctions::isEOF(const QString &datasourceName)
|
bool DatasourceFunctions::isEOF(const QString &datasourceName)
|
||||||
{
|
{
|
||||||
if (m_dataManager && m_dataManager->dataSource(datasourceName))
|
if (m_dataManager && m_dataManager->dataSource(datasourceName))
|
||||||
@ -1810,6 +1826,14 @@ bool DatasourceFunctions::isEOF(const QString &datasourceName)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DatasourceFunctions::invalidate(const QString& datasourceName)
|
||||||
|
{
|
||||||
|
if (m_dataManager && m_dataManager->dataSource(datasourceName)){
|
||||||
|
m_dataManager->dataSourceHolder(datasourceName)->invalidate(IDataSource::DatasourceMode::RENDER_MODE);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef USE_QJSENGINE
|
#ifndef USE_QJSENGINE
|
||||||
void ComboBoxPrototype::addItem(const QString &text)
|
void ComboBoxPrototype::addItem(const QString &text)
|
||||||
|
@ -302,8 +302,12 @@ class DatasourceFunctions : public QObject{
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit DatasourceFunctions(IDataSourceManager* dataManager): m_dataManager(dataManager){}
|
explicit DatasourceFunctions(IDataSourceManager* dataManager): m_dataManager(dataManager){}
|
||||||
|
Q_INVOKABLE bool first(const QString& datasourceName);
|
||||||
Q_INVOKABLE bool next(const QString& datasourceName);
|
Q_INVOKABLE bool next(const QString& datasourceName);
|
||||||
|
Q_INVOKABLE bool prior(const QString& datasourceName);
|
||||||
Q_INVOKABLE bool isEOF(const QString& datasourceName);
|
Q_INVOKABLE bool isEOF(const QString& datasourceName);
|
||||||
|
Q_INVOKABLE bool invalidate(const QString& datasourceName);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IDataSourceManager* m_dataManager;
|
IDataSourceManager* m_dataManager;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user