Diffstat (limited to 'core/pim/todo/todomanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/todomanager.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/core/pim/todo/todomanager.cpp b/core/pim/todo/todomanager.cpp index 501cca7..21e1d0c 100644 --- a/core/pim/todo/todomanager.cpp +++ b/core/pim/todo/todomanager.cpp | |||
@@ -37,56 +37,56 @@ TodoManager::TodoManager( QObject *obj ) | |||
37 | QTime time; | 37 | QTime time; |
38 | time.start(); | 38 | time.start(); |
39 | int el = time.elapsed(); | 39 | int el = time.elapsed(); |
40 | qWarning("QTimer for loading %d", el/1000 ); | 40 | qWarning("QTimer for loading %d", el/1000 ); |
41 | } | 41 | } |
42 | TodoManager::~TodoManager() { | 42 | TodoManager::~TodoManager() { |
43 | delete m_db; | 43 | delete m_db; |
44 | } | 44 | } |
45 | OTodo TodoManager::event(int uid ) { | 45 | OPimTodo TodoManager::event(int uid ) { |
46 | return m_db->find( uid ); | 46 | return m_db->find( uid ); |
47 | } | 47 | } |
48 | void TodoManager::updateList() { | 48 | void TodoManager::updateList() { |
49 | qWarning("update list"); | 49 | qWarning("update list"); |
50 | m_list = m_db->allRecords(); | 50 | m_list = m_db->allRecords(); |
51 | } | 51 | } |
52 | OTodoAccess::List TodoManager::list() const{ | 52 | OPimTodoAccess::List TodoManager::list() const{ |
53 | return m_list; | 53 | return m_list; |
54 | } | 54 | } |
55 | OTodoAccess::List TodoManager::sorted( bool asc, int so, int f, int cat ) { | 55 | OPimTodoAccess::List TodoManager::sorted( bool asc, int so, int f, int cat ) { |
56 | return m_db->sorted( asc, so, f, cat ); | 56 | return m_db->sorted( asc, so, f, cat ); |
57 | } | 57 | } |
58 | OTodoAccess::List::Iterator TodoManager::overDue() { | 58 | OPimTodoAccess::List::Iterator TodoManager::overDue() { |
59 | int filter = 2 | 1; | 59 | int filter = 2 | 1; |
60 | m_list = m_db->sorted(m_asc, m_sortOrder, filter, m_ca ); | 60 | m_list = m_db->sorted(m_asc, m_sortOrder, filter, m_ca ); |
61 | m_it = m_list.begin(); | 61 | m_it = m_list.begin(); |
62 | return m_it; | 62 | return m_it; |
63 | } | 63 | } |
64 | OTodoAccess::List::Iterator TodoManager::fromTo( const QDate& start, | 64 | OPimTodoAccess::List::Iterator TodoManager::fromTo( const QDate& start, |
65 | const QDate& end ) { | 65 | const QDate& end ) { |
66 | m_list = m_db->effectiveToDos( start, end ); | 66 | m_list = m_db->effectiveToDos( start, end ); |
67 | m_it = m_list.begin(); | 67 | m_it = m_list.begin(); |
68 | return m_it; | 68 | return m_it; |
69 | } | 69 | } |
70 | OTodoAccess::List::Iterator TodoManager::query( const OTodo& ev, int query ) { | 70 | OPimTodoAccess::List::Iterator TodoManager::query( const OPimTodo& ev, int query ) { |
71 | m_list = m_db->queryByExample( ev, query ); | 71 | m_list = m_db->queryByExample( ev, query ); |
72 | m_it = m_list.begin(); | 72 | m_it = m_list.begin(); |
73 | return m_it; | 73 | return m_it; |
74 | } | 74 | } |
75 | OTodoAccess* TodoManager::todoDB() { | 75 | OPimTodoAccess* TodoManager::todoDB() { |
76 | return m_db; | 76 | return m_db; |
77 | } | 77 | } |
78 | void TodoManager::add( const OTodo& ev ) { | 78 | void TodoManager::add( const OPimTodo& ev ) { |
79 | m_db->add( ev ); | 79 | m_db->add( ev ); |
80 | } | 80 | } |
81 | void TodoManager::update( int, const SmallTodo& ) { | 81 | void TodoManager::update( int, const SmallTodo& ) { |
82 | 82 | ||
83 | } | 83 | } |
84 | void TodoManager::update( int, const OTodo& ev) { | 84 | void TodoManager::update( int, const OPimTodo& ev) { |
85 | m_db->replace( ev ); | 85 | m_db->replace( ev ); |
86 | } | 86 | } |
87 | bool TodoManager::remove( int uid ) { | 87 | bool TodoManager::remove( int uid ) { |
88 | return m_db->remove( uid ); | 88 | return m_db->remove( uid ); |
89 | } | 89 | } |
90 | void TodoManager::removeAll() { | 90 | void TodoManager::removeAll() { |
91 | m_db->clear(); | 91 | m_db->clear(); |
92 | } | 92 | } |
@@ -116,12 +116,12 @@ void TodoManager::remove( const QArray<int>& ids) { | |||
116 | for (uint i=0; i < ids.size(); i++ ) | 116 | for (uint i=0; i < ids.size(); i++ ) |
117 | remove( ids[i] ); | 117 | remove( ids[i] ); |
118 | } | 118 | } |
119 | bool TodoManager::isLoaded()const { | 119 | bool TodoManager::isLoaded()const { |
120 | return (m_db == 0 ); | 120 | return (m_db == 0 ); |
121 | } | 121 | } |
122 | void TodoManager::load() { | 122 | void TodoManager::load() { |
123 | if (!m_db) { | 123 | if (!m_db) { |
124 | m_db = new OTodoAccess(); | 124 | m_db = new OPimTodoAccess(); |
125 | m_db->load(); | 125 | m_db->load(); |
126 | } | 126 | } |
127 | } | 127 | } |