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

OTodoAccessBackendSQL Class Reference

#include </home/clem/local/src/opie/noncore/unsupported/libopie/pim/otodoaccesssql.h>

Inheritance diagram for OTodoAccessBackendSQL:

Inheritance graph
[legend]
Collaboration diagram for OTodoAccessBackendSQL:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 OTodoAccessBackendSQL (const QString &file)
 ~OTodoAccessBackendSQL ()
bool load ()
bool reload ()
bool save ()
QArray< int > allRecords () const
QArray< int > queryByExample (const OTodo &t, int settings, const QDateTime &d=QDateTime())
OTodo find (int uid) const
OTodo find (int uid, const QArray< int > &, uint cur, Frontend::CacheDirection) const
void clear ()
bool add (const OTodo &t)
bool remove (int uid)
bool replace (const OTodo &t)
QArray< int > overDue ()
QArray< int > effectiveToDos (const QDate &start, const QDate &end, bool includeNoDates)
QArray< int > sorted (bool asc, int sortOrder, int sortFilter, int cat)
QBitArray supports () const
QArray< int > matchRegexp (const QRegExp &r) const
void removeAllCompleted ()

Private Member Functions

void update () const
void fillDict ()
bool date (QDate &date, const QString &) const
OTodo todo (const Opie::DB::OSQLResult &) const
OTodo todo (Opie::DB::OSQLResultItem &) const
QArray< int > uids (const Opie::DB::OSQLResult &) const
OTodo todo (int uid) const
QBitArray sup () const

Private Attributes

QAsciiDict< int > m_dict
Opie::DB::OSQLDriverm_driver
QArray< int > m_uids
bool m_dirty: 1

Constructor & Destructor Documentation

OTodoAccessBackendSQL::OTodoAccessBackendSQL const QString file  ) 
 

Definition at line 302 of file otodoaccesssql.cpp.

References Global::applicationFileName(), QString::isEmpty(), m_driver, Opie::DB::OSQLDriver::setUrl(), and Opie::DB::OSQLManager::standard().

OTodoAccessBackendSQL::~OTodoAccessBackendSQL  ) 
 

Definition at line 314 of file otodoaccesssql.cpp.

References m_driver.


Member Function Documentation

bool OTodoAccessBackendSQL::add const OTodo t  )  [virtual]
 

add T

Implements OPimAccessBackend< OTodo >.

Definition at line 391 of file otodoaccesssql.cpp.

References m_driver, m_uids, Opie::DB::OSQLDriver::query(), and Opie::DB::OSQLResult::state().

Referenced by replace().

QArray< int > OTodoAccessBackendSQL::allRecords  )  const [virtual]
 

return an array of all available uids

Implements OPimAccessBackend< OTodo >.

Definition at line 336 of file otodoaccesssql.cpp.

References m_dirty, m_uids, and update().

void OTodoAccessBackendSQL::clear  )  [virtual]
 

clear the back end

Implements OPimAccessBackend< OTodo >.

Definition at line 385 of file otodoaccesssql.cpp.

References m_driver, and Opie::DB::OSQLDriver::query().

bool OTodoAccessBackendSQL::date QDate date,
const QString
const [inline, private]
 

Definition at line 503 of file otodoaccesssql.cpp.

References list, and QStringList::split().

Referenced by todo().

QArray< int > OTodoAccessBackendSQL::effectiveToDos const QDate start,
const QDate end,
bool  includeNoDates
[virtual]
 

Implements OTodoAccessBackend.

Definition at line 428 of file otodoaccesssql.cpp.

References m_driver, Opie::DB::OSQLDriver::query(), and uids().

void OTodoAccessBackendSQL::fillDict  )  [private]
 

Definition at line 594 of file otodoaccesssql.cpp.

References OTodo::Category, OTodo::Completed, OTodo::CrossReference, OTodo::DateDay, OTodo::DateMonth, OTodo::DateYear, OTodo::Description, OTodo::HasDate, QAsciiDict< type >::insert(), m_dict, OTodo::Priority, OTodo::Progress, QPtrCollection::setAutoDelete(), OTodo::Summary, TRUE, and OTodo::Uid.

OTodo OTodoAccessBackendSQL::find int  uid,
const QArray< int > &  ,
uint  cur,
Frontend::CacheDirection 
const [virtual]
 

Reimplemented from OPimAccessBackend< OTodo >.

Definition at line 351 of file otodoaccesssql.cpp.

References i, m_driver, Opie::DB::OSQLDriver::query(), qWarning(), OPimAccessBackend< OTodo >::readAhead(), size, Opie::DB::OSQLResult::state(), and todo().

OTodo OTodoAccessBackendSQL::find int  uid  )  const [virtual]
 

find the OPimRecord with uid

Parameters:
uid returns T and T.isEmpty() if nothing was found

Implements OPimAccessBackend< OTodo >.

Definition at line 346 of file otodoaccesssql.cpp.

References m_driver, Opie::DB::OSQLDriver::query(), and todo().

Referenced by todo().

bool OTodoAccessBackendSQL::load  )  [virtual]
 

load the resource

Implements OPimAccessBackend< OTodo >.

Definition at line 319 of file otodoaccesssql.cpp.

References m_dirty, m_driver, Opie::DB::OSQLDriver::open(), and Opie::DB::OSQLDriver::query().

Referenced by reload().

QArray< int > OTodoAccessBackendSQL::matchRegexp const QRegExp r  )  const [virtual]
 

return a List of records that match the regex

Implements OPimAccessBackend< OTodo >.

Definition at line 645 of file otodoaccesssql.cpp.

References QMap< Key, T >::begin(), empty, and QMap< Key, T >::end().

QArray< int > OTodoAccessBackendSQL::overDue  )  [virtual]
 

Implements OTodoAccessBackend.

Definition at line 424 of file otodoaccesssql.cpp.

References m_driver, Opie::DB::OSQLDriver::query(), and uids().

QArray< int > OTodoAccessBackendSQL::queryByExample const OTodo t,
int  settings,
const QDateTime d = QDateTime()
[virtual]
 

queryByExample for T with the given Settings

Implements OPimAccessBackend< OTodo >.

Definition at line 342 of file otodoaccesssql.cpp.

bool OTodoAccessBackendSQL::reload  )  [virtual]
 

reload the resource

Implements OPimAccessBackend< OTodo >.

Definition at line 329 of file otodoaccesssql.cpp.

References load().

bool OTodoAccessBackendSQL::remove int  uid  )  [virtual]
 

remove

Implements OPimAccessBackend< OTodo >.

Definition at line 403 of file otodoaccesssql.cpp.

References m_dirty, m_driver, Opie::DB::OSQLDriver::query(), rem, and Opie::DB::OSQLResult::state().

Referenced by replace().

void OTodoAccessBackendSQL::removeAllCompleted  )  [virtual]
 

Implements OTodoAccessBackend.

Definition at line 691 of file otodoaccesssql.cpp.

bool OTodoAccessBackendSQL::replace const OTodo t  )  [virtual]
 

replace a record with T.uid()

Implements OPimAccessBackend< OTodo >.

Definition at line 418 of file otodoaccesssql.cpp.

References add(), m_dirty, and remove().

bool OTodoAccessBackendSQL::save  )  [virtual]
 

save the resource and all it's changes

Implements OPimAccessBackend< OTodo >.

Definition at line 333 of file otodoaccesssql.cpp.

References Opie::DB::OSQLDriver::close(), and m_driver.

QArray< int > OTodoAccessBackendSQL::sorted bool  asc,
int  sortOrder,
int  sortFilter,
int  cat
[virtual]
 

Implements OTodoAccessBackend.

Definition at line 437 of file otodoaccesssql.cpp.

References QDate::currentDate(), QDate::day(), QString::length(), m_driver, QDate::month(), QString::number(), Opie::DB::OSQLDriver::query(), qWarning(), QString::remove(), uids(), and QDate::year().

QBitArray OTodoAccessBackendSQL::sup  )  const [private]
 

Definition at line 678 of file otodoaccesssql.cpp.

References OTodo::CompletedDate, OTodo::CrossReference, QBitArray::fill(), OTodo::Maintainer, OTodo::Notifiers, OTodo::Reminders, and OTodo::State.

Referenced by supports().

QBitArray OTodoAccessBackendSQL::supports  )  const [virtual]
 

Implements OTodoAccessBackend.

Definition at line 673 of file otodoaccesssql.cpp.

References sup().

OTodo OTodoAccessBackendSQL::todo int  uid  )  const [private]
 

Definition at line 587 of file otodoaccesssql.cpp.

References find(), m_driver, Opie::DB::OSQLDriver::query(), and todo().

OTodo OTodoAccessBackendSQL::todo Opie::DB::OSQLResultItem  )  const [inline, private]
 

Definition at line 535 of file otodoaccesssql.cpp.

References OPimNotifyManager::alarmsFromString(), ORecur::Created, QDate::currentDate(), Opie::DB::OSQLResultItem::data(), date(), ORecur::EndDate, ORecur::Exceptions, ORecur::fromMap(), QMap< Key, T >::insert(), OTodo::notifiers(), qWarning(), recur(), OPimNotifyManager::remindersFromString(), ORecur::RFreq, ORecur::RHasEndDate, ORecur::RPosition, ORecur::RType, ORecur::RWeekdays, OTodo::setCompletedDate(), OTodo::setPriority(), OTodo::setRecurrence(), OTodo::setStartDate(), OTodo::setState(), OPimState::setState(), and QStringList::split().

OTodo OTodoAccessBackendSQL::todo const Opie::DB::OSQLResult  )  const [inline, private]
 

Definition at line 516 of file otodoaccesssql.cpp.

References QValueList< T >::begin(), OPimAccessBackend< OTodo >::cache(), QValueList< T >::end(), list, and qWarning().

Referenced by find(), and todo().

QArray< int > OTodoAccessBackendSQL::uids const Opie::DB::OSQLResult  )  const [inline, private]
 

Definition at line 630 of file otodoaccesssql.cpp.

References QValueList< T >::begin(), QValueList< T >::count(), QValueList< T >::end(), i, list, qWarning(), and Opie::DB::OSQLResult::results().

Referenced by effectiveToDos(), overDue(), sorted(), and update().

void OTodoAccessBackendSQL::update  )  const [private]
 

Definition at line 621 of file otodoaccesssql.cpp.

References m_driver, Opie::DB::OSQLDriver::query(), Opie::DB::OSQLResult::state(), and uids().

Referenced by allRecords().


Member Data Documentation

QAsciiDict<int> OTodoAccessBackendSQL::m_dict [private]
 

Definition at line 54 of file otodoaccesssql.h.

Referenced by fillDict().

bool OTodoAccessBackendSQL::m_dirty [private]
 

Definition at line 57 of file otodoaccesssql.h.

Referenced by allRecords(), load(), remove(), and replace().

Opie::DB::OSQLDriver* OTodoAccessBackendSQL::m_driver [private]
 

Definition at line 55 of file otodoaccesssql.h.

Referenced by add(), clear(), effectiveToDos(), find(), load(), OTodoAccessBackendSQL(), overDue(), remove(), save(), sorted(), todo(), update(), and ~OTodoAccessBackendSQL().

QArray<int> OTodoAccessBackendSQL::m_uids [private]
 

Definition at line 56 of file otodoaccesssql.h.

Referenced by add(), and allRecords().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:43:51 2005 for OPIE by  doxygen 1.4.2