12 #include "messageviewer/viewerplugininterface.h"
13 #include "messageviewer_export.h"
14 #include <MimeTreeParser/Enums>
17 #include <KMime/Message>
18 #include <MessageViewer/MDNWarningWidget>
29 namespace KIdentityManagementCore
31 class IdentityManager;
44 namespace WebEngineViewer
46 class WebHitTestResult;
49 namespace MessageViewer
51 class WebHitTestResult;
54 class AttachmentStrategy;
55 class HeaderStylePlugin;
59 class RemoteContentMenu;
60 class MDNWarningWidget;
87 class AbstractMessageLoadedHandlerPrivate;
88 std::unique_ptr<AbstractMessageLoadedHandlerPrivate>
const d;
122 enum DisplayFormatMessage {
123 UseGlobalSetting = 0,
130 enum AttachmentAction {
139 ReplyMessageToAuthor,
143 enum ResourceOnlineMode {
145 SelectedResource = 1,
161 void setMessageItem(
const Akonadi::Item &item, MimeTreeParser::UpdateMode updateMode = MimeTreeParser::Delayed);
166 [[nodiscard]]
QString messagePath()
const;
171 void setMessagePath(
const QString &path);
184 void clear(MimeTreeParser::UpdateMode updateMode = MimeTreeParser::Delayed);
186 void update(MimeTreeParser::UpdateMode updateMode = MimeTreeParser::Delayed);
201 [[nodiscard]] Viewer::DisplayFormatMessage displayFormatMessageOverwrite()
const;
204 void setDisplayFormatMessageOverwrite(Viewer::DisplayFormatMessage format);
207 bool htmlLoadExtOverride()
const;
214 void setHtmlLoadExtDefault(
bool loadExtDefault);
221 void setHtmlLoadExtOverride(
bool loadExtOverride);
224 [[nodiscard]]
bool htmlMail()
const;
227 [[nodiscard]]
bool htmlLoadExternal()
const;
238 void enableMessageDisplay();
243 [[nodiscard]]
bool isFixedFont()
const;
244 void setUseFixedFont(
bool useFixedFont);
246 [[nodiscard]]
QWidget *mainWindow();
249 void setDecryptMessageOverwrite(
bool overwrite =
true);
253 void deleteMessage();
258 [[nodiscard]]
QString overrideEncoding()
const;
259 void setOverrideEncoding(
const QString &encoding);
260 [[nodiscard]]
CSSHelper *cssHelper()
const;
261 void setPrinting(
bool enable);
264 void copySelectionToClipboard();
266 void setZoomFactor(qreal zoomFactor);
270 [[nodiscard]]
KToggleAction *toggleMimePartTreeAction()
const;
272 [[nodiscard]]
QAction *selectAllAction()
const;
273 [[nodiscard]]
QAction *copyURLAction()
const;
274 [[nodiscard]]
QAction *copyAction()
const;
275 [[nodiscard]]
QAction *urlOpenAction()
const;
276 [[nodiscard]]
QAction *speakTextAction()
const;
277 [[nodiscard]]
QAction *copyImageLocation()
const;
278 [[nodiscard]]
QAction *viewSourceAction()
const;
279 [[nodiscard]]
QAction *findInMessageAction()
const;
280 [[nodiscard]]
QAction *saveAsAction()
const;
281 [[nodiscard]]
QAction *saveMessageDisplayFormatAction()
const;
282 [[nodiscard]]
QAction *resetMessageDisplayFormatAction()
const;
283 [[nodiscard]]
QAction *shareTextAction()
const;
285 [[nodiscard]]
QAction *developmentToolsAction()
const;
287 [[nodiscard]]
KActionMenu *shareServiceUrlMenu()
const;
293 void setPluginName(
const QString &pluginName);
295 void writeConfig(
bool withSync =
true);
297 [[nodiscard]]
QUrl urlClicked()
const;
298 [[nodiscard]]
QUrl imageUrlClicked()
const;
325 [[nodiscard]]
QString selectedText()
const;
327 void saveMainFrameScreenshotInFile(
const QString &filename);
328 bool mimePartTreeIsEmpty()
const;
330 void showOpenAttachmentFolderWidget(
const QList<QUrl> &urls);
334 void runJavaScript(
const QString &code);
335 void setPrintElementBackground(
bool printElementBackground);
337 [[nodiscard]]
bool printingMode()
const;
339 [[nodiscard]]
bool showSignatureDetails()
const;
340 void setShowSignatureDetails(
bool showDetails);
342 [[nodiscard]] qreal webViewZoomFactor()
const;
343 void setWebViewZoomFactor(qreal factor);
345 [[nodiscard]]
bool showEncryptionDetails()
const;
346 void setShowEncryptionDetails(
bool showDetails);
348 void hasMultiMessages(
bool messages);
349 void updateShowMultiMessagesButton(
bool enablePreviousButton,
bool enableNextButton);
352 void exportToPdf(
const QString &fileName);
354 void showDevelopmentTools();
357 void setFolderIdentity(uint folderIdentity);
359 void mdnWarningAnimatedHide();
361 void moveMessageToTrash();
362 void pageIsScrolledToBottom(
bool);
379 void requestConfigSync();
394 void makeResourceOnline(MessageViewer::Viewer::ResourceOnlineMode mode);
396 void printingFinished();
397 void zoomChanged(qreal zoomFactor);
398 void showNextMessage();
399 void showPreviousMessage();
400 void sendResponse(MessageViewer::MDNWarningWidget::ResponseType type, KMime::MDN::SendingMode sendingMode);
404 void slotGeneralPaletteChanged();
415 void slotScrollDown();
416 void slotScrollPrior();
417 void slotScrollNext();
420 void slotSaveMessage();
421 void slotAttachmentSaveAs();
422 void slotAttachmentSaveAll();
423 void slotShowMessageSource();
426 void slotZoomReset();
427 void slotChangeDisplayMail(Viewer::DisplayFormatMessage,
bool);
434 [[nodiscard]]
bool event(
QEvent *e)
override;
435 void changeEvent(
QEvent *event)
override;
437 ViewerPrivate *
const d_ptr;