author | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
commit | b9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff) | |
tree | 2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /korganizer/kotodoviewitem.h | |
download | kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2 |
Initial revision
-rw-r--r-- | korganizer/kotodoviewitem.h | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/korganizer/kotodoviewitem.h b/korganizer/kotodoviewitem.h new file mode 100644 index 0000000..74dbe98 --- a/dev/null +++ b/korganizer/kotodoviewitem.h | |||
@@ -0,0 +1,93 @@ | |||
1 | /* | ||
2 | This file is part of KOrganizer. | ||
3 | Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> | ||
4 | |||
5 | This program is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation; either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program; if not, write to the Free Software | ||
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | */ | ||
19 | #ifndef KOTODOVIEWITEM_H | ||
20 | #define KOTODOVIEWITEM_H | ||
21 | |||
22 | #include <qfont.h> | ||
23 | #include <qfontmetrics.h> | ||
24 | #include <qlineedit.h> | ||
25 | #include <qptrlist.h> | ||
26 | #include <qstrlist.h> | ||
27 | #include <qlistbox.h> | ||
28 | #include <qpopupmenu.h> | ||
29 | #include <qlabel.h> | ||
30 | #include <qmap.h> | ||
31 | #include <qlistview.h> | ||
32 | #include <qpainter.h> | ||
33 | |||
34 | #include <libkcal/calendar.h> | ||
35 | #include <libkcal/todo.h> | ||
36 | |||
37 | using namespace KCal; | ||
38 | |||
39 | class KOTodoView; | ||
40 | |||
41 | /** | ||
42 | This class provides a way of displaying a single Event of Todo-Type in a | ||
43 | KTodoView. | ||
44 | |||
45 | @author Cornelius Schumacher <schumacher@kde.org> | ||
46 | @see KOTodoView | ||
47 | */ | ||
48 | class KOTodoViewItem : public QCheckListItem | ||
49 | { | ||
50 | public: | ||
51 | /** | ||
52 | Constructor. | ||
53 | |||
54 | @param parent is the list view to which this item belongs. | ||
55 | @param ev is the event to have the item display information for. | ||
56 | */ | ||
57 | KOTodoViewItem(QListView *parent, Todo *todo, KOTodoView *kotodo); | ||
58 | KOTodoViewItem(KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo); | ||
59 | //~KOTodoViewItem() { qDebug("~KOTodoViewItem() %s ", text(0).latin1() );} | ||
60 | |||
61 | void construct(); | ||
62 | |||
63 | Todo *todo() { return mTodo; } | ||
64 | |||
65 | QString key(int, bool) const; | ||
66 | |||
67 | void setSortKey(int column,const QString &key); | ||
68 | |||
69 | bool isAlternate(); | ||
70 | |||
71 | virtual void paintCell(QPainter *p, const QColorGroup &cg, | ||
72 | int column, int width, int alignment); | ||
73 | virtual void setup(); | ||
74 | protected: | ||
75 | #if QT_VERSION >= 300 | ||
76 | void paintBranches(QPainter *p,const QColorGroup & cg,int w,int y,int h); | ||
77 | #else | ||
78 | #endif | ||
79 | virtual void stateChange(bool); | ||
80 | void setMyPixmap(); | ||
81 | |||
82 | private: | ||
83 | Todo *mTodo; | ||
84 | KOTodoView *mTodoView; | ||
85 | |||
86 | QMap<int,QString> mKeyMap; | ||
87 | uint m_odd : 1; | ||
88 | uint m_known : 1; | ||
89 | uint m_unused : 30; | ||
90 | bool m_init; | ||
91 | }; | ||
92 | |||
93 | #endif | ||