kotodoviewitem.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef KOTODOVIEWITEM_H
00025 #define KOTODOVIEWITEM_H
00026
00027 #include <qmap.h>
00028 #include <qlistview.h>
00029 #include <qpalette.h>
00030
00031 #include <libkcal/todo.h>
00032 #include <libkcal/incidence.h>
00033
00034 using namespace KCal;
00035
00036 class KOTodoView;
00037
00045 class KOTodoViewItem : public QCheckListItem
00046 {
00047 public:
00054 KOTodoViewItem(QListView *parent, Todo *todo, KOTodoView *kotodo);
00055 KOTodoViewItem(KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo);
00056 virtual ~KOTodoViewItem() {}
00057
00058 void construct();
00059
00060 Todo *todo() { return mTodo; }
00061 Incidence *incidence() { return mTodo; }
00062 QDate itemDate() { return QDate(); }
00063
00064 QString key(int, bool) const;
00065
00066 void setSortKey(int column,const QString &key);
00067
00068 bool isAlternate();
00069 int compare( QListViewItem *i, int col, bool ascending ) const;
00070 virtual void paintCell(QPainter *p, const QColorGroup &cg,
00071 int column, int width, int alignment);
00072
00073
00074 void setResourceColor(QColor color);
00075 QColor resourceColor() const { return mResourceColor; }
00076
00077 protected:
00078 #if QT_VERSION >= 300
00079 void paintBranches(QPainter *p,const QColorGroup & cg,int w,int y,int h);
00080 #else
00081 #endif
00082 virtual void stateChange(bool);
00083 enum {
00084 eSummaryColumn=0,
00085 eRecurColumn=1,
00086 ePriorityColumn=2,
00087 ePercentColumn=3,
00088 eDueDateColumn=4,
00089 eCategoriesColumn=5,
00090 eDescriptionColumn=6
00091 };
00092 QColor mResourceColor;
00093
00094
00095 private:
00096 Todo *mTodo;
00097 KOTodoView *mTodoView;
00098
00099 QMap<int,QString> mKeyMap;
00100 uint m_odd : 1;
00101 uint m_known : 1;
00102 uint m_unused : 30;
00103 bool m_init;
00104 };
00105
00106 #endif
This file is part of the documentation for korganizer Library Version 3.3.2.