korganizer Library API Documentation

kotodoviewitem.h

00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program; if not, write to the Free Software
00017     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 */
00019 #ifndef KOTODOVIEWITEM_H
00020 #define KOTODOVIEWITEM_H
00021 
00022 #include <qfont.h>
00023 #include <qfontmetrics.h>
00024 #include <qlineedit.h>
00025 #include <qptrlist.h>
00026 #include <qstrlist.h>
00027 #include <qlistbox.h>
00028 #include <qpopupmenu.h>
00029 #include <qlabel.h>
00030 #include <qmap.h>
00031 #include <qlistview.h>
00032 
00033 #include <libkcal/calendar.h>
00034 #include <libkcal/todo.h>
00035 
00036 using namespace KCal;
00037 
00038 class KOTodoView;
00039 
00047 class KOTodoViewItem : public QCheckListItem
00048 {
00049   public:
00056     KOTodoViewItem(QListView *parent, Todo *todo, KOTodoView *kotodo);
00057     KOTodoViewItem(KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo);
00058     virtual ~KOTodoViewItem() {}
00059 
00060     void construct();
00061 
00062     Todo *todo() { return mTodo; }
00063 
00064     QString key(int, bool) const;
00065 
00066     void setSortKey(int column,const QString &key);
00067     
00068     bool isAlternate();
00069 
00070     virtual void paintCell(QPainter *p, const QColorGroup &cg,
00071       int column, int width, int alignment);
00072 
00073   protected:
00074 #if QT_VERSION >= 300
00075     void paintBranches(QPainter *p,const QColorGroup & cg,int w,int y,int h);
00076 #else
00077 #endif
00078   virtual void stateChange(bool);
00079 
00080   private:
00081     Todo *mTodo;
00082     KOTodoView *mTodoView;
00083 
00084     QMap<int,QString> mKeyMap;
00085     uint m_odd : 1;
00086     uint m_known : 1;
00087     uint m_unused : 30;
00088     bool m_init;
00089 };
00090 
00091 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:41:10 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001