mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2025-10-08 21:53:14 +03:00
Fix #46 Allow to customize the Preview dialog
hints (ShowAllPreviewBars, HidePreviewToolBar, HidePreviewMenuBar, HidePreviewStatusBar, HideAllPreviewBar) have been added to preview method
This commit is contained in:
@@ -307,7 +307,7 @@ bool ReportEnginePrivate::printToPDF(const QString &fileName)
|
||||
return false;
|
||||
}
|
||||
|
||||
void ReportEnginePrivate::previewReport()
|
||||
void ReportEnginePrivate::previewReport(PreviewHints hints)
|
||||
{
|
||||
QTime start = QTime::currentTime();
|
||||
try{
|
||||
@@ -327,6 +327,11 @@ void ReportEnginePrivate::previewReport()
|
||||
if (!dataManager()->errorsList().isEmpty()){
|
||||
w->setErrorMessages(dataManager()->errorsList());
|
||||
}
|
||||
|
||||
w->setMenuVisible(!hints.testFlag(HidePreviewMenuBar));
|
||||
w->setStatusBarVisible(!hints.testFlag(HidePreviewStatusBar));
|
||||
w->setToolBarVisible(!hints.testFlag(HidePreviewToolBar));
|
||||
|
||||
m_activePreview = w;
|
||||
connect(w,SIGNAL(destroyed(QObject*)), this, SLOT(slotPreviewWindowDestroed(QObject*)));
|
||||
qDebug()<<"render time ="<<start.msecsTo(QTime::currentTime());
|
||||
@@ -654,12 +659,12 @@ bool ReportEngine::printToPDF(const QString &fileName)
|
||||
return d->printToPDF(fileName);
|
||||
}
|
||||
|
||||
void ReportEngine::previewReport()
|
||||
void ReportEngine::previewReport(PreviewHints hints)
|
||||
{
|
||||
Q_D(ReportEngine);
|
||||
if (m_settings)
|
||||
d->setSettings(m_settings);
|
||||
d->previewReport();
|
||||
d->previewReport(hints);
|
||||
}
|
||||
|
||||
void ReportEngine::designReport()
|
||||
|
Reference in New Issue
Block a user