12 #include "config-messageviewer.h"
13 #include "messageviewer/viewerplugininterface.h"
14 #include "messageviewer_export.h"
15 #include <MimeTreeParser/Enums>
17 #include <KMime/Message>
28 namespace KIdentityManagement
30 class IdentityManager;
43 namespace WebEngineViewer
45 class WebHitTestResult;
48 namespace MessageViewer
50 class WebHitTestResult;
53 class AttachmentStrategy;
54 class HeaderStylePlugin;
58 class RemoteContentMenu;
59 class MDNWarningWidget;
86 class AbstractMessageLoadedHandlerPrivate;
87 std::unique_ptr<AbstractMessageLoadedHandlerPrivate>
const d;
121 enum DisplayFormatMessage { UseGlobalSetting = 0, Text = 1, Html = 2, Unknown = 3, ICal = 4 };
123 enum AttachmentAction { Open = 1, OpenWith,
View, Save, Properties, Delete, Copy, ScrollTo, ReplyMessageToAuthor, ReplyMessageToAll };
125 enum ResourceOnlineMode { AllResources = 0, SelectedResource = 1 };
140 void setMessageItem(
const Akonadi::Item &item, MimeTreeParser::UpdateMode updateMode = MimeTreeParser::Delayed);
145 Q_REQUIRED_RESULT
QString messagePath()
const;
150 void setMessagePath(
const QString &path);
163 void clear(MimeTreeParser::UpdateMode updateMode = MimeTreeParser::Delayed);
165 void update(MimeTreeParser::UpdateMode updateMode = MimeTreeParser::Delayed);
180 Q_REQUIRED_RESULT Viewer::DisplayFormatMessage displayFormatMessageOverwrite()
const;
183 void setDisplayFormatMessageOverwrite(Viewer::DisplayFormatMessage format);
186 bool htmlLoadExtOverride()
const;
193 void setHtmlLoadExtDefault(
bool loadExtDefault);
200 void setHtmlLoadExtOverride(
bool loadExtOverride);
203 Q_REQUIRED_RESULT
bool htmlMail()
const;
206 Q_REQUIRED_RESULT
bool htmlLoadExternal()
const;
217 void enableMessageDisplay();
222 Q_REQUIRED_RESULT
bool isFixedFont()
const;
223 void setUseFixedFont(
bool useFixedFont);
225 Q_REQUIRED_RESULT
QWidget *mainWindow();
228 void setDecryptMessageOverwrite(
bool overwrite =
true);
232 void deleteMessage();
237 Q_REQUIRED_RESULT
QString overrideEncoding()
const;
238 void setOverrideEncoding(
const QString &encoding);
239 Q_REQUIRED_RESULT
CSSHelper *cssHelper()
const;
240 void setPrinting(
bool enable);
243 void copySelectionToClipboard();
245 void setZoomFactor(qreal zoomFactor);
247 Q_REQUIRED_RESULT
KToggleAction *toggleFixFontAction()
const;
249 Q_REQUIRED_RESULT
KToggleAction *toggleMimePartTreeAction()
const;
251 Q_REQUIRED_RESULT
QAction *selectAllAction()
const;
252 Q_REQUIRED_RESULT
QAction *copyURLAction()
const;
253 Q_REQUIRED_RESULT
QAction *copyAction()
const;
254 Q_REQUIRED_RESULT
QAction *urlOpenAction()
const;
255 Q_REQUIRED_RESULT
QAction *speakTextAction()
const;
256 Q_REQUIRED_RESULT
QAction *copyImageLocation()
const;
257 Q_REQUIRED_RESULT
QAction *viewSourceAction()
const;
258 Q_REQUIRED_RESULT
QAction *findInMessageAction()
const;
259 Q_REQUIRED_RESULT
QAction *saveAsAction()
const;
260 Q_REQUIRED_RESULT
QAction *saveMessageDisplayFormatAction()
const;
261 Q_REQUIRED_RESULT
QAction *resetMessageDisplayFormatAction()
const;
262 Q_REQUIRED_RESULT
QAction *shareTextAction()
const;
264 Q_REQUIRED_RESULT
QAction *developmentToolsAction()
const;
265 Q_REQUIRED_RESULT
KToggleAction *disableEmoticonAction()
const;
266 Q_REQUIRED_RESULT
KActionMenu *shareServiceUrlMenu()
const;
272 void setPluginName(
const QString &pluginName);
274 void writeConfig(
bool withSync =
true);
276 Q_REQUIRED_RESULT
QUrl urlClicked()
const;
277 Q_REQUIRED_RESULT
QUrl imageUrlClicked()
const;
304 Q_REQUIRED_RESULT
QString selectedText()
const;
306 void saveMainFrameScreenshotInFile(
const QString &filename);
307 bool mimePartTreeIsEmpty()
const;
309 void showOpenAttachmentFolderWidget(
const QList<QUrl> &urls);
313 void runJavaScript(
const QString &code);
314 void setPrintElementBackground(
bool printElementBackground);
316 Q_REQUIRED_RESULT
bool printingMode()
const;
318 Q_REQUIRED_RESULT
bool showSignatureDetails()
const;
319 void setShowSignatureDetails(
bool showDetails);
321 Q_REQUIRED_RESULT qreal webViewZoomFactor()
const;
322 void setWebViewZoomFactor(qreal factor);
324 Q_REQUIRED_RESULT
bool showEncryptionDetails()
const;
325 void setShowEncryptionDetails(
bool showDetails);
327 void hasMultiMessages(
bool messages);
328 void updateShowMultiMessagesButton(
bool enablePreviousButton,
bool enableNextButton);
331 void exportToPdf(
const QString &fileName);
333 void showDevelopmentTools();
336 void setFolderIdentity(uint folderIdentity);
339 void moveMessageToTrash();
340 void pageIsScrolledToBottom(
bool);
357 void requestConfigSync();
372 void makeResourceOnline(MessageViewer::Viewer::ResourceOnlineMode mode);
374 void printingFinished();
375 void zoomChanged(qreal zoomFactor);
376 void showNextMessage();
377 void showPreviousMessage();
381 void slotGeneralPaletteChanged();
392 void slotScrollDown();
393 void slotScrollPrior();
394 void slotScrollNext();
397 void slotSaveMessage();
398 void slotAttachmentSaveAs();
399 void slotAttachmentSaveAll();
400 void slotShowMessageSource();
403 void slotZoomReset();
404 void slotChangeDisplayMail(Viewer::DisplayFormatMessage,
bool);
411 Q_REQUIRED_RESULT
bool event(
QEvent *e)
override;
412 void changeEvent(
QEvent *event)
override;
414 ViewerPrivate *
const d_ptr;