messagelist
view.cpp
Go to the documentation of this file.
115 header()->setMinimumSectionSize( 2 ); // QTreeView overrides our sections sizes if we set them smaller than this value
116 header()->setDefaultSectionSize( 2 ); // QTreeView overrides our sections sizes if we set them smaller than this value
143 // Zero out the theme, aggregation and ApplyThemeColumnsTimer so Model will not cause accesses to them in its destruction process
213 ( scrollBarPosition == scrollBarMaximum && sortOrder->messageSortDirection() == SortOrder::Ascending )
303 // is quite unpredictable. This is due to the complex interaction with the model, with the QTreeView
314 // - Explicitly save the column state, used when the user changes the widths or visibility manually.
638 ( *it )->setCurrentWidth( -1 ); // reset (hmmm... we could use the "don't touch" policy here too...)
777 QObject::connect( showColumnSignalMapper, SIGNAL(mapped(int)), this, SLOT(slotShowHideColumn(int)) );
851 // then apply theme columns to re-compute proportional widths (so we hopefully stay in the view)
876 selectionModel()->select( currentIndex(), QItemSelectionModel::Select | QItemSelectionModel::Current | QItemSelectionModel::Rows );
936 if ( includeCollapsedChildren && ( selectedItem->childItemCount() > 0 ) && ( !isExpanded( *it ) ) )
1098 selectionModel()->select( selection, QItemSelectionModel::Select | QItemSelectionModel::Rows );
1121 Item * View::messageItemAfter( Item * referenceItem, MessageTypeFilter messageTypeFilter, bool loop )
1142 // the current item had children: either expanded or we want unread/new messages (and so we'll expand it if it isn't)
1191 ( ( d->mModel->flags( belowIndex ) & ( Qt::ItemIsSelectable | Qt::ItemIsEnabled ) ) != ( Qt::ItemIsSelectable | Qt::ItemIsEnabled ) )
1195 if ( ( below->childItemCount() > 0 ) && ( ( messageTypeFilter != MessageTypeAny ) || isExpanded( belowIndex ) ) )
1197 // the current item had children: either expanded or we want unread messages (and so we'll expand it if it isn't)
1211 if ( referenceItem ) // <-- this means "we have started from something that is not the top: looping makes sense"
1213 // else mi == 0 and below == 0: we have started from the beginning and reached the end (it will fail the test below and exit)
1251 Item * View::messageItemBefore( Item * referenceItem, MessageTypeFilter messageTypeFilter, bool loop )
1273 // the current item had children: either expanded or we want unread/new messages (and so we'll expand it if it isn't)
1330 ( ( d->mModel->flags( aboveIndex ) & ( Qt::ItemIsSelectable | Qt::ItemIsEnabled ) ) != ( Qt::ItemIsSelectable | Qt::ItemIsEnabled ) )
1342 if ( referenceItem ) // <-- this means "we have started from something that is not the beginning: looping makes sense"
1344 // else mi == 0 and above == 0: we have started from the end and reached the beginning (it will fail the test below and exit)
1431 selectionModel()->select( newSelectedIndex, QItemSelectionModel::Rows | QItemSelectionModel::Select );
1445 selectionModel()->select( newSelectedIndex, QItemSelectionModel::Rows | QItemSelectionModel::Select );
1458 selectionModel()->select( newSelectedIndex, QItemSelectionModel::Rows | QItemSelectionModel::Select );
1546 bool View::focusNextMessageItem( MessageTypeFilter messageTypeFilter, bool centerItem, bool loop )
1569 bool View::focusPreviousMessageItem( MessageTypeFilter messageTypeFilter, bool centerItem, bool loop )
1603 selectionModel()->select( idx, QItemSelectionModel::Select | QItemSelectionModel::Current | QItemSelectionModel::Rows );
1674 QList< MessageItem * > View::persistentSetCurrentMessageItemList( MessageItemSetReference ref )
1823 selectionModel()->select( aMessageIndex, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows );
1849 if ( isRowHidden( it->parent()->indexOfChildItem( it ), d->mModel->index( it->parent(), 0 ) ) )
1850 setRowHidden( it->parent()->indexOfChildItem( it ), d->mModel->index( it->parent(), 0 ), false );
1856 if ( isRowHidden( it->parent()->indexOfChildItem( it ), d->mModel->index( it->parent(), 0 ) ) )
1857 setRowHidden( it->parent()->indexOfChildItem( it ), d->mModel->index( it->parent(), 0 ), false );
1883 return false; // item not viewable (not attached to the viewable root or qt not yet aware of it)
1887 if ( isRowHidden( it->parent()->indexOfChildItem( it ), d->mModel->index( it->parent(), 0 ) ) )
1945 selectionModel()->select( selection, QItemSelectionModel::Select | QItemSelectionModel::Rows );
2011 if ( d->mDelegate->hitContentItem()->isIcon() && d->mDelegate->hitContentItem()->isClickable() )
2067 void View::changeMessageStatus( MessageItem * it, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &unset )
2070 // visible to the user even if the Model is actually in the middle of a long job (maybe it's loading)
2073 // d->mWidget->viewMessageStatusChangeRequest() will really perform the status change on the storage.
2074 // Well... in KMail it will unless something is really screwed. Anyway, if it will not, at the next
2145 it->status().isImportant() ? Akonadi::MessageStatus() : Akonadi::MessageStatus::statusImportant(),
2146 it->status().isImportant() ? Akonadi::MessageStatus::statusImportant() : Akonadi::MessageStatus()
2150 changeMessageStatusRead( static_cast< MessageItem * >( it ), it->status().isRead() ? false : true );
2156 it->status().isSpam() ? Akonadi::MessageStatus() : ( it->status().isHam() ? Akonadi::MessageStatus::statusSpam() : Akonadi::MessageStatus::statusHam() ),
2157 it->status().isSpam() ? Akonadi::MessageStatus::statusSpam() : ( it->status().isHam() ? Akonadi::MessageStatus::statusHam() : Akonadi::MessageStatus() )
2164 it->status().isIgnored() ? Akonadi::MessageStatus() : ( it->status().isWatched() ? Akonadi::MessageStatus::statusIgnored() : Akonadi::MessageStatus::statusWatched() ),
2165 it->status().isIgnored() ? Akonadi::MessageStatus::statusIgnored() : ( it->status().isWatched() ? Akonadi::MessageStatus::statusWatched() : Akonadi::MessageStatus() )
2175 // Let QTreeView handle the selection and emit the appropriate signals (slotSelectionChanged() may be called)
2180 // Let QTreeView handle the selection and emit the appropriate signals (slotSelectionChanged() may be called)
2183 d->mWidget->viewMessageListContextPopupRequest( selectionAsMessageItemList(), viewport()->mapToGlobal( e->pos() ) );
2219 d->mWidget->viewGroupHeaderContextPopupRequest( groupHeaderItem, viewport()->mapToGlobal( e->pos() ) );
2245 if ( ( e->pos() - d->mMousePressPosition ).manhattanLength() <= KGlobalSettings::dndEventDelay() )
2272 d->mWidget->viewGroupHeaderContextPopupRequest( static_cast< GroupHeaderItem * >( item ), viewport()->mapToGlobal( pos ) );
2274 d->mWidget->viewMessageListContextPopupRequest( selectionAsMessageItemList(), viewport()->mapToGlobal( pos ) );
2359 const QString textDirection = textIsLeftToRight ? QLatin1String( "left" ) : QLatin1String( "right" );
2379 ).arg( txtColorName ).arg( bckColorName ).arg( Qt::escape( mi->subject() ) ).arg( textDirection );
2401 tip += htmlCodeForStandardRow.arg( i18n( "From" ) ).arg( MessageCore::StringUtil::stripEmailAddr( mi->sender() ) );
2402 tip += htmlCodeForStandardRow.arg( i18nc( "Receiver of the email", "To" ) ).arg( MessageCore::StringUtil::stripEmailAddr( mi->receiver() ) );
2405 tip += htmlCodeForStandardRow.arg( MessageCore::StringUtil::stripEmailAddr( mi->sender() ) ).arg( i18n( "From" ) );
2406 tip += htmlCodeForStandardRow.arg( MessageCore::StringUtil::stripEmailAddr( mi->receiver() ) ).arg( i18nc( "Receiver of the email", "To" ) );
2429 tip += htmlCodeForStandardRow.arg( i18n( "Note" ) ).arg( mi->annotation().replace( QLatin1Char( '\n' ), QLatin1String( "<br>" ) ) );
2431 tip += htmlCodeForStandardRow.arg( mi->annotation().replace( QLatin1Char( '\n' ), QLatin1String( "<br>" ) ) ).arg( i18n( "Note" ) );
2438 tip += htmlCodeForStandardRow.arg( i18n( "Preview" ) ).arg( content.replace( QLatin1Char( '\n' ), QLatin1String( "<br>" ) ) );
2440 tip += htmlCodeForStandardRow.arg( content.replace( QLatin1Char( '\n' ), QLatin1String( "<br>" ) ) ).arg( i18n( "Preview" ) );
void customContextMenuRequested(const QPoint &pos)
Sort the messages by date and time of the most recent message in subtree.
Definition: sortorder.h:82
bool focusPreviousMessageItem(MessageTypeFilter messageTypeFilter, bool centerItem, bool loop)
Focuses the previous message item in the view without actually selecting it.
Definition: view.cpp:1569
QModelIndexList indexes() const
void slotAdjustColumnSizes()
Handles the Adjust Column Sizes action of the header context menu.
Definition: view.cpp:802
virtual void mouseDoubleClickEvent(QMouseEvent *e)
Reimplemented in order to handle double clicks with sub-item precision.
Definition: view.cpp:1985
The Expanded state icon for group headers.
Definition: theme.h:186
A class which holds information about sorting, e.g.
Definition: sortorder.h:37
Type type() const
A set of aggregation options that can be applied to the MessageList::Model in a single shot...
Definition: aggregation.h:43
const QPalette & palette() const
The icon that displays the unread/read state (never disabled)
Definition: theme.h:154
Item * messageItemBefore(Item *referenceItem, MessageTypeFilter messageTypeFilter, bool loop)
Finds message item that comes "before" the reference item.
Definition: view.cpp:1251
int bottom() const
void ignoreCurrentChanges(bool ignore)
This is called by the model to insulate us from certain QTreeView signals This is because they may be...
Definition: view.cpp:162
void setAlternatingRowColors(bool enable)
Definition: delegate.h:34
MessageList::Core::QuickSearchLine::SearchOptions currentOptions() const
Definition: view.cpp:2722
Qt::LayoutDirection layoutDirection()
Item * previousMessageItem(MessageTypeFilter messageTypeFilter, bool loop)
Finds the previous message item with respect to the current item.
Definition: view.cpp:1369
void childItemStats(ChildItemStats &stats) const
Gathers statistics about child items.
Definition: item.cpp:55
virtual void mousePressEvent(QMouseEvent *e)
Reimplemented in order to handle clicks with sub-item precision.
Definition: view.cpp:2094
QString annotation() const
Returns the annotation of the message, given that hasAnnotation() is true.
Definition: messageitem.cpp:267
void setCurrentThreadExpanded(bool expand)
If expand is true then it expands the current thread, otherwise collapses it.
Definition: view.cpp:1009
void setCurrentIndex(const QModelIndex &index)
void setSelectionMode(QAbstractItemView::SelectionMode mode)
virtual void dragEnterEvent(QDragEnterEvent *e)
Reimplemented in order to handle message DnD.
Definition: view.cpp:2279
bool isDisplayedWithParentsExpanded(Item *it) const
Returns true if the specified item is currently displayed in the tree and has all the parents expande...
Definition: view.cpp:1871
void changeMessageStatus(MessageItem *it, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &unset)
Performs a change in the specified MessageItem status.
Definition: view.cpp:2067
void slotShowDefaultColumns()
Handles the Show Default Columns action of the header context menu.
Definition: view.cpp:811
void slotHeaderSectionResized(int logicalIndex, int oldWidth, int newWidth)
Handles section resizes in order to save the column widths.
Definition: view.cpp:708
Definition: messageitem.h:46
QString name() const
QItemSelectionModel * selectionModel() const
const QString & label() const
Definition: groupheaderitem.cpp:35
Perform no threading at all.
Definition: aggregation.h:85
void subTreeToList(QList< MessageItem * > &list)
Appends the whole subtree originating at this item to the specified list.
Definition: messageitem.cpp:609
void setDefaultSectionSize(int size)
void setChecked(bool)
virtual int sizeHintForColumn(int logicalColumnIndex) const
Reimplemented in order to kill the QTreeView column auto-resizing.
Definition: view.cpp:718
void slotExpandAllGroups()
Expands all the group headers (if present in the current Aggregation)
Definition: view.cpp:2697
bool selectLastMessageItem(MessageTypeFilter messageTypeFilter, bool centerItem)
Selects the last message item in the view that matches messageTypeFilter.
Definition: view.cpp:1635
Provides a widget which has the messagelist and the most important helper widgets, like the search line and the comboboxes for changing status filtering, aggregation etc.
Definition: widgetbase.h:61
const QColor & color(ColorGroup group, ColorRole role) const
const T & at(int i) const
const QObjectList & children() const
Definition: enums.h:58
QModelIndex bottomRight() const
bool isVisible() const
QPoint mapToGlobal(const QPoint &pos) const
Group the messages by the date of the thread leader.
Definition: aggregation.h:55
const int gHeaderContextMenuDisplayToolTipsId
Definition: view.cpp:747
QPoint bottomLeft() const
const QPoint & pos() const
QString formattedSize() const
A string with a text rappresentation of size().
Definition: item.cpp:254
void setUniformRowHeights(bool uniform)
QWidget * viewport() const
void modelJobBatchTerminated()
This is called by Model to signal the end of a lengthy job batch.
Definition: view.cpp:286
const QString & receiver() const
Returns the receiver associated to this item.
Definition: item.cpp:451
Use smart (thread leader) date ranges ("Today","Yesterday","Last Week"...)
Definition: aggregation.h:56
bool selectionEmpty() const
Fast function that determines if the selection is empty.
Definition: view.cpp:900
virtual void resizeEvent(QResizeEvent *event)
bool isScrollingLocked() const
Returns true if the vertical scrollbar should keep to the top or bottom while inserting items...
Definition: view.cpp:181
Item * deepestExpandedChild(Item *referenceItem) const
Returns the deepest child that is visible (i.e.
Definition: view.cpp:1240
void setVerticalScrollMode(ScrollMode mode)
QList< MessageItem * > selectionAsMessageItemList(bool includeCollapsedChildren=true) const
Returns the currently selected MessageItems (bound to current StorageModel).
Definition: view.cpp:905
const QString & subject() const
Returns the subject associated to this Item.
Definition: item.cpp:471
Qt::MouseButtons buttons() const
virtual QRect visualRect(const QModelIndex &index) const
unsigned int mUnreadChildCount
Definition: item.h:195
The MessageList::View is the real display of the message list.
Definition: view.h:65
void sortOrderMenuAboutToShow(KMenu *menu)
Definition: view.cpp:2751
void setExpandItem(const QModelIndex &index)
Definition: view.cpp:2772
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
Item * messageItemAfter(Item *referenceItem, MessageTypeFilter messageTypeFilter, bool loop)
Finds message item that comes "after" the reference item.
Definition: view.cpp:1121
void showText(const QPoint &pos, const QString &text, QWidget *w)
The Important tag icon.
Definition: theme.h:174
Item * currentItem() const
Returns the current Item (that is bound to current StorageModel).
Definition: view.cpp:855
MessageItem * currentMessageItem(bool selectIfNeeded=true) const
Returns the current MessageItem (that is bound to current StorageModel).
Definition: view.cpp:865
void update()
Whether the message has a annotation/note.
Definition: theme.h:218
int y() const
virtual void contextMenuEvent(QContextMenuEvent *e)
Reimplemented in order to handle context menu request via keyboard.
Definition: view.cpp:2251
unsigned int mTotalChildCount
Definition: item.h:194
The thread grouping is computed from the topmost message (very similar to least recent, but might be different if timezones or machine clocks are screwed)
Definition: aggregation.h:99
const int gHeaderContextMenuShowDefaultColumnsId
Definition: view.cpp:746
The Column class defines a view column available inside this theme.
Definition: theme.h:565
This class manages the huge tree of displayable objects: GroupHeaderItems and MessageItems.
Definition: model.h:77
void saveThemeColumnState()
Saves the state of the columns (width and visility) to the currently selected theme object...
Definition: view.cpp:611
bool isRowHidden(int row, const QModelIndex &parent) const
void resizeSection(int logicalIndex, int size)
width
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
void setExpanded(const QModelIndex &index, bool expanded)
bool isValid() const
int columnWidth(int column) const
void slotShowHideColumn(int columnIndex)
Handles the actions of the header context menu for showing/hiding a column.
Definition: view.cpp:825
void setMapping(QObject *sender, int id)
int top() const
virtual void dragMoveEvent(QDragMoveEvent *e)
Reimplemented in order to handle message DnD.
Definition: view.cpp:2284
MessageItemSetReference createPersistentSet(const QList< MessageItem * > &items)
Creates a persistent set for the specified MessageItems and returns its reference.
Definition: view.cpp:1669
virtual void showEvent(QShowEvent *event)
int count(const T &value) const
void aggregationMenuAboutToShow(KMenu *menu)
Definition: view.cpp:2756
virtual bool hasAnnotation() const
Returns true if this message has an annotation.
Definition: messageitem.cpp:260
MESSAGELIST_EXPORT QString contentSummary(const Akonadi::Item &item)
Returns the first few lines of the actual email text if available.
Definition: messagelistutil.cpp:143
void append(const T &value)
void modelFinishedLoading()
This is called by Model to signal that the initial loading stage of a newly attached StorageModel is ...
Definition: view.cpp:1661
Akonadi::Item akonadiItem() const
Definition: messageitem.cpp:540
void ensureDisplayedWithParentsExpanded(Item *it)
Makes sure that the specified is currently viewable by the user.
Definition: view.cpp:1843
void setMinimumSectionSize(int size)
bool isSectionHidden(int logicalIndex) const
static bool message_type_matches(Item *item, MessageTypeFilter messageTypeFilter)
Definition: view.cpp:1101
int top() const
Item * firstMessageItem(MessageTypeFilter messageTypeFilter)
Finds the first message item in the view.
Definition: view.h:519
MessageSorting messageSorting() const
Returns the current message sorting option.
Definition: sortorder.h:127
void setUpdatesEnabled(bool enable)
int red() const
Group by receiver, always.
Definition: aggregation.h:59
const QPoint & globalPos() const
void setFocus()
void modelHasBeenReset()
This is called by the model from inside setFolder().
Definition: view.cpp:292
const QItemSelection selection() const
SortDirection messageSortDirection() const
Returns the current message SortDirection.
Definition: sortorder.h:139
Qt::MouseButton button() const
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
Item * itemAboveChild(Item *child)
Returns the item that is visually above the specified child if this item.
Definition: item.cpp:134
StorageModel * storageModel() const
Returns the currently displayed StorageModel.
Definition: view.cpp:240
virtual void select(const QModelIndex &index, QFlags< QItemSelectionModel::SelectionFlag > command)
bool isEmpty() const
QString trimmed() const
QModelIndexList selectedRows(int column) const
void setItemDelegate(QAbstractItemDelegate *delegate)
int row() const
virtual void changeEvent(QEvent *ev)
QString tagListDescription() const
Definition: messageitem.cpp:311
virtual void updateGeometries()
Reimplemented in order to disable update of the geometries while a job step is running (as it takes a...
Definition: view.cpp:218
PreSelectionMode
Pre-selection is the action of automatically selecting a message just after the folder has finished l...
Definition: enums.h:44
Item * lastMessageItem(MessageTypeFilter messageTypeFilter)
Finds the last message item in the view.
Definition: view.h:560
QPoint pos() const
void setCurrentMessageItem(MessageItem *it, bool center=false)
Sets the current message item.
Definition: view.cpp:882
void * internalPointer() const
QModelIndex parent() const
void setAllThreadsExpanded(bool expand)
If expand is true then it expands all the threads, otherwise collapses them.
Definition: view.cpp:1037
void slotSelectionChanged(const QItemSelection ¤t, const QItemSelection &)
Handles selection item management.
Definition: view.cpp:1920
void setQuickSearchClickMessage(const QString &msg)
Definition: view.cpp:2778
Item * childItem(int idx) const
Returns the child item at position idx or 0 if idx is out of the allowable range. ...
Definition: item.cpp:75
T & first()
void setCollapseItem(const QModelIndex &index)
Definition: view.cpp:2766
void setAllColumnsShowFocus(bool enable)
void clearSelection()
void setSortOrder(const SortOrder *sortOrder)
Sets the specified sort order.
Definition: view.cpp:262
QScrollBar * verticalScrollBar() const
bool isExpanded(const QModelIndex &index) const
void slotDisplayTooltips(bool showTooltips)
Handles the Display Tooltips action of the header context menu.
Definition: view.cpp:820
void changeMessageStatusRead(MessageItem *it, bool read)
Definition: view.cpp:2048
void setAcceptDrops(bool on)
QString formattedDate() const
A string with a text rappresentation of date() obtained via Manager.
Definition: item.cpp:259
int sectionSize(int logicalIndex) const
int green() const
iterator end()
void modelAboutToEmitLayoutChanged()
Definition: view.cpp:695
bool contains(QChar ch, Qt::CaseSensitivity cs) const
void setContextMenuPolicy(Qt::ContextMenuPolicy policy)
A single item of the MessageList tree managed by MessageList::Model.
Definition: item.h:52
void slotCollapseAllGroups()
Collapses all the group headers (if present in the current Aggregation)
Definition: view.cpp:2692
virtual void changeEvent(QEvent *e)
Reimplemented in order to catch palette, font and style changes.
Definition: view.cpp:2294
bool contains(const T &value) const
virtual void scrollTo(const QModelIndex &index, ScrollHint hint)
void selectFocusedMessageItem(bool centerItem)
Selects the currently focused message item.
Definition: view.cpp:1592
void setCurrentlyVisible(bool currentlyVisible)
Sets the current shared visibility state for this column.
Definition: theme.h:753
bool selectNextMessageItem(MessageTypeFilter messageTypeFilter, ExistingSelectionBehaviour existingSelectionBehaviour, bool centerItem, bool loop)
Selects the next message item in the view.
Definition: view.cpp:1462
bool isValid() const
void deletePersistentSet(MessageItemSetReference ref)
Deletes the persistent set pointed by the specified reference.
Definition: view.cpp:1679
void setCheckable(bool)
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
bool selectPreviousMessageItem(MessageTypeFilter messageTypeFilter, ExistingSelectionBehaviour existingSelectionBehaviour, bool centerItem, bool loop)
Selects the previous message item in the view.
Definition: view.cpp:1504
The QAbstractItemModel based interface that you need to provide for your storage to work with Message...
Definition: storagemodelbase.h:45
void modelEmittedLayoutChanged()
Definition: view.cpp:701
QString & replace(int position, int n, QChar after)
int blue() const
virtual bool event(QEvent *event)
A structure used with MessageList::Item::childItemStats().
Definition: item.h:191
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
The thread grouping is computed from the most recent message.
Definition: aggregation.h:100
virtual void clear()
The Spam/Ham state icon.
Definition: theme.h:178
const int gHeaderContextMenuAdjustColumnSizesId
Definition: view.cpp:745
Definition: enums.h:46
void growOrShrinkExistingSelection(const QModelIndex &newSelectedIndex, bool movingUp)
This is used by the selection functions to grow/shrink the existing selection according to the newly ...
Definition: view.cpp:1374
Item * itemBelow()
Returns the item that is visually below this item in the tree.
Definition: item.cpp:109
MESSAGELIST_EXPORT void fillViewMenu(KMenu *menu, QObject *receiver)
Definition: messagelistutil.cpp:122
void setHeaderHidden(bool hide)
QString escape(const QString &plain)
The ActionItem state icon.
Definition: theme.h:170
QString currentFilterSearchString() const
Returns the search term in the current quicksearch field.
Definition: view.cpp:2727
bool isSelected(const QModelIndex &index) const
virtual void setModel(QAbstractItemModel *model)
virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
void setResizeMode(ResizeMode mode)
QPoint mapFromGlobal(const QPoint &pos) const
void triggerDelayedApplyThemeColumns()
Starts a short-delay timer connected to applyThemeColumns().
Definition: view.cpp:603
T & last()
virtual void setRowHidden(int row, const QModelIndex &parent, bool hide)
Called to hide or show the specified row from the view.
Definition: view.cpp:2732
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
void setClickable(bool clickable)
int bottom() const
QPoint topLeft() const
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Definition: model.cpp:545
int column() const
void setStorageModel(StorageModel *storageModel, PreSelectionMode preSelectionMode=PreSelectLastSelected)
Sets the StorageModel to be displayed in this view.
Definition: view.cpp:272
virtual QModelIndexList selectedIndexes() const
virtual void dropEvent(QDropEvent *e)
Reimplemented in order to handle message DnD.
Definition: view.cpp:2289
bool focusNextMessageItem(MessageTypeFilter messageTypeFilter, bool centerItem, bool loop)
Focuses the next message item in the view without actually selecting it.
Definition: view.cpp:1546
Item * itemAbove()
Returns the item that is visually above this item in the tree.
Definition: item.cpp:149
QString fromLatin1(const char *str, int size)
void focusQuickSearch(const QString &selectedText)
Sets the focus on the quick search line of the currently active tab.
Definition: view.cpp:2712
void slotHeaderContextMenuRequested(const QPoint &pnt)
Handles context menu requests for the header.
Definition: view.cpp:749
void setCurrentIndex(const QModelIndex &index, QFlags< QItemSelectionModel::SelectionFlag > command)
Sort the messages by date and time.
Definition: sortorder.h:81
virtual void mousePressEvent(QMouseEvent *event)
const Akonadi::MessageStatus & status() const
Returns the status associated to this Item.
Definition: item.cpp:401
QHeaderView * header() const
void modelJobBatchStarted()
This is called by Model to signal a start of a lengthy job batch.
Definition: view.cpp:280
The Theme class defines the visual appearance of the MessageList.
Definition: theme.h:65
void themeMenuAboutToShow(KMenu *menu)
Definition: view.cpp:2761
void expanded(const QModelIndex &index)
const QPoint & pos() const
void selectMessageItems(const QList< MessageItem * > &list)
Selects the specified MessageItems.
Definition: view.cpp:1083
virtual void resizeEvent(QResizeEvent *e)
Reimplemented in order to resize columns when header is not visible.
Definition: view.cpp:656
const_iterator constEnd() const
virtual void updateGeometries()
void expand(const QModelIndex &index)
const_iterator constBegin() const
QString statusDescription() const
Returns a string describing the status e.g: "Read, Forwarded, Important".
Definition: item.cpp:213
The Watched/Ignored state icon.
Definition: theme.h:182
QModelIndex currentIndex() const
virtual void mouseMoveEvent(QMouseEvent *e)
Reimplemented in order to handle DnD.
Definition: view.cpp:2234
maximum
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
virtual void mouseMoveEvent(QMouseEvent *event)
QObject * parent() const
Item * parent() const
Returns the parent Item in the tree, or 0 if this item isn't attached to the tree.
Definition: item.cpp:391
Group by sender (incoming) or receiver (outgoing) field.
Definition: aggregation.h:57
void reload()
Triggers a reload of the view in order to re-display the current folder.
Definition: view.cpp:267
virtual void showEvent(QShowEvent *e)
Reimplemented in order to apply theme column widths on the first show.
Definition: view.cpp:730
bool hasChildren() const
Convenience function that returns true if this item has children.
Definition: item.cpp:168
Item * nextMessageItem(MessageTypeFilter messageTypeFilter, bool loop)
Finds the next message item with respect to the current item.
Definition: view.cpp:1235
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
void setVerticalScrollBarPolicy(Qt::ScrollBarPolicy)
bool selectFirstMessageItem(MessageTypeFilter messageTypeFilter, bool centerItem)
Selects the first message item in the view that matches messageTypeFilter.
Definition: view.cpp:1609
void setSectionHidden(int logicalIndex, bool hide)
iterator begin()
long int MessageItemSetReference
Definition: messageitemsetmanager.h:33
void setEnabled(bool)
int count() const
void setChildrenExpanded(const Item *parent, bool expand)
Expands or collapses the children of the specified item, recursively.
Definition: view.cpp:967
height
virtual QModelIndex indexAt(const QPoint &point) const
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
Item * itemBelowChild(Item *child)
Returns the item that is visually below the specified child if this item.
Definition: item.cpp:91
void setRowHidden(int row, const QModelIndex &parent, bool hide)
void triggerDelayedSaveThemeColumnState()
Starts a short-delay timer connected to saveThemeColumnState().
Definition: view.cpp:648
void ignoreUpdateGeometries(bool ignore)
Used to enable/disable the ignoring of updateGeometries() calls.
Definition: view.cpp:176
void setAggregation(const Aggregation *aggregation)
Sets the aggregation for this view.
Definition: view.cpp:245
int indexOfChildItem(Item *item) const
Returns the actual index of the child Item item or -1 if item is not a child of this Item...
Definition: item.cpp:173
virtual bool containsOutboundMessages() const =0
Returns true if this StorageModel (folder) contains outbound messages and false otherwise.
void setCurrentWidth(int currentWidth)
Sets the current shared width setting for this column.
Definition: theme.h:768
QModelIndex topLeft() const
void setStatus(const Akonadi::MessageStatus &status)
Sets the status associated to this Item.
Definition: item.cpp:406
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.