0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-11-25 00:18:06 +03:00

plugin extracted

This commit is contained in:
Arin Alexander
2017-11-24 00:13:47 +03:00
parent 9e4025f886
commit 0fb1ba1bd8
34 changed files with 3025 additions and 370 deletions

View File

@@ -42,6 +42,7 @@
#include "serializators/lrstorageintf.h"
#include "lrscriptenginemanager.h"
#include "lrreporttranslation.h"
#include "lrdesignerplugininterface.h"
class QFileSystemWatcher;
@@ -53,7 +54,40 @@ class ReportDesignWindow;
//TODO: Add on render callback
class ReportEnginePrivate : public QObject, public ICollectionContainer, public ITranslationContainer
class ReportEnginePrivateInterface {
public:
virtual PageDesignIntf* appendPage(const QString& pageName="") = 0;
virtual bool deletePage(PageDesignIntf *page) = 0;
virtual void reorderPages(const QList<PageDesignIntf *> &reorderedPages) = 0;
virtual int pageCount() = 0;
virtual PageDesignIntf* pageAt(int index) = 0;
virtual void clearReport() = 0;
virtual ScriptEngineContext* scriptContext() = 0;
virtual ScriptEngineManager* scriptManager() = 0;
virtual DataSourceManager* dataManager() = 0;
virtual QString reportFileName() = 0;
virtual void setReportFileName(const QString& reportFileName) = 0;
virtual void emitSaveFinished() = 0;
virtual bool isNeedToSave() = 0;
virtual void emitSaveReport() = 0;
virtual bool saveToFile() = 0;
virtual bool saveToFile(const QString& fileName) = 0;
virtual bool isSaved() = 0;
virtual QString reportName() = 0;
virtual bool loadFromFile(const QString& fileName, bool autoLoadPreviewOnChange) = 0;
virtual bool emitLoadReport() = 0;
virtual void clearSelection() = 0;
virtual bool printReport(QPrinter *printer=0) = 0;
virtual void previewReport(PreviewHints hints = PreviewBarsUserSetting) = 0;
virtual void setCurrentReportsDir(const QString& dirName) = 0;
virtual QString currentReportsDir() = 0;
virtual bool suppressFieldAndVarError() const = 0;
virtual void setSuppressFieldAndVarError(bool suppressFieldAndVarError) = 0;
};
class ReportEnginePrivate : public QObject, public ICollectionContainer, public ITranslationContainer,
public ReportEnginePrivateInterface
{
Q_OBJECT
Q_DECLARE_PUBLIC(ReportEngine)
@@ -195,7 +229,7 @@ private:
QMainWindow* m_activePreview;
QIcon m_previewWindowIcon;
QString m_previewWindowTitle;
QPointer<ReportDesignWindow> m_designerWindow;
QPointer<QMainWindow> m_designerWindow;
ReportSettings m_reportSettings;
bool m_reportRendering;
bool m_resultIsEditable;
@@ -205,6 +239,7 @@ private:
QLocale::Language m_reportLanguage;
void activateLanguage(QLocale::Language language);
Qt::LayoutDirection m_previewLayoutDirection;
LimeReportPluginInterface* m_designerFactory;
};
}