author | zecke <zecke> | 2002-10-07 14:39:07 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-07 14:39:07 (UTC) |
commit | a7b03f9c31f515747663f07b6665744369e57ba8 (patch) (side-by-side diff) | |
tree | 3799a9001d60eac5d8212596c6ce012082d42cf6 /core/pim/todo/todoview.cpp | |
parent | add436706a938a71a487db019dcd6ff236207bfc (diff) | |
download | opie-a7b03f9c31f515747663f07b6665744369e57ba8.zip opie-a7b03f9c31f515747663f07b6665744369e57ba8.tar.gz opie-a7b03f9c31f515747663f07b6665744369e57ba8.tar.bz2 |
TodoView is a mess because I tried hard to make
it work with templates... I've to clean this up
Then I made the way free to use sorted
my next step is to make the paint hack work
-rw-r--r-- | core/pim/todo/todoview.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/core/pim/todo/todoview.cpp b/core/pim/todo/todoview.cpp index 5362b23..b77baed 100644 --- a/core/pim/todo/todoview.cpp +++ b/core/pim/todo/todoview.cpp @@ -8,6 +8,8 @@ TodoView::TodoView( MainWindow* win ) : m_main( win ) { hack = new InternQtHack; + m_asc = false; + m_sortOrder = -1; } TodoView::~TodoView() { delete hack; @@ -48,12 +50,25 @@ MainWindow* TodoView::todoWindow() { } OTodo TodoView::event(int uid ) { return m_main->event( uid ); } -OTodoAccess::List::Iterator TodoView::begin() { - m_main->updateList(); - return m_main->begin(); +OTodoAccess::List TodoView::list(){ + todoWindow()->updateList(); + return todoWindow()->list(); +} +OTodoAccess::List TodoView::sorted(){ + return m_sort; +} +void TodoView::sort() { + m_sort = todoWindow()->sorted(m_asc,m_sortOrder ); +} +void TodoView::sort(int sort) { + m_sort = todoWindow()->sorted(m_asc, m_sortOrder, sort ); +} +void TodoView::setSortOrder( int order ) { + m_sortOrder = order; +} +void TodoView::setAscending( bool b ) { + m_asc = b; } -OTodoAccess::List::Iterator TodoView::end() { return m_main->end(); } - void TodoView::update(int uid, const SmallTodo& to ) { //m_main->slotUpate1( uid, to ); } |