korganizer Library API Documentation

kotodoviewitem.h

00001 /* 00002 This file is part of KOrganizer. 00003 00004 Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00019 00020 As a special exception, permission is given to link this program 00021 with any edition of Qt, and distribute the resulting executable, 00022 without including the source code for Qt in the source distribution. 00023 */ 00024 #ifndef KOTODOVIEWITEM_H 00025 #define KOTODOVIEWITEM_H 00026 00027 #include <qmap.h> 00028 #include <qlistview.h> 00029 #include <qpalette.h> 00030 00031 namespace KCal { 00032 class Todo; 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 00062 QString key(int, bool) const; 00063 00064 void setSortKey(int column,const QString &key); 00065 00066 bool isAlternate(); 00067 int compare( QListViewItem *i, int col, bool ascending ) const; 00068 virtual void paintCell(QPainter *p, const QColorGroup &cg, 00069 int column, int width, int alignment); 00070 00071 protected: 00072 #if QT_VERSION >= 300 00073 void paintBranches(QPainter *p,const QColorGroup & cg,int w,int y,int h); 00074 #else 00075 #endif 00076 virtual void stateChange(bool); 00077 enum { 00078 eSummaryColumn=0, 00079 eRecurColumn=1, 00080 ePriorityColumn=2, 00081 ePercentColumn=3, 00082 eDueDateColumn=4, 00083 eCategoriesColumn=5, 00084 eDescriptionColumn=6 00085 }; 00086 00087 00088 private: 00089 Todo *mTodo; 00090 KOTodoView *mTodoView; 00091 00092 QMap<int,QString> mKeyMap; 00093 uint m_odd : 1; 00094 uint m_known : 1; 00095 uint m_unused : 30; 00096 bool m_init; 00097 }; 00098 00099 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 27 12:53:27 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003