Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

todoview.cpp

Go to the documentation of this file.
00001 /*
00002                              This file is part of the Opie Project
00003 
00004                              Copyright (C) Opie Team <opie-devel@handhelds.org>
00005               =.
00006             .=l.
00007            .>+-=
00008  _;:,     .>    :=|.         This program is free software; you can
00009 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00010 :`=1 )Y*s>-.--   :           the terms of the GNU Library General Public
00011 .="- .-=="i,     .._         License as published by the Free Software
00012  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00013      ._= =}       :          or (at your option) any later version.
00014     .%`+i>       _;_.
00015     .i_,=:_.      -<s.       This program is distributed in the hope that
00016      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00017     : ..    .:,     . . .    without even the implied warranty of
00018     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00019   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00020 ..}^=.=       =       ;      Library General Public License for more
00021 ++=   -.     .`     .:       details.
00022 :     =  ...= . :.=-
00023  -.   .:....=;==+<;          You should have received a copy of the GNU
00024   -_. . .   )=.  =           Library General Public License along with
00025     --        :-=`           this library; see the file COPYING.LIB.
00026                              If not, write to the Free Software Foundation,
00027                              Inc., 59 Temple Place - Suite 330,
00028                              Boston, MA 02111-1307, USA.
00029 */
00030 
00031 #include "mainwindow.h"
00032 
00033 #include <opie2/odebug.h>
00034 
00035 #include "todoview.h"
00036 
00037 using namespace Todo;
00038 
00039 
00040 
00041 
00042 TodoView::TodoView( MainWindow* win )
00043     : m_main( win )
00044 {
00045     m_asc = false;
00046     m_sortOrder = -1;
00047 }
00048 TodoView::~TodoView() {
00049 };
00050 MainWindow* TodoView::todoWindow() {
00051     return m_main;
00052 }
00053 
00054 OPimTodo TodoView::event(int uid ) {
00055     return m_main->event( uid );
00056 }
00057 OPimTodoAccess::List TodoView::list(){
00058     todoWindow()->updateList();
00059     return todoWindow()->list();
00060 }
00061 OPimTodoAccess::List TodoView::sorted()const{
00062     return m_sort;
00063 }
00064 void TodoView::sort() {
00065     m_sort = todoWindow()->sorted(m_asc,m_sortOrder );
00066     owarn << "m_sort.count() = " << m_sort.count() << oendl;
00067 }
00068 void TodoView::sort(int sort) {
00069     m_sort = todoWindow()->sorted(m_asc, m_sortOrder, sort );
00070 }
00071 void TodoView::setSortOrder( int order ) {
00072     m_sortOrder = order;
00073 }
00074 void TodoView::setAscending( bool b ) {
00075     owarn << "setAscending " << b << oendl;
00076     m_asc = b;
00077 }
00078 void TodoView::update(int, const SmallTodo&  ) {
00079     //m_main->slotUpate1( uid, to );
00080 }
00081 void TodoView::update(int , const OPimTodo& ev ) {
00082     m_main->updateTodo( ev );
00083 }
00084 void TodoView::showTodo( int uid ) {
00085     m_main->slotShow( uid );
00086 }
00087 void TodoView::edit( int uid ) {
00088     m_main->slotEdit( uid );
00089 }
00090 void TodoView::remove( int uid ) {
00091     m_main->m_todoMgr.remove( uid );
00092 }
00093 void TodoView::complete( int uid ) {
00094     m_main->slotComplete( uid );
00095 }
00096 void TodoView::complete( const OPimTodo& ev ) {
00097     m_main->slotComplete( ev );
00098 }
00099 void TodoView::removeQuery( int uid ) {
00100     m_main->slotDelete( uid );
00101 }

Generated on Sat Nov 5 16:15:56 2005 for OPIE by  doxygen 1.4.2