Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef QXTSCHEDULEITEMDELEGATE_H_INCLUDED
00026 #define QXTSCHEDULEITEMDELEGATE_H_INCLUDED
00027
00028 #include <QAbstractItemDelegate>
00029 #include <QPainterPath>
00030 #include "qxtstyleoptionscheduleviewitem.h"
00031 #include "qxtglobal.h"
00032
00033 QT_FORWARD_DECLARE_CLASS(QPainter)
00034
00035
00038 class QXT_GUI_EXPORT QxtScheduleItemDelegate : public QAbstractItemDelegate
00039 {
00040 Q_OBJECT
00041 public:
00042
00043 enum ItemPart
00044 {
00045 Top,
00046 Middle,
00047 Bottom,
00048 Single
00049
00050 };
00051
00052 QxtScheduleItemDelegate(QObject *parent = 0);
00053 ~QxtScheduleItemDelegate();
00054
00055 virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
00056 virtual void paintItemBody(QPainter *painter, const QRect rect , const QxtStyleOptionScheduleViewItem & option , const ItemPart part, const QModelIndex & index) const;
00057 virtual void paintItemHeader(QPainter *painter, const QRect rect , const QxtStyleOptionScheduleViewItem & option , const QModelIndex & index) const;
00058 virtual void paintSubItem(QPainter *painter, const QRect rect , const QxtStyleOptionScheduleViewItem & option , const QModelIndex & index) const;
00059 virtual QSize sizeHint(const QStyleOptionViewItem & option , const QModelIndex & index) const;
00060 virtual void createPainterPath(QPainterPath &emptyPath, const QRect &fullItemRect , const int iRoundTop, const int iRoundBottom) const;
00061
00062
00063 };
00064
00065 #endif // QXTSCHEDULEITEMDELEGATE_H_INCLUDED