mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-24 12:34:39 +03:00
Add printedToPDF signal for digitally signing saved pdfs.
This commit is contained in:
parent
d344264bfb
commit
79baeef72c
@ -200,6 +200,7 @@ void PreviewReportWidget::printToPDF()
|
|||||||
foreach(PageItemDesignIntf::Ptr pageItem, d_ptr->m_reportPages){
|
foreach(PageItemDesignIntf::Ptr pageItem, d_ptr->m_reportPages){
|
||||||
d_ptr->m_previewPage->reactivatePageItem(pageItem);
|
d_ptr->m_previewPage->reactivatePageItem(pageItem);
|
||||||
}
|
}
|
||||||
|
d_ptr->m_report->emitPrintedToPDF(fileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -484,7 +484,9 @@ bool ReportEnginePrivate::printToPDF(const QString &fileName)
|
|||||||
QPrinter printer;
|
QPrinter printer;
|
||||||
printer.setOutputFileName(fn);
|
printer.setOutputFileName(fn);
|
||||||
printer.setOutputFormat(QPrinter::PdfFormat);
|
printer.setOutputFormat(QPrinter::PdfFormat);
|
||||||
return printReport(&printer);
|
bool success = printReport(&printer);
|
||||||
|
if(success) emitPrintedToPDF(fileName);
|
||||||
|
return success;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -600,6 +602,11 @@ void ReportEnginePrivate::emitSaveFinished()
|
|||||||
emit saveFinished();
|
emit saveFinished();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ReportEnginePrivate::emitPrintedToPDF(QString fileName)
|
||||||
|
{
|
||||||
|
emit printedToPDF(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
bool ReportEnginePrivate::isSaved()
|
bool ReportEnginePrivate::isSaved()
|
||||||
{
|
{
|
||||||
foreach (PageDesignIntf* page, m_pages) {
|
foreach (PageDesignIntf* page, m_pages) {
|
||||||
@ -1139,6 +1146,7 @@ ReportEngine::ReportEngine(QObject *parent)
|
|||||||
connect(d, SIGNAL(onLoad(bool&)), this, SIGNAL(onLoad(bool&)));
|
connect(d, SIGNAL(onLoad(bool&)), this, SIGNAL(onLoad(bool&)));
|
||||||
connect(d, SIGNAL(saveFinished()), this, SIGNAL(saveFinished()));
|
connect(d, SIGNAL(saveFinished()), this, SIGNAL(saveFinished()));
|
||||||
connect(d, SIGNAL(loaded()), this, SIGNAL(loaded()));
|
connect(d, SIGNAL(loaded()), this, SIGNAL(loaded()));
|
||||||
|
connect(d, SIGNAL(printedToPDF(QString)), this, SIGNAL(printedToPDF(QString)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ReportEngine::~ReportEngine()
|
ReportEngine::~ReportEngine()
|
||||||
|
@ -121,6 +121,7 @@ signals:
|
|||||||
void onSave();
|
void onSave();
|
||||||
void saveFinished();
|
void saveFinished();
|
||||||
void loaded();
|
void loaded();
|
||||||
|
void printedToPDF(QString fileName);
|
||||||
public slots:
|
public slots:
|
||||||
void cancelRender();
|
void cancelRender();
|
||||||
protected:
|
protected:
|
||||||
|
@ -147,6 +147,7 @@ public:
|
|||||||
void emitSaveReport();
|
void emitSaveReport();
|
||||||
bool emitLoadReport();
|
bool emitLoadReport();
|
||||||
void emitSaveFinished();
|
void emitSaveFinished();
|
||||||
|
void emitPrintedToPDF(QString fileName);
|
||||||
bool isSaved();
|
bool isSaved();
|
||||||
void setCurrentReportsDir(const QString& dirName);
|
void setCurrentReportsDir(const QString& dirName);
|
||||||
QString currentReportsDir(){ return m_reportsDir;}
|
QString currentReportsDir(){ return m_reportsDir;}
|
||||||
@ -190,6 +191,7 @@ signals:
|
|||||||
void onSave();
|
void onSave();
|
||||||
void saveFinished();
|
void saveFinished();
|
||||||
void loaded();
|
void loaded();
|
||||||
|
void printedToPDF(QString fileName);
|
||||||
public slots:
|
public slots:
|
||||||
bool slotLoadFromFile(const QString& fileName);
|
bool slotLoadFromFile(const QString& fileName);
|
||||||
void cancelRender();
|
void cancelRender();
|
||||||
|
Loading…
Reference in New Issue
Block a user