akonadi
collectionstatisticsdelegate.cpp
66 void getCountRecursive(const QModelIndex &index, qint64 &totalCount, qint64 &unreadCount, qint64 &totalSize) const
266 unread = QString::fromLatin1(" (%1 + %2)").arg(unreadCount).arg(unreadRecursiveCount - unreadCount);
280 const QColor unreadColor = (option.state & QStyle::State_Selected) ? d->mSelectedUnreadColor : d->mDeselectedUnreadColor;
291 const bool enoughPlaceForText = (option.rect.width() > (folderWidth + unreadWidth + iconRect.width()));
301 unreadRect = QRect(folderRect.right(), folderRect.top(), unreadRect.width(), unreadRect.height());
326 if (index.column() == 1 && ((!expanded && unreadRecursiveCount > 0) || (expanded && unreadCount > 0))) {
334 if (index.column() == 2 && ((!expanded && totalRecursiveCount > 0) || (expanded && totalCount > 0))) {
A delegate that draws unread and total count for CollectionStatisticsModel.
Definition collectionstatisticsdelegate.h:65
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition collectionstatisticsdelegate.cpp:196
void updatePalette()
Definition collectionstatisticsdelegate.cpp:359
virtual void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const
Definition collectionstatisticsdelegate.cpp:150
bool unreadCountShown() const
Returns whether the unread count is drawn next to the folder name.
Definition collectionstatisticsdelegate.cpp:122
void setUnreadCountShown(bool enable)
Sets whether the unread count is drawn next to the folder name.
Definition collectionstatisticsdelegate.cpp:116
~CollectionStatisticsDelegate()
Destroys the collection statistics delegate.
Definition collectionstatisticsdelegate.cpp:111
void setProgressAnimationEnabled(bool enable)
Definition collectionstatisticsdelegate.cpp:128
CollectionStatisticsDelegate(QAbstractItemView *parent)
Creates a new collection statistics delegate.
Definition collectionstatisticsdelegate.cpp:97
Provides statistics information of a Collection.
Definition collectionstatistics.h:70
qint64 unreadCount() const
Returns the number of unread items in this collection or -1 if this information is not available.
Definition collectionstatistics.cpp:77
qint64 count() const
Returns the number of items in this collection or -1 if this information is not available.
Definition collectionstatistics.cpp:67
qint64 size() const
Returns the total size of the items in this collection or -1 if this information is not available.
Definition collectionstatistics.cpp:87
@ FetchingState
There is a fetch of items in this collection in progress.
Definition entitytreemodel.h:376
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.