• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

messagelist

  • MessageList
  • Pane
Public Slots | Signals | Public Member Functions | List of all members
MessageList::Pane Class Reference

#include <pane.h>

Inheritance diagram for MessageList::Pane:
Inheritance graph
[legend]

Public Slots

void aggregationMenuAboutToShow ()
 
QItemSelectionModel * createNewTab ()
 
void selectAll ()
 
void sortOrderMenuAboutToShow ()
 
void themeMenuAboutToShow ()
 

Signals

void currentTabChanged ()
 
void fullSearchRequest ()
 
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 Member Functions

 Pane (bool restoreSession, QAbstractItemModel *model, QItemSelectionModel *selectionModel, QWidget *parent=0)
 
 ~Pane ()
 
virtual MessageList::StorageModel * createStorageModel (QAbstractItemModel *model, QItemSelectionModel *selectionModel, QObject *parent)
 
QString currentFilterSearchString () const
 
Akonadi::MessageStatus currentFilterStatus () const
 
Akonadi::Item currentItem () const
 
QItemSelectionModel * currentItemSelectionModel ()
 
KMime::Message::Ptr currentMessage () const
 
QList< Akonadi::Item > currentThreadAsMessageList () const
 
MessageList::Core::MessageItemSetReference currentThreadAsPersistentSet () const
 
void deletePersistentSet (MessageList::Core::MessageItemSetReference ref)
 
bool focusNextMessageItem (MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop)
 
bool focusPreviousMessageItem (MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop)
 
void focusQuickSearch ()
 
void focusView ()
 
bool getSelectionStats (Akonadi::Item::List &selectedItems, Akonadi::Item::List &selectedVisibleItems, bool *allSelectedBelongToSameThread, bool includeCollapsedChildren=true) const
 
bool isThreaded () const
 
QList< Akonadi::Item > itemListFromPersistentSet (MessageList::Core::MessageItemSetReference ref)
 
void markMessageItemsAsAboutToBeRemoved (MessageList::Core::MessageItemSetReference ref, bool bMark)
 
void reloadGlobalConfiguration ()
 
void resetModelStorage ()
 
void saveCurrentSelection ()
 
bool searchEditHasFocus () const
 
bool selectFirstMessageItem (MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem)
 
void selectFocusedMessageItem (bool centerItem)
 
QList< Akonadi::Item::Id > selectionAsListMessageId (bool includeCollapsedChildren=true) const
 
QList< Akonadi::Item > selectionAsMessageItemList (bool includeCollapsedChildren=true) const
 
QVector< qlonglong > selectionAsMessageItemListId (bool includeCollapsedChildren=true) const
 
QList< KMime::Message::Ptr > selectionAsMessageList (bool includeCollapsedChildren=true) const
 
MessageList::Core::MessageItemSetReference selectionAsPersistentSet (bool includeCollapsedChildren=true) const
 
bool selectionEmpty () const
 
bool selectLastMessageItem (MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem)
 
bool selectNextMessageItem (MessageList::Core::MessageTypeFilter messageTypeFilter, MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour, bool centerItem, bool loop)
 
bool selectPreviousMessageItem (MessageList::Core::MessageTypeFilter messageTypeFilter, MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour, bool centerItem, bool loop)
 
void setAllGroupsExpanded (bool expand)
 
void setAllThreadsExpanded (bool expand)
 
void setCurrentFolder (const Akonadi::Collection &fld, bool preferEmptyTab=false, MessageList::Core::PreSelectionMode preSelectionMode=MessageList::Core::PreSelectLastSelected, const QString &overrideLabel=QString())
 
void setCurrentThreadExpanded (bool expand)
 
void setPreferEmptyTab (bool emptyTab)
 
void setXmlGuiClient (KXMLGUIClient *xmlGuiClient)
 
void updateTabIconText (const Akonadi::Collection &collection, const QString &label, const QIcon &icon)
 
void updateTagComboBox ()
 
virtual void writeConfig (bool restoreSession)
 

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.

Definition at line 65 of file pane.h.

Constructor & Destructor Documentation

Pane::Pane ( bool  restoreSession,
QAbstractItemModel *  model,
QItemSelectionModel *  selectionModel,
QWidget *  parent = 0 
)
explicit

Create a Pane wrapping the specified model and selection.

Definition at line 119 of file pane.cpp.

Pane::~Pane ( )

Definition at line 193 of file pane.cpp.

Member Function Documentation

void Pane::aggregationMenuAboutToShow ( )
slot

Definition at line 1101 of file pane.cpp.

QItemSelectionModel * Pane::createNewTab ( )
slot

Add a new tab to the Pane and select it.

Definition at line 708 of file pane.cpp.

MessageList::StorageModel * Pane::createStorageModel ( QAbstractItemModel *  model,
QItemSelectionModel *  selectionModel,
QObject *  parent 
)
virtual

Definition at line 674 of file pane.cpp.

QString Pane::currentFilterSearchString ( ) const

Returns the search term in the current quicksearch field.

Definition at line 908 of file pane.cpp.

Akonadi::MessageStatus Pane::currentFilterStatus ( ) const

Returns the Akonadi::MessageStatus in the current quicksearch field.

Definition at line 899 of file pane.cpp.

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.

Definition at line 805 of file pane.cpp.

QItemSelectionModel * Pane::currentItemSelectionModel ( )

Returns the QItemSelectionModel for the currently displayed tab.

Definition at line 982 of file pane.cpp.

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.

Definition at line 816 of file pane.cpp.

void MessageList::Pane::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.

QList< Akonadi::Item > 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().

Definition at line 865 of file pane.cpp.

MessageList::Core::MessageItemSetReference Pane::currentThreadAsPersistentSet ( ) const

Return a persistent set from current thread.

Definition at line 959 of file pane.cpp.

void Pane::deletePersistentSet ( MessageList::Core::MessageItemSetReference  ref)

Deletes the persistent set pointed by the specified reference.

If the set does not exist anymore, nothing happens.

Definition at line 883 of file pane.cpp.

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.

Definition at line 315 of file pane.cpp.

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.

Definition at line 329 of file pane.cpp.

void Pane::focusQuickSearch ( )

Sets the focus on the quick search line of the currently active tab.

Definition at line 432 of file pane.cpp.

void Pane::focusView ( )

Sets the focus on the view of the currently active tab.

Definition at line 967 of file pane.cpp.

void MessageList::Pane::fullSearchRequest ( )
signal

Emitted when a full search is requested.

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

Definition at line 935 of file pane.cpp.

bool Pane::isThreaded ( ) const

Returns true if the current Aggregation is threaded, false otherwise (or if there is no current Aggregation).

Definition at line 917 of file pane.cpp.

QList< Akonadi::Item > Pane::itemListFromPersistentSet ( MessageList::Core::MessageItemSetReference  ref)

Return Akonadi::Item from messageItemReference.

Definition at line 874 of file pane.cpp.

void Pane::markMessageItemsAsAboutToBeRemoved ( MessageList::Core::MessageItemSetReference  ref,
bool  bMark 
)

If bMark is true this function marks the messages as "about to be removed" so they appear dimmer and aren't selectable in the view.

If bMark is false then this function clears the "about to be removed" state for the specified MessageItems.

Definition at line 891 of file pane.cpp.

void MessageList::Pane::messageActivated ( const Akonadi::Item &  item)
signal

Emitted when a message is doubleclicked or activated by other input means.

void MessageList::Pane::messageSelected ( const Akonadi::Item &  item)
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.

void MessageList::Pane::messageStatusChangeRequest ( const Akonadi::Item &  item,
const Akonadi::MessageStatus &  set,
const Akonadi::MessageStatus &  clear 
)
signal

Emitted when a message wants its status to be changed.

void Pane::reloadGlobalConfiguration ( )

Reloads global configuration and eventually reloads all the views.

Definition at line 977 of file pane.cpp.

void Pane::resetModelStorage ( )

Definition at line 990 of file pane.cpp.

void Pane::saveCurrentSelection ( )

Definition at line 1005 of file pane.cpp.

bool Pane::searchEditHasFocus ( ) const

Definition at line 1083 of file pane.cpp.

void Pane::selectAll ( )
slot

Selects all the items in the current folder.

Definition at line 383 of file pane.cpp.

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.

Definition at line 355 of file pane.cpp.

void Pane::selectFocusedMessageItem ( bool  centerItem)

Selects the currently focused message item.

May do nothing if the focused message item is already selected (which is very likely). If centerItem is true then the specified item will be positioned at the center of the view, if possible.

Definition at line 343 of file pane.cpp.

QList< Akonadi::Item::Id > Pane::selectionAsListMessageId ( bool  includeCollapsedChildren = true) const

Definition at line 845 of file pane.cpp.

QList< Akonadi::Item > 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().

Definition at line 836 of file pane.cpp.

QVector< qlonglong > Pane::selectionAsMessageItemListId ( bool  includeCollapsedChildren = true) const

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().

Definition at line 855 of file pane.cpp.

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().

Definition at line 827 of file pane.cpp.

MessageList::Core::MessageItemSetReference Pane::selectionAsPersistentSet ( bool  includeCollapsedChildren = true) const

Return a persistent set from current selection.

Definition at line 951 of file pane.cpp.

void MessageList::Pane::selectionChanged ( )
signal

Emitted when the selection in the view changes.

bool Pane::selectionEmpty ( ) const

Fast function that determines if the selection is empty.

Definition at line 926 of file pane.cpp.

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.

Definition at line 369 of file pane.cpp.

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/shrinked.

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.

Definition at line 281 of file pane.cpp.

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/shrinked.

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.

Definition at line 298 of file pane.cpp.

void Pane::setAllGroupsExpanded ( bool  expand)

If expand is true then it expands all the groups (only the toplevel group item: inner threads are NOT expanded).

If expand is false then it collapses all the groups. If no grouping is in effect then this function does nothing.

Definition at line 420 of file pane.cpp.

void Pane::setAllThreadsExpanded ( bool  expand)

If expand is true then it expands all the threads, otherwise collapses them.

Definition at line 408 of file pane.cpp.

void Pane::setCurrentFolder ( const Akonadi::Collection &  fld,
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.

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..."

Definition at line 679 of file pane.cpp.

void Pane::setCurrentThreadExpanded ( bool  expand)

If expand is true then it expands the current thread, otherwise collapses it.

Definition at line 396 of file pane.cpp.

void Pane::setPreferEmptyTab ( bool  emptyTab)

Definition at line 1000 of file pane.cpp.

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
xmlGuiClientThe KXMLGUIClient the view is used in.

Definition at line 211 of file pane.cpp.

void Pane::sortOrderMenuAboutToShow ( )
slot

Definition at line 1092 of file pane.cpp.

void MessageList::Pane::statusMessage ( const QString &  message)
signal

Notify the outside when updating the status bar with a message could be useful.

void Pane::themeMenuAboutToShow ( )
slot

Definition at line 1110 of file pane.cpp.

void Pane::updateTabIconText ( const Akonadi::Collection &  collection,
const QString &  label,
const QIcon &  icon 
)

Definition at line 695 of file pane.cpp.

void Pane::updateTagComboBox ( )

Definition at line 1013 of file pane.cpp.

void Pane::writeConfig ( bool  restoreSession)
virtual

Definition at line 1021 of file pane.cpp.


The documentation for this class was generated from the following files:
  • pane.h
  • pane.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:32 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messagelist

Skip menu "messagelist"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal