akonadi
collectionstatisticsdelegate.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef AKONADI_COLLECTIONSTATISTICSDELEGATE_H
00020 #define AKONADI_COLLECTIONSTATISTICSDELEGATE_H
00021
00022 #include "akonadi_export.h"
00023
00024 #include <QtGui/QStyledItemDelegate>
00025
00026 class QTreeView;
00027
00028 namespace Akonadi {
00029
00030 class CollectionStatisticsDelegatePrivate;
00031
00059 class AKONADI_EXPORT CollectionStatisticsDelegate : public QStyledItemDelegate
00060 {
00061 Q_OBJECT
00062
00063 public:
00064
00070 explicit CollectionStatisticsDelegate( QTreeView *parent );
00071
00075 ~CollectionStatisticsDelegate();
00076
00077 public Q_SLOTS:
00087 void setUnreadCountShown( bool enable );
00088
00092 bool unreadCountShown() const;
00093
00094 protected:
00095 virtual void paint( QPainter *painter, const QStyleOptionViewItem &option,
00096 const QModelIndex &index ) const;
00097
00098 virtual void initStyleOption( QStyleOptionViewItem *option,
00099 const QModelIndex &index ) const;
00100
00101 private:
00102
00103 CollectionStatisticsDelegatePrivate* const d_ptr;
00104
00105
00106 Q_DECLARE_PRIVATE( CollectionStatisticsDelegate )
00107 };
00108
00109 }
00110
00111 #endif