1 /*
2   This file is part of KMail, the KDE mail client.
3   SPDX-FileCopyrightText: 2002 Don Sanders <sanders@kde.org>
4 
5   Based on the work of Stefan Taferner <taferner@kde.org>
6 
7   SPDX-License-Identifier: GPL-2.0-only
8 */
9 
10 #pragma once
11 
12 #include "kmail_export.h"
13 #include "kmkernel.h" // for access to config
14 #include "kmreaderwin.h" //for inline actions
15 
16 #include <MailCommon/FolderTreeWidget>
17 
18 #include "messageactions.h"
19 #include <Akonadi/KMime/StandardMailActionManager>
20 #include <Akonadi/Tag>
21 #include <KActionCollection>
22 #include <KXMLGUIClient>
23 #include <MailCommon/FolderSettings>
24 #include <MessageList/View>
25 #include <QPointer>
26 #include <QTimer>
27 
28 #ifdef WITH_KUSERFEEDBACK
29 namespace KUserFeedback
30 {
31 class NotificationPopup;
32 }
33 #endif
34 
35 namespace MailTransport
36 {
37 class Transport;
38 }
39 namespace Akonadi
40 {
41 class Tag;
42 }
43 
44 namespace KMime
45 {
46 class Message;
47 }
48 class QUrl;
49 class QVBoxLayout;
50 class QSplitter;
51 class KMLaunchExternalComponent;
52 class DisplayMessageFormatActionMenu;
53 class QAction;
54 class KActionMenu;
55 class KToggleAction;
56 class KMMetaFilterActionCommand;
57 class CollectionPane;
58 class KMCommand;
59 class KMMoveCommand;
60 class KMTrashMsgCommand;
61 class KRecentFilesMenu;
62 class ManageShowCollectionProperties;
63 class KActionMenuTransport;
64 class KActionMenuAccount;
65 class ZoomLabelWidget;
66 
67 namespace KIO
68 {
69 class Job;
70 }
71 
72 namespace KMail
73 {
74 class SearchWindow;
75 class VacationScriptIndicatorWidget;
76 class TagActionManager;
77 class FolderShortcutActionManager;
78 }
79 
80 namespace KSieveUi
81 {
82 class SieveImapPasswordProvider;
83 class ManageSieveScriptsDialog;
84 class VacationManager;
85 }
86 namespace MailCommon
87 {
88 class FolderSelectionDialog;
89 class FavoriteCollectionWidget;
90 class MailFilter;
91 }
92 class QStatusBar;
93 class KMailPluginCheckBeforeDeletingManagerInterface;
94 class CollectionSwitcherTreeViewManager;
95 class KMAIL_EXPORT KMMainWidget : public QWidget
96 {
97     Q_OBJECT
98 
99 public:
100     KMMainWidget(QWidget *parent,
101                  KXMLGUIClient *aGUIClient,
102                  KActionCollection *actionCollection,
103                  const KSharedConfig::Ptr &config = KMKernel::self()->config());
104     ~KMMainWidget() override;
105     void destruct();
106 
107     /** Read configuration options before widgets are created. */
108     void readPreConfig();
109 
110     /** Read configuration for current folder. */
111     void readFolderConfig();
112 
113     /** Write configuration for current folder. */
114     void writeFolderConfig();
115 
116     /** Read configuration options after widgets are created. */
117     void readConfig();
118 
119     /** Write configuration options. */
120     void writeConfig(bool force = true);
121 
122     void writeReaderConfig();
123 
124     /** Easy access to main components of the window. */
125     Q_REQUIRED_RESULT KMReaderWin *messageView() const;
126     /** Access to the header list pane. */
127     CollectionPane *messageListPane() const;
128 
129     Q_REQUIRED_RESULT Akonadi::Collection currentCollection() const;
130     Q_REQUIRED_RESULT QSharedPointer<MailCommon::FolderSettings> currentFolder() const;
131 
132     static void cleanup();
133     QAction *action(const QString &name);
134 
135     QAction *sendQueuedAction() const;
136 
137     KActionMenuTransport *sendQueueViaMenu() const;
138 
139     /**
140       Returns a list of all KMMainWidgets. Warning, the list itself can be 0.
141       @return the list of all main widgets, or 0 if it is not yet initialized
142     */
143     static const KMMainWidget *mainWidgetList();
144 
145     QWidget *vacationScriptIndicator() const;
146     Q_REQUIRED_RESULT QWidget *dkimWidgetInfo() const;
147     MailCommon::FolderTreeView *folderTreeView() const;
148 
149     /** Returns the XML GUI client. */
150     KXMLGUIClient *guiClient() const;
151 
152     KMail::TagActionManager *tagActionManager() const;
153 
154     KMail::FolderShortcutActionManager *folderShortcutActionManager() const;
155     void savePaneSelection();
156 
157     void updatePaneTagComboBox();
158 
159     void addRecentFile(const QUrl &mUrl);
160     void updateQuickSearchLineText();
161 
162     void populateMessageListStatusFilterCombo();
163     void initializePluginActions();
164 
165     Q_REQUIRED_RESULT Akonadi::Item::List currentSelection() const;
166 
167     Q_REQUIRED_RESULT QString fullCollectionPath() const;
168 
169     void initializeFilterActions(bool clearFilter);
170     /** Clear and create actions for marked filters */
171     void clearFilterActions();
172     /**
173      * Convenience function to get the action collection in a list.
174      *
175      * @return a list of action collections. The list only has one item, and
176      *         that is the action collection of this main widget as returned
177      *         by actionCollection().
178      */
179     Q_REQUIRED_RESULT QList<KActionCollection *> actionCollections() const;
180     void refreshMessageListSelection();
181     Akonadi::StandardMailActionManager *standardMailActionManager() const;
182     QAction *akonadiStandardAction(Akonadi::StandardActionManager::Type type);
183     QAction *akonadiStandardAction(Akonadi::StandardMailActionManager::Type type);
184     Q_REQUIRED_RESULT QWidget *zoomLabelIndicator() const;
185 
186     void clearPluginActions();
187 
188     void replyMessageTo(const Akonadi::Item &item, bool replyToAll);
189 public Q_SLOTS:
190 
191     /**
192       Open a separate viewer window containing the specified message.
193     */
194     void slotMessageActivated(const Akonadi::Item &);
195 
196     /**
197       Opens mail in the internal viewer.
198     */
199     void slotMessageSelected(const Akonadi::Item &);
200 
201     void slotItemsFetchedForActivation(KMCommand *command);
202     void slotMessageStatusChangeRequest(const Akonadi::Item &, const Akonadi::MessageStatus &, const Akonadi::MessageStatus &);
203 
204     /** Adds if not existing/removes if existing the tag identified by @p aLabel
205         in all selected messages */
206     void slotUpdateMessageTagList(const Akonadi::Tag &tag);
207 
208     void slotSelectCollectionFolder(const Akonadi::Collection &col);
209 
210     void slotUpdateConfig();
211 Q_SIGNALS:
212     void captionChangeRequest(const QString &caption);
213     void recreateGui();
214 
215 protected:
216     void showEvent(QShowEvent *event) override;
217 
218 private:
219     void assignLoadExternalReference();
220     KMail::MessageActions *messageActions() const;
221 
222     KActionMenu *filterMenu() const;
223 
224     KActionMenu *mailingListActionMenu() const;
225 
226     // Moving messages around
227     /**
228      * This will ask for a destination folder and move the currently selected
229      * messages (in MessageListView) into it.
230      */
231     void slotMoveSelectedMessageToFolder();
232 
233     // Copying messages around
234 
235     /**
236      * This will ask for a destination folder and copy the currently selected
237      * messages (in MessageListView) into it.
238      */
239     void slotCopySelectedMessagesToFolder();
240     /**
241      * Implements the "move to trash" action
242      */
243     void slotTrashSelectedMessages();
244 
245     void slotCheckMail();
246     void slotCheckMailOnStartup();
247 
248     /** Trigger the dialog for editing out-of-office scripts.  */
249     void slotEditVacation(const QString &serverName);
250 
251     void slotStartCheckMail();
252     void slotEndCheckMail();
253     void restoreCollectionFolderViewConfig();
254     /** Update message actions */
255     void updateMessageActions(bool fast = false);
256     void updateMessageActionsDelayed();
257     /**
258       Update message menu
259     */
260     void updateMessageMenu();
261 
262     void slotRemoveDuplicates();
263 
264     /**
265       Start a timer to update message actions
266     */
267     void startUpdateMessageActionsTimer();
268     void slotSelectMoreMessageTagList();
269     void setupActions();
270     void createWidgets();
271     void deleteWidgets();
272     void layoutSplitters();
273     void newFromTemplate(const Akonadi::Item &);
274     void moveSelectedMessagesToFolder(const Akonadi::Collection &dest);
275     void copySelectedMessagesToFolder(const Akonadi::Collection &dest);
276     KActionCollection *actionCollection() const;
277     /**
278       @return the correct config dialog depending on whether the parent of
279       the mainWidget is a KPart or a KMMainWindow.
280       When dealing with geometries, use this pointer
281     */
282     Q_REQUIRED_RESULT KSharedConfig::Ptr config();
283 
284     void checkAkonadiServerManagerState();
285     void updateHtmlMenuEntry();
286 
287     void updateMoveAction(const Akonadi::CollectionStatistics &statistic);
288     void updateMoveAction(bool hasUnreadMails);
289 
290     void updateAllToTrashAction(qint64 statistics);
291 
292     /** Get override character encoding. */
293     Q_REQUIRED_RESULT QString overrideEncoding() const;
294 
295     void moveMessageSelected(MessageList::Core::MessageItemSetReference ref, const Akonadi::Collection &dest, bool confirmOnDeletion = true);
296 
297     void copyMessageSelected(const Akonadi::Item::List &selectMsg, const Akonadi::Collection &dest);
298 
299     /**
300      * Move the messages referenced by the specified set to trash.
301      * The set parameter must not be null and the ownership is passed
302      * to this function.
303      */
304     void trashMessageSelected(MessageList::Core::MessageItemSetReference ref);
305     /**
306      * Set the status of the messages referenced by the specified set, eventually toggling it.
307      * The set parameter must not be null and the ownership is passed to this function.
308      */
309     void setMessageSetStatus(const Akonadi::Item::List &select, Akonadi::MessageStatus status, bool toggle);
310     /**
311      * Toggles a tag for the messages referenced by the specified set.
312      * The set parameter must not be null and the ownership is passed to this function.
313      */
314     void toggleMessageSetTag(const Akonadi::Item::List &select, const Akonadi::Tag &tag);
315     /**
316      * This applies setMessageSetStatus() on the current thread.
317      */
318     void setCurrentThreadStatus(Akonadi::MessageStatus status, bool toggle);
319 
320     void applyFilters(const Akonadi::Item::List &selectedMessages);
321     void applyFilters(const Akonadi::Collection::List &selectedCols);
322     void applyFilter(const Akonadi::Collection::List &selectedCols, const QString &filter);
323 
324     /**
325      * Internal helper that creates the folder selection dialog used for the
326      * move and copy to folder actions on demand. Only folders where items can
327      * be added are listed.
328      */
329     MailCommon::FolderSelectionDialog *moveOrCopyToDialog();
330 
331     /**
332      * Internal helper that creates the folder selection dialog used for
333      * jumping to folders, or adding them as favourites. All folders are listed.
334      */
335     MailCommon::FolderSelectionDialog *selectFromAllFoldersDialog();
336 
337     /**
338      * Internal helper that applies the current settings so the
339      * favorite folder view.
340      */
341     void refreshFavoriteFoldersViewProperties();
342 
343     void openFilterDialog(const QByteArray &field, const QString &value);
344 
345     void showMessagePopup(const Akonadi::Item &msg,
346                           const QUrl &aUrl,
347                           const QUrl &imageUrl,
348                           const QPoint &aPoint,
349                           bool contactAlreadyExists,
350                           bool uniqueContactFound,
351                           const WebEngineViewer::WebHitTestResult &result);
352 
353     void setZoomChanged(qreal zoomFactor);
354 
355 private Q_SLOTS:
356     void updateFileMenu();
357     void slotFilter();
358     void slotManageSieveScripts();
359     void slotCompose();
360     void slotPostToML();
361     void slotExpireFolder();
362     void slotExpireAll();
363     void slotArchiveFolder();
364     void slotRemoveFolder();
365     void slotEmptyFolder();
366     void slotClearCurrentFolder();
367     void slotAddFavoriteFolder();
368     void slotShowSelectedFolderInPane();
369     void slotOverrideHtmlLoadExt();
370     void slotUseTemplate();
371     void slotTrashThread();
372     void slotDeleteThread(bool confirmDelete); // completely delete thread
373     void slotUndo();
374     void slotReadOn();
375     void slotSaveMsg();
376     void slotOpenMsg();
377     void slotSaveAttachments();
378     void slotJumpToFolder();
379     void slotCheckVacation();
380     void slotDebugSieve();
381     void slotApplyFilters();
382     void slotApplyFiltersOnFolder(bool recursive);
383     void slotApplyFilterOnFolder(bool recursive);
384     void slotExpandThread();
385     void slotExpandAllThreads();
386     void slotCollapseThread();
387     void slotCollapseAllThreads();
388     void slotSetThreadStatusUnread();
389     void slotSetThreadStatusRead();
390     void slotSetThreadStatusImportant();
391     void slotSetThreadStatusToAct();
392     void slotSetThreadStatusWatched();
393     void slotSetThreadStatusIgnored();
394     void slotSendQueued();
395     void slotSendQueuedVia(MailTransport::Transport *transport);
396     void slotOnlineStatus();
397     void slotUpdateOnlineStatus(KMailSettings::EnumNetworkState::type);
398     void slotMessagePopup(const Akonadi::Item &aMsg, const WebEngineViewer::WebHitTestResult &result, const QPoint &aPoint);
399     void slotContactSearchJobForMessagePopupDone(KJob *job);
400     void slotSelectAllMessages();
401     void slotFocusQuickSearch();
402 
403     void slotIntro();
404     void slotShowStartupFolder();
405     void slotCopyDecryptedTo(QAction *action);
406 
407     /** Message navigation */
408     void slotSelectNextMessage();
409     void slotExtendSelectionToNextMessage();
410     void slotSelectNextUnreadMessage();
411     void slotSelectPreviousMessage();
412     void slotExtendSelectionToPreviousMessage();
413     void slotSelectPreviousUnreadMessage();
414     void slotFocusOnNextMessage();
415     void slotFocusOnPrevMessage();
416     void slotSelectFirstMessage();
417     void slotSelectLastMessage();
418     void slotSelectFocusedMessage();
419 
420     void slotNextUnreadFolder();
421     void slotPrevUnreadFolder();
422 
423     /** etc. */
424     void slotDisplayCurrentMessage();
425 
426     void slotShowNewFromTemplate();
427     void slotDelayedShowNewFromTemplate(KJob *);
428     void slotNewFromTemplate(QAction *);
429 
430     /** Update the undo action */
431     void slotUpdateUndo();
432 
433     /** Update html and threaded messages preferences in Folder menu. */
434     void updateFolderMenu();
435 
436     /** Settings menu */
437 
438     /** XML-GUI stuff */
439     void slotEditNotifications();
440 
441     /** Slot to reply to a message */
442     void slotCustomReplyToMsg(const QString &tmpl);
443     void slotCustomReplyAllToMsg(const QString &tmpl);
444     void slotForwardInlineMsg();
445     void slotForwardAttachedMessage();
446     void slotRedirectMessage();
447     void slotNewMessageToRecipients();
448     void slotCustomForwardMsg(const QString &tmpl);
449     void slotSubjectFilter();
450     void slotFromFilter();
451     void slotToFilter();
452 
453     void slotConfigChanged();
454 
455     /** Show a splash screen for the longer-lasting operation */
456     void slotShowBusySplash();
457 
458     /**
459       Show a message screen explaining that we are currently offline, when
460       an online folder is selected.
461     */
462     void showOfflinePage();
463     void showResourceOfflinePage();
464     void updateVacationScriptStatus(bool active, const QString &serverName = QString());
465 
466     void slotItemAdded(const Akonadi::Item &, const Akonadi::Collection &col);
467     void slotItemRemoved(const Akonadi::Item &);
468     void slotItemMoved(const Akonadi::Item &item, const Akonadi::Collection &from, const Akonadi::Collection &to);
469     void slotCollectionStatisticsChanged(Akonadi::Collection::Id, const Akonadi::CollectionStatistics &);
470 
471     void slotAkonadiStandardActionUpdated();
472     void slotCollectionChanged(const Akonadi::Collection &, const QSet<QByteArray> &);
473     void slotCreateNewTab(bool);
474     void slotUpdateActionsAfterMailChecking();
475     void slotCreateAddressBookContact();
476     void slotOpenRecentMessage(const QUrl &url);
477 
478     void slotMoveMessageToTrash();
479     /**
480      * Called when a "move to trash" operation is completed
481      */
482     void slotTrashMessagesCompleted(KMTrashMsgCommand *command);
483 
484     /**
485      * Called when a "move" operation is completed
486      */
487     void slotMoveMessagesCompleted(KMMoveCommand *command);
488 
489     /**
490      * Called when a "copy" operation is completed
491      */
492     void slotCopyMessagesCompleted(KMCommand *command);
493 
494     void slotRequestFullSearchFromQuickSearch();
495     void slotFolderChanged(const Akonadi::Collection &);
496     void slotCollectionFetched(int collectionId);
497 
498     void itemsReceived(const Akonadi::Item::List &list);
499     void itemsFetchDone(KJob *job);
500 
501     void slotServerSideSubscription();
502     void slotServerStateChanged(Akonadi::ServerManager::State state);
503     void slotArchiveMails();
504     void slotChangeDisplayMessageFormat(MessageViewer::Viewer::DisplayFormatMessage format);
505 
506     void slotCollectionRemoved(const Akonadi::Collection &col);
507     void slotCcFilter();
508     void slotDeleteMessages();
509 
510     void slotMarkAllMessageAsReadInCurrentFolderAndSubfolder();
511     void slotRemoveDuplicateRecursive();
512     void slotRedirectCurrentMessage();
513     void slotEditCurrentVacation();
514     void slotReplyMessageTo(const KMime::Message::Ptr &message, bool replyToAll);
515 
516 private:
517     void slotSetFocusToViewer();
518     void deleteSelectedMessages(bool confirmDelete); // completely delete message
519     bool showSearchDialog();
520     void clearCurrentFolder();
521     void setCurrentCollection(const Akonadi::Collection &col);
522     void showMessageActivities(const QString &str);
523     void slotPageIsScrolledToBottom(bool isAtBottom);
524     void printCurrentMessage(bool preview);
525     void setupUnifiedMailboxChecker();
526     QAction *filterToAction(MailCommon::MailFilter *filter);
527     Q_REQUIRED_RESULT Akonadi::Collection::List applyFilterOnCollection(bool recursive);
528     void setShowStatusBarMessage(const QString &msg);
529     void slotRestartAccount();
530     void slotAccountSettings();
531     void updateDisplayFormatMessage();
532     void slotHistorySwitchFolder(const Akonadi::Collection &collection);
533     void redoSwitchFolder();
534     void undoSwitchFolder();
535     void updateMoveAllToTrash();
536 
537     // Message actions
538     QAction *mDeleteAction = nullptr;
539     QAction *mTrashThreadAction = nullptr;
540     QAction *mDeleteThreadAction = nullptr;
541     QAction *mSaveAsAction = nullptr;
542     QAction *mApplyAllFiltersAction = nullptr;
543     QAction *mSaveAttachmentsAction = nullptr;
544     QAction *mOpenAction = nullptr;
545     QAction *mMoveMsgToFolderAction = nullptr;
546     QAction *mCollectionProperties = nullptr;
547     QAction *mSendQueued = nullptr;
548     QAction *mArchiveAction = nullptr;
549     QAction *mSelectAllMessages = nullptr;
550     KActionMenuTransport *mSendActionMenu = nullptr;
551     QAction *mRestartAccountSettings = nullptr;
552     // Filter actions
553     KActionMenu *mFilterMenu = nullptr;
554     QAction *mExpireConfigAction = nullptr;
555     KActionMenu *mApplyFilterFolderActionsMenu = nullptr;
556     KActionMenu *mApplyFilterFolderRecursiveActionsMenu = nullptr;
557     QAction *mApplyAllFiltersFolderAction = nullptr;
558     QAction *mApplyAllFiltersFolderRecursiveAction = nullptr;
559     // Custom template actions menu
560     KActionMenu *mTemplateMenu = nullptr;
561 
562     KActionMenu *mThreadStatusMenu = nullptr;
563     KActionMenu *mApplyFilterActionsMenu = nullptr;
564     QAction *mCopyActionMenu = nullptr;
565     QAction *mMoveActionMenu = nullptr;
566     QAction *mCopyDecryptedActionMenu = nullptr;
567     QAction *mMarkThreadAsReadAction = nullptr;
568     QAction *mMarkThreadAsUnreadAction = nullptr;
569     KToggleAction *mToggleThreadImportantAction = nullptr;
570     KToggleAction *mToggleThreadToActAction = nullptr;
571 
572     KToggleAction *mWatchThreadAction = nullptr;
573     KToggleAction *mIgnoreThreadAction = nullptr;
574 
575     MailCommon::FavoriteCollectionWidget *mFavoriteCollectionsView = nullptr;
576     Akonadi::FavoriteCollectionsModel *mFavoritesModel = nullptr;
577     KMReaderWin *mMsgView = nullptr;
578     QSplitter *mSplitter1 = nullptr;
579     QSplitter *mSplitter2 = nullptr;
580     QSplitter *mFolderViewSplitter = nullptr;
581     Akonadi::Collection mTemplateFolder;
582     bool mLongFolderList = false;
583     bool mStartupDone = false;
584     bool mWasEverShown = false;
585     bool mHtmlGlobalSetting = false;
586     bool mHtmlLoadExtGlobalSetting = false;
587     bool mFolderHtmlLoadExtPreference = false;
588     bool mReaderWindowActive = false;
589     bool mReaderWindowBelow = false;
590     bool mEnableFavoriteFolderView = false;
591     bool mEnableFolderQuickSearch = false;
592 
593     QPointer<KMail::SearchWindow> mSearchWin;
594 
595     QAction *mExpireFolderAction = nullptr;
596     QAction *mFolderMailingListPropertiesAction = nullptr;
597     QAction *mShowFolderShortcutDialogAction = nullptr;
598     QAction *mArchiveFolderAction = nullptr;
599     QAction *mMessageNewList = nullptr;
600     KToggleAction *mPreferHtmlLoadExtAction = nullptr;
601 
602     QTimer *menutimer = nullptr;
603     QTimer *mShowBusySplashTimer = nullptr;
604 
605     KSieveUi::VacationManager *mVacationManager = nullptr;
606     KActionCollection *mActionCollection = nullptr;
607     QAction *mToolbarActionSeparator = nullptr;
608     QVBoxLayout *mTopLayout = nullptr;
609     bool mDestructed = false;
610     QList<QAction *> mFilterMenuActions;
611     QList<QAction *> mFilterFolderMenuActions;
612     QList<QAction *> mFilterFolderMenuRecursiveActions;
613     QList<QAction *> mFilterTBarActions;
614     QList<KMMetaFilterActionCommand *> mFilterCommands;
615 
616     KMail::TagActionManager *mTagActionManager = nullptr;
617     KMail::FolderShortcutActionManager *mFolderShortcutActionManager = nullptr;
618     KSharedConfig::Ptr mConfig;
619     KXMLGUIClient *mGUIClient = nullptr;
620 
621     KMail::MessageActions *mMsgActions = nullptr;
622     Akonadi::StandardMailActionManager *mAkonadiStandardActionManager = nullptr;
623     CollectionPane *mMessagePane = nullptr;
624     QSharedPointer<MailCommon::FolderSettings> mCurrentFolderSettings;
625 
626     MailCommon::FolderTreeWidget *mFolderTreeWidget = nullptr;
627 
628     KMail::VacationScriptIndicatorWidget *mVacationScriptIndicator = nullptr;
629     bool mVacationIndicatorActive = false;
630     bool mGoToFirstUnreadMessageInSelectedFolder = false;
631     MessageList::Core::PreSelectionMode mPreSelectionMode;
632 
633     QTimer mCheckMailTimer;
634 
635     KSieveUi::SieveImapPasswordProvider *mSievePasswordProvider = nullptr;
636     QPointer<MailCommon::FolderSelectionDialog> mMoveOrCopyToDialog;
637     QPointer<MailCommon::FolderSelectionDialog> mSelectFromAllFoldersDialog;
638     QAction *mServerSideSubscription = nullptr;
639     QAction *mAccountSettings = nullptr;
640     KRecentFilesMenu *mOpenRecentMenu = nullptr;
641     QPointer<KSieveUi::ManageSieveScriptsDialog> mManageSieveDialog;
642     QAction *mQuickSearchAction = nullptr;
643     DisplayMessageFormatActionMenu *mDisplayMessageFormatMenu = nullptr;
644     MessageViewer::Viewer::DisplayFormatMessage mFolderDisplayFormatPreference = MessageViewer::Viewer::UseGlobalSetting;
645     QAction *mSearchMessages = nullptr;
646     KMLaunchExternalComponent *const mLaunchExternalComponent;
647     ManageShowCollectionProperties *const mManageShowCollectionProperties;
648     QAction *mShowIntroductionAction = nullptr;
649     QAction *mMarkAllMessageAsReadAndInAllSubFolder = nullptr;
650     KActionMenuAccount *mAccountActionMenu = nullptr;
651     QAction *mRemoveDuplicateRecursiveAction = nullptr;
652     Akonadi::Collection mCurrentCollection;
653     QStatusBar *mCurrentStatusBar = nullptr;
654     ZoomLabelWidget *mZoomLabelIndicator = nullptr;
655 #ifdef WITH_KUSERFEEDBACK
656     KUserFeedback::NotificationPopup *mUserFeedBackNotificationPopup = nullptr;
657 #endif
658     KMailPluginCheckBeforeDeletingManagerInterface *mPluginCheckBeforeDeletingManagerInterface = nullptr;
659     CollectionSwitcherTreeViewManager *const mCollectionSwitcherTreeViewManager;
660 };
661 
662