summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/opimevent.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/core/opimevent.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/core/opimevent.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/libopie2/opiepim/core/opimevent.cpp b/libopie2/opiepim/core/opimevent.cpp
index 7bc6c32..1b553d8 100644
--- a/libopie2/opiepim/core/opimevent.cpp
+++ b/libopie2/opiepim/core/opimevent.cpp
@@ -480,24 +480,43 @@ QString OPimEvent::type() const
480 480
481QString OPimEvent::recordField( int /*id */ ) const 481QString OPimEvent::recordField( int /*id */ ) const
482{ 482{
483 return QString::null; 483 return QString::null;
484} 484}
485 485
486 486
487int OPimEvent::rtti() const 487int OPimEvent::rtti() const
488{ 488{
489 return OPimResolver::DateBook; 489 return OPimResolver::DateBook;
490} 490}
491 491
492/**
493 * \brief Cast safely to OPimEvent from OPimRecord
494 *
495 * Safely cast from OPimRecord to OPimEvent. If the
496 * OPimRecord is not of type OPimEvent Null will be
497 * returned.
498 *
499 * @param rec The OPimRecord to be casted to OPimEvent
500 *
501 * @see OPimTodo::safeCast
502 * @return OPimEvent or Null Pointer
503 */
504OPimEvent* OPimEvent::safeCast( const OPimRecord* rec) {
505 return ( rec && rec->rtti() == OPimResolver::DateBook ) ?
506 static_cast<OPimEvent*>( const_cast<OPimRecord*>(rec) ) :
507 0l;
508}
509
510
492 511
493bool OPimEvent::loadFromStream( QDataStream& ) 512bool OPimEvent::loadFromStream( QDataStream& )
494{ 513{
495 return true; 514 return true;
496} 515}
497 516
498 517
499bool OPimEvent::saveToStream( QDataStream& ) const 518bool OPimEvent::saveToStream( QDataStream& ) const
500{ 519{
501 return true; 520 return true;
502} 521}
503 522