mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 00:33:02 +03:00
Merge tag '1.5.46' into develop
Finish 1.5.46
This commit is contained in:
commit
5c6dc28dc8
339
CMakeLists.txt
Normal file
339
CMakeLists.txt
Normal file
@ -0,0 +1,339 @@
|
||||
project(limereport)
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
|
||||
find_package(Qt5Core)
|
||||
find_package(Qt5Widgets)
|
||||
find_package(Qt5Sql)
|
||||
find_package(Qt5Network)
|
||||
find_package(Qt5Xml)
|
||||
find_package(Qt5Svg)
|
||||
find_package(Qt5Qml)
|
||||
find_package(Qt5PrintSupport)
|
||||
find_package(Qt5Script)
|
||||
find_package(Qt5UiTools)
|
||||
find_package(PNG REQUIRED)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
|
||||
set ( LIMEREPORT_SOURCES
|
||||
limereport/bands/lrdataband.cpp
|
||||
limereport/bands/lrgroupbands.cpp
|
||||
limereport/bands/lrpagefooter.cpp
|
||||
limereport/bands/lrpageheader.cpp
|
||||
limereport/bands/lrreportfooter.cpp
|
||||
limereport/bands/lrreportheader.cpp
|
||||
limereport/bands/lrsubdetailband.cpp
|
||||
limereport/bands/lrtearoffband.cpp
|
||||
limereport/databrowser/lrconnectiondialog.cpp
|
||||
limereport/databrowser/lrdatabrowser.cpp
|
||||
limereport/databrowser/lrdatabrowsertree.cpp
|
||||
limereport/databrowser/lrsqleditdialog.cpp
|
||||
limereport/databrowser/lrvariabledialog.cpp
|
||||
limereport/exporters/lrpdfexporter.cpp
|
||||
limereport/items/charts/lrhorizontalbarchart.cpp
|
||||
limereport/items/charts/lrlineschart.cpp
|
||||
limereport/items/charts/lrpiechart.cpp
|
||||
limereport/items/charts/lrverticalbarchart.cpp
|
||||
limereport/items/editors/lrfonteditorwidget.cpp
|
||||
limereport/items/editors/lritemeditorwidget.cpp
|
||||
limereport/items/editors/lritemsaligneditorwidget.cpp
|
||||
limereport/items/editors/lritemsborderseditorwidget.cpp
|
||||
limereport/items/editors/lrtextalignmenteditorwidget.cpp
|
||||
limereport/items/lrabstractlayout.cpp
|
||||
limereport/items/lralignpropitem.cpp
|
||||
limereport/items/lrbarcodeitem.cpp
|
||||
limereport/items/lrchartitem.cpp
|
||||
limereport/items/lrchartitemeditor.cpp
|
||||
limereport/items/lrhorizontallayout.cpp
|
||||
limereport/items/lrimageitem.cpp
|
||||
limereport/items/lrimageitemeditor.cpp
|
||||
limereport/items/lrlayoutmarker.cpp
|
||||
limereport/items/lrshapeitem.cpp
|
||||
limereport/items/lrsimpletagparser.cpp
|
||||
limereport/items/lrsubitemparentpropitem.cpp
|
||||
limereport/items/lrsvgitem.cpp
|
||||
limereport/items/lrtextitem.cpp
|
||||
limereport/items/lrtextitemeditor.cpp
|
||||
limereport/items/lrverticallayout.cpp
|
||||
limereport/lraboutdialog.cpp
|
||||
limereport/lrbanddesignintf.cpp
|
||||
limereport/lrbandsmanager.cpp
|
||||
limereport/lrbasedesignintf.cpp
|
||||
limereport/lrcolorindicator.cpp
|
||||
limereport/lrdatadesignintf.cpp
|
||||
limereport/lrdatasourcemanager.cpp
|
||||
limereport/lrfactoryinitializer.cpp
|
||||
limereport/lrglobal.cpp
|
||||
limereport/lrgraphicsviewzoom.cpp
|
||||
limereport/lrgroupfunctions.cpp
|
||||
limereport/lritemdesignintf.cpp
|
||||
limereport/lritemscontainerdesignitf.cpp
|
||||
limereport/lrpagedesignintf.cpp
|
||||
limereport/lrpageitemdesignintf.cpp
|
||||
limereport/lrpreparedpages.cpp
|
||||
limereport/lrpreviewreportwidget.cpp
|
||||
limereport/lrpreviewreportwindow.cpp
|
||||
limereport/lrreportdesignwidget.cpp
|
||||
limereport/lrreportdesignwindow.cpp
|
||||
limereport/lrreportengine.cpp
|
||||
limereport/lrreportrender.cpp
|
||||
limereport/lrreporttranslation.cpp
|
||||
limereport/lrscriptenginemanager.cpp
|
||||
limereport/lrsettingdialog.cpp
|
||||
limereport/lrsimplecrypt.cpp
|
||||
limereport/lrvariablesholder.cpp
|
||||
limereport/objectinspector/editors/lrbuttonlineeditor.cpp
|
||||
limereport/objectinspector/editors/lrcheckboxeditor.cpp
|
||||
limereport/objectinspector/editors/lrcoloreditor.cpp
|
||||
limereport/objectinspector/editors/lrcomboboxeditor.cpp
|
||||
limereport/objectinspector/editors/lrfonteditor.cpp
|
||||
limereport/objectinspector/editors/lrimageeditor.cpp
|
||||
limereport/objectinspector/editors/lrsvgeditor.cpp
|
||||
limereport/objectinspector/editors/lrtextitempropertyeditor.cpp
|
||||
limereport/objectinspector/lrbasedesignobjectmodel.cpp
|
||||
limereport/objectinspector/lrobjectinspectorwidget.cpp
|
||||
limereport/objectinspector/lrobjectitemmodel.cpp
|
||||
limereport/objectinspector/lrobjectpropitem.cpp
|
||||
limereport/objectinspector/lrpropertydelegate.cpp
|
||||
limereport/objectinspector/propertyItems/lrboolpropitem.cpp
|
||||
limereport/objectinspector/propertyItems/lrcolorpropitem.cpp
|
||||
limereport/objectinspector/propertyItems/lrcontentpropitem.cpp
|
||||
limereport/objectinspector/propertyItems/lrdatasourcepropitem.cpp
|
||||
limereport/objectinspector/propertyItems/lrenumpropitem.cpp
|
||||
limereport/objectinspector/propertyItems/lrflagspropitem.cpp
|
||||
limereport/objectinspector/propertyItems/lrfontpropitem.cpp
|
||||
limereport/objectinspector/propertyItems/lrgroupfieldpropitem.cpp
|
||||
limereport/objectinspector/propertyItems/lrimagepropitem.cpp
|
||||
limereport/objectinspector/propertyItems/lrintpropitem.cpp
|
||||
limereport/objectinspector/propertyItems/lrmarginpropitem.cpp
|
||||
limereport/objectinspector/propertyItems/lrqrealpropitem.cpp
|
||||
limereport/objectinspector/propertyItems/lrrectproptem.cpp
|
||||
limereport/objectinspector/propertyItems/lrseriespropitem.cpp
|
||||
limereport/objectinspector/propertyItems/lrstringpropitem.cpp
|
||||
limereport/objectinspector/propertyItems/lrsvgpropitem.cpp
|
||||
limereport/objectsbrowser/lrobjectbrowser.cpp
|
||||
limereport/scriptbrowser/lrscriptbrowser.cpp
|
||||
limereport/scripteditor/lrcodeeditor.cpp
|
||||
limereport/scripteditor/lrscripteditor.cpp
|
||||
limereport/scripteditor/lrscripthighlighter.cpp
|
||||
limereport/serializators/lrxmlbasetypesserializators.cpp
|
||||
limereport/serializators/lrxmlqrectserializator.cpp
|
||||
limereport/serializators/lrxmlreader.cpp
|
||||
limereport/serializators/lrxmlwriter.cpp
|
||||
limereport/translationeditor/languageselectdialog.cpp
|
||||
limereport/translationeditor/translationeditor.cpp
|
||||
|
||||
|
||||
limereport/bands/lrdataband.h
|
||||
limereport/bands/lrgroupbands.h
|
||||
limereport/bands/lrpagefooter.h
|
||||
limereport/bands/lrpageheader.h
|
||||
limereport/bands/lrreportfooter.h
|
||||
limereport/bands/lrreportheader.h
|
||||
limereport/bands/lrsubdetailband.h
|
||||
limereport/bands/lrtearoffband.h
|
||||
limereport/base/lrattribsabstractfactory.h
|
||||
limereport/base/lrsimpleabstractfactory.h
|
||||
limereport/base/lrsingleton.h
|
||||
limereport/databrowser/lrconnectiondialog.h
|
||||
limereport/databrowser/lrdatabrowser.h
|
||||
limereport/databrowser/lrdatabrowsertree.h
|
||||
limereport/databrowser/lrsqleditdialog.h
|
||||
limereport/databrowser/lrvariabledialog.h
|
||||
limereport/exporters/lrpdfexporter.h
|
||||
limereport/items/charts/lrhorizontalbarchart.h
|
||||
limereport/items/charts/lrlineschart.h
|
||||
limereport/items/charts/lrpiechart.h
|
||||
limereport/items/charts/lrverticalbarchart.h
|
||||
limereport/items/editors/lrfonteditorwidget.h
|
||||
limereport/items/editors/lritemeditorwidget.h
|
||||
limereport/items/editors/lritemsaligneditorwidget.h
|
||||
limereport/items/editors/lritemsborderseditorwidget.h
|
||||
limereport/items/editors/lrtextalignmenteditorwidget.h
|
||||
limereport/items/lrabstractlayout.h
|
||||
limereport/items/lralignpropitem.h
|
||||
limereport/items/lrbarcodeitem.h
|
||||
limereport/items/lrchartitem.h
|
||||
limereport/items/lrchartitemeditor.h
|
||||
limereport/items/lreditableimageitemintf.h
|
||||
limereport/items/lrhorizontallayout.h
|
||||
limereport/items/lrimageitem.h
|
||||
limereport/items/lrimageitemeditor.h
|
||||
limereport/items/lrlayoutmarker.h
|
||||
limereport/items/lrshapeitem.h
|
||||
limereport/items/lrsimpletagparser.h
|
||||
limereport/items/lrsubitemparentpropitem.h
|
||||
limereport/items/lrsvgitem.h
|
||||
limereport/items/lrtextitem.h
|
||||
limereport/items/lrtextitemeditor.h
|
||||
limereport/items/lrverticallayout.h
|
||||
limereport/lraboutdialog.h
|
||||
limereport/lrbanddesignintf.h
|
||||
limereport/lrbandsmanager.h
|
||||
limereport/lrbasedesignintf.h
|
||||
limereport/lrcallbackdatasourceintf.h
|
||||
limereport/lrcollection.h
|
||||
limereport/lrcolorindicator.h
|
||||
limereport/lrdatadesignintf.h
|
||||
limereport/lrdatasourceintf.h
|
||||
limereport/lrdatasourcemanager.h
|
||||
limereport/lrdatasourcemanagerintf.h
|
||||
limereport/lrdesignelementsfactory.h
|
||||
limereport/lrdesignerplugininterface.h
|
||||
limereport/lrexporterintf.h
|
||||
limereport/lrexportersfactory.h
|
||||
limereport/lrfactoryinitializer.h
|
||||
limereport/lrgraphicsviewzoom.h
|
||||
limereport/lrgroupfunctions.h
|
||||
limereport/lritemdesignintf.h
|
||||
limereport/lritemscontainerdesignitf.h
|
||||
limereport/lrpagedesignintf.h
|
||||
limereport/lrpageinitintf.h
|
||||
limereport/lrpageitemdesignintf.h
|
||||
limereport/lrpreparedpages.h
|
||||
limereport/lrpreparedpagesintf.h
|
||||
limereport/lrpreviewreportwidget.h
|
||||
limereport/lrpreviewreportwidget_p.h
|
||||
limereport/lrpreviewreportwindow.h
|
||||
limereport/lrreportdesignwidget.h
|
||||
limereport/lrreportdesignwindow.h
|
||||
limereport/lrreportdesignwindowintrerface.h
|
||||
limereport/lrreportengine.h
|
||||
limereport/lrreportengine_p.h
|
||||
limereport/lrreportrender.h
|
||||
limereport/lrreporttranslation.h
|
||||
limereport/lrscriptenginemanager.h
|
||||
limereport/lrscriptenginemanagerintf.h
|
||||
limereport/lrsettingdialog.h
|
||||
limereport/lrsimplecrypt.h
|
||||
limereport/lrvariablesholder.h
|
||||
limereport/objectinspector/editors/lrbuttonlineeditor.h
|
||||
limereport/objectinspector/editors/lrcheckboxeditor.h
|
||||
limereport/objectinspector/editors/lrcoloreditor.h
|
||||
limereport/objectinspector/editors/lrcomboboxeditor.h
|
||||
limereport/objectinspector/editors/lrfonteditor.h
|
||||
limereport/objectinspector/editors/lrimageeditor.h
|
||||
limereport/objectinspector/editors/lrsvgeditor.h
|
||||
limereport/objectinspector/editors/lrtextitempropertyeditor.h
|
||||
limereport/objectinspector/lrbasedesignobjectmodel.h
|
||||
limereport/objectinspector/lrobjectinspectorwidget.h
|
||||
limereport/objectinspector/lrobjectitemmodel.h
|
||||
limereport/objectinspector/lrobjectpropitem.h
|
||||
limereport/objectinspector/lrpropertydelegate.h
|
||||
limereport/objectinspector/propertyItems/lrboolpropitem.h
|
||||
limereport/objectinspector/propertyItems/lrcolorpropitem.h
|
||||
limereport/objectinspector/propertyItems/lrcontentpropitem.h
|
||||
limereport/objectinspector/propertyItems/lrdatasourcepropitem.h
|
||||
limereport/objectinspector/propertyItems/lrenumpropitem.h
|
||||
limereport/objectinspector/propertyItems/lrflagspropitem.h
|
||||
limereport/objectinspector/propertyItems/lrfontpropitem.h
|
||||
limereport/objectinspector/propertyItems/lrgroupfieldpropitem.h
|
||||
limereport/objectinspector/propertyItems/lrimagepropitem.h
|
||||
limereport/objectinspector/propertyItems/lrintpropitem.h
|
||||
limereport/objectinspector/propertyItems/lrmarginpropitem.h
|
||||
limereport/objectinspector/propertyItems/lrqrealpropitem.h
|
||||
limereport/objectinspector/propertyItems/lrrectproptem.h
|
||||
limereport/objectinspector/propertyItems/lrseriespropitem.h
|
||||
limereport/objectinspector/propertyItems/lrstringpropitem.h
|
||||
limereport/objectinspector/propertyItems/lrsvgpropitem.h
|
||||
limereport/objectsbrowser/lrobjectbrowser.h
|
||||
limereport/scriptbrowser/lrscriptbrowser.h
|
||||
limereport/scripteditor/lrcodeeditor.h
|
||||
limereport/scripteditor/lrscripteditor.h
|
||||
limereport/scripteditor/lrscripthighlighter.h
|
||||
limereport/serializators/lrserializatorintf.h
|
||||
limereport/serializators/lrstorageintf.h
|
||||
limereport/serializators/lrxmlbasetypesserializators.h
|
||||
limereport/serializators/lrxmlqrectserializator.h
|
||||
limereport/serializators/lrxmlreader.h
|
||||
limereport/serializators/lrxmlserializatorsfactory.h
|
||||
limereport/serializators/lrxmlwriter.h
|
||||
limereport/translationeditor/languageselectdialog.h
|
||||
limereport/translationeditor/translationeditor.h
|
||||
limereport/lrglobal.h
|
||||
|
||||
|
||||
3rdparty/zint-2.6.1/backend/2of5.c
|
||||
3rdparty/zint-2.6.1/backend/auspost.c
|
||||
3rdparty/zint-2.6.1/backend/aztec.c
|
||||
3rdparty/zint-2.6.1/backend/bmp.c
|
||||
3rdparty/zint-2.6.1/backend/codablock.c
|
||||
3rdparty/zint-2.6.1/backend/code.c
|
||||
3rdparty/zint-2.6.1/backend/code1.c
|
||||
3rdparty/zint-2.6.1/backend/code128.c
|
||||
3rdparty/zint-2.6.1/backend/code16k.c
|
||||
3rdparty/zint-2.6.1/backend/code49.c
|
||||
3rdparty/zint-2.6.1/backend/common.c
|
||||
3rdparty/zint-2.6.1/backend/composite.c
|
||||
3rdparty/zint-2.6.1/backend/dllversion.c
|
||||
3rdparty/zint-2.6.1/backend/dmatrix.c
|
||||
3rdparty/zint-2.6.1/backend/dotcode.c
|
||||
3rdparty/zint-2.6.1/backend/eci.c
|
||||
3rdparty/zint-2.6.1/backend/emf.c
|
||||
3rdparty/zint-2.6.1/backend/gif.c
|
||||
3rdparty/zint-2.6.1/backend/gridmtx.c
|
||||
3rdparty/zint-2.6.1/backend/gs1.c
|
||||
3rdparty/zint-2.6.1/backend/hanxin.c
|
||||
3rdparty/zint-2.6.1/backend/imail.c
|
||||
3rdparty/zint-2.6.1/backend/large.c
|
||||
3rdparty/zint-2.6.1/backend/library.c
|
||||
3rdparty/zint-2.6.1/backend/libzint.rc
|
||||
3rdparty/zint-2.6.1/backend/maxicode.c
|
||||
3rdparty/zint-2.6.1/backend/medical.c
|
||||
3rdparty/zint-2.6.1/backend/pcx.c
|
||||
3rdparty/zint-2.6.1/backend/pdf417.c
|
||||
3rdparty/zint-2.6.1/backend/plessey.c
|
||||
3rdparty/zint-2.6.1/backend/png.c
|
||||
3rdparty/zint-2.6.1/backend/postal.c
|
||||
3rdparty/zint-2.6.1/backend/ps.c
|
||||
3rdparty/zint-2.6.1/backend/qr.c
|
||||
3rdparty/zint-2.6.1/backend/raster.c
|
||||
3rdparty/zint-2.6.1/backend/reedsol.c
|
||||
3rdparty/zint-2.6.1/backend/render.c
|
||||
3rdparty/zint-2.6.1/backend/rss.c
|
||||
3rdparty/zint-2.6.1/backend/svg.c
|
||||
3rdparty/zint-2.6.1/backend/telepen.c
|
||||
3rdparty/zint-2.6.1/backend/tif.c
|
||||
3rdparty/zint-2.6.1/backend/upcean.c
|
||||
3rdparty/zint-2.6.1/backend_qt/qzint.cpp
|
||||
|
||||
|
||||
limereport/databrowser/lrconnectiondialog.ui
|
||||
limereport/databrowser/lrdatabrowser.ui
|
||||
limereport/databrowser/lrsqleditdialog.ui
|
||||
limereport/databrowser/lrvariabledialog.ui
|
||||
limereport/dialogdesigner/templates/Dialog.ui
|
||||
limereport/items/lrchartitemeditor.ui
|
||||
limereport/items/lrimageitemeditor.ui
|
||||
limereport/items/lrtextitemeditor.ui
|
||||
limereport/lraboutdialog.ui
|
||||
limereport/lrpreviewreportwidget.ui
|
||||
limereport/lrpreviewreportwindow.ui
|
||||
limereport/lrsettingdialog.ui
|
||||
limereport/objectinspector/editors/ltextitempropertyeditor.ui
|
||||
limereport/scriptbrowser/lrscriptbrowser.ui
|
||||
limereport/scripteditor/lrscripteditor.ui
|
||||
limereport/translationeditor/languageselectdialog.ui
|
||||
limereport/translationeditor/translationeditor.ui
|
||||
|
||||
|
||||
./limereport/databrowser/lrdatabrowser.qrc
|
||||
./limereport/dialogdesigner/dialogdesigner.qrc
|
||||
./limereport/items/items.qrc
|
||||
./limereport/objectinspector/lobjectinspector.qrc
|
||||
./limereport/report.qrc
|
||||
./limereport/scriptbrowser/lrscriptbrowser.qrc
|
||||
./limereport/translationeditor/translationeditor.qrc
|
||||
)
|
||||
|
||||
add_library( limereport_static STATIC ${LIMEREPORT_SOURCES})
|
||||
add_library( limereport SHARED ${LIMEREPORT_SOURCES})
|
||||
target_link_libraries( limereport_static PNG::PNG Qt5::Core Qt5::Qml Qt5::Widgets Qt5::Xml Qt5::Sql Qt5::PrintSupport Qt5::Script Qt5::Svg Qt5::UiTools)
|
||||
target_link_libraries( limereport PNG::PNG Qt5::Core Qt5::Widgets Qt5::Qml Qt5::Xml Qt5::Sql Qt5::PrintSupport Qt5::Script Qt5::Svg Qt5::UiTools)
|
||||
target_compile_definitions( limereport_static PUBLIC -DHAVE_QT5 -DHAVE_STATIC_BUILD -DLIMEREPORT_VERSION_STR="dev" -DHAVE_REPORT_DESIGNER -DUSE_QJSENGINE -DHAVE_UI_LOADER )
|
||||
target_compile_definitions( limereport PUBLIC -DHAVE_QT5 -DLIMEREPORT_VERSION_STR="dev" -DHAVE_REPORT_DESIGNER -DUSE_QJSENGINE -DLIMEREPORT_EXPORTS -DHAVE_UI_LOADER)
|
||||
target_include_directories( limereport PRIVATE limereport/ limereport/base limereport/bands limereport/databrowser limereport/items/editors limereport/items limereport/objectinspector limereport/scriptbrowser limereport/serializators 3rdparty/zint-2.6.1/backend_qt 3rdparty/zint-2.6.1/backend limereport/scripteditor)
|
||||
target_include_directories( limereport_static PRIVATE limereport/ limereport/base limereport/bands limereport/databrowser limereport/items/editors limereport/items limereport/objectinspector limereport/scriptbrowser limereport/serializators 3rdparty/zint-2.6.1/backend_qt 3rdparty/zint-2.6.1/backend limereport/scripteditor )
|
@ -134,7 +134,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
|
||||
|
||||
LIMEREPORT_VERSION_MAJOR = 1
|
||||
LIMEREPORT_VERSION_MINOR = 5
|
||||
LIMEREPORT_VERSION_RELEASE = 45
|
||||
LIMEREPORT_VERSION_RELEASE = 46
|
||||
|
||||
LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}'
|
||||
DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\"
|
||||
|
@ -51,6 +51,7 @@ namespace LimeReport {
|
||||
#define VARIABLE_IS_NOT_USED
|
||||
#endif
|
||||
|
||||
Q_NAMESPACE
|
||||
|
||||
namespace Const{
|
||||
int const DEFAULT_GRID_STEP = 1;
|
||||
|
@ -129,7 +129,8 @@ void SeriesItem::setPreferredType(const SeriesItemPreferredType& type)
|
||||
ChartItem::ChartItem(QObject *owner, QGraphicsItem *parent)
|
||||
: ItemDesignIntf(xmlTag, owner, parent), m_legendBorder(true),
|
||||
m_legendAlign(LegendAlignCenter), m_titleAlign(TitleAlignCenter),
|
||||
m_chartType(Pie), m_labelsField("")
|
||||
m_chartType(Pie), m_labelsField(""), m_isEmpty(true),
|
||||
m_showLegend(true)
|
||||
{
|
||||
m_labels<<"First"<<"Second"<<"Thrid";
|
||||
m_chart = new PieChart(this);
|
||||
@ -176,12 +177,15 @@ void ChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||
(maxTitleHeight)):0;
|
||||
|
||||
QRectF titleRect = QRectF(borderMargin,borderMargin,rect().width()-borderMargin*2,titleOffset);
|
||||
QRectF legendRect = m_chart->calcChartLegendRect(painter->font(), rect(), false, borderMargin, titleOffset);
|
||||
QRectF legendRect = QRectF(0,0,0,0);
|
||||
if (m_showLegend)
|
||||
legendRect = m_chart->calcChartLegendRect(painter->font(), rect(), false, borderMargin, titleOffset);
|
||||
QRectF diagramRect = rect().adjusted(borderMargin,titleOffset+borderMargin,
|
||||
-(legendRect.width()+borderMargin*2),-borderMargin);
|
||||
|
||||
paintChartTitle(painter, titleRect);
|
||||
m_chart->paintChartLegend(painter,legendRect);
|
||||
if (m_showLegend)
|
||||
m_chart->paintChartLegend(painter,legendRect);
|
||||
m_chart->paintChart(painter,diagramRect);
|
||||
|
||||
painter->restore();
|
||||
@ -224,11 +228,15 @@ QObject *ChartItem::elementAt(const QString &collectionName, int index)
|
||||
|
||||
void ChartItem::updateItemSize(DataSourceManager *dataManager, RenderPass , int )
|
||||
{
|
||||
|
||||
m_isEmpty = false;
|
||||
if (dataManager && dataManager->dataSource(m_datasource)){
|
||||
IDataSource* ds = dataManager->dataSource(m_datasource);
|
||||
foreach (SeriesItem* series, m_series) {
|
||||
series->setLabelsColumn(m_labelsField);
|
||||
series->fillSeriesData(ds);
|
||||
if (series->isEmpty()){
|
||||
series->setLabelsColumn(m_labelsField);
|
||||
series->fillSeriesData(ds);
|
||||
}
|
||||
}
|
||||
fillLabels(ds);
|
||||
}
|
||||
@ -258,7 +266,22 @@ QWidget *ChartItem::defaultEditor()
|
||||
|
||||
bool ChartItem::isNeedUpdateSize(RenderPass pass) const
|
||||
{
|
||||
return pass == FirstPass;
|
||||
return pass == FirstPass && m_isEmpty;
|
||||
}
|
||||
|
||||
bool ChartItem::showLegend() const
|
||||
{
|
||||
return m_showLegend;
|
||||
}
|
||||
|
||||
void ChartItem::setShowLegend(bool showLegend)
|
||||
{
|
||||
if (m_showLegend != showLegend){
|
||||
m_showLegend = showLegend;
|
||||
notify("showLegend", !m_showLegend, m_showLegend);
|
||||
update();
|
||||
}
|
||||
m_showLegend = showLegend;
|
||||
}
|
||||
|
||||
QList<QString> ChartItem::labels() const
|
||||
|
@ -52,6 +52,7 @@ public:
|
||||
void setColor(const QColor &color);
|
||||
SeriesItemPreferredType preferredType() const;
|
||||
void setPreferredType(const SeriesItemPreferredType& preferredType);
|
||||
bool isEmpty(){ return m_data.values().isEmpty();}
|
||||
private:
|
||||
QString m_name;
|
||||
QString m_valuesColumn;
|
||||
@ -127,6 +128,7 @@ class ChartItem : public LimeReport::ItemDesignIntf
|
||||
Q_PROPERTY(TitleAlign titleAlign READ titleAlign WRITE setTitleAlign)
|
||||
Q_PROPERTY(ChartType chartType READ chartType WRITE setChartType)
|
||||
Q_PROPERTY(QString labelsField READ labelsField WRITE setLabelsField)
|
||||
Q_PROPERTY(bool showLegend READ showLegend WRITE setShowLegend)
|
||||
friend class AbstractChart;
|
||||
public:
|
||||
|
||||
@ -176,6 +178,9 @@ public:
|
||||
void setLabels(const QList<QString> &labels);
|
||||
QWidget* defaultEditor();
|
||||
|
||||
bool showLegend() const;
|
||||
void setShowLegend(bool showLegend);
|
||||
|
||||
protected:
|
||||
void paintChartTitle(QPainter* painter, QRectF titleRect);
|
||||
virtual BaseDesignIntf* createSameTypeItem(QObject *owner, QGraphicsItem *parent);
|
||||
@ -200,6 +205,8 @@ private:
|
||||
ChartType m_chartType;
|
||||
QString m_labelsField;
|
||||
QList<QString> m_labels;
|
||||
bool m_isEmpty;
|
||||
bool m_showLegend;
|
||||
};
|
||||
|
||||
} //namespace LimeReport
|
||||
|
@ -51,6 +51,7 @@ namespace LimeReport {
|
||||
#define VARIABLE_IS_NOT_USED
|
||||
#endif
|
||||
|
||||
Q_NAMESPACE
|
||||
|
||||
namespace Const{
|
||||
int const DEFAULT_GRID_STEP = 1;
|
||||
|
@ -609,6 +609,8 @@ void ReportRender::renderDataBand(BandDesignIntf *dataBand)
|
||||
|
||||
while(!bandDatasource->eof() && !m_renderCanceled){
|
||||
|
||||
datasources()->updateChildrenData(dataBand->datasourceName());
|
||||
|
||||
BandDesignIntf* rawData = renderData(dataBand);
|
||||
|
||||
if (!rawData->isEmpty() || dataBand->printIfEmpty()){
|
||||
@ -624,7 +626,6 @@ void ReportRender::renderDataBand(BandDesignIntf *dataBand)
|
||||
if (dataBand->keepFooterTogether() && !bandDatasource->hasNext())
|
||||
openFooterGroup(dataBand);
|
||||
|
||||
datasources()->updateChildrenData(dataBand->datasourceName());
|
||||
m_lastDataBand = dataBand;
|
||||
|
||||
if (header && !firstTime && header->repeatOnEachRow())
|
||||
|
Loading…
Reference in New Issue
Block a user