-rw-r--r-- | core/pim/todo/todotable.cpp | 2 | ||||
-rw-r--r-- | core/pim/todo/todotable.h | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/core/pim/todo/todotable.cpp b/core/pim/todo/todotable.cpp index 208a084..2389cdd 100644 --- a/core/pim/todo/todotable.cpp +++ b/core/pim/todo/todotable.cpp | |||
@@ -32,32 +32,34 @@ | |||
32 | #include <qfile.h> | 32 | #include <qfile.h> |
33 | #include <qpainter.h> | 33 | #include <qpainter.h> |
34 | #include <qtextcodec.h> | 34 | #include <qtextcodec.h> |
35 | #include <qtimer.h> | 35 | #include <qtimer.h> |
36 | #include <qdatetime.h> | 36 | #include <qdatetime.h> |
37 | #include <qtextstream.h> | 37 | #include <qtextstream.h> |
38 | 38 | ||
39 | #include <qcursor.h> | 39 | #include <qcursor.h> |
40 | #include <qregexp.h> | 40 | #include <qregexp.h> |
41 | 41 | ||
42 | #include <errno.h> | 42 | #include <errno.h> |
43 | #include <stdlib.h> | 43 | #include <stdlib.h> |
44 | 44 | ||
45 | #include <stdio.h> | 45 | #include <stdio.h> |
46 | #include <iostream> | 46 | #include <iostream> |
47 | 47 | ||
48 | using namespace Opie; | ||
49 | |||
48 | namespace { | 50 | namespace { |
49 | 51 | ||
50 | static bool taskCompare( const ToDoEvent &task, const QRegExp &r, int category ); | 52 | static bool taskCompare( const ToDoEvent &task, const QRegExp &r, int category ); |
51 | static QString journalFileName(); | 53 | static QString journalFileName(); |
52 | static ToDoEvent xmlToEvent( XMLElement *ev ); | 54 | static ToDoEvent xmlToEvent( XMLElement *ev ); |
53 | } | 55 | } |
54 | CheckItem::CheckItem( QTable *t, const QString &key ) | 56 | CheckItem::CheckItem( QTable *t, const QString &key ) |
55 | : QTableItem( t, Never, "" ), checked( FALSE ), sortKey( key ) | 57 | : QTableItem( t, Never, "" ), checked( FALSE ), sortKey( key ) |
56 | { | 58 | { |
57 | } | 59 | } |
58 | 60 | ||
59 | QString CheckItem::key() const | 61 | QString CheckItem::key() const |
60 | { | 62 | { |
61 | return sortKey; | 63 | return sortKey; |
62 | } | 64 | } |
63 | 65 | ||
diff --git a/core/pim/todo/todotable.h b/core/pim/todo/todotable.h index 2f6e635..7672f21 100644 --- a/core/pim/todo/todotable.h +++ b/core/pim/todo/todotable.h | |||
@@ -81,33 +81,37 @@ class DueTextItem : public QTableItem | |||
81 | { | 81 | { |
82 | public: | 82 | public: |
83 | DueTextItem( QTable *t, ToDoEvent *ev ); | 83 | DueTextItem( QTable *t, ToDoEvent *ev ); |
84 | QString key() const; | 84 | QString key() const; |
85 | void setToDoEvent( const ToDoEvent *ev ); | 85 | void setToDoEvent( const ToDoEvent *ev ); |
86 | void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected ); | 86 | void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected ); |
87 | private: | 87 | private: |
88 | int m_off; | 88 | int m_off; |
89 | bool m_hasDate:1; | 89 | bool m_hasDate:1; |
90 | bool m_completed:1; | 90 | bool m_completed:1; |
91 | 91 | ||
92 | }; | 92 | }; |
93 | 93 | ||
94 | 94 | ||
95 | enum journal_action { ACTION_ADD=0, ACTION_REMOVE, ACTION_REPLACE }; | 95 | enum journal_action { ACTION_ADD=0, ACTION_REMOVE, ACTION_REPLACE }; |
96 | 96 | ||
97 | namespace Opie | ||
98 | { | ||
97 | class XMLElement; | 99 | class XMLElement; |
100 | }; | ||
101 | |||
98 | class TodoTable : public QTable | 102 | class TodoTable : public QTable |
99 | { | 103 | { |
100 | Q_OBJECT | 104 | Q_OBJECT |
101 | 105 | ||
102 | public: | 106 | public: |
103 | TodoTable( QWidget *parent = 0, const char * name = 0 ); | 107 | TodoTable( QWidget *parent = 0, const char * name = 0 ); |
104 | void addEntry( const ToDoEvent &todo ); | 108 | void addEntry( const ToDoEvent &todo ); |
105 | void clearFindRow() { currFindRow = -2; } | 109 | void clearFindRow() { currFindRow = -2; } |
106 | 110 | ||
107 | ToDoEvent currentEntry() const; | 111 | ToDoEvent currentEntry() const; |
108 | void replaceCurrentEntry( const ToDoEvent &todo, bool fromTableItem = false ); | 112 | void replaceCurrentEntry( const ToDoEvent &todo, bool fromTableItem = false ); |
109 | 113 | ||
110 | QStringList categories(); | 114 | QStringList categories(); |
111 | 115 | ||
112 | void setShowCompleted( bool sc ) { showComp = sc; updateVisible(); } | 116 | void setShowCompleted( bool sc ) { showComp = sc; updateVisible(); } |
113 | bool showCompleted() const { return showComp; } | 117 | bool showCompleted() const { return showComp; } |