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
00063 class AKONADI_EXPORT CollectionStatisticsDelegate : public QStyledItemDelegate
00064 {
00065 Q_OBJECT
00066
00067 public:
00068
00074 explicit CollectionStatisticsDelegate( QTreeView *parent );
00075
00079 ~CollectionStatisticsDelegate();
00080
00081 public Q_SLOTS:
00091 void setUnreadCountShown( bool enable );
00092
00096 bool unreadCountShown() const;
00097
00098 void setProgressAnimationEnabled( bool enable );
00099
00100 bool progressAnimationEnabled() const;
00101
00102 protected:
00103 virtual void paint( QPainter *painter, const QStyleOptionViewItem &option,
00104 const QModelIndex &index ) const;
00105
00106 virtual void initStyleOption( QStyleOptionViewItem *option,
00107 const QModelIndex &index ) const;
00108
00109 private:
00110
00111 CollectionStatisticsDelegatePrivate* const d_ptr;
00112
00113
00114 Q_DECLARE_PRIVATE( CollectionStatisticsDelegate )
00115 };
00116
00117 }
00118
00119 #endif