mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-23 20:22:58 +03:00
Merge branch 'master' into develop
# Conflicts: # limereport/lrreportengine.cpp # limereport/lrreportengine_p.h
This commit is contained in:
commit
a68be66078
@ -182,6 +182,12 @@ public:
|
|||||||
void setPreviewPageBackgroundColor(QColor color);
|
void setPreviewPageBackgroundColor(QColor color);
|
||||||
void setResultEditable(bool value);
|
void setResultEditable(bool value);
|
||||||
bool resultIsEditable();
|
bool resultIsEditable();
|
||||||
|
void setSaveToFileVisible(bool value);
|
||||||
|
bool saveToFileIsVisible();
|
||||||
|
void setPrintToPdfVisible(bool value);
|
||||||
|
bool printToPdfIsVisible();
|
||||||
|
void setPrintVisible(bool value);
|
||||||
|
bool printIsVisible();
|
||||||
bool isBusy();
|
bool isBusy();
|
||||||
void setPassPharse(QString& passPharse);
|
void setPassPharse(QString& passPharse);
|
||||||
QList<QLocale::Language> aviableLanguages();
|
QList<QLocale::Language> aviableLanguages();
|
||||||
|
@ -186,6 +186,26 @@ void PreviewReportWindow::setHideResultEditButton(bool value)
|
|||||||
ui->actionEdit_Mode->setVisible(value);
|
ui->actionEdit_Mode->setVisible(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PreviewReportWindow::setHidePrintButton(bool value)
|
||||||
|
{
|
||||||
|
ui->actionPrint->setVisible(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PreviewReportWindow::setHideSaveToFileButton(bool value)
|
||||||
|
{
|
||||||
|
ui->actionSaveToFile->setVisible(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PreviewReportWindow::setHidePrintToPdfButton(bool value)
|
||||||
|
{
|
||||||
|
ui->actionPrint_To_PDF->setVisible(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PreviewReportWindow::setEnablePrintMenu(bool value)
|
||||||
|
{
|
||||||
|
ui->menuReport->setEnabled(value);
|
||||||
|
}
|
||||||
|
|
||||||
QSettings*PreviewReportWindow::settings()
|
QSettings*PreviewReportWindow::settings()
|
||||||
{
|
{
|
||||||
if (m_settings){
|
if (m_settings){
|
||||||
|
@ -72,6 +72,10 @@ public:
|
|||||||
void setStatusBarVisible(bool value);
|
void setStatusBarVisible(bool value);
|
||||||
void setMenuVisible(bool value);
|
void setMenuVisible(bool value);
|
||||||
void setHideResultEditButton(bool value);
|
void setHideResultEditButton(bool value);
|
||||||
|
void setHidePrintButton(bool value);
|
||||||
|
void setHideSaveToFileButton(bool value);
|
||||||
|
void setHidePrintToPdfButton(bool value);
|
||||||
|
void setEnablePrintMenu(bool value);
|
||||||
QSettings* settings();
|
QSettings* settings();
|
||||||
ScaleType previewScaleType() const;
|
ScaleType previewScaleType() const;
|
||||||
void setPreviewScaleType(const ScaleType &previewScaleType, int percent = 0);
|
void setPreviewScaleType(const ScaleType &previewScaleType, int percent = 0);
|
||||||
|
@ -84,7 +84,9 @@ ReportEnginePrivate::ReportEnginePrivate(QObject *parent) :
|
|||||||
m_fileWatcher( new QFileSystemWatcher( this ) ), m_reportLanguage(QLocale::AnyLanguage),
|
m_fileWatcher( new QFileSystemWatcher( this ) ), m_reportLanguage(QLocale::AnyLanguage),
|
||||||
m_previewLayoutDirection(Qt::LayoutDirectionAuto), m_designerFactory(0),
|
m_previewLayoutDirection(Qt::LayoutDirectionAuto), m_designerFactory(0),
|
||||||
m_previewScaleType(FitWidth), m_previewScalePercent(0), m_startTOCPage(0),
|
m_previewScaleType(FitWidth), m_previewScalePercent(0), m_startTOCPage(0),
|
||||||
m_previewPageBackgroundColor(Qt::gray)
|
m_previewPageBackgroundColor(Qt::gray),
|
||||||
|
m_saveToFileVisible(true), m_printToPdfVisible(true),
|
||||||
|
m_printVisible(true)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_STATIC_BUILD
|
#ifdef HAVE_STATIC_BUILD
|
||||||
initResources();
|
initResources();
|
||||||
@ -532,8 +534,13 @@ void ReportEnginePrivate::previewReport(QPrinter *printer, PreviewHints hints)
|
|||||||
w->setStatusBarVisible(!hints.testFlag(HidePreviewStatusBar));
|
w->setStatusBarVisible(!hints.testFlag(HidePreviewStatusBar));
|
||||||
w->setToolBarVisible(!hints.testFlag(HidePreviewToolBar));
|
w->setToolBarVisible(!hints.testFlag(HidePreviewToolBar));
|
||||||
}
|
}
|
||||||
|
|
||||||
w->setHideResultEditButton(resultIsEditable());
|
w->setHideResultEditButton(resultIsEditable());
|
||||||
|
w->setHidePrintButton(printIsVisible());
|
||||||
|
w->setHideSaveToFileButton(saveToFileIsVisible());
|
||||||
|
w->setHidePrintToPdfButton(printToPdfIsVisible());
|
||||||
|
w->setEnablePrintMenu(printIsVisible() || printToPdfIsVisible());
|
||||||
|
|
||||||
w->setStyleSheet(m_styleSheet);
|
w->setStyleSheet(m_styleSheet);
|
||||||
m_activePreview = w;
|
m_activePreview = w;
|
||||||
|
|
||||||
@ -1090,6 +1097,36 @@ void ReportEnginePrivate::setResultEditable(bool value)
|
|||||||
m_resultIsEditable = value;
|
m_resultIsEditable = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ReportEnginePrivate::saveToFileIsVisible() const
|
||||||
|
{
|
||||||
|
return m_saveToFileVisible;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportEnginePrivate::setSaveToFileVisible(bool value)
|
||||||
|
{
|
||||||
|
m_saveToFileVisible = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ReportEnginePrivate::printToPdfIsVisible() const
|
||||||
|
{
|
||||||
|
return m_printToPdfVisible;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportEnginePrivate::setPrintToPdfVisible(bool value)
|
||||||
|
{
|
||||||
|
m_printToPdfVisible = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ReportEnginePrivate::printIsVisible() const
|
||||||
|
{
|
||||||
|
return m_printVisible;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportEnginePrivate::setPrintVisible(bool value)
|
||||||
|
{
|
||||||
|
m_printVisible = value;
|
||||||
|
}
|
||||||
|
|
||||||
bool ReportEnginePrivate::suppressFieldAndVarError() const
|
bool ReportEnginePrivate::suppressFieldAndVarError() const
|
||||||
{
|
{
|
||||||
return m_reportSettings.suppressAbsentFieldsAndVarsWarnings();
|
return m_reportSettings.suppressAbsentFieldsAndVarsWarnings();
|
||||||
@ -1432,6 +1469,42 @@ bool ReportEngine::resultIsEditable()
|
|||||||
return d->resultIsEditable();
|
return d->resultIsEditable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ReportEngine::setSaveToFileVisible(bool value)
|
||||||
|
{
|
||||||
|
Q_D(ReportEngine);
|
||||||
|
d->setSaveToFileVisible(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ReportEngine::saveToFileIsVisible()
|
||||||
|
{
|
||||||
|
Q_D(ReportEngine);
|
||||||
|
return d->saveToFileIsVisible();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportEngine::setPrintToPdfVisible(bool value)
|
||||||
|
{
|
||||||
|
Q_D(ReportEngine);
|
||||||
|
d->setPrintToPdfVisible(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ReportEngine::printToPdfIsVisible()
|
||||||
|
{
|
||||||
|
Q_D(ReportEngine);
|
||||||
|
return d->printToPdfIsVisible();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportEngine::setPrintVisible(bool value)
|
||||||
|
{
|
||||||
|
Q_D(ReportEngine);
|
||||||
|
d->setPrintVisible(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ReportEngine::printIsVisible()
|
||||||
|
{
|
||||||
|
Q_D(ReportEngine);
|
||||||
|
return d->printIsVisible();
|
||||||
|
}
|
||||||
|
|
||||||
bool ReportEngine::isBusy()
|
bool ReportEngine::isBusy()
|
||||||
{
|
{
|
||||||
Q_D(ReportEngine);
|
Q_D(ReportEngine);
|
||||||
|
@ -182,6 +182,12 @@ public:
|
|||||||
void setPreviewPageBackgroundColor(QColor color);
|
void setPreviewPageBackgroundColor(QColor color);
|
||||||
void setResultEditable(bool value);
|
void setResultEditable(bool value);
|
||||||
bool resultIsEditable();
|
bool resultIsEditable();
|
||||||
|
void setSaveToFileVisible(bool value);
|
||||||
|
bool saveToFileIsVisible();
|
||||||
|
void setPrintToPdfVisible(bool value);
|
||||||
|
bool printToPdfIsVisible();
|
||||||
|
void setPrintVisible(bool value);
|
||||||
|
bool printIsVisible();
|
||||||
bool isBusy();
|
bool isBusy();
|
||||||
void setPassPharse(QString& passPharse);
|
void setPassPharse(QString& passPharse);
|
||||||
QList<QLocale::Language> aviableLanguages();
|
QList<QLocale::Language> aviableLanguages();
|
||||||
|
@ -216,6 +216,12 @@ public:
|
|||||||
bool isBusy();
|
bool isBusy();
|
||||||
bool resultIsEditable() const;
|
bool resultIsEditable() const;
|
||||||
void setResultEditable(bool value);
|
void setResultEditable(bool value);
|
||||||
|
bool saveToFileIsVisible() const;
|
||||||
|
void setSaveToFileVisible(bool value);
|
||||||
|
bool printToPdfIsVisible() const;
|
||||||
|
void setPrintToPdfVisible(bool value);
|
||||||
|
bool printIsVisible() const;
|
||||||
|
void setPrintVisible(bool value);
|
||||||
|
|
||||||
void setPassPhrase(const QString &passPhrase);
|
void setPassPhrase(const QString &passPhrase);
|
||||||
bool addTranslationLanguage(QLocale::Language language);
|
bool addTranslationLanguage(QLocale::Language language);
|
||||||
@ -325,6 +331,9 @@ private:
|
|||||||
QColor m_previewPageBackgroundColor;
|
QColor m_previewPageBackgroundColor;
|
||||||
QVector<WatermarkSetting> m_watermarks;
|
QVector<WatermarkSetting> m_watermarks;
|
||||||
BaseDesignIntf *createWatermark(PageDesignIntf *page, WatermarkSetting watermarkSetting);
|
BaseDesignIntf *createWatermark(PageDesignIntf *page, WatermarkSetting watermarkSetting);
|
||||||
|
bool m_saveToFileVisible;
|
||||||
|
bool m_printToPdfVisible;
|
||||||
|
bool m_printVisible;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user