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

Opie::OPimRecord Class Reference

#include </home/clem/local/src/opie/libopie2/opiepim/core/opimrecord.h>

Inheritance diagram for Opie::OPimRecord:

Inheritance graph
[legend]
Collaboration diagram for Opie::OPimRecord:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 OPimRecord (UID uid=0)
 ~OPimRecord ()
 OPimRecord (const OPimRecord &rec)
OPimRecordoperator= (const OPimRecord &)
QStringList categoryNames (const QString &appname) const
void setCategoryNames (const QStringList &)
void addCategoryName (const QString &)
virtual bool isEmpty () const
virtual QString toRichText () const =0
virtual QString toShortText () const =0
virtual QString type () const =0
virtual bool match (const QString &regexp) const
int lastHitField () const
virtual QMap< int, QStringtoMap () const =0
QMap< QString, QStringtoExtraMap () const
void setExtraMap (const QMap< QString, QString > &)
virtual QString recordField (int) const =0
OPimXRefManagerxrefmanager ()
virtual void setUid (int uid)
virtual int rtti () const
virtual bool loadFromStream (QDataStream &)
virtual bool saveToStream (QDataStream &stream) const

Protected Member Functions

void setLastHitField (int lastHit) const
Qtopia::UidGenuidGen ()

Protected Attributes

int m_lastHit

Private Member Functions

void flush (const OPimXRefPartner &, QDataStream &stream) const
OPimXRefPartner partner (QDataStream &)

Private Attributes

OPimRecordPrivate * d
OPimXRefManager m_xrefman

Static Private Attributes

static Qtopia::UidGen m_uidGen

Detailed Description

This is the base class for all PIM Records

Definition at line 57 of file opimrecord.h.


Constructor & Destructor Documentation

Opie::OPimRecord::OPimRecord UID  uid = 0  ) 
 

c'tor uid of 0 isEmpty uid of 1 will be assigned a new one

Opie::OPimRecord::~OPimRecord  ) 
 

Definition at line 52 of file opimrecord.cpp.

Opie::OPimRecord::OPimRecord const OPimRecord rec  ) 
 

copy c'tor

Definition at line 56 of file opimrecord.cpp.


Member Function Documentation

void Opie::OPimRecord::addCategoryName const QString  ) 
 

addCategoryName adds a name to the internal category list

Definition at line 99 of file opimrecord.cpp.

References categoryFileName(), and Categories::load().

QStringList Opie::OPimRecord::categoryNames const QString appname  )  const
 

category names resolved

Definition at line 78 of file opimrecord.cpp.

References Qtopia::Record::categories(), categoryFileName(), i, Categories::label(), list, and Categories::load().

Referenced by Opie::OPimTodo::toRichText(), Opie::OPimEvent::toRichText(), and Opie::OPimContact::toRichText().

void Opie::OPimRecord::flush const OPimXRefPartner ,
QDataStream stream
const [private]
 

Definition at line 207 of file opimrecord.cpp.

bool Opie::OPimRecord::isEmpty  )  const [virtual]
 

if a Record isEmpty it's empty if it's 0

Definition at line 106 of file opimrecord.cpp.

References Qtopia::Record::uid().

Referenced by AbLabel::currentEntry_UID(), AddressbookWindow::exportvCard(), Opie::OPimEvent::fromMap(), Opie::Security::Internal::runPlugins(), ContactEditor::setEntry(), Opie::OPimTodoAccessBackend::sorted(), Opie::ODateBookAccessBackend::sorted(), Opie::OPimContactAccessBackend::sorted(), Opie::OPimEvent::toMap(), Opie::OPimTodo::toRichText(), Opie::OPimEvent::toRichText(), and Opie::OPimContact::toRichText().

int Opie::OPimRecord::lastHitField  )  const
 

if implemented this function returns which item has been last hit by the match() function. or -1 if not implemented or no hit has occured

Definition at line 240 of file opimrecord.cpp.

References OPimRecord::m_lastHit.

Referenced by DatebookSearch::insertItem(), TodoItem::setIcon(), EventItem::setIcon(), and ContactItem::setIcon().

bool Opie::OPimRecord::loadFromStream QDataStream  )  [virtual]
 

some marshalling and de marshalling code saves the OPimRecord to and from a DataStream

Reimplemented in Opie::OPimEvent.

Definition at line 147 of file opimrecord.cpp.

References Opie::OPimXRefManager::add(), i, OPimRecord::m_xrefman, OPimXRef::One, OPimRecord::partner(), Qtopia::Record::setCategories(), Opie::OPimXRef::setPartner(), OPimRecord::setUid(), and OPimXRef::Two.

Referenced by Opie::OPimMainWindow::record().

virtual bool Opie::OPimRecord::match const QString regexp  )  const [inline, virtual]
 

matches the Records the regular expression?

Definition at line 118 of file opimrecord.h.

References Qtopia::Record::match(), and setLastHitField().

OPimRecord & Opie::OPimRecord::operator= const OPimRecord  ) 
 

copy operator

Definition at line 63 of file opimrecord.cpp.

References OPimRecord::m_lastHit, OPimRecord::m_xrefman, and Qtopia::Record::operator=().

OPimXRefPartner Opie::OPimRecord::partner QDataStream  )  [private]
 

Definition at line 215 of file opimrecord.cpp.

References i, Opie::OPimXRefPartner::setField(), Opie::OPimXRefPartner::setService(), Opie::OPimXRefPartner::setUid(), and str.

virtual QString Opie::OPimRecord::recordField int   )  const [pure virtual]
 

the name for a recordField

Implemented in Opie::OPimContact, Opie::OPimEvent, and Opie::OPimTodo.

int Opie::OPimRecord::rtti  )  const [virtual]
 

Reimplemented in Opie::OPimContact, Opie::OPimEvent, and Opie::OPimTodo.

Definition at line 134 of file opimrecord.cpp.

Referenced by Opie::OPimResolver::add(), Opie::OPimAccessTemplate< T >::queryByExample(), Opie::OPimTodo::safeCast(), Opie::OPimEvent::safeCast(), and Opie::OPimContact::safeCast().

bool Opie::OPimRecord::saveToStream QDataStream stream  )  const [virtual]
 

UIDs

Categories

Reimplemented in Opie::OPimEvent.

Definition at line 179 of file opimrecord.cpp.

References Qtopia::Record::categories(), OPimRecord::flush(), i, Opie::OPimXRefManager::list(), OPimRecord::m_xrefman, OPimXRef::One, OPimXRef::Two, and Qtopia::Record::uid().

Referenced by Opie::OPimResolver::add().

void Opie::OPimRecord::setCategoryNames const QStringList  ) 
 

set category names they will be resolved

Definition at line 94 of file opimrecord.cpp.

void Opie::OPimRecord::setExtraMap const QMap< QString, QString > &   ) 
 

Definition at line 252 of file opimrecord.cpp.

References Qtopia::Record::customMap.

Referenced by Opie::ODateBookAccessBackend_SQL::find(), and Opie::OPimContactAccessBackend_SQL::find().

void Opie::OPimRecord::setLastHitField int  lastHit  )  const [protected]
 

Definition at line 234 of file opimrecord.cpp.

References OPimRecord::m_lastHit.

Referenced by Opie::OPimTodo::match(), match(), Opie::OPimEvent::match(), and Opie::OPimContact::match().

void Opie::OPimRecord::setUid int  uid  )  [virtual]
 

set the uid

Reimplemented from Qtopia::Record.

Reimplemented in Opie::OPimContact.

Definition at line 113 of file opimrecord.cpp.

References Qtopia::Record::setUid(), and OPimRecord::uidGen().

Referenced by Todo::TemplateManager::addEvent(), eventByVObj(), Opie::ODateBookAccessBackend_XML::finalizeRecord(), Opie::OPimTodoAccessXML::find(), Opie::OPimEvent::fromMap(), OTaskEditor::init(), Opie::OPimTodoAccessXML::load(), Todo::Editor::newTodo(), and Opie::OPimTodoAccessXML::todo().

QMap< QString, QString > Opie::OPimRecord::toExtraMap  )  const
 

key value representation of extra items

Definition at line 246 of file opimrecord.cpp.

References Qtopia::Record::customMap.

Referenced by Opie::OPimTodoAccessXML::toString().

virtual QMap<int, QString> Opie::OPimRecord::toMap  )  const [pure virtual]
 

converts the internal structure to a map

Implemented in Opie::OPimContact, Opie::OPimEvent, and Opie::OPimTodo.

virtual QString Opie::OPimRecord::toRichText  )  const [pure virtual]
 

toRichText summary

Implemented in Opie::OPimContact, Opie::OPimEvent, and Opie::OPimTodo.

Referenced by MainWindow::slotShowRecord().

virtual QString Opie::OPimRecord::toShortText  )  const [pure virtual]
 

a small one line summary

Implemented in Opie::OPimContact, Opie::OPimEvent, and Opie::OPimTodo.

virtual QString Opie::OPimRecord::type  )  const [pure virtual]
 

the name of the Record

Implemented in Opie::OPimContact, Opie::OPimEvent, and Opie::OPimTodo.

Qtopia::UidGen & Opie::OPimRecord::uidGen  )  [protected, virtual]
 

Implements Qtopia::Record.

Definition at line 122 of file opimrecord.cpp.

References OPimRecord::m_uidGen.

Referenced by Opie::OPimContact::OPimContact().

OPimXRefManager & Opie::OPimRecord::xrefmanager  ) 
 

returns a reference of the Cross Reference Manager Partner 'One' is THIS PIM RECORD! 'Two' is the Partner where we link to

Definition at line 128 of file opimrecord.cpp.

References OPimRecord::m_xrefman.


Member Data Documentation

OPimRecordPrivate* Opie::OPimRecord::d [private]
 

Reimplemented from Qtopia::Record.

Reimplemented in Opie::OPimContact, and Opie::OPimTodo.

Definition at line 188 of file opimrecord.h.

int Opie::OPimRecord::m_lastHit [mutable, protected]
 

Definition at line 182 of file opimrecord.h.

Qtopia::UidGen Opie::OPimRecord::m_uidGen [static, private]
 

OPimXRefManager Opie::OPimRecord::m_xrefman [private]
 

Definition at line 190 of file opimrecord.h.


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