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

Merge tag '1.5.88' into develop

Finish 1.5.88

# Conflicts:
#	limereport/limereport.pri
#	limereport/limereport.pro
This commit is contained in:
fralx
2021-09-11 19:29:52 +03:00
239 changed files with 2492 additions and 999 deletions

View File

@@ -1,6 +1,6 @@
/***************************************************************************
* This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin *
* Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru *
* *
** GNU General Public License Usage **
@@ -41,7 +41,11 @@
#include <QPrintDialog>
#include <QFileDialog>
#include <QScrollBar>
#if QT_VERSION < 0x060000
#include <QDesktopWidget>
#else
#include <QScreen>
#endif
#include <QLabel>
#include <QMessageBox>
#include <QToolButton>
@@ -57,7 +61,7 @@ PreviewReportWindow::PreviewReportWindow(ReportEngine *report, QWidget *parent,
m_progressWidget = new QWidget(ui->statusbar);
QHBoxLayout* progressLayout = new QHBoxLayout();
progressLayout->setMargin(0);
progressLayout->setContentsMargins(0, 0, 0, 0);
progressLayout->addWidget(new QLabel(tr("Printing")));
m_progressBar = new QProgressBar(ui->statusbar);
m_progressBar->setMaximumWidth(100);
@@ -139,11 +143,17 @@ void PreviewReportWindow::restoreSetting()
if (v.isValid()){
restoreGeometry(v.toByteArray());
} else {
#if QT_VERSION < 0x060000
QDesktopWidget *desktop = QApplication::desktop();
int screenWidth = desktop->screenGeometry().width();
int screenHeight = desktop->screenGeometry().height();
#else
QScreen *screen = QGuiApplication::primaryScreen();
int screenWidth = screen->geometry().width();
int screenHeight = screen->geometry().height();
#endif
int x = static_cast<int>(screenWidth*0.1);
int y = static_cast<int>(screenHeight*0.1);