AnimationDelegate.qt.H
00001 #ifndef ANIMATION_DELEGATE_QT_H
00002 #define ANIMATION_DELEGATE_QT_H
00003
00004
00005 #include <QtGui/QtGui>
00006
00007 class AnimationDelegate : public QAbstractItemDelegate
00008 {
00009 Q_OBJECT
00010
00011 public:
00012 AnimationDelegate(QObject *parent = 0);
00013
00014 void paint(QPainter *painter, const QStyleOptionViewItem &option,
00015 const QModelIndex &index) const;
00016
00017 QSize sizeHint(const QStyleOptionViewItem &option,
00018 const QModelIndex &index ) const;
00019
00020 enum FrameType {Invisible, VisibleKeyframe, InvisibleKeyframe, Tween};
00021
00022 void setSelectedRow(int rowIdx) {itsSelectedRow = rowIdx; }
00023
00024 public slots:
00025 void setFrameType(FrameType type);
00026 void frameIndexChanged(int);
00027
00028 private:
00029 FrameType itsFrameType;
00030 int itsCurrentFrameIndex;
00031 int itsSelectedRow;
00032
00033 };
00034
00035 #endif //ANIMATION_DELEGATE_QT_H