akonadi
22 #ifndef PROGRESSSPINNERDELEGATE_P_H 23 #define PROGRESSSPINNERDELEGATE_P_H 25 #include <QStyledItemDelegate> 28 #include <kpixmapsequence.h> 32 class DelegateAnimator :
public QObject
36 explicit DelegateAnimator(QAbstractItemView *view);
38 void push(
const QModelIndex &index);
39 void pop(
const QModelIndex &index);
41 QPixmap sequenceFrame(
const QModelIndex &index);
43 static const int sCount = 7;
45 inline Animation(
const QPersistentModelIndex &idx)
51 bool operator==(
const Animation &other)
const 53 return index == other.index;
56 inline void nextFrame()
const {
57 frame = (frame + 1) % sCount;
60 QPersistentModelIndex index;
64 virtual void timerEvent(QTimerEvent *event);
68 QSet<Animation> m_animations;
69 QAbstractItemView *m_view;
70 KPixmapSequence m_pixmapSequence;
74 uint qHash(Akonadi::DelegateAnimator::Animation anim);
79 class ProgressSpinnerDelegate :
public QStyledItemDelegate
83 explicit ProgressSpinnerDelegate(DelegateAnimator *animator, QObject *parent = 0);
86 virtual void initStyleOption(QStyleOptionViewItem *option,
const QModelIndex &index)
const;
89 DelegateAnimator *m_animator;
FreeBusyManager::Singleton.
This file is part of the KDE documentation.
Documentation copyright © 1996-2017 The KDE developers.
Generated on Mon Mar 6 2017 14:32:58 by
doxygen 1.8.11 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.