summaryrefslogtreecommitdiff
path: root/core/pim/todo/todotable.h
Unidiff
Diffstat (limited to 'core/pim/todo/todotable.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/todotable.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/core/pim/todo/todotable.h b/core/pim/todo/todotable.h
index 4f3a064..2746ce7 100644
--- a/core/pim/todo/todotable.h
+++ b/core/pim/todo/todotable.h
@@ -22,9 +22,10 @@
22#define TODOTABLE_H 22#define TODOTABLE_H
23 23
24#include <qpe/categories.h> 24#include <qpe/categories.h>
25#include <qpe/stringutil.h> 25#include <qpe/stringutil.h>
26#include <qpe/task.h> 26//#include <qpe/task.h>
27#include <opie/todoevent.h>
27 28
28#include <qtable.h> 29#include <qtable.h>
29#include <qmap.h> 30#include <qmap.h>
30#include <qguardedptr.h> 31#include <qguardedptr.h>
@@ -85,13 +86,13 @@ class TodoTable : public QTable
85 Q_OBJECT 86 Q_OBJECT
86 87
87public: 88public:
88 TodoTable( QWidget *parent = 0, const char * name = 0 ); 89 TodoTable( QWidget *parent = 0, const char * name = 0 );
89 void addEntry( const Task &todo ); 90 void addEntry( const ToDoEvent &todo );
90 void clearFindRow() { currFindRow = -2; } 91 void clearFindRow() { currFindRow = -2; }
91 92
92 Task currentEntry() const; 93 ToDoEvent currentEntry() const;
93 void replaceCurrentEntry( const Task &todo, bool fromTableItem = false ); 94 void replaceCurrentEntry( const ToDoEvent &todo, bool fromTableItem = false );
94 95
95 QStringList categories(); 96 QStringList categories();
96 97
97 void setShowCompleted( bool sc ) { showComp = sc; updateVisible(); } 98 void setShowCompleted( bool sc ) { showComp = sc; updateVisible(); }
@@ -127,13 +128,13 @@ protected:
127 128
128private: 129private:
129 void updateVisible(); 130 void updateVisible();
130 void viewportPaintEvent( QPaintEvent * ); 131 void viewportPaintEvent( QPaintEvent * );
131 void internalAddEntries( QList<Task> &list); 132 void internalAddEntries( QList<ToDoEvent> &list);
132 inline void insertIntoTable( Task *todo, int row ); 133 inline void insertIntoTable( ToDoEvent *todo, int row );
133 void updateJournal( const Task &todo, journal_action action, int row = -1); 134 void updateJournal( const ToDoEvent &todo, journal_action action, int row = -1);
134 void mergeJournal(); 135 void mergeJournal();
135 void journalFreeReplaceEntry( const Task &todo, int row ); 136 void journalFreeReplaceEntry( const ToDoEvent &todo, int row );
136 void journalFreeRemoveEntry( int row ); 137 void journalFreeRemoveEntry( int row );
137 inline void realignTable( int row ); 138 inline void realignTable( int row );
138 void loadFile( const QString &strFile, bool fromJournal = false ); 139 void loadFile( const QString &strFile, bool fromJournal = false );
139 140
@@ -149,9 +150,9 @@ private slots:
149 150
150private: 151private:
151 friend class TodoWindow; 152 friend class TodoWindow;
152 153
153 QMap<CheckItem*, Task *> todoList; 154 QMap<CheckItem*, ToDoEvent *> todoList;
154 QStringList categoryList; 155 QStringList categoryList;
155 bool showComp; 156 bool showComp;
156 QString showCat; 157 QString showCat;
157 QTimer *menuTimer; 158 QTimer *menuTimer;
@@ -160,9 +161,9 @@ private:
160 int currFindRow; 161 int currFindRow;
161}; 162};
162 163
163 164
164inline void TodoTable::insertIntoTable( Task *todo, int row ) 165inline void TodoTable::insertIntoTable( ToDoEvent *todo, int row )
165{ 166{
166 QString sortKey = (char) ((todo->isCompleted() ? 'a' : 'A') 167 QString sortKey = (char) ((todo->isCompleted() ? 'a' : 'A')
167 + todo->priority() ) 168 + todo->priority() )
168 + Qtopia::buildSortKey( todo->description() ); 169 + Qtopia::buildSortKey( todo->description() );