author | simon <simon> | 2002-04-30 14:27:27 (UTC) |
---|---|---|
committer | simon <simon> | 2002-04-30 14:27:27 (UTC) |
commit | 972fbb128294c821ff0f13ea59a83edb015d571e (patch) (unidiff) | |
tree | 29d5de901e2e6c679d4cc76286e3e6e77a49b297 | |
parent | 5dae945f8ec25a811efb10eb71d606ce8da4429f (diff) | |
download | opie-972fbb128294c821ff0f13ea59a83edb015d571e.zip opie-972fbb128294c821ff0f13ea59a83edb015d571e.tar.gz opie-972fbb128294c821ff0f13ea59a83edb015d571e.tar.bz2 |
- XMLTree is in the Opie namespace now
-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 | |||
@@ -24,48 +24,50 @@ | |||
24 | #include <opie/tododb.h> | 24 | #include <opie/tododb.h> |
25 | #include <opie/xmltree.h> | 25 | #include <opie/xmltree.h> |
26 | 26 | ||
27 | #include <qpe/categoryselect.h> | 27 | #include <qpe/categoryselect.h> |
28 | #include <qpe/xmlreader.h> | 28 | #include <qpe/xmlreader.h> |
29 | 29 | ||
30 | #include <qasciidict.h> | 30 | #include <qasciidict.h> |
31 | #include <qcombobox.h> | 31 | #include <qcombobox.h> |
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 | ||
64 | void CheckItem::setChecked( bool b ) | 66 | void CheckItem::setChecked( bool b ) |
65 | { | 67 | { |
66 | checked = b; | 68 | checked = b; |
67 | table()->updateCell( row(), col() ); | 69 | table()->updateCell( row(), col() ); |
68 | } | 70 | } |
69 | 71 | ||
70 | void CheckItem::toggle() | 72 | void CheckItem::toggle() |
71 | { | 73 | { |
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 | |||
@@ -73,49 +73,53 @@ class TodoTextItem : public QTableItem | |||
73 | public: | 73 | public: |
74 | TodoTextItem( QTable *t, const QString & str ) | 74 | TodoTextItem( QTable *t, const QString & str ) |
75 | :QTableItem( t, QTableItem::Never, str ) {} | 75 | :QTableItem( t, QTableItem::Never, str ) {} |
76 | 76 | ||
77 | QString key () const { return Qtopia::buildSortKey( text() ); } | 77 | QString key () const { return Qtopia::buildSortKey( text() ); } |
78 | }; | 78 | }; |
79 | 79 | ||
80 | class DueTextItem : public QTableItem | 80 | 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; } |
114 | 118 | ||
115 | void setShowDeadline (bool sd) {showDeadl = sd; updateVisible();} | 119 | void setShowDeadline (bool sd) {showDeadl = sd; updateVisible();} |
116 | bool showDeadline() const { return showDeadl;} | 120 | bool showDeadline() const { return showDeadl;} |
117 | 121 | ||
118 | void setShowCategory( const QString &c ) { showCat = c; updateVisible(); } | 122 | void setShowCategory( const QString &c ) { showCat = c; updateVisible(); } |
119 | const QString &showCategory() const { return showCat; } | 123 | const QString &showCategory() const { return showCat; } |
120 | int showCategoryId() const; | 124 | int showCategoryId() const; |
121 | 125 | ||