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 QAbstractItemView;
00027 class QTreeView;
00028
00029 namespace Akonadi {
00030
00031 class CollectionStatisticsDelegatePrivate;
00032
00064 class AKONADI_EXPORT CollectionStatisticsDelegate : public QStyledItemDelegate
00065 {
00066 Q_OBJECT
00067
00068 public:
00069
00077 explicit CollectionStatisticsDelegate( QAbstractItemView *parent );
00078
00084 explicit CollectionStatisticsDelegate( QTreeView *parent );
00085
00089 ~CollectionStatisticsDelegate();
00090
00091 public Q_SLOTS:
00101 void setUnreadCountShown( bool enable );
00102
00106 bool unreadCountShown() const;
00107
00108 void setProgressAnimationEnabled( bool enable );
00109
00110 bool progressAnimationEnabled() const;
00111
00112 protected:
00113 virtual void paint( QPainter *painter, const QStyleOptionViewItem &option,
00114 const QModelIndex &index ) const;
00115
00116 virtual void initStyleOption( QStyleOptionViewItem *option,
00117 const QModelIndex &index ) const;
00118
00119 private:
00120
00121 CollectionStatisticsDelegatePrivate* const d_ptr;
00122
00123
00124 Q_DECLARE_PRIVATE( CollectionStatisticsDelegate )
00125 };
00126
00127 }
00128
00129 #endif