21 #ifndef __KMMAINWIDGET
22 #define __KMMAINWIDGET
28 #include "foldertreewidget.h"
30 #include <kxmlguiclient.h>
32 #include <kactioncollection.h>
33 #include <foldercollection.h>
37 #include <akonadi/kmime/standardmailactionmanager.h>
38 #include <akonadi/tag.h>
39 #include <messagelist/core/view.h>
41 namespace MailTransport {
63 class KRecentFilesAction;
66 template <
typename T,
typename S>
class QMap;
74 class VacationScriptIndicatorWidget;
75 class TagActionManager;
76 class FolderShortcutActionManager;
80 class SieveDebugDialog;
82 class ManageSieveScriptsDialog;
83 class VacationManager;
86 namespace MailCommon {
87 class FolderSelectionDialog;
88 class FavoriteCollectionWidget;
99 KActionCollection *actionCollection,
105 void readPreConfig();
108 void readFolderConfig();
111 void writeFolderConfig();
117 void writeConfig(
bool force =
true);
119 void writeReaderConfig();
128 static void cleanup();
132 KAction *
editAction()
const {
return mMsgActions->editAction(); }
143 static const PtrList *mainWidgetList();
145 QWidget *vacationScriptIndicator()
const;
146 void updateVacationScriptStatus();
149 return mFolderTreeWidget->folderTreeView();
158 void savePaneSelection();
160 void updatePaneTagComboBox();
164 void addRecentFile(
const KUrl& mUrl);
165 void updateQuickSearchLineText();
167 void populateMessageListStatusFilterCombo();
174 void slotMoveSelectedMessageToFolder();
182 void slotCopySelectedMessagesToFolder();
187 void slotTrashSelectedMessages();
189 void slotCheckMail();
191 void slotCheckMailOnStartup();
197 void folderSelected(
const Akonadi::Collection & col );
202 void slotMessageActivated(
const Akonadi::Item & );
207 void slotMessageSelected(
const Akonadi::Item & );
209 void slotItemsFetchedForActivation(
KMCommand* command );
210 void slotMessageStatusChangeRequest(
const Akonadi::Item &,
const Akonadi::MessageStatus &,
const Akonadi::MessageStatus & );
213 void slotReplaceMsgByUnencryptedVersion();
218 void updateMessageMenu();
223 void startUpdateMessageActionsTimer();
226 void updateMessageActions(
bool fast =
false );
227 void updateMessageActionsDelayed();
230 void clearFilterActions();
231 void initializeFilterActions();
239 void slotUpdateMessageTagList(
const Akonadi::Tag &tag );
240 void slotSelectMoreMessageTagList();
252 KAction *akonadiStandardAction( Akonadi::StandardActionManager::Type type );
253 KAction *akonadiStandardAction( Akonadi::StandardMailActionManager::Type type );
256 void refreshMessageListSelection();
258 void slotStartCheckMail();
259 void slotEndCheckMail();
261 void slotRemoveDuplicates();
263 void slotSelectCollectionFolder(
const Akonadi::Collection & col );
265 void restoreCollectionFolderViewConfig();
267 void messagesTransfered(
bool );
268 void captionChangeRequest(
const QString &caption );
273 void createWidgets();
274 void deleteWidgets();
275 void layoutSplitters();
276 void newFromTemplate(
const Akonadi::Item& );
277 void moveSelectedMessagesToFolder(
const Akonadi::Collection & dest );
278 void copySelectedMessagesToFolder(
const Akonadi::Collection& dest );
290 KSharedConfig::Ptr config();
293 void updateFileMenu();
296 void slotManageSieveScripts();
299 void slotExpireFolder();
300 void slotExpireAll();
301 void slotArchiveFolder();
302 void slotRemoveFolder();
303 void slotEmptyFolder();
304 void slotClearCurrentFolder();
305 void slotAddFavoriteFolder();
306 void slotShowSelectedFolderInPane();
307 void slotOverrideHtmlLoadExt();
308 void slotMessageQueuedOrDrafted();
309 void slotUseTemplate();
310 void slotDeleteMsg(
bool confirmDelete =
true );
311 void slotTrashThread();
312 void slotDeleteThread(
bool confirmDelete =
true );
317 void slotSaveAttachments();
318 void slotJumpToFolder();
319 void slotResendMsg();
320 void slotCheckVacation();
321 void slotDebugSieve();
322 void slotApplyFilters();
323 void slotApplyFiltersOnFolder();
324 void slotExpandThread();
325 void slotExpandAllThreads();
326 void slotCollapseThread();
327 void slotCollapseAllThreads();
328 void slotSetThreadStatusUnread();
329 void slotSetThreadStatusRead();
330 void slotSetThreadStatusImportant();
331 void slotSetThreadStatusToAct();
332 void slotSetThreadStatusWatched();
333 void slotSetThreadStatusIgnored();
334 void slotSendQueued();
335 void slotSendQueuedVia(MailTransport::Transport*transport);
336 void slotOnlineStatus();
337 void slotUpdateOnlineStatus( GlobalSettings::EnumNetworkState::type );
338 void slotMessagePopup(
const Akonadi::Item& ,
const KUrl&,
const KUrl &imageUrl,
const QPoint& );
339 void slotContactSearchJobForMessagePopupDone(
KJob *job );
341 void slotFocusQuickSearch();
344 void slotShowStartupFolder();
347 void slotSelectNextMessage();
348 void slotExtendSelectionToNextMessage();
349 void slotSelectNextUnreadMessage();
350 void slotSelectPreviousMessage();
351 void slotExtendSelectionToPreviousMessage();
352 void slotSelectPreviousUnreadMessage();
353 void slotFocusOnNextMessage();
354 void slotFocusOnPrevMessage();
355 void slotSelectFirstMessage();
356 void slotSelectLastMessage();
357 void slotSelectFocusedMessage();
359 void slotNextUnreadFolder();
360 void slotPrevUnreadFolder();
363 void slotDisplayCurrentMessage();
365 void slotShowNewFromTemplate();
366 void slotDelayedShowNewFromTemplate(
KJob* );
367 void slotNewFromTemplate(
QAction* );
370 void slotUpdateUndo();
373 void updateFolderMenu();
378 void slotEditNotifications();
381 void slotCustomReplyToMsg(
const QString &tmpl );
382 void slotCustomReplyAllToMsg(
const QString &tmpl );
383 void slotForwardInlineMsg();
384 void slotForwardAttachedMsg();
385 void slotRedirectMsg();
386 void slotCustomForwardMsg(
const QString &tmpl );
387 void slotSubjectFilter();
388 void slotFromFilter();
391 void slotConfigChanged();
394 void slotShowBusySplash();
400 void showOfflinePage();
401 void showResourceOfflinePage();
402 void updateVacationScriptStatus(
bool active ,
const QString &serverName =
QString());
405 void slotItemAdded(
const Akonadi::Item &,
const Akonadi::Collection& col);
406 void slotItemRemoved(
const Akonadi::Item & );
407 void slotItemMoved(
const Akonadi::Item &item,
const Akonadi::Collection &
from,
const Akonadi::Collection &
to );
408 void slotCollectionStatisticsChanged(
const Akonadi::Collection::Id,
const Akonadi::CollectionStatistics& );
410 void slotAkonadiStandardActionUpdated();
411 void slotCollectionChanged(
const Akonadi::Collection&,
const QSet<QByteArray>& );
412 void slotCreateNewTab(
bool );
413 void slotUpdateActionsAfterMailChecking();
414 void slotCreateAddressBookContact();
415 void slotOpenRecentMsg(
const KUrl& url);
418 void checkAkonadiServerManagerState();
419 void updateHtmlMenuEntry();
421 void updateMoveAction(
const Akonadi::CollectionStatistics& statistic );
422 void updateMoveAction(
bool hasUnreadMails,
bool hasMails );
424 void updateAllToTrashAction(
int statistics);
427 QString overrideEncoding()
const;
429 void moveMessageSelected( MessageList::Core::MessageItemSetReference ref,
const Akonadi::Collection &dest,
bool confirmOnDeletion =
true );
431 void copyMessageSelected(
const QList<Akonadi::Item> &selectMsg,
const Akonadi::Collection &dest );
439 void trashMessageSelected( MessageList::Core::MessageItemSetReference ref );
445 const Akonadi::MessageStatus &status,
456 void setCurrentThreadStatus(
const Akonadi::MessageStatus &status,
bool toggle );
465 MailCommon::FolderSelectionDialog* moveOrCopyToDialog();
471 MailCommon::FolderSelectionDialog* selectFromAllFoldersDialog();
478 void refreshFavoriteFoldersViewProperties();
482 void showMessagePopup(
const Akonadi::Item&msg ,
const KUrl&aUrl,
const KUrl &imageUrl,
const QPoint& aPoint,
bool contactAlreadyExists,
bool uniqueContactFound);
486 void slotMoveMessageToTrash();
500 void slotCopyMessagesCompleted(
KMCommand *command );
502 void slotRequestFullSearchFromQuickSearch();
503 void slotFolderChanged(
const Akonadi::Collection& );
504 void slotCollectionFetched(
int collectionId );
506 void itemsReceived(
const Akonadi::Item::List &list );
507 void itemsFetchDone(
KJob *job );
509 void slotServerSideSubscription();
510 void slotFetchItemsForFolderDone(
KJob*job);
511 void slotServerStateChanged(Akonadi::ServerManager::State state);
512 void slotArchiveMails();
513 void slotChangeDisplayMessageFormat(MessageViewer::Viewer::DisplayFormatMessage format);
515 void slotCollectionRemoved(
const Akonadi::Collection &col);
518 KAction *mDeleteAction, *mTrashThreadAction,
519 *mDeleteThreadAction, *mSaveAsAction, *mUseAction,
520 *mSendAgainAction, *mApplyAllFiltersAction,
521 *mSaveAttachmentsAction, *mOpenAction,
522 *mMoveMsgToFolderAction, *mCollectionProperties, *mSendQueued;
523 KAction *mArchiveAction;
527 KAction *mExpireConfigAction;
528 KAction *mApplyFiltersOnFolder;
532 KActionMenu *mThreadStatusMenu, *mApplyFilterActionsMenu;
533 KAction *mCopyActionMenu;
534 KAction *mMoveActionMenu;
535 KAction *mMarkThreadAsReadAction;
536 KAction *mMarkThreadAsUnreadAction;
537 KToggleAction *mToggleThreadImportantAction;
538 KToggleAction *mToggleThreadToActAction;
540 KToggleAction *mWatchThreadAction, *mIgnoreThreadAction;
542 MailCommon::FavoriteCollectionWidget *mFavoriteCollectionsView;
543 Akonadi::FavoriteCollectionsModel *mFavoritesModel;
546 QSplitter *mSplitter1, *mSplitter2, *mFolderViewSplitter;
547 Akonadi::Collection mTemplateFolder;
548 bool mLongFolderList;
551 bool mHtmlGlobalSetting, mHtmlLoadExtGlobalSetting, mFolderHtmlLoadExtPreference,
552 mReaderWindowActive, mReaderWindowBelow;
553 bool mEnableFavoriteFolderView;
554 bool mEnableFolderQuickSearch;
558 KAction *mExpireFolderAction,
559 *mFolderMailingListPropertiesAction,
560 *mShowFolderShortcutDialogAction,
561 *mArchiveFolderAction, *mMessageNewList;
562 KToggleAction *mPreferHtmlLoadExtAction;
565 QTimer *mShowBusySplashTimer;
567 KSieveUi::VacationManager *mVacationManager;
571 KActionCollection *mActionCollection;
572 QAction *mToolbarActionSeparator;
581 KSharedConfig::Ptr mConfig;
585 Akonadi::StandardMailActionManager *mAkonadiStandardActionManager;
589 MailCommon::FolderTreeWidget *mFolderTreeWidget;
592 bool mVacationIndicatorActive;
593 bool mGoToFirstUnreadMessageInSelectedFolder;
594 MessageList::Core::PreSelectionMode mPreSelectionMode;
600 KAction *mServerSideSubscription;
601 KRecentFilesAction *mOpenRecentAction;
603 KAction *mQuickSearchAction;
605 MessageViewer::Viewer::DisplayFormatMessage mFolderDisplayFormatPreference;
606 KAction *mSearchMessages;
609 KAction *mShowIntroductionAction;
QAction * action(const QString &name)
KAction * editAction() const
This class implements a "reader window", that is a window used for reading or viewing messages...
Manages common actions that can be performed on one or more messages.
CollectionPane * messageListPane() const
Access to the header list pane.
KMail::MessageActions * messageActions() const
static KMKernel * self()
normal control stuff
Creates actions related to the existing Akonadi tags and plugs them into the GUI. ...
MailCommon::FolderTreeView * folderTreeView() const
QList< KMMainWidget * > PtrList
KActionCollection * actionCollection() const
Small helper structure which encapsulates the KMMessage created when creating a reply, and.
KAction * sendAgainAction() const
KActionMenuTransport * sendQueueViaMenu() const
KActionMenu * filterMenu() const
KAction * sendQueuedAction() const
KXMLGUIClient * guiClient() const
Returns the XML GUI client.
KActionMenu * mailingListActionMenu() const
Akonadi::StandardMailActionManager * standardMailActionManager() const
KMReaderWin * messageView() const
Easy access to main components of the window.