mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-23 16:22:58 +03:00
Deleted unneeded files
Deleted unneeded files
This commit is contained in:
parent
bb45ac34e5
commit
0671e08164
Binary file not shown.
Binary file not shown.
@ -1,120 +0,0 @@
|
||||
/***************************************************************************
|
||||
* This file is part of the Lime Report project *
|
||||
* Copyright (C) 2015 by Alexander Arin *
|
||||
* arin_a@bk.ru *
|
||||
* *
|
||||
** GNU General Public License Usage **
|
||||
* *
|
||||
* This library is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
** GNU Lesser General Public License **
|
||||
* *
|
||||
* This library is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation, either version 3 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library. *
|
||||
* If not, see <http://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
****************************************************************************/
|
||||
#ifndef LRLIMERENDER_H
|
||||
#define LRLIMERENDER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QSettings>
|
||||
#include <QPrintDialog>
|
||||
//#include <QJSEngine>
|
||||
|
||||
#include "lrreportrender.h"
|
||||
#include "limerender_p.h"
|
||||
#include "lrglobal.h"
|
||||
#include "lrdatasourcemanagerintf.h"
|
||||
#include "lrscriptenginemanagerintf.h"
|
||||
#include "lrpreviewreportwidget.h"
|
||||
|
||||
class QPrinter;
|
||||
|
||||
namespace LimeReport {
|
||||
|
||||
//class PrintRange{
|
||||
//public:
|
||||
// int fromPage() const { return m_fromPage;}
|
||||
// int toPage() const { return m_toPage;}
|
||||
// QPrintDialog::PrintRange rangeType() const { return m_rangeType;}
|
||||
// PrintRange(QAbstractPrintDialog::PrintRange rangeType=QPrintDialog::AllPages, int fromPage=0, int toPage=0);
|
||||
// void setRangeType(QAbstractPrintDialog::PrintRange rangeType){ m_rangeType=rangeType;}
|
||||
// void setFromPage(int fromPage){ m_fromPage = fromPage;}
|
||||
// void setToPage(int toPage){ m_toPage = toPage;}
|
||||
//private:
|
||||
// QPrintDialog::PrintRange m_rangeType;
|
||||
// int m_fromPage;
|
||||
// int m_toPage;
|
||||
//};
|
||||
|
||||
class DataSourceManager;
|
||||
class LimeRenderPrivate;
|
||||
class PageDesignIntf;
|
||||
class PageItemDesignIntf;
|
||||
class PreviewReportWidget;
|
||||
|
||||
typedef QList< QSharedPointer<PageItemDesignIntf> > ReportPages;
|
||||
|
||||
class LIMEREPORT_EXPORT LimeRender : public QObject{
|
||||
Q_OBJECT
|
||||
friend class PreviewReportWidget;
|
||||
public:
|
||||
static void setSettings(QSettings *value){m_settings=value;}
|
||||
public:
|
||||
explicit LimeRender(QObject *parent = 0);
|
||||
~LimeRender();
|
||||
bool printReport(QPrinter *printer=0);
|
||||
bool printPages(ReportPages pages, QPrinter *printer);
|
||||
void printToFile(const QString& fileName);
|
||||
PageDesignIntf *createPreviewScene(QObject *parent = 0);
|
||||
bool printToPDF(const QString& fileName);
|
||||
void previewReport(PreviewHints hints = PreviewBarsUserSetting);
|
||||
IDataSourceManager* dataManager();
|
||||
IScriptEngineManager* scriptManager();
|
||||
bool loadFromFile(const QString& fileName, bool autoLoadPreviewOnChange = false);
|
||||
bool loadFromByteArray(QByteArray *data);
|
||||
bool loadFromString(const QString& data);
|
||||
QString lastError();
|
||||
PreviewReportWidget *createPreviewWidget(QWidget *parent = 0);
|
||||
void setPreviewWindowTitle(const QString& title);
|
||||
void setPreviewWindowIcon(const QIcon& icon);
|
||||
void setResultEditable(bool value);
|
||||
bool resultIsEditable();
|
||||
bool isBusy();
|
||||
void setPassPharse(QString& passPharse);
|
||||
QList<QLocale::Language> aviableLanguages();
|
||||
bool setReportLanguage(QLocale::Language language);
|
||||
Qt::LayoutDirection previewLayoutDirection();
|
||||
void setPreviewLayoutDirection(const Qt::LayoutDirection& previewLayoutDirection);
|
||||
signals:
|
||||
void renderStarted();
|
||||
void renderFinished();
|
||||
void renderPageFinished(int renderedPageCount);
|
||||
void onLoad(bool& loaded);
|
||||
public slots:
|
||||
void cancelRender();
|
||||
protected:
|
||||
LimeRenderPrivate * const d_ptr;
|
||||
LimeRender(LimeRenderPrivate &dd, QObject * parent=0);
|
||||
private:
|
||||
Q_DECLARE_PRIVATE(LimeRender)
|
||||
static QSettings* m_settings;
|
||||
};
|
||||
|
||||
} // namespace LimeReport
|
||||
|
||||
#endif // LRLIMERENDER_H
|
@ -1,156 +0,0 @@
|
||||
include(../common.pri)
|
||||
|
||||
DEFINES += IS_RENDER_BUILD
|
||||
|
||||
INCLUDEPATH += \
|
||||
$$REPORT_PATH/ \
|
||||
$$REPORT_PATH/items \
|
||||
$$REPORT_PATH/bands \
|
||||
$$REPORT_PATH/base \
|
||||
$$REPORT_PATH/scripteditor
|
||||
|
||||
SOURCES += \
|
||||
$$REPORT_PATH/bands/lrpageheader.cpp \
|
||||
$$REPORT_PATH/bands/lrpagefooter.cpp \
|
||||
$$REPORT_PATH/bands/lrreportheader.cpp \
|
||||
$$REPORT_PATH/bands/lrreportfooter.cpp \
|
||||
$$REPORT_PATH/bands/lrdataband.cpp \
|
||||
$$REPORT_PATH/bands/lrgroupbands.cpp \
|
||||
$$REPORT_PATH/bands/lrsubdetailband.cpp \
|
||||
$$REPORT_PATH/bands/lrtearoffband.cpp \
|
||||
$$REPORT_PATH/serializators/lrxmlqrectserializator.cpp \
|
||||
$$REPORT_PATH/serializators/lrxmlbasetypesserializators.cpp \
|
||||
$$REPORT_PATH/serializators/lrxmlreader.cpp \
|
||||
$$REPORT_PATH/serializators/lrxmlwriter.cpp \
|
||||
$$REPORT_PATH/scripteditor/lrscripteditor.cpp \
|
||||
$$REPORT_PATH/scripteditor/lrcodeeditor.cpp \
|
||||
$$REPORT_PATH/scripteditor/lrscripthighlighter.cpp \
|
||||
$$REPORT_PATH/items/lrhorizontallayout.cpp \
|
||||
$$REPORT_PATH/items/editors/lritemeditorwidget.cpp \
|
||||
$$REPORT_PATH/items/editors/lrfonteditorwidget.cpp \
|
||||
$$REPORT_PATH/items/editors/lrtextalignmenteditorwidget.cpp \
|
||||
$$REPORT_PATH/items/editors/lritemsaligneditorwidget.cpp \
|
||||
$$REPORT_PATH/items/editors/lritemsborderseditorwidget.cpp \
|
||||
$$REPORT_PATH/items/lrsimpletagparser.cpp \
|
||||
$$REPORT_PATH/items/lrimageitem.cpp \
|
||||
$$REPORT_PATH/items/lrtextitemeditor.cpp \
|
||||
$$REPORT_PATH/items/lrshapeitem.cpp \
|
||||
$$REPORT_PATH/items/lrtextitem.cpp \
|
||||
$$REPORT_PATH/lrbanddesignintf.cpp \
|
||||
$$REPORT_PATH/lrpageitemdesignintf.cpp \
|
||||
$$REPORT_PATH/lrpagedesignintf.cpp \
|
||||
$$REPORT_PATH/lrbandsmanager.cpp \
|
||||
$$REPORT_PATH/lrglobal.cpp \
|
||||
$$REPORT_PATH/lritemdesignintf.cpp \
|
||||
$$REPORT_PATH/lrdatadesignintf.cpp \
|
||||
$$REPORT_PATH/lrbasedesignintf.cpp \
|
||||
$$REPORT_PATH/lrdatasourcemanager.cpp \
|
||||
$$REPORT_PATH/lrreportrender.cpp \
|
||||
$$REPORT_PATH/lrscriptenginemanager.cpp \
|
||||
$$REPORT_PATH/lrpreviewreportwindow.cpp \
|
||||
$$REPORT_PATH/lrpreviewreportwidget.cpp \
|
||||
$$REPORT_PATH/lrgraphicsviewzoom.cpp \
|
||||
$$REPORT_PATH/lrvariablesholder.cpp \
|
||||
$$REPORT_PATH/lrgroupfunctions.cpp \
|
||||
$$REPORT_PATH/lrsimplecrypt.cpp \
|
||||
$$REPORT_PATH/lraboutdialog.cpp \
|
||||
$$REPORT_PATH/lritemscontainerdesignitf.cpp \
|
||||
$$REPORT_PATH/lrcolorindicator.cpp \
|
||||
$$REPORT_PATH/items/lrchartitem.cpp \
|
||||
$$REPORT_PATH/lrreporttranslation.cpp
|
||||
# $$PWD/lrreportrender.cpp
|
||||
|
||||
|
||||
contains(CONFIG, staticlib){
|
||||
SOURCES += $$REPORT_PATH/lrfactoryinitializer.cpp
|
||||
}
|
||||
|
||||
contains(CONFIG, zint){
|
||||
SOURCES += $$REPORT_PATH/items/lrbarcodeitem.cpp
|
||||
}
|
||||
|
||||
HEADERS += \
|
||||
$$REPORT_PATH/base/lrsingleton.h \
|
||||
$$REPORT_PATH/base/lrsimpleabstractfactory.h \
|
||||
$$REPORT_PATH/base/lrattribsabstractfactory.h \
|
||||
$$REPORT_PATH/bands/lrpageheader.h \
|
||||
$$REPORT_PATH/bands/lrpagefooter.h \
|
||||
$$REPORT_PATH/bands/lrreportheader.h \
|
||||
$$REPORT_PATH/bands/lrreportfooter.h \
|
||||
$$REPORT_PATH/bands/lrdataband.h \
|
||||
$$REPORT_PATH/bands/lrtearoffband.h \
|
||||
$$REPORT_PATH/bands/lrsubdetailband.h \
|
||||
$$REPORT_PATH/bands/lrgroupbands.h \
|
||||
$$REPORT_PATH/serializators/lrserializatorintf.h \
|
||||
$$REPORT_PATH/serializators/lrstorageintf.h \
|
||||
$$REPORT_PATH/serializators/lrxmlqrectserializator.h \
|
||||
$$REPORT_PATH/serializators/lrxmlserializatorsfactory.h \
|
||||
$$REPORT_PATH/serializators/lrxmlbasetypesserializators.h \
|
||||
$$REPORT_PATH/serializators/lrxmlreader.h \
|
||||
$$REPORT_PATH/serializators/lrxmlwriter.h \
|
||||
$$REPORT_PATH/scripteditor/lrscripteditor.h \
|
||||
$$REPORT_PATH/scripteditor/lrcodeeditor.h \
|
||||
$$REPORT_PATH/scripteditor/lrscripthighlighter.h \
|
||||
$$REPORT_PATH/items/editors/lritemeditorwidget.h \
|
||||
$$REPORT_PATH/items/editors/lrfonteditorwidget.h \
|
||||
$$REPORT_PATH/items/editors/lrtextalignmenteditorwidget.h \
|
||||
$$REPORT_PATH/items/editors/lritemsaligneditorwidget.h \
|
||||
$$REPORT_PATH/items/editors/lritemsborderseditorwidget.h \
|
||||
$$REPORT_PATH/items/lrtextitem.h \
|
||||
$$REPORT_PATH/items/lrhorizontallayout.h \
|
||||
$$REPORT_PATH/items/lrtextitemeditor.h \
|
||||
$$REPORT_PATH/items/lrshapeitem.h \
|
||||
$$REPORT_PATH/items/lrimageitem.h \
|
||||
$$REPORT_PATH/items/lrsimpletagparser.h \
|
||||
$$REPORT_PATH/lrfactoryinitializer.h \
|
||||
$$REPORT_PATH/lrbanddesignintf.h \
|
||||
$$REPORT_PATH/lrpageitemdesignintf.h \
|
||||
$$REPORT_PATH/lrbandsmanager.h \
|
||||
$$REPORT_PATH/lrglobal.h \
|
||||
$$REPORT_PATH/lrdatadesignintf.h \
|
||||
$$REPORT_PATH/lrcollection.h \
|
||||
$$REPORT_PATH/lrpagedesignintf.h \
|
||||
$$REPORT_PATH/lrdatasourcemanager.h \
|
||||
$$REPORT_PATH/lrreportrender.h \
|
||||
$$REPORT_PATH/lrpreviewreportwindow.h \
|
||||
$$REPORT_PATH/lrpreviewreportwidget.h \
|
||||
$$REPORT_PATH/lrpreviewreportwidget_p.h \
|
||||
$$REPORT_PATH/lrgraphicsviewzoom.h \
|
||||
$$REPORT_PATH/lrbasedesignintf.h \
|
||||
$$REPORT_PATH/lritemdesignintf.h \
|
||||
$$REPORT_PATH/lrdesignelementsfactory.h \
|
||||
$$REPORT_PATH/lrscriptenginemanager.h \
|
||||
$$REPORT_PATH/lrvariablesholder.h \
|
||||
$$REPORT_PATH/lrgroupfunctions.h \
|
||||
$$REPORT_PATH/lrdatasourcemanagerintf.h \
|
||||
$$REPORT_PATH/lrscriptenginemanagerintf.h \
|
||||
$$REPORT_PATH/lrsimplecrypt.h \
|
||||
$$REPORT_PATH/lraboutdialog.h \
|
||||
$$REPORT_PATH/lrcallbackdatasourceintf.h \
|
||||
$$REPORT_PATH/lrpreviewreportwidget_p.h \
|
||||
$$REPORT_PATH/lritemscontainerdesignitf.h \
|
||||
$$REPORT_PATH/lrcolorindicator.h \
|
||||
$$REPORT_PATH/items/lrchartitem.h \
|
||||
$$REPORT_PATH/lrreporttranslation.h
|
||||
# $$PWD/limerender.h \
|
||||
# $$PWD/limerender_p.h
|
||||
|
||||
contains(CONFIG, staticlib){
|
||||
HEADERS += $$REPORT_PATH/lrfactoryinitializer.h
|
||||
}
|
||||
|
||||
contains(CONFIG,zint){
|
||||
HEADERS += $$REPORT_PATH/items/lrbarcodeitem.h
|
||||
}
|
||||
|
||||
FORMS += \
|
||||
$$REPORT_PATH/lrpreviewreportwindow.ui \
|
||||
$$REPORT_PATH/lrpreviewreportwidget.ui \
|
||||
$$REPORT_PATH/items/lrtextitemeditor.ui \
|
||||
$$REPORT_PATH/lraboutdialog.ui \
|
||||
$$REPORT_PATH/scripteditor/lrscripteditor.ui
|
||||
|
||||
RESOURCES += \
|
||||
$$REPORT_PATH/report.qrc \
|
||||
$$REPORT_PATH/items/items.qrc
|
||||
|
@ -1,124 +0,0 @@
|
||||
contains(CONFIG,release) {
|
||||
TARGET = limerender
|
||||
} else {
|
||||
TARGET = limerenderd
|
||||
}
|
||||
|
||||
TEMPLATE = lib
|
||||
|
||||
contains(CONFIG, static_build){
|
||||
CONFIG += staticlib
|
||||
}
|
||||
|
||||
!contains(CONFIG, staticlib){
|
||||
CONFIG += lib
|
||||
CONFIG += dll
|
||||
}
|
||||
|
||||
CONFIG += create_prl
|
||||
CONFIG += link_prl
|
||||
|
||||
macx{
|
||||
CONFIG -= dll
|
||||
CONFIG += lib_bundle
|
||||
CONFIG += plugin
|
||||
}
|
||||
|
||||
DEFINES += LIMEREPORT_EXPORTS
|
||||
|
||||
contains(CONFIG, staticlib){
|
||||
DEFINES += HAVE_STATIC_BUILD
|
||||
message(STATIC_BUILD)
|
||||
DEFINES -= LIMEREPORT_EXPORTS
|
||||
}
|
||||
|
||||
EXTRA_FILES += \
|
||||
$$PWD/../limereport/lrglobal.cpp \
|
||||
$$PWD/../limereport/lrglobal.h \
|
||||
$$PWD/../limereport/lrdatasourcemanagerintf.h \
|
||||
$$PWD/../limereport/lrreportengine.h \
|
||||
$$PWD/../limereport/lrscriptenginemanagerintf.h \
|
||||
$$PWD/../limereport/lrcallbackdatasourceintf.h \
|
||||
$$PWD/../limereport/lrpreviewreportwidget.h
|
||||
|
||||
include(limerender.pri)
|
||||
|
||||
unix:{
|
||||
DESTDIR = $${DEST_LIBS}
|
||||
linux{
|
||||
QMAKE_POST_LINK += mkdir -p $$quote($${DEST_INCLUDE_DIR}) $$escape_expand(\\n\\t) # qmake need make mkdir -p on subdirs more than root/
|
||||
for(FILE,EXTRA_FILES){
|
||||
QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($${DEST_INCLUDE_DIR}) $$escape_expand(\\n\\t) # inside of libs make /include/files
|
||||
}
|
||||
}
|
||||
macx{
|
||||
for(FILE,EXTRA_FILES){
|
||||
QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($${DEST_INCLUDE_DIR}) $$escape_expand(\\n\\t)
|
||||
}
|
||||
QMAKE_POST_LINK += mkdir -p $$quote($${DESTDIR}/include) $$escape_expand(\\n\\t)
|
||||
}
|
||||
QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($${DEST_INCLUDE_DIR}) $$quote($${DESTDIR})
|
||||
}
|
||||
|
||||
win32 {
|
||||
EXTRA_FILES ~= s,/,\\,g
|
||||
BUILD_DIR ~= s,/,\\,g
|
||||
DESTDIR = $${DEST_LIBS}
|
||||
DEST_DIR = $$DESTDIR/include
|
||||
DEST_DIR ~= s,/,\\,g
|
||||
DEST_INCLUDE_DIR ~= s,/,\\,g
|
||||
|
||||
for(FILE,EXTRA_FILES){
|
||||
QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t)
|
||||
}
|
||||
QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$${DEST_INCLUDE_DIR}\" \"$${DEST_DIR}\"
|
||||
}
|
||||
|
||||
contains(CONFIG,zint){
|
||||
message(zint)
|
||||
INCLUDEPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt
|
||||
DEPENDPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt
|
||||
LIBS += -L$${DEST_LIBS}
|
||||
contains(CONFIG,release) {
|
||||
LIBS += -lQtZint
|
||||
} else {
|
||||
LIBS += -lQtZintd
|
||||
}
|
||||
}
|
||||
|
||||
####Automatically build required translation files (*.qm)
|
||||
|
||||
contains(CONFIG,build_translations){
|
||||
LANGUAGES = ru es_ES ar
|
||||
|
||||
defineReplace(prependAll) {
|
||||
for(a,$$1):result += $$2$${a}$$3
|
||||
return($$result)
|
||||
}
|
||||
|
||||
TRANSLATIONS = $$prependAll(LANGUAGES, \"$$TRANSLATIONS_PATH/limereport_,.ts\")
|
||||
|
||||
qtPrepareTool(LUPDATE, lupdate)
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
ts.commands = $$LUPDATE $$shell_quote($$PWD) -ts $$TRANSLATIONS
|
||||
}
|
||||
lessThan(QT_MAJOR_VERSION, 5){
|
||||
ts.commands = $$LUPDATE $$quote($$PWD) -ts $$TRANSLATIONS
|
||||
}
|
||||
TRANSLATIONS_FILES =
|
||||
qtPrepareTool(LRELEASE, lrelease)
|
||||
for(tsfile, TRANSLATIONS) {
|
||||
qmfile = $$tsfile
|
||||
qmfile ~= s,".ts\"$",".qm\"",
|
||||
qm.commands += $$LRELEASE -removeidentical $$tsfile -qm $$qmfile $$escape_expand(\\n\\t)
|
||||
tmp_command = $$LRELEASE -removeidentical $$tsfile -qm $$qmfile $$escape_expand(\\n\\t)
|
||||
TRANSLATIONS_FILES += $$qmfile
|
||||
}
|
||||
qm.depends = ts
|
||||
OTHER_FILES += $$TRANSLATIONS
|
||||
QMAKE_EXTRA_TARGETS += qm ts
|
||||
POST_TARGETDEPS += qm
|
||||
}
|
||||
|
||||
#### EN AUTOMATIC TRANSLATIONS
|
@ -1,192 +0,0 @@
|
||||
/***************************************************************************
|
||||
* This file is part of the Lime Report project *
|
||||
* Copyright (C) 2015 by Alexander Arin *
|
||||
* arin_a@bk.ru *
|
||||
* *
|
||||
** GNU General Public License Usage **
|
||||
* *
|
||||
* This library is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
** GNU Lesser General Public License **
|
||||
* *
|
||||
* This library is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation, either version 3 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library. *
|
||||
* If not, see <http://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
****************************************************************************/
|
||||
#ifndef LRLIMERENDER_P_H
|
||||
#define LRLIMERENDER_P_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QSharedPointer>
|
||||
#include <QMainWindow>
|
||||
|
||||
#include "limerender.h"
|
||||
#include "lrcollection.h"
|
||||
#include "lrglobal.h"
|
||||
#include "lrdatasourcemanager.h"
|
||||
#include "lrbanddesignintf.h"
|
||||
#include "serializators/lrstorageintf.h"
|
||||
#include "lrscriptenginemanager.h"
|
||||
#include "lrreporttranslation.h"
|
||||
|
||||
class QFileSystemWatcher;
|
||||
|
||||
namespace LimeReport{
|
||||
|
||||
class PageDesignIntf;
|
||||
class PrintRange;
|
||||
class ReportDesignWindow;
|
||||
|
||||
//TODO: Add on render callback
|
||||
|
||||
class LimeRenderPrivate : public QObject, public ICollectionContainer, public ITranslationContainer
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DECLARE_PUBLIC(ReportEngine)
|
||||
Q_PROPERTY(ACollectionProperty pages READ fakeCollectionReader())
|
||||
Q_PROPERTY(QObject* datasourcesManager READ dataManager)
|
||||
Q_PROPERTY(QObject* scriptContext READ scriptContext)
|
||||
Q_PROPERTY(bool suppressFieldAndVarError READ suppressFieldAndVarError WRITE setSuppressFieldAndVarError)
|
||||
Q_PROPERTY(ATranslationProperty translation READ fakeTranslationReader)
|
||||
friend class PreviewReportWidget;
|
||||
public:
|
||||
static void printReport(ItemsReaderIntf::Ptr reader, QPrinter &printer);
|
||||
static void printReport(ReportPages pages, QPrinter &printer);
|
||||
Q_INVOKABLE QStringList aviableReportTranslations();
|
||||
Q_INVOKABLE void setReportTranslation(const QString& languageName);
|
||||
public:
|
||||
explicit LimeRenderPrivate(QObject *parent = 0);
|
||||
virtual ~LimeRenderPrivate();
|
||||
|
||||
PageDesignIntf* appendPage(const QString& pageName="");
|
||||
bool deletePage(PageDesignIntf *page);
|
||||
PageDesignIntf* createPreviewPage();
|
||||
PageDesignIntf* pageAt(int index){return (index<=(m_pages.count()-1)) ? m_pages.at(index):0;}
|
||||
int pageCount() {return m_pages.count();}
|
||||
DataSourceManager* dataManager(){return m_datasources;}
|
||||
ScriptEngineContext* scriptContext(){return m_scriptEngineContext;}
|
||||
ScriptEngineManager* scriptManager();
|
||||
IDataSourceManager* dataManagerIntf(){return m_datasources;}
|
||||
|
||||
IScriptEngineManager* scriptManagerIntf(){
|
||||
ScriptEngineManager::instance().setDataManager(dataManager());
|
||||
return &ScriptEngineManager::instance();
|
||||
}
|
||||
|
||||
void clearReport();
|
||||
bool printReport(QPrinter *printer=0);
|
||||
bool printPages(ReportPages pages, QPrinter *printer);
|
||||
void printToFile(const QString& fileName);
|
||||
bool printToPDF(const QString& fileName);
|
||||
void previewReport(PreviewHints hints = PreviewBarsUserSetting);
|
||||
void setSettings(QSettings* value);
|
||||
QSettings* settings();
|
||||
bool loadFromFile(const QString& fileName, bool autoLoadPreviewOnChange);
|
||||
bool loadFromByteArray(QByteArray *data, const QString& name = "");
|
||||
bool loadFromString(const QString& report, const QString& name = "");
|
||||
QString lastError();
|
||||
ReportEngine * q_ptr;
|
||||
bool emitLoadReport();
|
||||
bool hasActivePreview(){return m_activePreview;}
|
||||
PageDesignIntf *createPreviewScene(QObject *parent);
|
||||
PreviewReportWidget *createPreviewWidget(QWidget *parent);
|
||||
QIcon previewWindowIcon() const;
|
||||
void setPreviewWindowIcon(const QIcon &previewWindowIcon);
|
||||
QString previewWindowTitle() const;
|
||||
void setPreviewWindowTitle(const QString &previewWindowTitle);
|
||||
|
||||
bool suppressFieldAndVarError() const;
|
||||
void setSuppressFieldAndVarError(bool suppressFieldAndVarError);
|
||||
bool isBusy();
|
||||
bool resultIsEditable() const;
|
||||
void setResultEditable(bool value);
|
||||
|
||||
void setPassPhrase(const QString &passPhrase);
|
||||
bool addTranslationLanguage(QLocale::Language language);
|
||||
bool removeTranslationLanguage(QLocale::Language language);
|
||||
bool setReportLanguage(QLocale::Language language);
|
||||
QList<QLocale::Language> aviableLanguages();
|
||||
ReportTranslation* reportTranslation(QLocale::Language language);
|
||||
void reorderPages(const QList<PageDesignIntf *> &reorderedPages);
|
||||
void clearSelection();
|
||||
Qt::LayoutDirection previewLayoutDirection();
|
||||
void setPreviewLayoutDirection(const Qt::LayoutDirection& previewLayoutDirection);
|
||||
signals:
|
||||
void pagesLoadFinished();
|
||||
void datasourceCollectionLoadFinished(const QString& collectionName);
|
||||
void cleared();
|
||||
void renderStarted();
|
||||
void renderFinished();
|
||||
void renderPageFinished(int renderedPageCount);
|
||||
void onLoad(bool& loaded);
|
||||
public slots:
|
||||
bool slotLoadFromFile(const QString& fileName);
|
||||
void cancelRender();
|
||||
protected:
|
||||
PageDesignIntf* createPage(const QString& pageName="");
|
||||
protected slots:
|
||||
void slotDataSourceCollectionLoaded(const QString& collectionName);
|
||||
private slots:
|
||||
void slotPreviewWindowDestroyed(QObject *window);
|
||||
private:
|
||||
//ICollectionContainer
|
||||
virtual QObject* createElement(const QString&,const QString&);
|
||||
virtual int elementsCount(const QString&);
|
||||
virtual QObject* elementAt(const QString&, int index);
|
||||
virtual void collectionLoadFinished(const QString&);
|
||||
void saveError(QString message);
|
||||
void showError(QString message);
|
||||
//ICollectionContainer
|
||||
//ITranslationContainer
|
||||
Translations* translations(){ return &m_translations;}
|
||||
void updateTranslations();
|
||||
//ITranslationContainer
|
||||
ReportPages renderToPages();
|
||||
QString renderToString();
|
||||
PageDesignIntf* getPageByName(const QString& pageName);
|
||||
ATranslationProperty fakeTranslationReader(){ return ATranslationProperty();}
|
||||
private:
|
||||
QList<PageDesignIntf*> m_pages;
|
||||
DataSourceManager* m_datasources;
|
||||
ScriptEngineContext* m_scriptEngineContext;
|
||||
ReportRender::Ptr m_reportRender;
|
||||
QString m_fileName;
|
||||
QString m_lastError;
|
||||
QSettings* m_settings;
|
||||
bool m_ownedSettings;
|
||||
QScopedPointer<QPrinter> m_printer;
|
||||
bool m_printerSelected;
|
||||
bool m_showProgressDialog;
|
||||
QString m_reportsDir;
|
||||
QString m_reportName;
|
||||
QMainWindow* m_activePreview;
|
||||
QIcon m_previewWindowIcon;
|
||||
QString m_previewWindowTitle;
|
||||
QPointer<ReportDesignWindow> m_designerWindow;
|
||||
ReportSettings m_reportSettings;
|
||||
bool m_LimeRendering;
|
||||
bool m_resultIsEditable;
|
||||
QString m_passPhrase;
|
||||
QFileSystemWatcher *m_fileWatcher;
|
||||
Translations m_translations;
|
||||
QLocale::Language m_reportLanguage;
|
||||
void activateLanguage(QLocale::Language language);
|
||||
Qt::LayoutDirection m_previewLayoutDirection;
|
||||
};
|
||||
|
||||
}
|
||||
#endif // LRLIMERENDER_P_H
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user