MessageList::Pane
#include <pane.h>
Signals | |
void | currentTabChanged () |
void | forceLostFocus () |
void | messageActivated (const Akonadi::Item &item) |
void | messageSelected (const Akonadi::Item &item) |
void | messageStatusChangeRequest (const Akonadi::Item &item, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear) |
void | selectionChanged () |
void | statusMessage (const QString &message) |
Public Slots | |
void | aggregationMenuAboutToShow () |
QItemSelectionModel * | createNewTab () |
void | selectAll () |
void | sortOrderMenuAboutToShow () |
void | themeMenuAboutToShow () |
Detailed Description
This is the main MessageList panel for Akonadi applications.
It contains multiple MessageList::Widget tabs so it can actually display multiple folder sets at once.
When a KXmlGuiWindow is passed to setXmlGuiClient, the XMLGUI defined context menu akonadi_messagelist_contextmenu
is used if available.
Constructor & Destructor Documentation
◆ Pane()
|
explicit |
◆ ~Pane()
Member Function Documentation
◆ aggregationMenuAboutToShow
◆ createNewTab
|
slot |
◆ createStorageModel()
|
virtual |
◆ currentFilterSearchString()
QString Pane::currentFilterSearchString | ( | ) | const |
◆ currentFilterStatus()
QList< Akonadi::MessageStatus > Pane::currentFilterStatus | ( | ) | const |
Returns the Akonadi::MessageStatus in the current quicksearch field.
◆ currentFolder()
Akonadi::Collection Pane::currentFolder | ( | ) | const |
◆ currentItem()
Akonadi::Item Pane::currentItem | ( | ) | const |
Returns the current message for the list as Akonadi::Item.
May return an invalid Item if there is no current message or no current folder.
◆ currentItemSelectionModel()
QItemSelectionModel * Pane::currentItemSelectionModel | ( | ) |
Returns the QItemSelectionModel for the currently displayed tab.
◆ currentMessage()
KMime::Message::Ptr Pane::currentMessage | ( | ) | const |
Returns the current message for the list as KMime::Message::Ptr.
May return 0 if there is no current message or no current folder.
◆ currentOptions()
Core::QuickSearchLine::SearchOptions Pane::currentOptions | ( | ) | const |
◆ currentTabChanged
|
signal |
Emitted when the current tab has changed.
Clients using the selection model from currentItemSelectionModel() should ask for it again, as it may be different now.
◆ currentThreadAsMessageList()
Akonadi::Item::List Pane::currentThreadAsMessageList | ( | ) | const |
Returns the Akonadi::Item bound to the current StorageModel that are part of the current thread.
The current thread is the thread that contains currentMessageItem(). The list may be empty if there is no currentMessageItem() or no StorageModel.
The returned list is guaranteed to be valid only until you return control to the main even loop. Don't store it for any longer. If you need to reference this set of messages at a later stage then take a look at createPersistentSet().
◆ currentThreadAsPersistentSet()
MessageList::Core::MessageItemSetReference Pane::currentThreadAsPersistentSet | ( | ) | const |
◆ deletePersistentSet()
void Pane::deletePersistentSet | ( | MessageList::Core::MessageItemSetReference | ref | ) |
◆ focusNextMessageItem()
bool Pane::focusNextMessageItem | ( | MessageList::Core::MessageTypeFilter | messageTypeFilter, |
bool | centerItem, | ||
bool | loop ) |
Focuses the next message item in the view without actually selecting it.
messageTypeFilter can be used to restrict the selection to only certain message types.
If centerItem is true then the specified item will be positioned at the center of the view, if possible. If loop is true then the "next" algorithm will restart from the beginning of the list if the end is reached, otherwise it will just stop returning false.
◆ focusPreviousMessageItem()
bool Pane::focusPreviousMessageItem | ( | MessageList::Core::MessageTypeFilter | messageTypeFilter, |
bool | centerItem, | ||
bool | loop ) |
Focuses the previous message item in the view without actually selecting it.
messageTypeFilter can be used to restrict the selection to only certain message types.
If centerItem is true then the specified item will be positioned at the center of the view, if possible. If loop is true then the "previous" algorithm will restart from the end of the list if the beginning is reached, otherwise it will just stop returning false.
◆ focusQuickSearch()
◆ focusView()
void Pane::focusView | ( | ) |
◆ getSelectionStats()
bool Pane::getSelectionStats | ( | Akonadi::Item::List & | selectedItems, |
Akonadi::Item::List & | selectedVisibleItems, | ||
bool * | allSelectedBelongToSameThread, | ||
bool | includeCollapsedChildren = true ) const |
Fills the lists of the selected message serial numbers and of the selected+visible ones.
Returns true if the returned stats are valid (there is a current folder after all) and false otherwise. This is called by KMMainWidget in a single place so we optimize by making it a single sweep on the selection.
If includeCollapsedChildren is true then the children of the selected but collapsed items are also included in the stats
◆ isThreaded()
bool Pane::isThreaded | ( | ) | const |
◆ itemListFromPersistentSet()
Akonadi::Item::List Pane::itemListFromPersistentSet | ( | MessageList::Core::MessageItemSetReference | ref | ) |
Return Akonadi::Item from messageItemReference.
◆ markMessageItemsAsAboutToBeRemoved()
void Pane::markMessageItemsAsAboutToBeRemoved | ( | MessageList::Core::MessageItemSetReference | ref, |
bool | bMark ) |
◆ messageActivated
|
signal |
Emitted when a message is doubleclicked or activated by other input means.
◆ messageSelected
|
signal |
Emitted when a message is selected (that is, single clicked and thus made current in the view) Note that this message CAN be 0 (when the current item is cleared, for example).
This signal is emitted when a SINGLE message is selected in the view, probably by clicking on it or by simple keyboard navigation. When multiple items are selected at once (by shift+clicking, for example) then you will get this signal only for the last clicked message (or at all, if the last shift+clicked thing is a group header...). You should handle selection changed in this case.
◆ messageStatusChangeRequest
|
signal |
Emitted when a message wants its status to be changed.
◆ populateStatusFilterCombo()
◆ reloadGlobalConfiguration()
void Pane::reloadGlobalConfiguration | ( | ) |
◆ resetModelStorage()
◆ saveCurrentSelection()
◆ searchEditHasFocus()
◆ selectAll
|
slot |
◆ selectFirstMessageItem()
bool Pane::selectFirstMessageItem | ( | MessageList::Core::MessageTypeFilter | messageTypeFilter, |
bool | centerItem ) |
Selects the first message item in the view that matches the specified Core::MessageTypeFilter.
If centerItem is true then the specified item will be positioned at the center of the view, if possible.
If the current view is already loaded then the request will be satisfied immediately (well... if an unread message exists at all). If the current view is still loading then the selection of the first message will be scheduled to be executed when loading terminates.
So this function doesn't actually guarantee that an unread or new message was selected when the call returns. Take care :)
The function returns true if a message was selected and false otherwise.
◆ selectFocusedMessageItem()
void Pane::selectFocusedMessageItem | ( | bool | centerItem | ) |
◆ selectionAsListMessageId()
QList< Akonadi::Item::Id > Pane::selectionAsListMessageId | ( | bool | includeCollapsedChildren = true | ) | const |
◆ selectionAsMessageItemList()
Akonadi::Item::List Pane::selectionAsMessageItemList | ( | bool | includeCollapsedChildren = true | ) | const |
Returns the currently selected Items (bound to current StorageModel).
The list may be empty if there are no selected messages or no StorageModel.
If includeCollapsedChildren is true then the children of the selected but collapsed items are also added to the list.
The returned list is guaranteed to be valid only until you return control to the main even loop. Don't store it for any longer. If you need to reference this set of messages at a later stage then take a look at createPersistentSet().
◆ selectionAsMessageItemListId()
Returns the currently selected Items id(bound to current StorageModel).
The list may be empty if there are no selected messages or no StorageModel.
If includeCollapsedChildren is true then the children of the selected but collapsed items are also added to the list.
The returned list is guaranteed to be valid only until you return control to the main even loop. Don't store it for any longer. If you need to reference this set of messages at a later stage then take a look at createPersistentSet().
◆ selectionAsMessageList()
QList< KMime::Message::Ptr > Pane::selectionAsMessageList | ( | bool | includeCollapsedChildren = true | ) | const |
Returns the currently selected KMime::Message::Ptr (bound to current StorageModel).
The list may be empty if there are no selected messages or no StorageModel.
If includeCollapsedChildren is true then the children of the selected but collapsed items are also added to the list.
The returned list is guaranteed to be valid only until you return control to the main even loop. Don't store it for any longer. If you need to reference this set of messages at a later stage then take a look at createPersistentSet().
◆ selectionAsPersistentSet()
MessageList::Core::MessageItemSetReference Pane::selectionAsPersistentSet | ( | bool | includeCollapsedChildren = true | ) | const |
◆ selectionChanged
|
signal |
Emitted when the selection in the view changes.
◆ selectionEmpty()
bool Pane::selectionEmpty | ( | ) | const |
◆ selectLastMessageItem()
bool Pane::selectLastMessageItem | ( | MessageList::Core::MessageTypeFilter | messageTypeFilter, |
bool | centerItem ) |
Selects the last message item in the view that matches the specified Core::MessageTypeFilter.
If centerItem is true then the specified item will be positioned at the center of the view, if possible.
The function returns true if a message was selected and false otherwise.
◆ selectNextMessageItem()
bool Pane::selectNextMessageItem | ( | MessageList::Core::MessageTypeFilter | messageTypeFilter, |
MessageList::Core::ExistingSelectionBehaviour | existingSelectionBehaviour, | ||
bool | centerItem, | ||
bool | loop ) |
Selects the next message item in the view.
messageTypeFilter can be used to restrict the selection to only certain message types.
existingSelectionBehaviour specifies how the existing selection is manipulated. It may be cleared, expanded or grown/shrunk.
If centerItem is true then the specified item will be positioned at the center of the view, if possible. If loop is true then the "next" algorithm will restart from the beginning of the list if the end is reached, otherwise it will just stop returning false.
◆ selectPreviousMessageItem()
bool Pane::selectPreviousMessageItem | ( | MessageList::Core::MessageTypeFilter | messageTypeFilter, |
MessageList::Core::ExistingSelectionBehaviour | existingSelectionBehaviour, | ||
bool | centerItem, | ||
bool | loop ) |
Selects the previous message item in the view.
If centerItem is true then the specified item will be positioned at the center of the view, if possible.
messageTypeFilter can be used to restrict the selection to only certain message types.
existingSelectionBehaviour specifies how the existing selection is manipulated. It may be cleared, expanded or grown/shrunk.
If loop is true then the "previous" algorithm will restart from the end of the list if the beginning is reached, otherwise it will just stop returning false.
◆ setAllGroupsExpanded()
void Pane::setAllGroupsExpanded | ( | bool | expand | ) |
◆ setAllThreadsExpanded()
void Pane::setAllThreadsExpanded | ( | bool | expand | ) |
◆ setCurrentFolder()
void Pane::setCurrentFolder | ( | const Akonadi::Collection & | fld, |
const QModelIndex & | etmIndex, | ||
bool | preferEmptyTab = false, | ||
MessageList::Core::PreSelectionMode | preSelectionMode = MessageList::Core::PreSelectLastSelected, | ||
const QString & | overrideLabel = QString() ) |
Sets the current folder to be displayed by this Pane.
If the specified folder is already open in one of the tabs then that tab is made current (and no reloading happens). If the specified folder is not open yet then behaviour depends on the preferEmptyTab value as follows.
- Parameters
-
etmIndex the index for the collection in the EntityTreeModel (source model)
If preferEmptyTab is set to false then the (new) folder is loaded in the current tab. If preferEmptyTab is set to true then the (new) folder is loaded in the first empty tab (or a new one if there are no empty ones).
Pre-selection is the action of automatically selecting a message just after the folder has finished loading. See Model::setStorageModel() for more information.
If overrideLabel is not empty then it's used as the tab text for the specified folder. This is useful to signal a particular folder state like "loading..."
◆ setCurrentThreadExpanded()
void Pane::setCurrentThreadExpanded | ( | bool | expand | ) |
◆ setPreferEmptyTab()
◆ setQuickSearchClickMessage()
◆ setXmlGuiClient()
void Pane::setXmlGuiClient | ( | KXMLGUIClient * | xmlGuiClient | ) |
Sets the XML GUI client which the pane is used in.
This is needed if you want to use the built-in context menu. Passing 0 is ok and will disable the builtin context menu.
- Parameters
-
xmlGuiClient The KXMLGUIClient the view is used in.
◆ sortOrderMenuAboutToShow
◆ statusMessage
Notify the outside when updating the status bar with a message could be useful.
◆ themeMenuAboutToShow
◆ updateTabIconText()
◆ updateTagComboBox()
◆ writeConfig()
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:12:44 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.