Akonadi::CollectionStatisticsDelegate Class

Header: #include <Akonadi/CollectionStatisticsDelegate>
CMake: find_package(KPim6 REQUIRED COMPONENTS AkonadiWidgets)
target_link_libraries(mytarget PRIVATE KPim6::AkonadiWidgets)

Public Functions

CollectionStatisticsDelegate(QAbstractItemView *parent)
CollectionStatisticsDelegate(QTreeView *parent)
virtual ~CollectionStatisticsDelegate() override
void setProgressAnimationEnabled(bool enable)
void setUnreadCountShown(bool enable)
bool unreadCountShown() const
void updatePalette()

Reimplemented Protected Functions

virtual void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const override
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override

Member Function Documentation

[explicit] CollectionStatisticsDelegate::CollectionStatisticsDelegate(QAbstractItemView *parent)

Creates a new collection statistics delegate.

parent The parent item view, which will also take ownership.

[explicit] CollectionStatisticsDelegate::CollectionStatisticsDelegate(QTreeView *parent)

Creates a new collection statistics delegate.

parent The parent tree view, which will also take ownership.

[override virtual noexcept] CollectionStatisticsDelegate::~CollectionStatisticsDelegate()

Destroys the collection statistics delegate.

[override virtual protected] void CollectionStatisticsDelegate::initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const

option style option view item index model index (QModelIndex)

[override virtual protected] void CollectionStatisticsDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const

painter pointer for QPainter to use in method option style options index model index (QModelIndex)

void CollectionStatisticsDelegate::setProgressAnimationEnabled(bool enable)

enable new mode of progress animation

void CollectionStatisticsDelegate::setUnreadCountShown(bool enable)

Sets whether the unread count is drawn next to the folder name.

You probably want to enable this when the unread count is hidden only. This is disabled by default.

enable If \ true, the unread count is drawn next to the folder name, if \ false, the folder name will be drawn normally.

See also unreadCountShown().

bool CollectionStatisticsDelegate::unreadCountShown() const

Returns whether the unread count is drawn next to the folder name.

See also setUnreadCountShown().

void CollectionStatisticsDelegate::updatePalette()