messagelist
widget.cpp
Go to the documentation of this file.
111 Collection::List collections = static_cast<const StorageModel*>( storageModel() )->displayedCollections();
126 const QString type = url.queryItems()[QLatin1String( "type" )]; // But does it have the right type?
141 return view()->selectNextMessageItem( messageTypeFilter, existingSelectionBehaviour, centerItem, loop );
149 return view()->selectPreviousMessageItem( messageTypeFilter, existingSelectionBehaviour, centerItem, loop );
152 bool Widget::focusNextMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop )
157 bool Widget::focusPreviousMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop )
167 bool Widget::selectFirstMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem )
172 bool Widget::selectLastMessageItem( Core::MessageTypeFilter messageTypeFilter, bool centerItem )
292 // Dealing with mLastSelectedMessage here would be expensive: it would involve releasing the last selected,
310 void Widget::viewMessageListContextPopupRequest( const QList< MessageList::Core::MessageItem * > &selectedItems,
326 void Widget::viewMessageStatusChangeRequest( MessageList::Core::MessageItem *msg, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear )
344 void Widget::viewGroupHeaderContextPopupRequest( MessageList::Core::GroupHeaderItem *ghi, const QPoint &globalPos )
435 QAction *moveAction = menu.addAction( KIcon( QLatin1String( "go-jump" )), i18n( "&Move Here" ) );
436 QAction *copyAction = menu.addAction( KIcon( QLatin1String( "edit-copy" ) ), i18n( "&Copy Here" ) );
453 Collection::List collections = static_cast<const StorageModel*>( storageModel() )->displayedCollections();
470 Collection::List collections = static_cast<const StorageModel*>( storageModel() )->displayedCollections();
572 QList<KMime::Message::Ptr > Widget::selectionAsMessageList( bool includeCollapsedChildren ) const
575 QList<Core::MessageItem *> lstMi = view()->selectionAsMessageItemList( includeCollapsedChildren );
588 QList<Core::MessageItem *> lstMi = view()->selectionAsMessageItemList( includeCollapsedChildren );
601 QList<Core::MessageItem *> lstMi = view()->selectionAsMessageItemList( includeCollapsedChildren );
612 QList<Akonadi::Item::Id> Widget::selectionAsListMessageId( bool includeCollapsedChildren ) const
615 QList<Core::MessageItem *> lstMi = view()->selectionAsMessageItemList( includeCollapsedChildren );
676 QList< Core::MessageItem * > selected = view()->selectionAsMessageItemList( includeCollapsedChildren );
702 void Widget::markMessageItemsAsAboutToBeRemoved( MessageList::Core::MessageItemSetReference ref, bool bMark )
704 QList< Core::MessageItem * > lstPersistent = view()->persistentSetCurrentMessageItemList( ref );
709 QList<Akonadi::Item> Widget::itemListFromPersistentSet( MessageList::Core::MessageItemSetReference ref )
722 MessageList::Core::MessageItemSetReference Widget::selectionAsPersistentSet( bool includeCollapsedChildren ) const
724 QList<Core::MessageItem *> lstMi = view()->selectionAsMessageItemList( includeCollapsedChildren );
742 Collection::List collections = static_cast<const StorageModel*>( storageModel() )->displayedCollections();
744 return Akonadi::Collection(); // no folder here or too many (in case we can't decide where the drop will end)
virtual void fillMessageTagCombo()
Reimplemented from MessageList::Core::Widget.
Definition: widget.cpp:208
bool focusPreviousMessageItem(MessageTypeFilter messageTypeFilter, bool centerItem, bool loop)
Focuses the previous message item in the view without actually selecting it.
Definition: view.cpp:1569
void messageSelected(const Akonadi::Item &item)
Emitted when a message is selected (that is, single clicked and thus made current in the view) Note t...
QWidget * source() const
void setHotSpot(const QPoint &hotspot)
QList< Akonadi::Item > selectionAsMessageItemList(bool includeCollapsedChildren=true) const
Returns the currently selected Items (bound to current StorageModel).
Definition: widget.cpp:585
KMime::Message::Ptr currentMessage() const
Returns the current message for the list as KMime::Message::Ptr.
Definition: widget.cpp:560
MessageList::Core::QuickSearchLine::SearchOptions currentOptions() const
Definition: view.cpp:2722
int width() const
QList< Akonadi::Item > itemListFromPersistentSet(MessageList::Core::MessageItemSetReference ref)
Return Akonadi::Item from messageItemReference.
Definition: widget.cpp:709
void messageActivated(const Akonadi::Item &item)
Emitted when a message is doubleclicked or activated by other input means.
const QMimeData * mimeData() const
void setCurrentThreadExpanded(bool expand)
If expand is true then it expands the current thread, otherwise collapses it.
Definition: view.cpp:1009
void setCurrentStatusFilterItem()
Must be called by fillMessageTagCombo()
Definition: widgetbase.cpp:219
Qt::KeyboardModifiers keyboardModifiers()
Qt::DropActions possibleActions() const
void append(const T &value)
void setMimeData(QMimeData *data)
Definition: messageitem.h:46
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
MessageItem * topmostMessage()
Definition: messageitem.cpp:552
void focusQuickSearch(const QString &selectedText)
Sets the focus on the quick search line of the currently active tab.
Definition: widget.cpp:198
void setPixmap(const QPixmap &pixmap)
bool selectLastMessageItem(MessageTypeFilter messageTypeFilter, bool centerItem)
Selects the last message item in the view that matches messageTypeFilter.
Definition: view.cpp:1635
virtual void viewStartDragRequest()
Reimplemented from MessageList::Core::Widget.
Definition: widget.cpp:468
MessageList::Core::QuickSearchLine::SearchOptions currentOptions() const
Definition: widget.cpp:638
bool selectLastMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem)
Selects the last message item in the view that matches the specified Core::MessageTypeFilter.
Definition: widget.cpp:172
bool contains(const QString &str, Qt::CaseSensitivity cs) const
virtual void viewDragEnterEvent(QDragEnterEvent *e)
Reimplemented from MessageList::Core::Widget.
Definition: widget.cpp:378
Definition: widget.cpp:402
QWidget * viewport() const
Akonadi::Collection currentCollection() const
Definition: widget.cpp:740
bool selectionEmpty() const
Fast function that determines if the selection is empty.
Definition: view.cpp:900
QList< MessageItem * > selectionAsMessageItemList(bool includeCollapsedChildren=true) const
Returns the currently selected MessageItems (bound to current StorageModel).
Definition: view.cpp:905
void setExpandItem(const QModelIndex &index)
Definition: view.cpp:2772
virtual void viewDragMoveEvent(QDragMoveEvent *e)
Reimplemented from MessageList::Core::Widget.
Definition: widget.cpp:388
QString currentFilterSearchString() const
Returns the search term in the current quicksearch field.
Definition: widget.cpp:648
MessageItem * currentMessageItem(bool selectIfNeeded=true) const
Returns the current MessageItem (that is bound to current StorageModel).
Definition: view.cpp:865
MessageList::Core::MessageItemSetReference selectionAsPersistentSet(bool includeCollapsedChildren=true) const
Return a persistent set from current selection.
Definition: widget.cpp:722
bool isValid() const
Returns true if this ModelInvariantIndex is valid, that is, it has been attacched to a ModelInvariant...
Definition: modelinvariantindex.cpp:42
int size() const
Qt::DropAction exec(QFlags< Qt::DropAction > supportedActions)
void setAllGroupsExpanded(bool expand)
If expand is true then it expands all the groups (only the toplevel group item: inner threads are NOT...
Definition: view.cpp:1056
virtual void viewDropEvent(QDropEvent *e)
Reimplemented from MessageList::Core::Widget.
Definition: widget.cpp:405
QList< KMime::Message::Ptr > selectionAsMessageList(bool includeCollapsedChildren=true) const
Returns the currently selected KMime::Message::Ptr (bound to current StorageModel).
Definition: widget.cpp:572
virtual void viewSelectionChanged()
Reimplemented from MessageList::Core::Widget.
Definition: widget.cpp:302
MessageItemSetReference createPersistentSet(const QList< MessageItem * > &items)
Creates a persistent set for the specified MessageItems and returns its reference.
Definition: view.cpp:1669
QString number(int n, int base)
void append(const T &value)
bool selectionEmpty() const
Fast function that determines if the selection is empty.
Definition: widget.cpp:659
bool selectFirstMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem)
Selects the first message item in the view that matches the specified Core::MessageTypeFilter.
Definition: widget.cpp:167
void ignore()
void accept()
virtual void viewMessageListContextPopupRequest(const QList< MessageList::Core::MessageItem * > &selectedItems, const QPoint &globalPos)
Reimplemented from MessageList::Core::Widget.
Definition: widget.cpp:310
bool canAcceptDrag(const QDropEvent *e)
Returns true if this drag can be accepted by the underlying view.
Definition: widget.cpp:106
virtual void viewGroupHeaderContextPopupRequest(MessageList::Core::GroupHeaderItem *group, const QPoint &globalPos)
Reimplemented from MessageList::Core::Widget.
Definition: widget.cpp:344
bool isThreaded() const
Returns true if the current Aggregation is threaded, false otherwise (or if there is no current Aggre...
Definition: view.cpp:1913
bool isEmpty() const
bool isEmpty() const
QList< Akonadi::Item > currentThreadAsMessageList() const
Returns the Akonadi::Item bound to the current StorageModel that are part of the current thread...
Definition: widget.cpp:625
virtual void viewMessageSelected(MessageList::Core::MessageItem *msg)
Reimplemented from MessageList::Core::Widget.
Definition: widget.cpp:253
void setAllThreadsExpanded(bool expand)
If expand is true then it expands all the threads, otherwise collapses them.
Definition: view.cpp:1037
void setQuickSearchClickMessage(const QString &msg)
Definition: view.cpp:2778
void setCollapseItem(const QModelIndex &index)
Definition: view.cpp:2766
int currentModelIndexRow()
Returns the current model index row for this invariant index.
Definition: modelinvariantindex.cpp:47
void 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 ...
Definition: widget.cpp:702
QList< Akonadi::Item::Id > selectionAsListMessageId(bool includeCollapsedChildren) const
Definition: widget.cpp:612
void ignore()
bool getSelectionStats(Akonadi::Item::List &selectedSernums, Akonadi::Item::List &selectedVisibleSernums, bool *allSelectedBelongToSameThread, bool includeCollapsedChildren=true) const
Fills the lists of the selected message serial numbers and of the selected+visible ones...
Definition: widget.cpp:664
Akonadi::Item currentItem() const
Returns the current message for the list as Akonadi::Item.
Definition: widget.cpp:549
bool isNull() const
void messageStatusChangeRequest(const Akonadi::Item &item, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear)
Emitted when a message wants its status to be changed.
int height() const
Definition: widget.cpp:401
void selectFocusedMessageItem(bool centerItem)
Selects the currently focused message item.
Definition: view.cpp:1592
bool selectNextMessageItem(MessageTypeFilter messageTypeFilter, ExistingSelectionBehaviour existingSelectionBehaviour, bool centerItem, bool loop)
Selects the next message item in the view.
Definition: view.cpp:1462
void deletePersistentSet(MessageItemSetReference ref)
Deletes the persistent set pointed by the specified reference.
Definition: view.cpp:1679
void markMessageItemsAsAboutToBeRemoved(QList< MessageItem * > &items, bool bMark)
If bMark is true this function marks the messages as "about to be removed" so they appear dimmer and ...
Definition: view.cpp:1684
void selectFocusedMessageItem(bool centerItem)
Selects the currently focused message item.
Definition: widget.cpp:162
bool selectPreviousMessageItem(MessageTypeFilter messageTypeFilter, ExistingSelectionBehaviour existingSelectionBehaviour, bool centerItem, bool loop)
Selects the previous message item in the view.
Definition: view.cpp:1504
virtual void selectAll()
MessageTypeFilter
This enum is used in the view message selection functions (for instance View::nextMessageItem()).
Definition: enums.h:56
QList< MessageItem * > currentThreadAsMessageItemList() const
Returns the MessageItems bound to the current StorageModel that are part of the current thread...
Definition: view.cpp:947
QPoint pos()
void setAllThreadsExpanded(bool expand)
If expand is true then it expands all the threads, otherwise collapses them.
Definition: widget.cpp:188
bool focusNextMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop)
Focuses the next message item in the view without actually selecting it.
Definition: widget.cpp:152
QString currentFilterSearchString() const
Returns the search term in the current quicksearch field.
Definition: view.cpp:2727
QList< MessageItem * > persistentSetCurrentMessageItemList(MessageItemSetReference ref)
Returns the list of MessageItems that are still existing in the set pointed by the specified referenc...
Definition: view.cpp:1674
The Akonadi specific implementation of the Core::StorageModel.
Definition: storagemodel.h:48
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Definition: model.cpp:545
virtual void viewMessageActivated(MessageList::Core::MessageItem *msg)
Reimplemented from MessageList::Core::Widget.
Definition: widget.cpp:273
bool focusNextMessageItem(MessageTypeFilter messageTypeFilter, bool centerItem, bool loop)
Focuses the next message item in the view without actually selecting it.
Definition: view.cpp:1546
Core::MessageItem * currentMessageItem() const
Returns the current MessageItem in the current folder.
Definition: widgetbase.cpp:228
void focusQuickSearch(const QString &selectedText)
Sets the focus on the quick search line of the currently active tab.
Definition: view.cpp:2712
void setQuickSearchClickMessage(const QString &msg)
Definition: widget.cpp:203
QList< Akonadi::MessageStatus > currentFilterStatus() const
Returns the Akonadi::MessageStatus in the current quicksearch field.
Definition: widget.cpp:643
MessageList::Core::MessageItemSetReference currentThreadAsPersistentSet() const
Return a persistent set from current thread.
Definition: widget.cpp:731
void setXmlGuiClient(KXMLGUIClient *xmlGuiClient)
Sets the XML GUI client which the view is used in.
Definition: widget.cpp:101
bool isThreaded() const
Returns true if the current Aggregation is threaded, false otherwise (or if there is no current Aggre...
Definition: widget.cpp:654
bool selectNextMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour, bool centerItem, bool loop)
Selects the next message item in the view.
Definition: widget.cpp:136
QVector< qlonglong > selectionAsMessageItemListId(bool includeCollapsedChildren) const
Returns the currently selected Items id (bound to current StorageModel).
Definition: widget.cpp:598
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setCurrentThreadExpanded(bool expand)
If expand is true then it expands the current thread, otherwise collapses it.
Definition: widget.cpp:183
void populateStatusFilterCombo()
This is called to setup the status filter's KComboBox.
Definition: widgetbase.cpp:199
StorageModel * storageModel() const
Returns the StorageModel currently set.
Definition: widgetbase.cpp:363
void addMessageTagItem(const QPixmap &, const QString &, const QVariant &)
Definition: widgetbase.cpp:214
bool selectFirstMessageItem(MessageTypeFilter messageTypeFilter, bool centerItem)
Selects the first message item in the view that matches messageTypeFilter.
Definition: view.cpp:1609
qint64 parentCollectionId() const
Definition: item.cpp:509
void accept(bool accept)
bool selectPreviousMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour, bool centerItem, bool loop)
Selects the previous message item in the view.
Definition: widget.cpp:144
long int MessageItemSetReference
Definition: messageitemsetmanager.h:33
void setAllGroupsExpanded(bool expand)
If expand is true then it expands all the groups (only the toplevel group item: inner threads are NOT...
Definition: widget.cpp:193
ExistingSelectionBehaviour
This enum is used in the view message selection functions (for instance View::selectNextMessage()) ...
Definition: enums.h:65
QList< Akonadi::MessageStatus > currentFilterStatus() const
Returns the Akonadi::MessageStatus in the current quicksearch field.
Definition: view.cpp:2717
virtual void viewMessageStatusChangeRequest(MessageList::Core::MessageItem *msg, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear)
Reimplemented from MessageList::Core::Widget.
Definition: widget.cpp:326
void deletePersistentSet(MessageList::Core::MessageItemSetReference ref)
Deletes the persistent set pointed by the specified reference.
Definition: widget.cpp:697
void selectionChanged()
Emitted when the selection in the view changes.
Definition: widget.cpp:400
bool focusPreviousMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop)
Focuses the previous message item in the view without actually selecting it.
Definition: widget.cpp:157
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.