Diffstat (limited to 'libopie2/opiepim/core/otodoaccess.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/otodoaccess.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libopie2/opiepim/core/otodoaccess.cpp b/libopie2/opiepim/core/otodoaccess.cpp index 83750d5..6fa0089 100644 --- a/libopie2/opiepim/core/otodoaccess.cpp +++ b/libopie2/opiepim/core/otodoaccess.cpp @@ -12,48 +12,49 @@ ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This program is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <qdatetime.h> #include <qpe/alarmserver.h> // #include "otodoaccesssql.h" #include <opie2/otodoaccess.h> #include <opie2/obackendfactory.h> +#include <opie2/opimresolver.h> namespace Opie { OPimTodoAccess::OPimTodoAccess( OPimTodoAccessBackend* end, enum Access ) : QObject(), OPimAccessTemplate<OPimTodo>( end ), m_todoBackEnd( end ) { // if (end == 0l ) // m_todoBackEnd = new OPimTodoAccessBackendSQL( QString::null); // Zecke: Du musst hier noch fr das XML-Backend einen Appnamen bergeben ! if (end == 0l ) m_todoBackEnd = OBackendFactory<OPimTodoAccessBackend>::Default ("todo", QString::null); setBackEnd( m_todoBackEnd ); } OPimTodoAccess::~OPimTodoAccess() { // qWarning("~OPimTodoAccess"); } void OPimTodoAccess::mergeWith( const QValueList<OPimTodo>& list ) { QValueList<OPimTodo>::ConstIterator it; for ( it = list.begin(); it != list.end(); ++it ) { replace( (*it) ); } } OPimTodoAccess::List OPimTodoAccess::effectiveToDos( const QDate& start, @@ -69,25 +70,31 @@ OPimTodoAccess::List OPimTodoAccess::effectiveToDos( const QDate& start, return effectiveToDos( start, QDate::currentDate(), includeNoDates ); } OPimTodoAccess::List OPimTodoAccess::overDue() { List lis( m_todoBackEnd->overDue(), this ); return lis; } /* sort order */ OPimTodoAccess::List OPimTodoAccess::sorted( bool ascending, int sort,int filter, int cat ) { QArray<int> ints = m_todoBackEnd->sorted( ascending, sort, filter, cat ); OPimTodoAccess::List list( ints, this ); return list; } void OPimTodoAccess::removeAllCompleted() { m_todoBackEnd->removeAllCompleted(); } QBitArray OPimTodoAccess::backendSupport( const QString& ) const{ return m_todoBackEnd->supports(); } bool OPimTodoAccess::backendSupports( int attr, const QString& ar) const{ return backendSupport(ar).testBit( attr ); } + +int OPimTodoAccess::rtti() const +{ + return OPimResolver::TodoList; +} + } |