Commit 1c62b2e9 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

implement export to pdf

parent 2882e04a
......@@ -3591,6 +3591,11 @@ void KMMainWidget::setupActions()
mRestartAccountSettings = new QAction(QIcon::fromTheme(QStringLiteral("view-refresh")), i18n("Restart Account"), this);
actionCollection()->addAction(QStringLiteral("resource_restart"), mRestartAccountSettings);
connect(mRestartAccountSettings, &QAction::triggered, this, &KMMainWidget::slotRestartAccount);
mExportToPdfAction = new QAction(QIcon::fromTheme(QStringLiteral("application-pdf")), i18n("Export to Pdf..."), this);
actionCollection()->addAction(QStringLiteral("file_export_pdf"), mExportToPdfAction);
connect(mSaveAsAction, &QAction::triggered, this, &KMMainWidget::slotExportToPdf);
}
void KMMainWidget::slotAddFavoriteFolder()
......@@ -4362,6 +4367,14 @@ KActionMenu *KMMainWidget::mailingListActionMenu() const
return mMsgActions->mailingListActionMenu();
}
void KMMainWidget::slotExportToPdf()
{
if (mMsgView) {
//TODO
mMsgView->viewer()->exportToPdf(QString());
}
}
QAction *KMMainWidget::sendQueuedAction() const
{
return mSendQueued;
......
......@@ -188,6 +188,7 @@ public:
QWidget *zoomLabelIndicator() const;
void clearPluginActions();
public Q_SLOTS:
/**
......@@ -226,6 +227,9 @@ private:
KActionMenu *mailingListActionMenu() const;
void slotExportToPdf();
// Moving messages around
/**
* This will ask for a destination folder and move the currently selected
......@@ -593,6 +597,7 @@ private:
QAction *mShowFolderShortcutDialogAction = nullptr;
QAction *mArchiveFolderAction = nullptr;
QAction *mMessageNewList = nullptr;
QAction *mExportToPdfAction = nullptr;
KToggleAction *mPreferHtmlLoadExtAction = nullptr;
QTimer *menutimer = nullptr;
......
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