mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-23 20:22:58 +03:00
plugin finished
This commit is contained in:
parent
0fb1ba1bd8
commit
911eb1102a
@ -2,6 +2,7 @@ DEFINES += NO_PNG
|
||||
TEMPLATE = lib
|
||||
|
||||
contains(CONFIG, static_build){
|
||||
message(Static Build)
|
||||
CONFIG += staticlib
|
||||
DEFINES += HAVE_STATIC_BUILD
|
||||
}
|
||||
|
@ -12,6 +12,11 @@ CONFIG *= build_translations
|
||||
CONFIG *= dialogdesigner
|
||||
}
|
||||
|
||||
!contains(CONFIG, no_embedded_designer){
|
||||
CONFIG *= embedded_designer
|
||||
DEFINES += HAVE_REPORT_DESIGNER
|
||||
}
|
||||
|
||||
ZINT_PATH = $$PWD/3rdparty/zint-2.6.1
|
||||
contains(CONFIG,zint){
|
||||
DEFINES *= HAVE_ZINT
|
||||
|
@ -1,6 +1,6 @@
|
||||
include(../common.pri)
|
||||
|
||||
DEFINES += IS_REPORT_DESIGNER
|
||||
DEFINES += HAVE_REPORT_DESIGNER
|
||||
|
||||
contains(CONFIG,dialogdesigner){
|
||||
include($$REPORT_PATH/dialogdesigner/dialogdesigner.pri)
|
||||
@ -19,23 +19,11 @@ INCLUDEPATH += \
|
||||
$$REPORT_PATH/../designer_plugin
|
||||
|
||||
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/databrowser/lrdatabrowser.cpp \
|
||||
$$REPORT_PATH/databrowser/lrsqleditdialog.cpp \
|
||||
$$REPORT_PATH/databrowser/lrconnectiondialog.cpp \
|
||||
$$REPORT_PATH/databrowser/lrvariabledialog.cpp \
|
||||
$$REPORT_PATH/databrowser/lrdatabrowsertree.cpp \
|
||||
$$REPORT_PATH/serializators/lrxmlqrectserializator.cpp \
|
||||
$$REPORT_PATH/serializators/lrxmlbasetypesserializators.cpp \
|
||||
$$REPORT_PATH/serializators/lrxmlreader.cpp \
|
||||
$$REPORT_PATH/serializators/lrxmlwriter.cpp \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrstringpropitem.cpp \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrrectproptem.cpp \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrintpropitem.cpp \
|
||||
@ -74,11 +62,6 @@ SOURCES += \
|
||||
$$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/translationeditor/translationeditor.cpp \
|
||||
$$REPORT_PATH/lrbanddesignintf.cpp \
|
||||
$$REPORT_PATH/lrpageitemdesignintf.cpp \
|
||||
@ -89,58 +72,25 @@ SOURCES += \
|
||||
$$REPORT_PATH/lrdatadesignintf.cpp \
|
||||
$$REPORT_PATH/lrreportdesignwidget.cpp \
|
||||
$$REPORT_PATH/lrbasedesignintf.cpp \
|
||||
$$REPORT_PATH/lrreportengine.cpp \
|
||||
$$REPORT_PATH/lrdatasourcemanager.cpp \
|
||||
$$REPORT_PATH/lrreportdesignwindow.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/lrsettingdialog.cpp \
|
||||
$$REPORT_PATH/lritemscontainerdesignitf.cpp \
|
||||
$$REPORT_PATH/lrcolorindicator.cpp \
|
||||
$$REPORT_PATH/items/lrchartitem.cpp \
|
||||
$$REPORT_PATH/items/lrchartitemeditor.cpp \
|
||||
$$REPORT_PATH/lrreporttranslation.cpp \
|
||||
$$REPORT_PATH/translationeditor/languageselectdialog.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/databrowser/lrdatabrowser.h \
|
||||
$$REPORT_PATH/databrowser/lrsqleditdialog.h \
|
||||
$$REPORT_PATH/databrowser/lrconnectiondialog.h \
|
||||
$$REPORT_PATH/databrowser/lrvariabledialog.h \
|
||||
$$REPORT_PATH/databrowser/lrdatabrowsertree.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/objectinspector/propertyItems/lrstringpropitem.h \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrrectproptem.h \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrdatasourcepropitem.h \
|
||||
@ -181,69 +131,40 @@ HEADERS += \
|
||||
$$REPORT_PATH/items/lralignpropitem.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/translationeditor/translationeditor.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/lrreportdesignwidget.h \
|
||||
$$REPORT_PATH/lrreportengine_p.h \
|
||||
$$REPORT_PATH/lrdatasourcemanager.h \
|
||||
$$REPORT_PATH/lrreportdesignwindow.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/lrreportengine.h \
|
||||
$$REPORT_PATH/lrdatasourcemanagerintf.h \
|
||||
$$REPORT_PATH/lrscriptenginemanagerintf.h \
|
||||
$$REPORT_PATH/lrsimplecrypt.h \
|
||||
$$REPORT_PATH/lraboutdialog.h \
|
||||
$$REPORT_PATH/lrcallbackdatasourceintf.h \
|
||||
$$REPORT_PATH/lrsettingdialog.h \
|
||||
$$REPORT_PATH/lrpreviewreportwidget_p.h \
|
||||
$$REPORT_PATH/lritemscontainerdesignitf.h \
|
||||
$$REPORT_PATH/lrcolorindicator.h \
|
||||
$$REPORT_PATH/items/lrchartitem.h \
|
||||
$$REPORT_PATH/items/lrchartitemeditor.h \
|
||||
$$REPORT_PATH/lrreporttranslation.h \
|
||||
$$REPORT_PATH/translationeditor/languageselectdialog.h
|
||||
|
||||
contains(CONFIG, staticlib){
|
||||
HEADERS += $$REPORT_PATH/lrfactoryinitializer.h
|
||||
}
|
||||
|
||||
contains(CONFIG,zint){
|
||||
HEADERS += $$REPORT_PATH/items/lrbarcodeitem.h
|
||||
}
|
||||
|
||||
FORMS += \
|
||||
$$REPORT_PATH/databrowser/lrsqleditdialog.ui \
|
||||
$$REPORT_PATH/databrowser/lrconnectiondialog.ui \
|
||||
$$REPORT_PATH/databrowser/lrdatabrowser.ui \
|
||||
$$REPORT_PATH/databrowser/lrvariabledialog.ui \
|
||||
$$REPORT_PATH/objectinspector/editors/ltextitempropertyeditor.ui \
|
||||
$$REPORT_PATH/lrpreviewreportwindow.ui \
|
||||
$$REPORT_PATH/lrpreviewreportwidget.ui \
|
||||
$$REPORT_PATH/items/lrtextitemeditor.ui \
|
||||
$$REPORT_PATH/lraboutdialog.ui \
|
||||
$$REPORT_PATH/lrsettingdialog.ui \
|
||||
$$REPORT_PATH/scriptbrowser/lrscriptbrowser.ui \
|
||||
$$REPORT_PATH/items/lrchartitemeditor.ui \
|
||||
$$REPORT_PATH/translationeditor/translationeditor.ui \
|
||||
$$REPORT_PATH/translationeditor/languageselectdialog.ui \
|
||||
$$REPORT_PATH/scripteditor/lrscripteditor.ui
|
||||
|
@ -3,29 +3,15 @@
|
||||
#include <QRect>
|
||||
#include "lrreportdesignwindow.h"
|
||||
|
||||
DesignerFactoryPlugin::~DesignerFactoryPlugin() {
|
||||
ReportDesignerFactoryPlugin::~ReportDesignerFactoryPlugin() {
|
||||
}
|
||||
|
||||
QString DesignerFactoryPlugin::getString() const {
|
||||
return "Hello, Plugin!";
|
||||
}
|
||||
|
||||
QVariant DesignerFactoryPlugin::getVar() const {
|
||||
return QRect( 10, 10, 500, 500 );
|
||||
}
|
||||
|
||||
QMainWindow* DesignerFactoryPlugin::getDesignerWindow(LimeReport::ReportEnginePrivateInterface* report, QWidget* parent, QSettings* settings)
|
||||
LimeReport::ReportDesignWindowInterface* ReportDesignerFactoryPlugin::getDesignerWindow(LimeReport::ReportEnginePrivateInterface* report, QWidget* parent, QSettings* settings)
|
||||
{
|
||||
LimeReport::ReportDesignWindow* designerWindow = new LimeReport::ReportDesignWindow(report, parent, settings);
|
||||
|
||||
settings->beginGroup("DesignerWindow");
|
||||
designerWindow->setAttribute(Qt::WA_DeleteOnClose,true);
|
||||
designerWindow->setWindowIcon(QIcon(":report/images/logo32"));
|
||||
designerWindow->setShowProgressDialog(settings->value("showProgressDialog").toBool());
|
||||
settings->endGroup();
|
||||
|
||||
return designerWindow;
|
||||
return new LimeReport::ReportDesignWindow(report, parent, settings);
|
||||
}
|
||||
|
||||
//Q_EXPORT_PLUGIN2( LimeReportPluginInterface, DesignerFactoryPlugin )
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2( LimeReportPluginInterface, DesignerFactoryPlugin )
|
||||
#endif
|
||||
|
||||
|
@ -4,17 +4,14 @@
|
||||
#include <QMainWindow>
|
||||
#include <lrdesignerplugininterface.h>
|
||||
|
||||
class DesignerFactoryPlugin : public QObject, public LimeReportPluginInterface {
|
||||
class ReportDesignerFactoryPlugin : public QObject, public LimeReportPluginInterface {
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "ru.limereport.DersignerFactoryInterface")
|
||||
Q_INTERFACES( LimeReportPluginInterface )
|
||||
|
||||
public:
|
||||
~DesignerFactoryPlugin();
|
||||
|
||||
QString getString() const;
|
||||
QVariant getVar() const;
|
||||
QMainWindow* getDesignerWindow(LimeReport::ReportEnginePrivateInterface* report, QWidget* parent, QSettings* settings);
|
||||
~ReportDesignerFactoryPlugin();
|
||||
LimeReport::ReportDesignWindowInterface* getDesignerWindow(LimeReport::ReportEnginePrivateInterface* report, QWidget* parent, QSettings* settings);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "lrdatasourcemanagerintf.h"
|
||||
#include "lrscriptenginemanagerintf.h"
|
||||
#include "lrpreviewreportwidget.h"
|
||||
#include "lrreportdesignwindowintrerface.h"
|
||||
|
||||
class QPrinter;
|
||||
|
||||
@ -85,6 +86,7 @@ public:
|
||||
bool printToPDF(const QString& fileName);
|
||||
void previewReport(PreviewHints hints = PreviewBarsUserSetting);
|
||||
void designReport();
|
||||
ReportDesignWindowInterface* getDesignerWindow();
|
||||
void setShowProgressDialog(bool value);
|
||||
IDataSourceManager* dataManager();
|
||||
IScriptEngineManager* scriptManager();
|
||||
|
@ -10,12 +10,18 @@ contains(CONFIG, zint){
|
||||
}
|
||||
|
||||
export($$CONFIG)
|
||||
SUBDIRS += \
|
||||
limereport
|
||||
|
||||
SUBDIRS += limereport
|
||||
|
||||
CONFIG += ordered
|
||||
|
||||
SUBDIRS += demo_r1 demo_r2 designer designer_plugin
|
||||
SUBDIRS += demo_r1 demo_r2 designer
|
||||
|
||||
!contains(CONFIG, embedded_designer){
|
||||
!contains(CONFIG, static_build){
|
||||
SUBDIRS += designer_plugin
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -31,28 +31,6 @@
|
||||
|
||||
namespace LimeReport{
|
||||
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
//FontEditorWidget::FontEditorWidget(ReportDesignWidget *reportEditor, const QString &title, QWidget *parent)
|
||||
// : ItemEditorWidget(reportEditor,title,parent), m_ignoreSlots(false) {
|
||||
// initEditor();
|
||||
//}
|
||||
|
||||
//FontEditorWidget::FontEditorWidget(ReportDesignWidget *reportEditor, QWidget *parent)
|
||||
// :ItemEditorWidget(reportEditor,parent), m_ignoreSlots(false) {
|
||||
// initEditor();
|
||||
//}
|
||||
//#endif
|
||||
|
||||
//FontEditorWidget::FontEditorWidget(PageDesignIntf *page, const QString &title, QWidget *parent)
|
||||
// :ItemEditorWidget(page,title,parent), m_ignoreSlots(false) {
|
||||
// initEditor();
|
||||
//}
|
||||
|
||||
//FontEditorWidget::FontEditorWidget(LimeReport::PageDesignIntf *page, QWidget *parent)
|
||||
// :ItemEditorWidget(page,parent), m_ignoreSlots(false){
|
||||
// initEditor();
|
||||
//}
|
||||
|
||||
FontEditorWidget::FontEditorWidget(const QString& title, QWidget* parent)
|
||||
:ItemEditorWidget(title, parent), m_ignoreSlots(false)
|
||||
{
|
||||
@ -109,13 +87,6 @@ void FontEditorWidget::initEditor()
|
||||
connect(m_fontUnderline,SIGNAL(toggled(bool)),this,SLOT(slotFontAttribsChanged(bool)));
|
||||
addAction(m_fontUnderline);
|
||||
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// if (reportEditor()){
|
||||
// connect(reportEditor(),SIGNAL(itemPropertyChanged(QString,QString,QVariant,QVariant)),
|
||||
// this,SLOT(slotPropertyChanged(QString,QString,QVariant,QVariant)));
|
||||
// }
|
||||
//#endif
|
||||
|
||||
}
|
||||
|
||||
void FontEditorWidget::updateValues(const QFont& font)
|
||||
@ -135,7 +106,7 @@ bool FontEditorWidget::ignoreSlots() const
|
||||
}
|
||||
|
||||
|
||||
void FontEditorWidget::slotFontChanged(const QFont &font)
|
||||
void FontEditorWidget::slotFontChanged(const QFont /*&font*/)
|
||||
{
|
||||
// if (page()) page()->setFont(font);
|
||||
}
|
||||
@ -143,28 +114,17 @@ void FontEditorWidget::slotFontChanged(const QFont &font)
|
||||
void FontEditorWidget::slotFontSizeChanged(const QString &value)
|
||||
{
|
||||
if (m_ignoreSlots) return;
|
||||
|
||||
m_resFont = fontNameEditor()->currentFont();
|
||||
m_resFont.setPointSize(value.toInt());
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// if (reportEditor()) reportEditor()->setFont(resFont);
|
||||
//#endif
|
||||
// if (page()) page()->setFont(resFont);
|
||||
}
|
||||
|
||||
void FontEditorWidget::slotFontAttribsChanged(bool)
|
||||
{
|
||||
if (m_ignoreSlots) return;
|
||||
|
||||
m_resFont = m_fontNameEditor->currentFont();
|
||||
m_resFont.setBold(m_fontBold->isChecked());
|
||||
m_resFont.setItalic(m_fontItalic->isChecked());
|
||||
m_resFont.setUnderline(m_fontUnderline->isChecked());
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// if (reportEditor()) reportEditor()->setFont(resFont);
|
||||
//#endif
|
||||
// if (page()) page()->setFont(resFont);
|
||||
|
||||
}
|
||||
|
||||
void FontEditorWidget::slotPropertyChanged(const QString &objectName, const QString &property, const QVariant& oldValue, const QVariant& newValue)
|
||||
@ -194,7 +154,7 @@ void FontEditorWidgetForPage::slotFontAttribsChanged(bool value)
|
||||
m_page->setFont(resFont());
|
||||
}
|
||||
|
||||
#ifdef IS_REPORT_DESIGNER
|
||||
#ifdef HAVE_REPORT_DESIGNER
|
||||
void FontEditorWidgetForDesigner::initEditor()
|
||||
{
|
||||
FontEditorWidget::initEditor();
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <QStringListModel>
|
||||
#include <QAction>
|
||||
|
||||
#ifdef IS_REPORT_DESIGNER
|
||||
#ifdef HAVE_REPORT_DESIGNER
|
||||
#include "lrreportdesignwidget.h"
|
||||
#endif
|
||||
|
||||
@ -47,19 +47,13 @@ class FontEditorWidget :public ItemEditorWidget{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FontEditorWidget(const QString &title, QWidget *parent = 0);
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// explicit FontEditorWidget(ReportDesignWidget* reportEditor, const QString &title, QWidget *parent = 0);
|
||||
// explicit FontEditorWidget(ReportDesignWidget* reportEditor, QWidget *parent = 0);
|
||||
//#endif
|
||||
// explicit FontEditorWidget(PageDesignIntf* page, const QString &title, QWidget *parent = 0);
|
||||
// explicit FontEditorWidget(PageDesignIntf* page, QWidget *parent = 0);
|
||||
bool ignoreSlots() const;
|
||||
protected:
|
||||
void setItemEvent(BaseDesignIntf *item);
|
||||
QFontComboBox* fontNameEditor(){return m_fontNameEditor;}
|
||||
virtual void initEditor();
|
||||
protected slots:
|
||||
virtual void slotFontChanged(const QFont& font);
|
||||
virtual void slotFontChanged(const QFont);
|
||||
virtual void slotFontSizeChanged(const QString& value);
|
||||
virtual void slotFontAttribsChanged(bool);
|
||||
void slotPropertyChanged(const QString& objectName, const QString& property, const QVariant &oldValue, const QVariant &newValue);
|
||||
@ -95,7 +89,7 @@ private:
|
||||
PageDesignIntf* m_page;
|
||||
};
|
||||
|
||||
#ifdef IS_REPORT_DESIGNER
|
||||
#ifdef HAVE_REPORT_DESIGNER
|
||||
class FontEditorWidgetForDesigner : public FontEditorWidget{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -31,36 +31,6 @@
|
||||
|
||||
namespace LimeReport{
|
||||
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
//ItemEditorWidget::ItemEditorWidget(ReportDesignWidget* reportEditor, const QString& title, QWidget* parent)
|
||||
// :QToolBar(title,parent), m_reportEditor(reportEditor), m_item(0), m_page(0)
|
||||
//{
|
||||
//}
|
||||
|
||||
//ItemEditorWidget::ItemEditorWidget(ReportDesignWidget* reportEditor, QWidget* parent)
|
||||
// :QToolBar(parent), m_reportEditor(reportEditor), m_item(0), m_page(0)
|
||||
//{
|
||||
//}
|
||||
//#endif
|
||||
|
||||
//ItemEditorWidget::ItemEditorWidget(PageDesignIntf* page, const QString& title, QWidget* parent)
|
||||
// :QToolBar(title,parent),
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// m_reportEditor(0),
|
||||
//#endif
|
||||
// m_item(0), m_page(page)
|
||||
//{
|
||||
//}
|
||||
|
||||
//ItemEditorWidget::ItemEditorWidget(PageDesignIntf* page, QWidget* parent)
|
||||
// :QToolBar(parent),
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// m_reportEditor(0),
|
||||
//#endif
|
||||
// m_item(0), m_page(page)
|
||||
//{
|
||||
//}
|
||||
|
||||
void ItemEditorWidget::setItem(BaseDesignIntf* item)
|
||||
{
|
||||
if (m_item!=item){
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
#include <QToolBar>
|
||||
|
||||
#ifdef IS_REPORT_DESIGNER
|
||||
#ifdef HAVE_REPORT_DESIGNER
|
||||
#include "lrreportdesignwidget.h"
|
||||
#endif
|
||||
#include "lrpagedesignintf.h"
|
||||
@ -45,33 +45,16 @@ class ItemEditorWidget : public QToolBar
|
||||
public:
|
||||
explicit ItemEditorWidget(const QString &title, QWidget *parent = 0)
|
||||
: QToolBar(title, parent), m_item(0){}
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// explicit ItemEditorWidget(ReportDesignWidget* reportEditor, const QString &title, QWidget *parent = 0);
|
||||
// explicit ItemEditorWidget(ReportDesignWidget* reportEditor, QWidget *parent = 0);
|
||||
//#endif
|
||||
// explicit ItemEditorWidget(PageDesignIntf* page, const QString &title, QWidget *parent = 0);
|
||||
// explicit ItemEditorWidget(PageDesignIntf* page, QWidget *parent = 0);
|
||||
void setItem(BaseDesignIntf *item);
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// void setReportEditor(ReportDesignWidget* editor){m_reportEditor = editor;}
|
||||
//#endif
|
||||
protected:
|
||||
virtual void setItemEvent(BaseDesignIntf*){}
|
||||
virtual void properyChangedEvent(const QString& propertName, const QVariant& oldValue, const QVariant& newValue);
|
||||
BaseDesignIntf* item(){return m_item;}
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// ReportDesignWidget* reportEditor(){return m_reportEditor;}
|
||||
//#endif
|
||||
// PageDesignIntf* page(){return m_page;}
|
||||
private slots:
|
||||
void slotItemDestroyed(QObject* item);
|
||||
void slotPropertyChanged(const QString& propertName, const QVariant& oldValue, const QVariant& newValue);
|
||||
private:
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// ReportDesignWidget* m_reportEditor;
|
||||
//#endif
|
||||
BaseDesignIntf* m_item;
|
||||
// PageDesignIntf* m_page;
|
||||
};
|
||||
|
||||
} // namespace LimeReport
|
||||
|
@ -31,19 +31,7 @@
|
||||
#include <QAction>
|
||||
|
||||
namespace LimeReport{
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
//ItemsBordersEditorWidget::ItemsBordersEditorWidget(ReportDesignWidget* reportEditor, const QString& title, QWidget* parent)
|
||||
// : ItemEditorWidget(reportEditor,title,parent), m_changing(false)
|
||||
//{
|
||||
// initEditor();
|
||||
//}
|
||||
|
||||
//ItemsBordersEditorWidget::ItemsBordersEditorWidget(ReportDesignWidget* reportEditor, QWidget* parent)
|
||||
// : ItemEditorWidget(reportEditor,parent), m_changing(false)
|
||||
//{
|
||||
// initEditor();
|
||||
//}
|
||||
//#endif
|
||||
void ItemsBordersEditorWidget::setItemEvent(BaseDesignIntf* item)
|
||||
{
|
||||
QVariant borders=item->property("borders");
|
||||
@ -65,10 +53,6 @@ void ItemsBordersEditorWidget::properyChangedEvent(const QString& property, cons
|
||||
|
||||
void ItemsBordersEditorWidget::noBordesClicked()
|
||||
{
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// if (reportEditor())
|
||||
// reportEditor()->setBorders(0);
|
||||
//#endif
|
||||
updateValues(0);
|
||||
}
|
||||
|
||||
@ -80,10 +64,6 @@ void ItemsBordersEditorWidget::allBordesClicked()
|
||||
BaseDesignIntf::BottomLine;
|
||||
|
||||
updateValues((BaseDesignIntf::BorderLines)borders);
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// if (reportEditor())
|
||||
// reportEditor()->setBorders((BaseDesignIntf::BorderLines)borders);
|
||||
//#endif
|
||||
}
|
||||
|
||||
void ItemsBordersEditorWidget::buttonClicked(bool)
|
||||
@ -159,7 +139,7 @@ bool ItemsBordersEditorWidget::changing() const
|
||||
return m_changing;
|
||||
}
|
||||
|
||||
#ifdef IS_REPORT_DESIGNER
|
||||
#ifdef HAVE_REPORT_DESIGNER
|
||||
void ItemsBordersEditorWidgetForDesigner::buttonClicked(bool)
|
||||
{
|
||||
if (!changing())
|
||||
|
@ -36,8 +36,6 @@
|
||||
|
||||
namespace LimeReport{
|
||||
|
||||
|
||||
|
||||
class ItemsBordersEditorWidget : public ItemEditorWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -46,10 +44,6 @@ public:
|
||||
: ItemEditorWidget(title, parent), m_changing(false), m_borders(0){
|
||||
initEditor();
|
||||
}
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// explicit ItemsBordersEditorWidget(ReportDesignWidget* reportEditor, const QString &title, QWidget *parent = 0);
|
||||
// explicit ItemsBordersEditorWidget(ReportDesignWidget* reportEditor, QWidget *parent = 0);
|
||||
//#endif
|
||||
bool changing() const;
|
||||
protected slots:
|
||||
virtual void noBordesClicked();
|
||||
@ -72,8 +66,7 @@ private:
|
||||
int m_borders;
|
||||
};
|
||||
|
||||
|
||||
#ifdef IS_REPORT_DESIGNER
|
||||
#ifdef HAVE_REPORT_DESIGNER
|
||||
class ItemsBordersEditorWidgetForDesigner : public ItemsBordersEditorWidget{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -36,31 +36,6 @@ TextAlignmentEditorWidget::TextAlignmentEditorWidget(const QString& title, QWidg
|
||||
initEditor();
|
||||
}
|
||||
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
//TextAlignmentEditorWidget::TextAlignmentEditorWidget(ReportDesignWidget *reportEditor, const QString &title, QWidget *parent)
|
||||
// :ItemEditorWidget(reportEditor,title,parent), m_textAttibutesIsChanging(false)
|
||||
//{
|
||||
// initEditor();
|
||||
//}
|
||||
|
||||
//TextAlignmentEditorWidget::TextAlignmentEditorWidget(ReportDesignWidget *reportEditor, QWidget *parent)
|
||||
// :ItemEditorWidget(reportEditor,parent), m_textAttibutesIsChanging(false)
|
||||
//{
|
||||
// initEditor();
|
||||
//}
|
||||
//#endif
|
||||
//TextAlignmentEditorWidget::TextAlignmentEditorWidget(PageDesignIntf* page, const QString& title, QWidget* parent)
|
||||
// :ItemEditorWidget(page,title,parent), m_textAttibutesIsChanging(false)
|
||||
//{
|
||||
// initEditor();
|
||||
//}
|
||||
|
||||
//TextAlignmentEditorWidget::TextAlignmentEditorWidget(PageDesignIntf* page, QWidget* parent)
|
||||
// :ItemEditorWidget(page,parent), m_textAttibutesIsChanging(false)
|
||||
//{
|
||||
// initEditor();
|
||||
//}
|
||||
|
||||
void TextAlignmentEditorWidget::setItemEvent(BaseDesignIntf *item)
|
||||
{
|
||||
QVariant align=item->property("alignment");
|
||||
@ -115,16 +90,6 @@ void TextAlignmentEditorWidget::initEditor()
|
||||
m_textAliginBottom->setCheckable(true);
|
||||
connect(m_textAliginBottom,SIGNAL(toggled(bool)),this,SLOT(slotTextVAttribsChanged(bool)));
|
||||
addAction(m_textAliginBottom);
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// if (reportEditor()){
|
||||
// connect(reportEditor(),SIGNAL(itemPropertyChanged(QString,QString,QVariant,QVariant)),
|
||||
// this,SLOT(slotPropertyChanged(QString,QString,QVariant,QVariant)));
|
||||
// }
|
||||
//#endif
|
||||
// if (page()){
|
||||
// connect(page(),SIGNAL(itemPropertyChanged(QString,QString,QVariant,QVariant)),
|
||||
// this,SLOT(slotPropertyChanged(QString,QString,QVariant,QVariant)));
|
||||
// }
|
||||
setEnabled(false);
|
||||
}
|
||||
|
||||
@ -169,13 +134,6 @@ void TextAlignmentEditorWidget::slotTextHAttribsChanged(bool)
|
||||
if (sender()==m_textAliginHCenter) m_flag |= Qt::AlignHCenter;
|
||||
if (sender()==m_textAliginRight) m_flag |= Qt::AlignRight;
|
||||
if (sender()==m_textAliginJustify) m_flag |= Qt::AlignJustify;
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// if (reportEditor()) reportEditor()->setTextAlign(true,Qt::AlignmentFlag(flag));
|
||||
//#endif
|
||||
// if (page()) {
|
||||
// //page()->setTextAlign(createAlignment());
|
||||
// page()->changeSelectedGrpoupTextAlignPropperty(true,Qt::AlignmentFlag(flag));
|
||||
// }
|
||||
m_textAttibutesIsChanging = false;
|
||||
}
|
||||
|
||||
@ -192,10 +150,6 @@ void TextAlignmentEditorWidget::slotTextVAttribsChanged(bool)
|
||||
if (sender()==m_textAliginTop) m_flag |= Qt::AlignTop;
|
||||
if (sender()==m_textAliginVCenter) m_flag |= Qt::AlignVCenter;
|
||||
if (sender()==m_textAliginBottom) m_flag |= Qt::AlignBottom;
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// if (reportEditor()) reportEditor()->setTextAlign(false,Qt::AlignmentFlag(flag));
|
||||
//#endif
|
||||
// if (page()) page()->changeSelectedGrpoupTextAlignPropperty(false,Qt::AlignmentFlag(flag) );
|
||||
m_textAttibutesIsChanging = false;
|
||||
}
|
||||
|
||||
@ -240,7 +194,7 @@ void TextAlignmentEditorWidgetForPage::slotTextVAttribsChanged(bool value)
|
||||
m_textAttibutesIsChanging = false;
|
||||
}
|
||||
|
||||
#ifdef IS_REPORT_DESIGNER
|
||||
#ifdef HAVE_REPORT_DESIGNER
|
||||
void TextAlignmentEditorWidgetForDesigner::initEditor()
|
||||
{
|
||||
TextAlignmentEditorWidget::initEditor();
|
||||
|
@ -42,12 +42,6 @@ class TextAlignmentEditorWidget:public ItemEditorWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TextAlignmentEditorWidget(const QString &title, QWidget *parent = 0);
|
||||
//#ifdef IS_REPORT_DESIGNER
|
||||
// explicit TextAlignmentEditorWidget(ReportDesignWidget* reportEditor, const QString &title, QWidget *parent = 0);
|
||||
// explicit TextAlignmentEditorWidget(ReportDesignWidget* reportEditor, QWidget *parent = 0);
|
||||
//#endif
|
||||
// explicit TextAlignmentEditorWidget(PageDesignIntf* page, const QString &title, QWidget *parent = 0);
|
||||
// explicit TextAlignmentEditorWidget(PageDesignIntf* page, QWidget *parent = 0);
|
||||
int flag() const;
|
||||
protected:
|
||||
void setItemEvent(BaseDesignIntf *item);
|
||||
@ -68,9 +62,7 @@ private:
|
||||
QAction* m_textAliginTop;
|
||||
QAction* m_textAliginBottom;
|
||||
QAction* m_textAliginVCenter;
|
||||
|
||||
int m_flag;
|
||||
|
||||
};
|
||||
|
||||
class TextAlignmentEditorWidgetForPage: public TextAlignmentEditorWidget{
|
||||
@ -87,7 +79,7 @@ private:
|
||||
PageDesignIntf* m_page;
|
||||
};
|
||||
|
||||
#ifdef IS_REPORT_DESIGNER
|
||||
#ifdef HAVE_REPORT_DESIGNER
|
||||
class TextAlignmentEditorWidgetForDesigner: public TextAlignmentEditorWidget{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -1,8 +1,10 @@
|
||||
include(../common.pri)
|
||||
|
||||
#contains(CONFIG,dialogdesigner){
|
||||
# include($$REPORT_PATH/dialogdesigner/dialogdesigner.pri)
|
||||
#}
|
||||
contains(CONFIG, embedded_designer){
|
||||
contains(CONFIG,dialogdesigner){
|
||||
include($$REPORT_PATH/dialogdesigner/dialogdesigner.pri)
|
||||
}
|
||||
}
|
||||
|
||||
DEFINES += INSPECT_BASEDESIGN
|
||||
|
||||
@ -11,10 +13,11 @@ INCLUDEPATH += \
|
||||
$$REPORT_PATH/items \
|
||||
$$REPORT_PATH/bands \
|
||||
$$REPORT_PATH/base \
|
||||
# $$REPORT_PATH/objectinspector \
|
||||
# $$REPORT_PATH/databrowser \
|
||||
$$REPORT_PATH/scripteditor
|
||||
# $$REPORT_PATH/../designer_plugin
|
||||
contains(CONFIG, embedded_designer){
|
||||
INCLUDEPATH += $$REPORT_PATH/objectinspector \
|
||||
$$REPORT_PATH/databrowser
|
||||
}
|
||||
|
||||
SOURCES += \
|
||||
$$REPORT_PATH/bands/lrpageheader.cpp \
|
||||
@ -25,59 +28,23 @@ SOURCES += \
|
||||
$$REPORT_PATH/bands/lrgroupbands.cpp \
|
||||
$$REPORT_PATH/bands/lrsubdetailband.cpp \
|
||||
$$REPORT_PATH/bands/lrtearoffband.cpp \
|
||||
# $$REPORT_PATH/databrowser/lrdatabrowser.cpp \
|
||||
# $$REPORT_PATH/databrowser/lrsqleditdialog.cpp \
|
||||
# $$REPORT_PATH/databrowser/lrconnectiondialog.cpp \
|
||||
# $$REPORT_PATH/databrowser/lrvariabledialog.cpp \
|
||||
# $$REPORT_PATH/databrowser/lrdatabrowsertree.cpp \
|
||||
$$REPORT_PATH/serializators/lrxmlqrectserializator.cpp \
|
||||
$$REPORT_PATH/serializators/lrxmlbasetypesserializators.cpp \
|
||||
$$REPORT_PATH/serializators/lrxmlreader.cpp \
|
||||
$$REPORT_PATH/serializators/lrxmlwriter.cpp \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrstringpropitem.cpp \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrrectproptem.cpp \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrintpropitem.cpp \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrenumpropitem.cpp \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrboolpropitem.cpp \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrflagspropitem.cpp \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrfontpropitem.cpp \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrimagepropitem.cpp \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrqrealpropitem.cpp \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrcolorpropitem.cpp \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrdatasourcepropitem.cpp \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrgroupfieldpropitem.cpp \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrcontentpropitem.cpp \
|
||||
# $$REPORT_PATH/objectinspector/editors/lrtextitempropertyeditor.cpp \
|
||||
# $$REPORT_PATH/objectinspector/editors/lrcomboboxeditor.cpp \
|
||||
# $$REPORT_PATH/objectinspector/editors/lrcheckboxeditor.cpp \
|
||||
# $$REPORT_PATH/objectinspector/editors/lrbuttonlineeditor.cpp \
|
||||
# $$REPORT_PATH/objectinspector/editors/lrfonteditor.cpp \
|
||||
# $$REPORT_PATH/objectinspector/editors/lrimageeditor.cpp \
|
||||
# $$REPORT_PATH/objectinspector/editors/lrcoloreditor.cpp \
|
||||
# $$REPORT_PATH/objectinspector/lrbasedesignobjectmodel.cpp \
|
||||
# $$REPORT_PATH/objectinspector/lrobjectinspectorwidget.cpp \
|
||||
# $$REPORT_PATH/objectinspector/lrobjectitemmodel.cpp \
|
||||
# $$REPORT_PATH/objectinspector/lrobjectpropitem.cpp \
|
||||
# $$REPORT_PATH/objectinspector/lrpropertydelegate.cpp \
|
||||
# $$REPORT_PATH/objectsbrowser/lrobjectbrowser.cpp \
|
||||
# $$REPORT_PATH/scriptbrowser/lrscriptbrowser.cpp \
|
||||
$$REPORT_PATH/scripteditor/lrscripteditor.cpp \
|
||||
$$REPORT_PATH/scripteditor/lrcodeeditor.cpp \
|
||||
$$REPORT_PATH/scripteditor/lrscripthighlighter.cpp \
|
||||
# $$REPORT_PATH/items/lrsubitemparentpropitem.cpp \
|
||||
# $$REPORT_PATH/items/lralignpropitem.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/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/translationeditor/translationeditor.cpp \
|
||||
$$REPORT_PATH/lrbanddesignintf.cpp \
|
||||
$$REPORT_PATH/lrpageitemdesignintf.cpp \
|
||||
$$REPORT_PATH/lrpagedesignintf.cpp \
|
||||
@ -85,11 +52,9 @@ SOURCES += \
|
||||
$$REPORT_PATH/lrglobal.cpp \
|
||||
$$REPORT_PATH/lritemdesignintf.cpp \
|
||||
$$REPORT_PATH/lrdatadesignintf.cpp \
|
||||
# $$REPORT_PATH/lrreportdesignwidget.cpp \
|
||||
$$REPORT_PATH/lrbasedesignintf.cpp \
|
||||
$$REPORT_PATH/lrreportengine.cpp \
|
||||
$$REPORT_PATH/lrdatasourcemanager.cpp \
|
||||
# $$REPORT_PATH/lrreportdesignwindow.cpp \
|
||||
$$REPORT_PATH/lrreportrender.cpp \
|
||||
$$REPORT_PATH/lrscriptenginemanager.cpp \
|
||||
$$REPORT_PATH/lrpreviewreportwindow.cpp \
|
||||
@ -104,8 +69,50 @@ SOURCES += \
|
||||
$$REPORT_PATH/lrcolorindicator.cpp \
|
||||
$$REPORT_PATH/items/lrchartitem.cpp \
|
||||
$$REPORT_PATH/items/lrchartitemeditor.cpp \
|
||||
$$REPORT_PATH/lrreporttranslation.cpp \
|
||||
# $$REPORT_PATH/translationeditor/languageselectdialog.cpp
|
||||
$$REPORT_PATH/lrreporttranslation.cpp
|
||||
|
||||
contains(CONFIG, embedded_designer){
|
||||
SOURCES += \
|
||||
$$REPORT_PATH/databrowser/lrdatabrowser.cpp \
|
||||
$$REPORT_PATH/databrowser/lrsqleditdialog.cpp \
|
||||
$$REPORT_PATH/databrowser/lrconnectiondialog.cpp \
|
||||
$$REPORT_PATH/databrowser/lrvariabledialog.cpp \
|
||||
$$REPORT_PATH/databrowser/lrdatabrowsertree.cpp \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrstringpropitem.cpp \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrrectproptem.cpp \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrintpropitem.cpp \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrenumpropitem.cpp \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrboolpropitem.cpp \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrflagspropitem.cpp \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrfontpropitem.cpp \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrimagepropitem.cpp \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrqrealpropitem.cpp \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrcolorpropitem.cpp \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrdatasourcepropitem.cpp \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrgroupfieldpropitem.cpp \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrcontentpropitem.cpp \
|
||||
$$REPORT_PATH/objectinspector/editors/lrtextitempropertyeditor.cpp \
|
||||
$$REPORT_PATH/objectinspector/editors/lrcomboboxeditor.cpp \
|
||||
$$REPORT_PATH/objectinspector/editors/lrcheckboxeditor.cpp \
|
||||
$$REPORT_PATH/objectinspector/editors/lrbuttonlineeditor.cpp \
|
||||
$$REPORT_PATH/objectinspector/editors/lrfonteditor.cpp \
|
||||
$$REPORT_PATH/objectinspector/editors/lrimageeditor.cpp \
|
||||
$$REPORT_PATH/objectinspector/editors/lrcoloreditor.cpp \
|
||||
$$REPORT_PATH/objectinspector/lrbasedesignobjectmodel.cpp \
|
||||
$$REPORT_PATH/objectinspector/lrobjectinspectorwidget.cpp \
|
||||
$$REPORT_PATH/objectinspector/lrobjectitemmodel.cpp \
|
||||
$$REPORT_PATH/objectinspector/lrobjectpropitem.cpp \
|
||||
$$REPORT_PATH/objectinspector/lrpropertydelegate.cpp \
|
||||
$$REPORT_PATH/objectsbrowser/lrobjectbrowser.cpp \
|
||||
$$REPORT_PATH/scriptbrowser/lrscriptbrowser.cpp \
|
||||
$$REPORT_PATH/items/lrsubitemparentpropitem.cpp \
|
||||
$$REPORT_PATH/items/lralignpropitem.cpp \
|
||||
$$REPORT_PATH/items/editors/lritemsaligneditorwidget.cpp \
|
||||
$$REPORT_PATH/translationeditor/translationeditor.cpp \
|
||||
$$REPORT_PATH/translationeditor/languageselectdialog.cpp \
|
||||
$$REPORT_PATH/lrreportdesignwidget.cpp \
|
||||
$$REPORT_PATH/lrreportdesignwindow.cpp
|
||||
}
|
||||
|
||||
contains(CONFIG, staticlib){
|
||||
SOURCES += $$REPORT_PATH/lrfactoryinitializer.cpp
|
||||
@ -127,11 +134,6 @@ HEADERS += \
|
||||
$$REPORT_PATH/bands/lrtearoffband.h \
|
||||
$$REPORT_PATH/bands/lrsubdetailband.h \
|
||||
$$REPORT_PATH/bands/lrgroupbands.h \
|
||||
# $$REPORT_PATH/databrowser/lrdatabrowser.h \
|
||||
# $$REPORT_PATH/databrowser/lrsqleditdialog.h \
|
||||
# $$REPORT_PATH/databrowser/lrconnectiondialog.h \
|
||||
# $$REPORT_PATH/databrowser/lrvariabledialog.h \
|
||||
# $$REPORT_PATH/databrowser/lrdatabrowsertree.h \
|
||||
$$REPORT_PATH/serializators/lrserializatorintf.h \
|
||||
$$REPORT_PATH/serializators/lrstorageintf.h \
|
||||
$$REPORT_PATH/serializators/lrxmlqrectserializator.h \
|
||||
@ -139,51 +141,17 @@ HEADERS += \
|
||||
$$REPORT_PATH/serializators/lrxmlbasetypesserializators.h \
|
||||
$$REPORT_PATH/serializators/lrxmlreader.h \
|
||||
$$REPORT_PATH/serializators/lrxmlwriter.h \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrstringpropitem.h \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrrectproptem.h \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrdatasourcepropitem.h \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrfontpropitem.h \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrimagepropitem.h \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrintpropitem.h \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrenumpropitem.h \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrboolpropitem.h \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrflagspropitem.h \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrgroupfieldpropitem.h \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrcontentpropitem.h \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrqrealpropitem.h \
|
||||
# $$REPORT_PATH/objectinspector/propertyItems/lrcolorpropitem.h \
|
||||
# $$REPORT_PATH/objectinspector/editors/lrtextitempropertyeditor.h \
|
||||
# $$REPORT_PATH/objectinspector/editors/lrcomboboxeditor.h \
|
||||
# $$REPORT_PATH/objectinspector/editors/lrcheckboxeditor.h \
|
||||
# $$REPORT_PATH/objectinspector/editors/lrbuttonlineeditor.h \
|
||||
# $$REPORT_PATH/objectinspector/editors/lrimageeditor.h \
|
||||
# $$REPORT_PATH/objectinspector/editors/lrcoloreditor.h \
|
||||
# $$REPORT_PATH/objectinspector/editors/lrfonteditor.h \
|
||||
# $$REPORT_PATH/objectinspector/lrbasedesignobjectmodel.h \
|
||||
# $$REPORT_PATH/objectinspector/lrobjectinspectorwidget.h \
|
||||
# $$REPORT_PATH/objectinspector/lrobjectitemmodel.h \
|
||||
# $$REPORT_PATH/objectinspector/lrobjectpropitem.h \
|
||||
# $$REPORT_PATH/objectinspector/lrpropertydelegate.h \
|
||||
# $$REPORT_PATH/objectsbrowser/lrobjectbrowser.h \
|
||||
# $$REPORT_PATH/scriptbrowser/lrscriptbrowser.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/lrsubitemparentpropitem.h \
|
||||
# $$REPORT_PATH/items/lralignpropitem.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/translationeditor/translationeditor.h \
|
||||
$$REPORT_PATH/lrfactoryinitializer.h \
|
||||
$$REPORT_PATH/lrbanddesignintf.h \
|
||||
$$REPORT_PATH/lrpageitemdesignintf.h \
|
||||
$$REPORT_PATH/lrbandsmanager.h \
|
||||
@ -191,10 +159,8 @@ HEADERS += \
|
||||
$$REPORT_PATH/lrdatadesignintf.h \
|
||||
$$REPORT_PATH/lrcollection.h \
|
||||
$$REPORT_PATH/lrpagedesignintf.h \
|
||||
# $$REPORT_PATH/lrreportdesignwidget.h \
|
||||
$$REPORT_PATH/lrreportengine_p.h \
|
||||
$$REPORT_PATH/lrdatasourcemanager.h \
|
||||
# $$REPORT_PATH/lrreportdesignwindow.h \
|
||||
$$REPORT_PATH/lrreportrender.h \
|
||||
$$REPORT_PATH/lrpreviewreportwindow.h \
|
||||
$$REPORT_PATH/lrpreviewreportwidget.h \
|
||||
@ -217,9 +183,54 @@ HEADERS += \
|
||||
$$REPORT_PATH/lritemscontainerdesignitf.h \
|
||||
$$REPORT_PATH/lrcolorindicator.h \
|
||||
$$REPORT_PATH/items/lrchartitem.h \
|
||||
$$REPORT_PATH/items/lrchartitemeditor.h
|
||||
# $$REPORT_PATH/lrreporttranslation.h \
|
||||
# $$REPORT_PATH/translationeditor/languageselectdialog.h
|
||||
$$REPORT_PATH/items/lrchartitemeditor.h \
|
||||
$$REPORT_PATH/items/editors/lrtextalignmenteditorwidget.h \
|
||||
$$REPORT_PATH/items/editors/lritemsborderseditorwidget.h \
|
||||
$$REPORT_PATH/lrreporttranslation.h \
|
||||
$$REPORT_PATH/lrreportdesignwindowintrerface.h
|
||||
|
||||
contains(CONFIG, embedded_designer){
|
||||
HEADERS += \
|
||||
$$REPORT_PATH/databrowser/lrdatabrowser.h \
|
||||
$$REPORT_PATH/databrowser/lrsqleditdialog.h \
|
||||
$$REPORT_PATH/databrowser/lrconnectiondialog.h \
|
||||
$$REPORT_PATH/databrowser/lrvariabledialog.h \
|
||||
$$REPORT_PATH/databrowser/lrdatabrowsertree.h \
|
||||
$$REPORT_PATH/scriptbrowser/lrscriptbrowser.h \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrstringpropitem.h \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrrectproptem.h \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrdatasourcepropitem.h \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrfontpropitem.h \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrimagepropitem.h \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrintpropitem.h \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrenumpropitem.h \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrboolpropitem.h \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrflagspropitem.h \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrgroupfieldpropitem.h \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrcontentpropitem.h \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrqrealpropitem.h \
|
||||
$$REPORT_PATH/objectinspector/propertyItems/lrcolorpropitem.h \
|
||||
$$REPORT_PATH/objectinspector/editors/lrtextitempropertyeditor.h \
|
||||
$$REPORT_PATH/objectinspector/editors/lrcomboboxeditor.h \
|
||||
$$REPORT_PATH/objectinspector/editors/lrcheckboxeditor.h \
|
||||
$$REPORT_PATH/objectinspector/editors/lrbuttonlineeditor.h \
|
||||
$$REPORT_PATH/objectinspector/editors/lrimageeditor.h \
|
||||
$$REPORT_PATH/objectinspector/editors/lrcoloreditor.h \
|
||||
$$REPORT_PATH/objectinspector/editors/lrfonteditor.h \
|
||||
$$REPORT_PATH/objectinspector/lrbasedesignobjectmodel.h \
|
||||
$$REPORT_PATH/objectinspector/lrobjectinspectorwidget.h \
|
||||
$$REPORT_PATH/objectinspector/lrobjectitemmodel.h \
|
||||
$$REPORT_PATH/objectinspector/lrobjectpropitem.h \
|
||||
$$REPORT_PATH/objectinspector/lrpropertydelegate.h \
|
||||
$$REPORT_PATH/objectsbrowser/lrobjectbrowser.h \
|
||||
$$REPORT_PATH/translationeditor/translationeditor.h \
|
||||
$$REPORT_PATH/translationeditor/languageselectdialog.h \
|
||||
$$REPORT_PATH/items/editors/lritemsaligneditorwidget.h \
|
||||
$$REPORT_PATH/items/lrsubitemparentpropitem.h \
|
||||
$$REPORT_PATH/items/lralignpropitem.h \
|
||||
$$REPORT_PATH/lrreportdesignwidget.h \
|
||||
$$REPORT_PATH/lrreportdesignwindow.h
|
||||
}
|
||||
|
||||
contains(CONFIG, staticlib){
|
||||
HEADERS += $$REPORT_PATH/lrfactoryinitializer.h
|
||||
@ -230,26 +241,32 @@ contains(CONFIG,zint){
|
||||
}
|
||||
|
||||
FORMS += \
|
||||
# $$REPORT_PATH/databrowser/lrsqleditdialog.ui \
|
||||
# $$REPORT_PATH/databrowser/lrconnectiondialog.ui \
|
||||
# $$REPORT_PATH/databrowser/lrdatabrowser.ui \
|
||||
# $$REPORT_PATH/databrowser/lrvariabledialog.ui \
|
||||
# $$REPORT_PATH/objectinspector/editors/ltextitempropertyeditor.ui \
|
||||
$$REPORT_PATH/lrpreviewreportwindow.ui \
|
||||
$$REPORT_PATH/lrpreviewreportwidget.ui \
|
||||
$$REPORT_PATH/items/lrtextitemeditor.ui \
|
||||
$$REPORT_PATH/lraboutdialog.ui \
|
||||
$$REPORT_PATH/lrsettingdialog.ui \
|
||||
# $$REPORT_PATH/scriptbrowser/lrscriptbrowser.ui \
|
||||
$$REPORT_PATH/items/lrchartitemeditor.ui \
|
||||
# $$REPORT_PATH/translationeditor/translationeditor.ui \
|
||||
# $$REPORT_PATH/translationeditor/languageselectdialog.ui \
|
||||
$$REPORT_PATH/scripteditor/lrscripteditor.ui
|
||||
contains(CONFIG, embedded_designer){
|
||||
FORMS += \
|
||||
$$REPORT_PATH/databrowser/lrsqleditdialog.ui \
|
||||
$$REPORT_PATH/databrowser/lrconnectiondialog.ui \
|
||||
$$REPORT_PATH/databrowser/lrdatabrowser.ui \
|
||||
$$REPORT_PATH/databrowser/lrvariabledialog.ui \
|
||||
$$REPORT_PATH/objectinspector/editors/ltextitempropertyeditor.ui \
|
||||
$$REPORT_PATH/scriptbrowser/lrscriptbrowser.ui \
|
||||
$$REPORT_PATH/translationeditor/translationeditor.ui \
|
||||
$$REPORT_PATH/translationeditor/languageselectdialog.ui
|
||||
}
|
||||
|
||||
RESOURCES += \
|
||||
# $$REPORT_PATH/objectinspector/lobjectinspector.qrc \
|
||||
# $$REPORT_PATH/databrowser/lrdatabrowser.qrc \
|
||||
$$REPORT_PATH/report.qrc \
|
||||
$$REPORT_PATH/items/items.qrc
|
||||
# $$REPORT_PATH/scriptbrowser/lrscriptbrowser.qrc \
|
||||
# $$REPORT_PATH/translationeditor/translationeditor.qrc
|
||||
contains(CONFIG, embedded_designer){
|
||||
RESOURCES += \
|
||||
$$REPORT_PATH/objectinspector/lobjectinspector.qrc \
|
||||
$$REPORT_PATH/databrowser/lrdatabrowser.qrc \
|
||||
$$REPORT_PATH/scriptbrowser/lrscriptbrowser.qrc \
|
||||
$$REPORT_PATH/translationeditor/translationeditor.qrc
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ DEFINES += LIMEREPORT_EXPORTS
|
||||
|
||||
contains(CONFIG, staticlib){
|
||||
DEFINES += HAVE_STATIC_BUILD
|
||||
message(STATIC_BUILD)
|
||||
message(Static Build)
|
||||
DEFINES -= LIMEREPORT_EXPORTS
|
||||
}
|
||||
|
||||
@ -39,7 +39,8 @@ EXTRA_FILES += \
|
||||
$$PWD/lrreportengine.h \
|
||||
$$PWD/lrscriptenginemanagerintf.h \
|
||||
$$PWD/lrcallbackdatasourceintf.h \
|
||||
$$PWD/lrpreviewreportwidget.h
|
||||
$$PWD/lrpreviewreportwidget.h \
|
||||
$$PWD/lrreportdesignwindowintrerface.h
|
||||
|
||||
include(limereport.pri)
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <QVariant>
|
||||
|
||||
#include <QtPlugin>
|
||||
#include "lrreportdesignwindowintrerface.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QSettings;
|
||||
@ -19,10 +20,7 @@ namespace LimeReport {
|
||||
class LimeReportPluginInterface {
|
||||
public:
|
||||
virtual ~LimeReportPluginInterface() { }
|
||||
|
||||
virtual QString getString() const = 0;
|
||||
virtual QVariant getVar() const = 0;
|
||||
virtual QMainWindow* getDesignerWindow(LimeReport::ReportEnginePrivateInterface* report, QWidget *parent = 0, QSettings* settings=0) = 0;
|
||||
virtual LimeReport::ReportDesignWindowInterface* getDesignerWindow(LimeReport::ReportEnginePrivateInterface* report, QWidget *parent = 0, QSettings* settings=0) = 0;
|
||||
};
|
||||
|
||||
Q_DECLARE_INTERFACE( LimeReportPluginInterface, "ru.limereport.LimeReport.DesignerPluginInterface/1.0" )
|
||||
|
@ -15,9 +15,10 @@
|
||||
#include "items/lrhorizontallayout.h"
|
||||
#include "items/lrimageitem.h"
|
||||
#include "items/lrshapeitem.h"
|
||||
#include "items/lrchartitem.h"
|
||||
#include "lrdesignelementsfactory.h"
|
||||
|
||||
|
||||
#ifdef HAVE_REPORT_DESIGNER
|
||||
#include "objectinspector/lrobjectpropitem.h"
|
||||
#include "objectinspector/propertyItems/lrboolpropitem.h"
|
||||
#include "objectinspector/propertyItems/lrcolorpropitem.h"
|
||||
@ -34,6 +35,7 @@
|
||||
#include "objectinspector/propertyItems/lrstringpropitem.h"
|
||||
#include "items/lralignpropitem.h"
|
||||
#include "items/lrsubitemparentpropitem.h"
|
||||
#endif
|
||||
|
||||
#include "serializators/lrxmlbasetypesserializators.h"
|
||||
#include "serializators/lrxmlqrectserializator.h"
|
||||
@ -41,10 +43,13 @@
|
||||
|
||||
void initResources(){
|
||||
Q_INIT_RESOURCE(report);
|
||||
#ifdef HAVE_REPORT_DESIGNER
|
||||
Q_INIT_RESOURCE(lobjectinspector);
|
||||
Q_INIT_RESOURCE(lrdatabrowser);
|
||||
Q_INIT_RESOURCE(items);
|
||||
Q_INIT_RESOURCE(lrscriptbrowser);
|
||||
Q_INIT_RESOURCE(translationeditor);
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace LimeReport{
|
||||
@ -106,14 +111,18 @@ BaseDesignIntf* createHLayout(QObject *owner, LimeReport::BaseDesignIntf *paren
|
||||
return new HorizontalLayout(owner, parent);
|
||||
}
|
||||
|
||||
BaseDesignIntf * createImageItem(QObject* owner, LimeReport::BaseDesignIntf* parent){
|
||||
BaseDesignIntf* createImageItem(QObject* owner, LimeReport::BaseDesignIntf* parent){
|
||||
return new ImageItem(owner,parent);
|
||||
}
|
||||
|
||||
BaseDesignIntf * createShapeItem(QObject* owner, LimeReport::BaseDesignIntf* parent){
|
||||
BaseDesignIntf* createShapeItem(QObject* owner, LimeReport::BaseDesignIntf* parent){
|
||||
return new ShapeItem(owner,parent);
|
||||
}
|
||||
|
||||
BaseDesignIntf* createChartItem(QObject* owner, LimeReport::BaseDesignIntf* parent){
|
||||
return new ChartItem(owner,parent);
|
||||
}
|
||||
|
||||
void initReportItems(){
|
||||
initResources();
|
||||
DesignElementsFactory::instance().registerCreator(
|
||||
@ -139,6 +148,9 @@ void initReportItems(){
|
||||
DesignElementsFactory::instance().registerCreator(
|
||||
"ShapeItem", LimeReport::ItemAttribs(QObject::tr("Shape Item"),"Item"), createShapeItem
|
||||
);
|
||||
DesignElementsFactory::instance().registerCreator(
|
||||
"ChartItem", LimeReport::ItemAttribs(QObject::tr("Chart Item"),"Item"), createChartItem
|
||||
);
|
||||
DesignElementsFactory::instance().registerCreator(
|
||||
"Data",
|
||||
LimeReport::ItemAttribs(QObject::tr("Data"),LimeReport::Const::bandTAG),
|
||||
@ -198,6 +210,8 @@ void initReportItems(){
|
||||
|
||||
}
|
||||
|
||||
#ifdef HAVE_REPORT_DESIGNER
|
||||
|
||||
ObjectPropItem * createBoolPropItem(
|
||||
QObject *object, LimeReport::ObjectPropItem::ObjectsList* objects, const QString& name, const QString& displayName, const QVariant& data, LimeReport::ObjectPropItem* parent, bool readonly)
|
||||
{
|
||||
@ -360,7 +374,7 @@ void initObjectInspectorProperties()
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
SerializatorIntf * createIntSerializator(QDomDocument *doc, QDomElement *node){
|
||||
return new LimeReport::XmlIntSerializator(doc,node);
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ namespace LimeReport{
|
||||
ReportDesignWindow* ReportDesignWindow::m_instance=0;
|
||||
|
||||
ReportDesignWindow::ReportDesignWindow(ReportEnginePrivateInterface* report, QWidget *parent, QSettings* settings) :
|
||||
QMainWindow(parent), m_textAttibutesIsChanging(false), m_settings(settings), m_ownedSettings(false),
|
||||
ReportDesignWindowInterface(parent), m_textAttibutesIsChanging(false), m_settings(settings), m_ownedSettings(false),
|
||||
m_progressDialog(0), m_showProgressDialog(true), m_editorTabType(ReportDesignWidget::Page), m_reportItemIsLocked(false)
|
||||
{
|
||||
initReportEditor(report);
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "items/editors/lritemsaligneditorwidget.h"
|
||||
#include "items/editors/lritemsborderseditorwidget.h"
|
||||
#include "lrobjectitemmodel.h"
|
||||
#include "lrreportdesignwindowintrerface.h"
|
||||
|
||||
namespace LimeReport{
|
||||
|
||||
@ -55,7 +56,7 @@ class BaseDesignIntf;
|
||||
class PageDesignIntf;
|
||||
class ObjectBrowser;
|
||||
|
||||
class ReportDesignWindow : public QMainWindow
|
||||
class ReportDesignWindow : public ReportDesignWindowInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
23
limereport/lrreportdesignwindowintrerface.h
Normal file
23
limereport/lrreportdesignwindowintrerface.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef LRREPORTDESIGNWINDOWINTRERFACE_H
|
||||
#define LRREPORTDESIGNWINDOWINTRERFACE_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QSettings>
|
||||
|
||||
namespace LimeReport {
|
||||
|
||||
class ReportDesignWindowInterface: public QMainWindow{
|
||||
public:
|
||||
ReportDesignWindowInterface(QWidget* parent = 0): QMainWindow(parent){}
|
||||
virtual bool checkNeedToSave() = 0;
|
||||
virtual void showModal() = 0;
|
||||
virtual void showNonModal() = 0;
|
||||
virtual void setSettings(QSettings* value) = 0;
|
||||
virtual QSettings* settings() = 0;
|
||||
virtual void restoreSetting() = 0;
|
||||
virtual void setShowProgressDialog(bool value) = 0;
|
||||
};
|
||||
|
||||
} // namespace LimeReport
|
||||
|
||||
#endif // LRREPORTDESIGNWINDOWINTRERFACE_H
|
@ -43,9 +43,11 @@
|
||||
|
||||
#include "lrpagedesignintf.h"
|
||||
#include "lrdatasourcemanager.h"
|
||||
//#include "lrdatabrowser.h"
|
||||
//#include "lrreportdesignwindow.h"
|
||||
|
||||
#ifdef HAVE_REPORT_DESIGNER
|
||||
#include "lrdatabrowser.h"
|
||||
#include "lrreportdesignwindow.h"
|
||||
#endif
|
||||
|
||||
#include "serializators/lrxmlwriter.h"
|
||||
#include "serializators/lrxmlreader.h"
|
||||
@ -73,7 +75,9 @@ ReportEnginePrivate::ReportEnginePrivate(QObject *parent) :
|
||||
#ifdef HAVE_STATIC_BUILD
|
||||
initResources();
|
||||
initReportItems();
|
||||
#ifdef HAVE_REPORT_DESIGNER
|
||||
initObjectInspectorProperties();
|
||||
#endif
|
||||
initSerializators();
|
||||
#endif
|
||||
m_datasources = new DataSourceManager(this);
|
||||
@ -88,26 +92,19 @@ ReportEnginePrivate::ReportEnginePrivate(QObject *parent) :
|
||||
connect(m_datasources,SIGNAL(loadCollectionFinished(QString)),this,SLOT(slotDataSourceCollectionLoaded(QString)));
|
||||
connect(m_fileWatcher,SIGNAL(fileChanged(const QString &)),this,SLOT(slotLoadFromFile(const QString &)));
|
||||
|
||||
QDir pluginsDir( "../lib" );
|
||||
foreach( const QString& pluginName, pluginsDir.entryList( QDir::Files ) ) {
|
||||
qDebug() << "===============================================================================";
|
||||
qDebug() << "Found:" << pluginName;
|
||||
QDir pluginsDir( "./lib" );
|
||||
if (!pluginsDir.exists()){
|
||||
pluginsDir.setPath("../lib");
|
||||
}
|
||||
|
||||
foreach( const QString& pluginName, pluginsDir.entryList( QDir::Files ) ) {
|
||||
QPluginLoader loader( pluginsDir.absoluteFilePath( pluginName ) );
|
||||
if( loader.load() ) {
|
||||
if( LimeReportPluginInterface* myPlugin = qobject_cast< LimeReportPluginInterface* >( loader.instance() ) ) {
|
||||
qDebug() << "Testing: \n" <<
|
||||
"(1)" << myPlugin->getString() << "\n" <<
|
||||
"(2)" << myPlugin->getVar();
|
||||
m_designerFactory = myPlugin;
|
||||
break;
|
||||
}
|
||||
//loader.unload();
|
||||
} else {
|
||||
qDebug() << "Failed to load :(";
|
||||
qDebug() << loader.errorString();
|
||||
}
|
||||
|
||||
qDebug() << "";
|
||||
}
|
||||
|
||||
}
|
||||
@ -513,6 +510,29 @@ void ReportEnginePrivate::previewReport(PreviewHints hints)
|
||||
}
|
||||
}
|
||||
|
||||
ReportDesignWindowInterface*ReportEnginePrivate::getDesignerWindow()
|
||||
{
|
||||
if (!m_designerWindow) {
|
||||
if (m_designerFactory){
|
||||
m_designerWindow = m_designerFactory->getDesignerWindow(this,QApplication::activeWindow(),settings());
|
||||
m_designerWindow->setAttribute(Qt::WA_DeleteOnClose,true);
|
||||
m_designerWindow->setWindowIcon(QIcon(":report/images/logo32"));
|
||||
m_designerWindow->setShowProgressDialog(m_showProgressDialog);
|
||||
} else {
|
||||
#ifdef HAVE_REPORT_DESIGNER
|
||||
m_designerWindow = new LimeReport::ReportDesignWindow(this,QApplication::activeWindow(),settings());
|
||||
m_designerWindow->setAttribute(Qt::WA_DeleteOnClose,true);
|
||||
m_designerWindow->setWindowIcon(QIcon(":report/images/logo32"));
|
||||
m_designerWindow->setShowProgressDialog(m_showProgressDialog);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (m_designerWindow){
|
||||
m_datasources->updateDatasourceModel();
|
||||
}
|
||||
return m_designerWindow;
|
||||
}
|
||||
|
||||
PreviewReportWidget* ReportEnginePrivate::createPreviewWidget(QWidget* parent){
|
||||
|
||||
Q_Q(ReportEngine);
|
||||
@ -645,33 +665,19 @@ PageDesignIntf* ReportEngine::createPreviewScene(QObject* parent){
|
||||
|
||||
void ReportEnginePrivate::designReport()
|
||||
{
|
||||
if (!m_designerWindow) {
|
||||
// Q_Q(ReportEngine);
|
||||
if (m_designerFactory){
|
||||
settings()->beginGroup("DesignerWindow");
|
||||
settings()->setValue("showProgressDialog",m_showProgressDialog);
|
||||
settings()->endGroup();
|
||||
m_designerWindow = m_designerFactory->getDesignerWindow(this,QApplication::activeWindow(),settings());
|
||||
//m_designerWindow->setAttribute(Qt::WA_DeleteOnClose,true);
|
||||
//m_designerWindow->setWindowIcon(QIcon(":report/images/logo32"));
|
||||
//m_designerWindow->setShowProgressDialog(m_showProgressDialog);
|
||||
} else {
|
||||
//m_designerWindow = new LimeReport::ReportDesignWindow(this,QApplication::activeWindow(),settings());
|
||||
//m_designerWindow->setAttribute(Qt::WA_DeleteOnClose,true);
|
||||
//m_designerWindow->setWindowIcon(QIcon(":report/images/logo32"));
|
||||
//m_designerWindow->setShowProgressDialog(m_showProgressDialog);
|
||||
}
|
||||
}
|
||||
m_datasources->updateDatasourceModel();
|
||||
ReportDesignWindowInterface* designerWindow = getDesignerWindow();
|
||||
if (designerWindow){
|
||||
#ifdef Q_OS_WIN
|
||||
m_designerWindow->setWindowModality(Qt::ApplicationModal);
|
||||
designerWindow->setWindowModality(Qt::ApplicationModal);
|
||||
#endif
|
||||
// if (QApplication::activeWindow()==0){
|
||||
// m_designerWindow->show();;
|
||||
// } else {
|
||||
// m_designerWindow->showModal();
|
||||
// }
|
||||
m_designerWindow->show();
|
||||
if (QApplication::activeWindow()==0){
|
||||
designerWindow->show();;
|
||||
} else {
|
||||
designerWindow->showModal();
|
||||
}
|
||||
} else {
|
||||
qDebug()<<(tr("Designer not found!"));
|
||||
}
|
||||
}
|
||||
|
||||
void ReportEnginePrivate::setSettings(QSettings* value)
|
||||
@ -1127,6 +1133,12 @@ void ReportEngine::designReport()
|
||||
d->designReport();
|
||||
}
|
||||
|
||||
ReportDesignWindowInterface*ReportEngine::getDesignerWindow()
|
||||
{
|
||||
Q_D(ReportEngine);
|
||||
return d->getDesignerWindow();
|
||||
}
|
||||
|
||||
PreviewReportWidget* ReportEngine::createPreviewWidget(QWidget *parent)
|
||||
{
|
||||
Q_D(ReportEngine);
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "lrdatasourcemanagerintf.h"
|
||||
#include "lrscriptenginemanagerintf.h"
|
||||
#include "lrpreviewreportwidget.h"
|
||||
#include "lrreportdesignwindowintrerface.h"
|
||||
|
||||
class QPrinter;
|
||||
|
||||
@ -85,6 +86,7 @@ public:
|
||||
bool printToPDF(const QString& fileName);
|
||||
void previewReport(PreviewHints hints = PreviewBarsUserSetting);
|
||||
void designReport();
|
||||
ReportDesignWindowInterface* getDesignerWindow();
|
||||
void setShowProgressDialog(bool value);
|
||||
IDataSourceManager* dataManager();
|
||||
IScriptEngineManager* scriptManager();
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "lrscriptenginemanager.h"
|
||||
#include "lrreporttranslation.h"
|
||||
#include "lrdesignerplugininterface.h"
|
||||
#include "lrreportdesignwindowintrerface.h"
|
||||
|
||||
class QFileSystemWatcher;
|
||||
|
||||
@ -128,6 +129,8 @@ public:
|
||||
void printToFile(const QString& fileName);
|
||||
bool printToPDF(const QString& fileName);
|
||||
void previewReport(PreviewHints hints = PreviewBarsUserSetting);
|
||||
|
||||
ReportDesignWindowInterface* getDesignerWindow();
|
||||
void designReport();
|
||||
void setSettings(QSettings* value);
|
||||
void setShowProgressDialog(bool value){m_showProgressDialog = value;}
|
||||
@ -229,7 +232,7 @@ private:
|
||||
QMainWindow* m_activePreview;
|
||||
QIcon m_previewWindowIcon;
|
||||
QString m_previewWindowTitle;
|
||||
QPointer<QMainWindow> m_designerWindow;
|
||||
QPointer<ReportDesignWindowInterface> m_designerWindow;
|
||||
ReportSettings m_reportSettings;
|
||||
bool m_reportRendering;
|
||||
bool m_resultIsEditable;
|
||||
|
Loading…
Reference in New Issue
Block a user