From daef743d10cfebda25e8d689797ef76eff948192 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Tue, 26 Nov 2019 23:40:36 +0300 Subject: [PATCH 1/2] ChartItem has been fixed --- common.pri | 2 +- limereport/items/lrchartitem.cpp | 5 +++++ limereport/items/lrchartitem.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/common.pri b/common.pri index 78767ea..62c871f 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 21 +LIMEREPORT_VERSION_RELEASE = 22 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/items/lrchartitem.cpp b/limereport/items/lrchartitem.cpp index 171d45c..73565d4 100644 --- a/limereport/items/lrchartitem.cpp +++ b/limereport/items/lrchartitem.cpp @@ -249,6 +249,11 @@ QWidget *ChartItem::defaultEditor() return editor; } +bool ChartItem::isNeedUpdateSize(RenderPass pass) const +{ + return pass == FirstPass; +} + QList ChartItem::labels() const { return m_labels; diff --git a/limereport/items/lrchartitem.h b/limereport/items/lrchartitem.h index 3419d20..5af5213 100644 --- a/limereport/items/lrchartitem.h +++ b/limereport/items/lrchartitem.h @@ -196,7 +196,7 @@ protected: void updateItemSize(DataSourceManager *dataManager, RenderPass, int); void fillLabels(IDataSource* dataSource); QWidget* defaultEditor(); - + bool isNeedUpdateSize(RenderPass pass) const; private: QList m_series; // QList< QPointer > m_series; From 634a0c7eaa940959f96f146a8dcd8817a8e2597c Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Wed, 11 Dec 2019 15:01:02 +0300 Subject: [PATCH 2/2] Default file name to save preview has been added --- common.pri | 2 +- limereport/lrpreviewreportwidget.cpp | 4 ++-- limereport/lrreportengine.cpp | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common.pri b/common.pri index 62c871f..cff835e 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 22 +LIMEREPORT_VERSION_RELEASE = 23 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/lrpreviewreportwidget.cpp b/limereport/lrpreviewreportwidget.cpp index 87a3bab..636bcb9 100644 --- a/limereport/lrpreviewreportwidget.cpp +++ b/limereport/lrpreviewreportwidget.cpp @@ -124,9 +124,9 @@ bool PreviewReportWidget::exportReport(QString exporterName, const QMapm_report); - + QString defaultFileName = d_ptr->m_report->reportName().split(".")[0]; QString filter = QString("%1 (*.%2)").arg(e->exporterName()).arg(e->exporterFileExt()); - QString fileName = QFileDialog::getSaveFileName(this,tr("%1 file name").arg(e->exporterName()),"",filter); + QString fileName = QFileDialog::getSaveFileName(this,tr("%1 file name").arg(e->exporterName()), defaultFileName, filter); if (!fileName.isEmpty()){ QFileInfo fi(fileName); if (fi.suffix().isEmpty()) diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index 1717f3f..8d25064 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -470,8 +470,9 @@ bool ReportEnginePrivate::exportReport(QString exporterName, const QString &file if (ExportersFactory::instance().map().contains(exporterName)){ ReportExporterInterface* e = ExportersFactory::instance().objectCreator(exporterName)(this); if (fn.isEmpty()){ + QString defaultFileName = reportName().split(".")[0]; QString filter = QString("%1 (*.%2)").arg(e->exporterName()).arg(e->exporterFileExt()); - QString fn = QFileDialog::getSaveFileName(0,tr("%1 file name").arg(e->exporterName()),"",filter); + QString fn = QFileDialog::getSaveFileName(0, tr("%1 file name").arg(e->exporterName()), defaultFileName, filter); } if (!fn.isEmpty()){ QFileInfo fi(fn);