Commit a0e77a07 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Allow to export mail as pdf

parent c8b6e0e3
......@@ -758,4 +758,10 @@ MessageViewer::DKIMWidgetInfo *Viewer::dkimWidgetInfo()
Q_D(Viewer);
return d->mDkimWidgetInfo;
}
void Viewer::exportToPdf(const QString &fileName)
{
Q_D(Viewer);
d->exportToPdf(fileName);
}
}
......@@ -348,6 +348,8 @@ public:
void updateShowMultiMessagesButton(bool enablePreviousButton, bool enableNextButton);
MessageViewer::DKIMWidgetInfo *dkimWidgetInfo();
void exportToPdf(const QString &fileName);
Q_SIGNALS:
void moveMessageToTrash();
void pageIsScrolledToBottom(bool);
......
......@@ -2309,13 +2309,13 @@ void ViewerPrivate::slotDelayPrintPreview()
dialog->open(this, SIGNAL(printingFinished()));
}
void ViewerPrivate::slotExportToPdf()
void ViewerPrivate::exportToPdf(const QString &fileName)
{
WebEngineViewer::WebEngineExportPdfPageJob *job
= new WebEngineViewer::WebEngineExportPdfPageJob(this);
job->setEngineView(mViewer);
job->setPdfPath(fileName);
job->start();
//TODO
}
void ViewerPrivate::slotOpenInBrowser()
......
......@@ -279,6 +279,8 @@ public:
void saveMainFrameScreenshotInFile(const QString &filename);
void exportToPdf(const QString &fileName);
private:
/** HTML initialization. */
void initHtmlWidget();
......@@ -471,7 +473,6 @@ private Q_SLOTS:
void slotExportHtmlPageSuccess(const QString &filename);
void slotHandlePagePrinted(bool result);
void slotToggleEmoticons();
void slotExportToPdf();
public Q_SLOTS:
/** An URL has been activate with a click. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment