summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-02-24 12:46:23 (UTC)
committer mickeyl <mickeyl>2004-02-24 12:46:23 (UTC)
commit911473db35a9fce5f3589f03c27210456faaba86 (patch) (unidiff)
tree7d55b6117b24de6ab18747b00a4641d38001c0ed
parenta2ead23c3614fe581261455cb4c3f31cee2098f3 (diff)
downloadopie-911473db35a9fce5f3589f03c27210456faaba86.zip
opie-911473db35a9fce5f3589f03c27210456faaba86.tar.gz
opie-911473db35a9fce5f3589f03c27210456faaba86.tar.bz2
*phew* here is the class and file rename patch. not converted yet: backend,
but that will be not visible to application classes so we can change it later.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/obackendfactory.h10
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend.h12
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp136
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_sql.h22
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp52
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_vcard.h22
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp158
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_xml.h26
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend.cpp18
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend.h8
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp64
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_sql.h12
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp86
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_xml.h20
-rw-r--r--libopie2/opiepim/backend/opimaccessbackend.h2
-rw-r--r--libopie2/opiepim/backend/otodoaccessbackend.cpp6
-rw-r--r--libopie2/opiepim/backend/otodoaccessbackend.h8
-rw-r--r--libopie2/opiepim/backend/otodoaccesssql.cpp164
-rw-r--r--libopie2/opiepim/backend/otodoaccesssql.h22
-rw-r--r--libopie2/opiepim/backend/otodoaccessvcal.cpp70
-rw-r--r--libopie2/opiepim/backend/otodoaccessvcal.h16
-rw-r--r--libopie2/opiepim/backend/otodoaccessxml.cpp228
-rw-r--r--libopie2/opiepim/backend/otodoaccessxml.h24
-rw-r--r--libopie2/opiepim/core/core.pro16
-rw-r--r--libopie2/opiepim/core/ocontactaccess.cpp36
-rw-r--r--libopie2/opiepim/core/ocontactaccess.h20
-rw-r--r--libopie2/opiepim/core/odatebookaccess.cpp2
-rw-r--r--libopie2/opiepim/core/odatebookaccess.h4
-rw-r--r--libopie2/opiepim/core/opimaccesstemplate.h6
-rw-r--r--libopie2/opiepim/core/opimcontact.cpp (renamed from libopie2/opiepim/ocontact.cpp)264
-rw-r--r--libopie2/opiepim/core/opimcontact.h (renamed from libopie2/opiepim/ocontact.h)16
-rw-r--r--libopie2/opiepim/core/opimcontactfields.cpp (renamed from libopie2/opiepim/ocontactfields.cpp)48
-rw-r--r--libopie2/opiepim/core/opimcontactfields.h (renamed from libopie2/opiepim/ocontactfields.h)12
-rw-r--r--libopie2/opiepim/core/opimdateconversion.cpp (renamed from libopie2/opiepim/core/oconversion.cpp)10
-rw-r--r--libopie2/opiepim/core/opimdateconversion.h (renamed from libopie2/opiepim/core/oconversion.h)2
-rw-r--r--libopie2/opiepim/core/opimevent.cpp (renamed from libopie2/opiepim/oevent.cpp)250
-rw-r--r--libopie2/opiepim/core/opimevent.h (renamed from libopie2/opiepim/oevent.h)46
-rw-r--r--libopie2/opiepim/core/opimnotify.h2
-rw-r--r--libopie2/opiepim/core/opimnotifymanager.cpp8
-rw-r--r--libopie2/opiepim/core/opimrecordlist.h (renamed from libopie2/opiepim/orecordlist.h)90
-rw-r--r--libopie2/opiepim/core/opimrecurrence.cpp (renamed from libopie2/opiepim/core/orecur.cpp)160
-rw-r--r--libopie2/opiepim/core/opimrecurrence.h (renamed from libopie2/opiepim/core/orecur.h)20
-rw-r--r--libopie2/opiepim/core/opimresolver.cpp8
-rw-r--r--libopie2/opiepim/core/opimresolver.h2
-rw-r--r--libopie2/opiepim/core/opimtemplatebase.h (renamed from libopie2/opiepim/core/otemplatebase.h)0
-rw-r--r--libopie2/opiepim/core/opimtimezone.cpp (renamed from libopie2/opiepim/core/otimezone.cpp)36
-rw-r--r--libopie2/opiepim/core/opimtimezone.h (renamed from libopie2/opiepim/core/otimezone.h)12
-rw-r--r--libopie2/opiepim/core/opimtodo.cpp (renamed from libopie2/opiepim/otodo.cpp)140
-rw-r--r--libopie2/opiepim/core/opimtodo.h (renamed from libopie2/opiepim/otodo.h)50
-rw-r--r--libopie2/opiepim/core/otodoaccess.cpp32
-rw-r--r--libopie2/opiepim/core/otodoaccess.h34
-rw-r--r--libopie2/opiepim/libopiepim2.control4
-rw-r--r--libopie2/opiepim/opiepim.pro17
53 files changed, 1266 insertions, 1267 deletions
diff --git a/libopie2/opiepim/backend/obackendfactory.h b/libopie2/opiepim/backend/obackendfactory.h
index 346e2f5..06421d1 100644
--- a/libopie2/opiepim/backend/obackendfactory.h
+++ b/libopie2/opiepim/backend/obackendfactory.h
@@ -61,5 +61,5 @@ class OBackendPrivate;
61 * 61 *
62 * <pre> 62 * <pre>
63 * OTodoAccessBackend* backend = OBackEndFactory<OTodoAccessBackend>::Default("todo", QString::null ); 63 * OPimTodoAccessBackend* backend = OBackEndFactory<OPimTodoAccessBackend>::Default("todo", QString::null );
64 * backend->load(); 64 * backend->load();
65 * </pre> 65 * </pre>
@@ -109,5 +109,5 @@ class OBackendFactory
109#ifdef __USE_SQL 109#ifdef __USE_SQL
110 if ( backend == "sql" ) 110 if ( backend == "sql" )
111 return (T*) new OTodoAccessBackendSQL(""); 111 return (T*) new OPimTodoAccessBackendSQL("");
112#else 112#else
113 if ( backend == "sql" ) 113 if ( backend == "sql" )
@@ -115,9 +115,9 @@ class OBackendFactory
115#endif 115#endif
116 116
117 return (T*) new OTodoAccessXML( appName ); 117 return (T*) new OPimTodoAccessXML( appName );
118 case CONTACT: 118 case CONTACT:
119#ifdef __USE_SQL 119#ifdef __USE_SQL
120 if ( backend == "sql" ) 120 if ( backend == "sql" )
121 return (T*) new OContactAccessBackend_SQL(""); 121 return (T*) new OPimContactAccessBackend_SQL("");
122#else 122#else
123 if ( backend == "sql" ) 123 if ( backend == "sql" )
@@ -125,5 +125,5 @@ class OBackendFactory
125#endif 125#endif
126 126
127 return (T*) new OContactAccessBackend_XML( appName ); 127 return (T*) new OPimContactAccessBackend_XML( appName );
128 case DATE: 128 case DATE:
129#ifdef __USE_SQL 129#ifdef __USE_SQL
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend.h b/libopie2/opiepim/backend/ocontactaccessbackend.h
index 6113cea..8436adc 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend.h
+++ b/libopie2/opiepim/backend/ocontactaccessbackend.h
@@ -40,5 +40,5 @@
40#define _OCONTACTACCESSBACKEND_H_ 40#define _OCONTACTACCESSBACKEND_H_
41 41
42#include <opie2/ocontact.h> 42#include <opie2/opimcontact.h>
43#include <opie2/opimaccessbackend.h> 43#include <opie2/opimaccessbackend.h>
44 44
@@ -53,17 +53,17 @@ namespace Opie {
53 * In all queries a list of uids is passed on instead of loading the actual record! 53 * In all queries a list of uids is passed on instead of loading the actual record!
54 * 54 *
55 * @see OContactAccessBackend_VCard 55 * @see OPimContactAccessBackend_VCard
56 * @see OContactAccessBackend_XML 56 * @see OPimContactAccessBackend_XML
57 */ 57 */
58class OContactAccessBackend: public OPimAccessBackend<OContact> { 58class OPimContactAccessBackend: public OPimAccessBackend<OPimContact> {
59 public: 59 public:
60 /** 60 /**
61 * @todo make non line in regard to BC guide of KDE 61 * @todo make non line in regard to BC guide of KDE
62 */ 62 */
63 OContactAccessBackend() {} 63 OPimContactAccessBackend() {}
64 /** 64 /**
65 * @todo make non inline in regard to the BC guide of KDE 65 * @todo make non inline in regard to the BC guide of KDE
66 */ 66 */
67 virtual ~OContactAccessBackend() {} 67 virtual ~OPimContactAccessBackend() {}
68 68
69 69
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
index d0c8052..f121cc2 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
@@ -40,6 +40,6 @@
40#include <qpe/recordfields.h> 40#include <qpe/recordfields.h>
41 41
42#include <opie2/ocontactfields.h> 42#include <opie2/opimcontactfields.h>
43#include <opie2/oconversion.h> 43#include <opie2/opimdateconversion.h>
44#include <opie2/osqldriver.h> 44#include <opie2/osqldriver.h>
45#include <opie2/osqlresult.h> 45#include <opie2/osqlresult.h>
@@ -106,13 +106,13 @@ namespace Opie {
106 106
107 /** 107 /**
108 * inserts/adds a OContact to the table 108 * inserts/adds a OPimContact to the table
109 */ 109 */
110 class InsertQuery : public OSQLQuery { 110 class InsertQuery : public OSQLQuery {
111 public: 111 public:
112 InsertQuery(const OContact& ); 112 InsertQuery(const OPimContact& );
113 ~InsertQuery(); 113 ~InsertQuery();
114 QString query()const; 114 QString query()const;
115 private: 115 private:
116 OContact m_contact; 116 OPimContact m_contact;
117 }; 117 };
118 118
@@ -177,5 +177,5 @@ namespace Opie {
177 qu += "create table addressbook( uid PRIMARY KEY "; 177 qu += "create table addressbook( uid PRIMARY KEY ";
178 178
179 QStringList fieldList = OContactFields::untrfields( false ); 179 QStringList fieldList = OPimContactFields::untrfields( false );
180 for ( QStringList::Iterator it = ++fieldList.begin(); it != fieldList.end(); ++it ){ 180 for ( QStringList::Iterator it = ++fieldList.begin(); it != fieldList.end(); ++it ){
181 qu += QString( ",\"%1\" VARCHAR(10)" ).arg( *it ); 181 qu += QString( ",\"%1\" VARCHAR(10)" ).arg( *it );
@@ -224,5 +224,5 @@ namespace Opie {
224 224
225 225
226 InsertQuery::InsertQuery( const OContact& contact ) 226 InsertQuery::InsertQuery( const OPimContact& contact )
227 : OSQLQuery(), m_contact( contact ) { 227 : OSQLQuery(), m_contact( contact ) {
228 } 228 }
@@ -232,5 +232,5 @@ namespace Opie {
232 232
233 /* 233 /*
234 * converts from a OContact to a query 234 * converts from a OPimContact to a query
235 */ 235 */
236 QString InsertQuery::query()const{ 236 QString InsertQuery::query()const{
@@ -245,6 +245,6 @@ namespace Opie {
245 QMap<int, QString> contactMap = m_contact.toMap(); 245 QMap<int, QString> contactMap = m_contact.toMap();
246 246
247 QStringList fieldList = OContactFields::untrfields( false ); 247 QStringList fieldList = OPimContactFields::untrfields( false );
248 QMap<QString, int> translate = OContactFields::untrFieldsToId(); 248 QMap<QString, int> translate = OPimContactFields::untrFieldsToId();
249 for ( QStringList::Iterator it = ++fieldList.begin(); it != fieldList.end(); ++it ){ 249 for ( QStringList::Iterator it = ++fieldList.begin(); it != fieldList.end(); ++it ){
250 // Convert Column-String to Id and get value for this id.. 250 // Convert Column-String to Id and get value for this id..
@@ -296,5 +296,5 @@ namespace Opie {
296 296
297 // Get the translation from the ID to the String 297 // Get the translation from the ID to the String
298 QMap<int, QString> transMap = OContactFields::idToUntrFields(); 298 QMap<int, QString> transMap = OPimContactFields::idToUntrFields();
299 299
300 for( QMap<int, QString>::Iterator it = contactMap.begin(); 300 for( QMap<int, QString>::Iterator it = contactMap.begin();
@@ -460,9 +460,9 @@ namespace Opie {
460namespace Opie { 460namespace Opie {
461 461
462OContactAccessBackend_SQL::OContactAccessBackend_SQL ( const QString& /* appname */, 462OPimContactAccessBackend_SQL::OPimContactAccessBackend_SQL ( const QString& /* appname */,
463 const QString& filename ): 463 const QString& filename ):
464 OContactAccessBackend(), m_changed(false), m_driver( NULL ) 464 OPimContactAccessBackend(), m_changed(false), m_driver( NULL )
465{ 465{
466 qWarning("C'tor OContactAccessBackend_SQL starts"); 466 qWarning("C'tor OPimContactAccessBackend_SQL starts");
467 QTime t; 467 QTime t;
468 t.start(); 468 t.start();
@@ -481,8 +481,8 @@ OContactAccessBackend_SQL::OContactAccessBackend_SQL ( const QString& /* appname
481 load(); 481 load();
482 482
483 qWarning("C'tor OContactAccessBackend_SQL ends: %d ms", t.elapsed() ); 483 qWarning("C'tor OPimContactAccessBackend_SQL ends: %d ms", t.elapsed() );
484} 484}
485 485
486OContactAccessBackend_SQL::~OContactAccessBackend_SQL () 486OPimContactAccessBackend_SQL::~OPimContactAccessBackend_SQL ()
487{ 487{
488 if( m_driver ) 488 if( m_driver )
@@ -490,5 +490,5 @@ OContactAccessBackend_SQL::~OContactAccessBackend_SQL ()
490} 490}
491 491
492bool OContactAccessBackend_SQL::load () 492bool OPimContactAccessBackend_SQL::load ()
493{ 493{
494 if (!m_driver->open() ) 494 if (!m_driver->open() )
@@ -507,10 +507,10 @@ bool OContactAccessBackend_SQL::load ()
507} 507}
508 508
509bool OContactAccessBackend_SQL::reload() 509bool OPimContactAccessBackend_SQL::reload()
510{ 510{
511 return load(); 511 return load();
512} 512}
513 513
514bool OContactAccessBackend_SQL::save() 514bool OPimContactAccessBackend_SQL::save()
515{ 515{
516 return m_driver->close(); // Shouldn't m_driver->sync be better than close ? (eilers) 516 return m_driver->close(); // Shouldn't m_driver->sync be better than close ? (eilers)
@@ -518,5 +518,5 @@ bool OContactAccessBackend_SQL::save()
518 518
519 519
520void OContactAccessBackend_SQL::clear () 520void OPimContactAccessBackend_SQL::clear ()
521{ 521{
522 ClearQuery cle; 522 ClearQuery cle;
@@ -526,10 +526,10 @@ void OContactAccessBackend_SQL::clear ()
526} 526}
527 527
528bool OContactAccessBackend_SQL::wasChangedExternally() 528bool OPimContactAccessBackend_SQL::wasChangedExternally()
529{ 529{
530 return false; 530 return false;
531} 531}
532 532
533QArray<int> OContactAccessBackend_SQL::allRecords() const 533QArray<int> OPimContactAccessBackend_SQL::allRecords() const
534{ 534{
535 535
@@ -537,10 +537,10 @@ QArray<int> OContactAccessBackend_SQL::allRecords() const
537 // Thus, we don't have to call update here... 537 // Thus, we don't have to call update here...
538 if ( m_changed ) 538 if ( m_changed )
539 ((OContactAccessBackend_SQL*)this)->update(); 539 ((OPimContactAccessBackend_SQL*)this)->update();
540 540
541 return m_uids; 541 return m_uids;
542} 542}
543 543
544bool OContactAccessBackend_SQL::add ( const OContact &newcontact ) 544bool OPimContactAccessBackend_SQL::add ( const OPimContact &newcontact )
545{ 545{
546 InsertQuery ins( newcontact ); 546 InsertQuery ins( newcontact );
@@ -558,5 +558,5 @@ bool OContactAccessBackend_SQL::add ( const OContact &newcontact )
558 558
559 559
560bool OContactAccessBackend_SQL::remove ( int uid ) 560bool OPimContactAccessBackend_SQL::remove ( int uid )
561{ 561{
562 RemoveQuery rem( uid ); 562 RemoveQuery rem( uid );
@@ -571,5 +571,5 @@ bool OContactAccessBackend_SQL::remove ( int uid )
571} 571}
572 572
573bool OContactAccessBackend_SQL::replace ( const OContact &contact ) 573bool OPimContactAccessBackend_SQL::replace ( const OPimContact &contact )
574{ 574{
575 if ( !remove( contact.uid() ) ) 575 if ( !remove( contact.uid() ) )
@@ -580,14 +580,14 @@ bool OContactAccessBackend_SQL::replace ( const OContact &contact )
580 580
581 581
582OContact OContactAccessBackend_SQL::find ( int uid ) const 582OPimContact OPimContactAccessBackend_SQL::find ( int uid ) const
583{ 583{
584 qWarning("OContactAccessBackend_SQL::find()"); 584 qWarning("OPimContactAccessBackend_SQL::find()");
585 QTime t; 585 QTime t;
586 t.start(); 586 t.start();
587 587
588 OContact retContact( requestNonCustom( uid ) ); 588 OPimContact retContact( requestNonCustom( uid ) );
589 retContact.setExtraMap( requestCustom( uid ) ); 589 retContact.setExtraMap( requestCustom( uid ) );
590 590
591 qWarning("OContactAccessBackend_SQL::find() needed: %d ms", t.elapsed() ); 591 qWarning("OPimContactAccessBackend_SQL::find() needed: %d ms", t.elapsed() );
592 return retContact; 592 return retContact;
593} 593}
@@ -595,11 +595,11 @@ OContact OContactAccessBackend_SQL::find ( int uid ) const
595 595
596 596
597QArray<int> OContactAccessBackend_SQL::queryByExample ( const OContact &query, int settings, const QDateTime& d = QDateTime() ) 597QArray<int> OPimContactAccessBackend_SQL::queryByExample ( const OPimContact &query, int settings, const QDateTime& d = QDateTime() )
598{ 598{
599 QString qu = "SELECT uid FROM addressbook WHERE"; 599 QString qu = "SELECT uid FROM addressbook WHERE";
600 600
601 QMap<int, QString> queryFields = query.toMap(); 601 QMap<int, QString> queryFields = query.toMap();
602 QStringList fieldList = OContactFields::untrfields( false ); 602 QStringList fieldList = OPimContactFields::untrfields( false );
603 QMap<QString, int> translate = OContactFields::untrFieldsToId(); 603 QMap<QString, int> translate = OPimContactFields::untrFieldsToId();
604 604
605 // Convert every filled field to a SQL-Query 605 // Convert every filled field to a SQL-Query
@@ -615,5 +615,5 @@ QArray<int> OContactAccessBackend_SQL::queryByExample ( const OContact &query, i
615 // LIKE is not case sensitive, GLOB is case sensitive 615 // LIKE is not case sensitive, GLOB is case sensitive
616 // Do exist a better solution to switch this ? 616 // Do exist a better solution to switch this ?
617 if ( settings & OContactAccess::IgnoreCase ) 617 if ( settings & OPimContactAccess::IgnoreCase )
618 qu += "(\"" + *it + "\"" + " LIKE " + "'" 618 qu += "(\"" + *it + "\"" + " LIKE " + "'"
619 + queryStr.replace(QRegExp("\\*"),"%") + "'" + ") AND "; 619 + queryStr.replace(QRegExp("\\*"),"%") + "'" + ") AND ";
@@ -644,5 +644,5 @@ QArray<int> OContactAccessBackend_SQL::queryByExample ( const OContact &query, i
644} 644}
645 645
646QArray<int> OContactAccessBackend_SQL::matchRegexp( const QRegExp &r ) const 646QArray<int> OPimContactAccessBackend_SQL::matchRegexp( const QRegExp &r ) const
647{ 647{
648 QArray<int> nix(0); 648 QArray<int> nix(0);
@@ -650,13 +650,13 @@ QArray<int> OContactAccessBackend_SQL::matchRegexp( const QRegExp &r ) const
650} 650}
651 651
652const uint OContactAccessBackend_SQL::querySettings() 652const uint OPimContactAccessBackend_SQL::querySettings()
653{ 653{
654 return OContactAccess::IgnoreCase 654 return OPimContactAccess::IgnoreCase
655 || OContactAccess::WildCards; 655 || OPimContactAccess::WildCards;
656} 656}
657 657
658bool OContactAccessBackend_SQL::hasQuerySettings (uint querySettings) const 658bool OPimContactAccessBackend_SQL::hasQuerySettings (uint querySettings) const
659{ 659{
660 /* OContactAccess::IgnoreCase, DateDiff, DateYear, DateMonth, DateDay 660 /* OPimContactAccess::IgnoreCase, DateDiff, DateYear, DateMonth, DateDay
661 * may be added with any of the other settings. IgnoreCase should never used alone. 661 * may be added with any of the other settings. IgnoreCase should never used alone.
662 * Wildcards, RegExp, ExactMatch should never used at the same time... 662 * Wildcards, RegExp, ExactMatch should never used at the same time...
@@ -665,12 +665,12 @@ bool OContactAccessBackend_SQL::hasQuerySettings (uint querySettings) const
665 // Step 1: Check whether the given settings are supported by this backend 665 // Step 1: Check whether the given settings are supported by this backend
666 if ( ( querySettings & ( 666 if ( ( querySettings & (
667 OContactAccess::IgnoreCase 667 OPimContactAccess::IgnoreCase
668 | OContactAccess::WildCards 668 | OPimContactAccess::WildCards
669 // | OContactAccess::DateDiff 669 // | OPimContactAccess::DateDiff
670 // | OContactAccess::DateYear 670 // | OPimContactAccess::DateYear
671 // | OContactAccess::DateMonth 671 // | OPimContactAccess::DateMonth
672 // | OContactAccess::DateDay 672 // | OPimContactAccess::DateDay
673 // | OContactAccess::RegExp 673 // | OPimContactAccess::RegExp
674 // | OContactAccess::ExactMatch 674 // | OPimContactAccess::ExactMatch
675 ) ) != querySettings ) 675 ) ) != querySettings )
676 return false; 676 return false;
@@ -679,20 +679,20 @@ bool OContactAccessBackend_SQL::hasQuerySettings (uint querySettings) const
679 679
680 // IngoreCase alone is invalid 680 // IngoreCase alone is invalid
681 if ( querySettings == OContactAccess::IgnoreCase ) 681 if ( querySettings == OPimContactAccess::IgnoreCase )
682 return false; 682 return false;
683 683
684 // WildCards, RegExp and ExactMatch should never used at the same time 684 // WildCards, RegExp and ExactMatch should never used at the same time
685 switch ( querySettings & ~( OContactAccess::IgnoreCase 685 switch ( querySettings & ~( OPimContactAccess::IgnoreCase
686 | OContactAccess::DateDiff 686 | OPimContactAccess::DateDiff
687 | OContactAccess::DateYear 687 | OPimContactAccess::DateYear
688 | OContactAccess::DateMonth 688 | OPimContactAccess::DateMonth
689 | OContactAccess::DateDay 689 | OPimContactAccess::DateDay
690 ) 690 )
691 ){ 691 ){
692 case OContactAccess::RegExp: 692 case OPimContactAccess::RegExp:
693 return ( true ); 693 return ( true );
694 case OContactAccess::WildCards: 694 case OPimContactAccess::WildCards:
695 return ( true ); 695 return ( true );
696 case OContactAccess::ExactMatch: 696 case OPimContactAccess::ExactMatch:
697 return ( true ); 697 return ( true );
698 case 0: // one of the upper removed bits were set.. 698 case 0: // one of the upper removed bits were set..
@@ -704,5 +704,5 @@ bool OContactAccessBackend_SQL::hasQuerySettings (uint querySettings) const
704} 704}
705 705
706QArray<int> OContactAccessBackend_SQL::sorted( bool asc, int , int , int ) 706QArray<int> OPimContactAccessBackend_SQL::sorted( bool asc, int , int , int )
707{ 707{
708 QTime t; 708 QTime t;
@@ -736,5 +736,5 @@ QArray<int> OContactAccessBackend_SQL::sorted( bool asc, int , int , int )
736 736
737 737
738void OContactAccessBackend_SQL::update() 738void OPimContactAccessBackend_SQL::update()
739{ 739{
740 qWarning("Update starts"); 740 qWarning("Update starts");
@@ -757,5 +757,5 @@ void OContactAccessBackend_SQL::update()
757} 757}
758 758
759QArray<int> OContactAccessBackend_SQL::extractUids( OSQLResult& res ) const 759QArray<int> OPimContactAccessBackend_SQL::extractUids( OSQLResult& res ) const
760{ 760{
761 qWarning("extractUids"); 761 qWarning("extractUids");
@@ -779,5 +779,5 @@ QArray<int> OContactAccessBackend_SQL::extractUids( OSQLResult& res ) const
779 779
780#ifdef __STORE_HORIZONTAL_ 780#ifdef __STORE_HORIZONTAL_
781QMap<int, QString> OContactAccessBackend_SQL::requestNonCustom( int uid ) const 781QMap<int, QString> OPimContactAccessBackend_SQL::requestNonCustom( int uid ) const
782{ 782{
783 QTime t; 783 QTime t;
@@ -799,6 +799,6 @@ QMap<int, QString> OContactAccessBackend_SQL::requestNonCustom( int uid ) const
799 t3.start(); 799 t3.start();
800 // Now loop through all columns 800 // Now loop through all columns
801 QStringList fieldList = OContactFields::untrfields( false ); 801 QStringList fieldList = OPimContactFields::untrfields( false );
802 QMap<QString, int> translate = OContactFields::untrFieldsToId(); 802 QMap<QString, int> translate = OPimContactFields::untrFieldsToId();
803 for ( QStringList::Iterator it = ++fieldList.begin(); it != fieldList.end(); ++it ){ 803 for ( QStringList::Iterator it = ++fieldList.begin(); it != fieldList.end(); ++it ){
804 // Get data for the selected column and store it with the 804 // Get data for the selected column and store it with the
@@ -821,5 +821,5 @@ QMap<int, QString> OContactAccessBackend_SQL::requestNonCustom( int uid ) const
821 if ( ( day != 0 ) && ( month != 0 ) && ( year != 0 ) ){ 821 if ( ( day != 0 ) && ( month != 0 ) && ( year != 0 ) ){
822 QDate date( year, month, day ); 822 QDate date( year, month, day );
823 nonCustomMap.insert( id, OConversion::dateToString( date ) ); 823 nonCustomMap.insert( id, OPimDateConversion::dateToString( date ) );
824 } 824 }
825 } 825 }
@@ -844,5 +844,5 @@ QMap<int, QString> OContactAccessBackend_SQL::requestNonCustom( int uid ) const
844#else 844#else
845 845
846QMap<int, QString> OContactAccessBackend_SQL::requestNonCustom( int uid ) const 846QMap<int, QString> OPimContactAccessBackend_SQL::requestNonCustom( int uid ) const
847{ 847{
848 QTime t; 848 QTime t;
@@ -867,5 +867,5 @@ QMap<int, QString> OContactAccessBackend_SQL::requestNonCustom( int uid ) const
867 QTime t3; 867 QTime t3;
868 t3.start(); 868 t3.start();
869 QMap<QString, int> translateMap = OContactFields::untrFieldsToId(); 869 QMap<QString, int> translateMap = OPimContactFields::untrFieldsToId();
870 870
871 OSQLResultItem::ValueList list = res_noncustom.results(); 871 OSQLResultItem::ValueList list = res_noncustom.results();
@@ -888,5 +888,5 @@ QMap<int, QString> OContactAccessBackend_SQL::requestNonCustom( int uid ) const
888 qWarning( "RequestNonCustom->Converting:%s to Year: %d, Month: %d, Day: %d ", (*it).data( "value" ).latin1(), year, month, day ); 888 qWarning( "RequestNonCustom->Converting:%s to Year: %d, Month: %d, Day: %d ", (*it).data( "value" ).latin1(), year, month, day );
889 QDate date( year, month, day ); 889 QDate date( year, month, day );
890 nonCustomMap.insert( typeId, OConversion::dateToString( date ) ); 890 nonCustomMap.insert( typeId, OPimDateConversion::dateToString( date ) );
891 } 891 }
892 break; 892 break;
@@ -907,5 +907,5 @@ QMap<int, QString> OContactAccessBackend_SQL::requestNonCustom( int uid ) const
907#endif // __STORE_HORIZONTAL_ 907#endif // __STORE_HORIZONTAL_
908 908
909QMap<QString, QString> OContactAccessBackend_SQL::requestCustom( int uid ) const 909QMap<QString, QString> OPimContactAccessBackend_SQL::requestCustom( int uid ) const
910{ 910{
911 QTime t; 911 QTime t;
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_sql.h b/libopie2/opiepim/backend/ocontactaccessbackend_sql.h
index 55b95fd..58ae2ae 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_sql.h
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_sql.h
@@ -31,6 +31,6 @@
31 */ 31 */
32 32
33#ifndef _OContactAccessBackend_SQL_ 33#ifndef _OPimContactAccessBackend_SQL_
34#define _OContactAccessBackend_SQL_ 34#define _OPimContactAccessBackend_SQL_
35 35
36#include <opie2/ocontactaccessbackend.h> 36#include <opie2/ocontactaccessbackend.h>
@@ -50,12 +50,12 @@ namespace Opie {
50/** 50/**
51 * This class is the SQL implementation of a Contact backend 51 * This class is the SQL implementation of a Contact backend
52 * it does implement everything available for OContact. 52 * it does implement everything available for OPimContact.
53 * @see OPimAccessBackend for more information of available methods 53 * @see OPimAccessBackend for more information of available methods
54 */ 54 */
55class OContactAccessBackend_SQL : public OContactAccessBackend { 55class OPimContactAccessBackend_SQL : public OPimContactAccessBackend {
56 public: 56 public:
57 OContactAccessBackend_SQL ( const QString& appname, const QString& filename = QString::null ); 57 OPimContactAccessBackend_SQL ( const QString& appname, const QString& filename = QString::null );
58 58
59 ~OContactAccessBackend_SQL (); 59 ~OPimContactAccessBackend_SQL ();
60 60
61 bool save(); 61 bool save();
@@ -69,9 +69,9 @@ class OContactAccessBackend_SQL : public OContactAccessBackend {
69 QArray<int> allRecords() const; 69 QArray<int> allRecords() const;
70 70
71 OContact find ( int uid ) const; 71 OPimContact find ( int uid ) const;
72 // FIXME: Add lookahead-cache support ! 72 // FIXME: Add lookahead-cache support !
73 //OContact find(int uid, const QArray<int>&, uint cur, Frontend::CacheDirection )const; 73 //OPimContact find(int uid, const QArray<int>&, uint cur, Frontend::CacheDirection )const;
74 74
75 QArray<int> queryByExample ( const OContact &query, int settings, 75 QArray<int> queryByExample ( const OPimContact &query, int settings,
76 const QDateTime& d ); 76 const QDateTime& d );
77 77
@@ -84,7 +84,7 @@ class OContactAccessBackend_SQL : public OContactAccessBackend {
84 // Currently only asc implemented.. 84 // Currently only asc implemented..
85 QArray<int> sorted( bool asc, int , int , int ); 85 QArray<int> sorted( bool asc, int , int , int );
86 bool add ( const OContact &newcontact ); 86 bool add ( const OPimContact &newcontact );
87 87
88 bool replace ( const OContact &contact ); 88 bool replace ( const OPimContact &contact );
89 89
90 bool remove ( int uid ); 90 bool remove ( int uid );
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
index f85cf38..b569f8b 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
@@ -40,5 +40,5 @@
40namespace Opie { 40namespace Opie {
41 41
42OContactAccessBackend_VCard::OContactAccessBackend_VCard ( const QString& , const QString& filename ): 42OPimContactAccessBackend_VCard::OPimContactAccessBackend_VCard ( const QString& , const QString& filename ):
43 m_dirty( false ), 43 m_dirty( false ),
44 m_file( filename ) 44 m_file( filename )
@@ -48,5 +48,5 @@ OContactAccessBackend_VCard::OContactAccessBackend_VCard ( const QString& , cons
48 48
49 49
50bool OContactAccessBackend_VCard::load () 50bool OPimContactAccessBackend_VCard::load ()
51{ 51{
52 m_map.clear(); 52 m_map.clear();
@@ -65,5 +65,5 @@ bool OContactAccessBackend_VCard::load ()
65 65
66 while ( obj ) { 66 while ( obj ) {
67 OContact con = parseVObject( obj ); 67 OPimContact con = parseVObject( obj );
68 /* 68 /*
69 * if uid is 0 assign a new one 69 * if uid is 0 assign a new one
@@ -86,9 +86,9 @@ bool OContactAccessBackend_VCard::load ()
86 86
87} 87}
88bool OContactAccessBackend_VCard::reload() 88bool OPimContactAccessBackend_VCard::reload()
89{ 89{
90 return load(); 90 return load();
91} 91}
92bool OContactAccessBackend_VCard::save() 92bool OPimContactAccessBackend_VCard::save()
93{ 93{
94 if (!m_dirty ) 94 if (!m_dirty )
@@ -104,5 +104,5 @@ bool OContactAccessBackend_VCard::save()
104 104
105 VObject *vo; 105 VObject *vo;
106 for(QMap<int, OContact>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){ 106 for(QMap<int, OPimContact>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){
107 vo = createVObject( *it ); 107 vo = createVObject( *it );
108 writeVObject( file.directHandle() , vo ); 108 writeVObject( file.directHandle() , vo );
@@ -117,5 +117,5 @@ bool OContactAccessBackend_VCard::save()
117 117
118} 118}
119void OContactAccessBackend_VCard::clear () 119void OPimContactAccessBackend_VCard::clear ()
120{ 120{
121 m_map.clear(); 121 m_map.clear();
@@ -123,5 +123,5 @@ void OContactAccessBackend_VCard::clear ()
123} 123}
124 124
125bool OContactAccessBackend_VCard::add ( const OContact& newcontact ) 125bool OPimContactAccessBackend_VCard::add ( const OPimContact& newcontact )
126{ 126{
127 m_map.insert( newcontact.uid(), newcontact ); 127 m_map.insert( newcontact.uid(), newcontact );
@@ -130,5 +130,5 @@ bool OContactAccessBackend_VCard::add ( const OContact& newcontact )
130} 130}
131 131
132bool OContactAccessBackend_VCard::remove ( int uid ) 132bool OPimContactAccessBackend_VCard::remove ( int uid )
133{ 133{
134 m_map.remove( uid ); 134 m_map.remove( uid );
@@ -137,5 +137,5 @@ bool OContactAccessBackend_VCard::remove ( int uid )
137} 137}
138 138
139bool OContactAccessBackend_VCard::replace ( const OContact &contact ) 139bool OPimContactAccessBackend_VCard::replace ( const OPimContact &contact )
140{ 140{
141 m_map.replace( contact.uid(), contact ); 141 m_map.replace( contact.uid(), contact );
@@ -144,13 +144,13 @@ bool OContactAccessBackend_VCard::replace ( const OContact &contact )
144} 144}
145 145
146OContact OContactAccessBackend_VCard::find ( int uid ) const 146OPimContact OPimContactAccessBackend_VCard::find ( int uid ) const
147{ 147{
148 return m_map[uid]; 148 return m_map[uid];
149} 149}
150 150
151QArray<int> OContactAccessBackend_VCard::allRecords() const 151QArray<int> OPimContactAccessBackend_VCard::allRecords() const
152{ 152{
153 QArray<int> ar( m_map.count() ); 153 QArray<int> ar( m_map.count() );
154 QMap<int, OContact>::ConstIterator it; 154 QMap<int, OPimContact>::ConstIterator it;
155 int i = 0; 155 int i = 0;
156 for ( it = m_map.begin(); it != m_map.end(); ++it ) { 156 for ( it = m_map.begin(); it != m_map.end(); ++it ) {
@@ -162,5 +162,5 @@ QArray<int> OContactAccessBackend_VCard::allRecords() const
162 162
163// Not implemented 163// Not implemented
164QArray<int> OContactAccessBackend_VCard::queryByExample ( const OContact&, int, const QDateTime& ) 164QArray<int> OPimContactAccessBackend_VCard::queryByExample ( const OPimContact&, int, const QDateTime& )
165{ 165{
166 QArray<int> ar(0); 166 QArray<int> ar(0);
@@ -169,5 +169,5 @@ QArray<int> OContactAccessBackend_VCard::queryByExample ( const OContact&, int,
169 169
170// Not implemented 170// Not implemented
171QArray<int> OContactAccessBackend_VCard::matchRegexp( const QRegExp& ) const 171QArray<int> OPimContactAccessBackend_VCard::matchRegexp( const QRegExp& ) const
172{ 172{
173 QArray<int> ar(0); 173 QArray<int> ar(0);
@@ -175,15 +175,15 @@ QArray<int> OContactAccessBackend_VCard::matchRegexp( const QRegExp& ) const
175} 175}
176 176
177const uint OContactAccessBackend_VCard::querySettings() 177const uint OPimContactAccessBackend_VCard::querySettings()
178{ 178{
179 return 0; // No search possible 179 return 0; // No search possible
180} 180}
181 181
182bool OContactAccessBackend_VCard::hasQuerySettings (uint ) const 182bool OPimContactAccessBackend_VCard::hasQuerySettings (uint ) const
183{ 183{
184 return false; // No search possible, therefore all settings invalid ;) 184 return false; // No search possible, therefore all settings invalid ;)
185} 185}
186 186
187bool OContactAccessBackend_VCard::wasChangedExternally() 187bool OPimContactAccessBackend_VCard::wasChangedExternally()
188{ 188{
189 return false; // Don't expect concurrent access 189 return false; // Don't expect concurrent access
@@ -191,5 +191,5 @@ bool OContactAccessBackend_VCard::wasChangedExternally()
191 191
192// Not implemented 192// Not implemented
193QArray<int> OContactAccessBackend_VCard::sorted( bool , int, int, int ) 193QArray<int> OPimContactAccessBackend_VCard::sorted( bool , int, int, int )
194{ 194{
195 QArray<int> ar(0); 195 QArray<int> ar(0);
@@ -200,7 +200,7 @@ QArray<int> OContactAccessBackend_VCard::sorted( bool , int, int, int )
200 200
201 201
202OContact OContactAccessBackend_VCard::parseVObject( VObject *obj ) 202OPimContact OPimContactAccessBackend_VCard::parseVObject( VObject *obj )
203{ 203{
204 OContact c; 204 OPimContact c;
205 205
206 VObjectIterator it; 206 VObjectIterator it;
@@ -428,5 +428,5 @@ OContact OContactAccessBackend_VCard::parseVObject( VObject *obj )
428 428
429 429
430VObject* OContactAccessBackend_VCard::createVObject( const OContact &c ) 430VObject* OPimContactAccessBackend_VCard::createVObject( const OPimContact &c )
431{ 431{
432 VObject *vcard = newVObject( VCCardProp ); 432 VObject *vcard = newVObject( VCCardProp );
@@ -534,5 +534,5 @@ VObject* OContactAccessBackend_VCard::createVObject( const OContact &c )
534} 534}
535 535
536QString OContactAccessBackend_VCard::convDateToVCardDate( const QDate& d ) const 536QString OPimContactAccessBackend_VCard::convDateToVCardDate( const QDate& d ) const
537{ 537{
538 QString str_rfc2425 = QString("%1-%2-%3") 538 QString str_rfc2425 = QString("%1-%2-%3")
@@ -548,5 +548,5 @@ QString OContactAccessBackend_VCard::convDateToVCardDate( const QDate& d ) const
548} 548}
549 549
550QDate OContactAccessBackend_VCard::convVCardDateToDate( const QString& datestr ) 550QDate OPimContactAccessBackend_VCard::convVCardDateToDate( const QString& datestr )
551{ 551{
552 int monthPos = datestr.find('-'); 552 int monthPos = datestr.find('-');
@@ -573,5 +573,5 @@ QDate OContactAccessBackend_VCard::convVCardDateToDate( const QString& datestr )
573} 573}
574 574
575VObject* OContactAccessBackend_VCard::safeAddPropValue( VObject *o, const char *prop, const QString &value ) 575VObject* OPimContactAccessBackend_VCard::safeAddPropValue( VObject *o, const char *prop, const QString &value )
576{ 576{
577 VObject *ret = 0; 577 VObject *ret = 0;
@@ -581,5 +581,5 @@ VObject* OContactAccessBackend_VCard::safeAddPropValue( VObject *o, const char *
581} 581}
582 582
583VObject* OContactAccessBackend_VCard::safeAddProp( VObject *o, const char *prop) 583VObject* OPimContactAccessBackend_VCard::safeAddProp( VObject *o, const char *prop)
584{ 584{
585 VObject *ret = 0; 585 VObject *ret = 0;
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h
index 11be027..2a786af 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h
@@ -33,5 +33,5 @@
33#define __OCONTACTACCESSBACKEND_VCARD_H_ 33#define __OCONTACTACCESSBACKEND_VCARD_H_
34 34
35#include <opie2/ocontact.h> 35#include <opie2/opimcontact.h>
36 36
37#include <opie2/ocontactaccessbackend.h> 37#include <opie2/ocontactaccessbackend.h>
@@ -42,10 +42,10 @@ namespace Opie {
42/** 42/**
43 * This is the vCard 2.1 implementation of the Contact Storage 43 * This is the vCard 2.1 implementation of the Contact Storage
44 * @see OContactAccessBackend_XML 44 * @see OPimContactAccessBackend_XML
45 * @see OPimAccessBackend 45 * @see OPimAccessBackend
46 */ 46 */
47class OContactAccessBackend_VCard : public OContactAccessBackend { 47class OPimContactAccessBackend_VCard : public OPimContactAccessBackend {
48 public: 48 public:
49 OContactAccessBackend_VCard ( const QString& appname, const QString& filename = QString::null ); 49 OPimContactAccessBackend_VCard ( const QString& appname, const QString& filename = QString::null );
50 50
51 bool load (); 51 bool load ();
@@ -54,11 +54,11 @@ class OContactAccessBackend_VCard : public OContactAccessBackend {
54 void clear (); 54 void clear ();
55 55
56 bool add ( const OContact& newcontact ); 56 bool add ( const OPimContact& newcontact );
57 bool remove ( int uid ); 57 bool remove ( int uid );
58 bool replace ( const OContact& contact ); 58 bool replace ( const OPimContact& contact );
59 59
60 OContact find ( int uid ) const; 60 OPimContact find ( int uid ) const;
61 QArray<int> allRecords() const; 61 QArray<int> allRecords() const;
62 QArray<int> queryByExample ( const OContact &query, int settings, const QDateTime& d = QDateTime() ); 62 QArray<int> queryByExample ( const OPimContact &query, int settings, const QDateTime& d = QDateTime() );
63 QArray<int> matchRegexp( const QRegExp &r ) const; 63 QArray<int> matchRegexp( const QRegExp &r ) const;
64 64
@@ -69,6 +69,6 @@ class OContactAccessBackend_VCard : public OContactAccessBackend {
69 69
70private: 70private:
71 OContact parseVObject( VObject* obj ); 71 OPimContact parseVObject( VObject* obj );
72 VObject* createVObject( const OContact& c ); 72 VObject* createVObject( const OPimContact& c );
73 QString convDateToVCardDate( const QDate& c ) const; 73 QString convDateToVCardDate( const QDate& c ) const;
74 QDate convVCardDateToDate( const QString& datestr ); 74 QDate convVCardDateToDate( const QString& datestr );
@@ -78,5 +78,5 @@ private:
78 bool m_dirty : 1; 78 bool m_dirty : 1;
79 QString m_file; 79 QString m_file;
80 QMap<int, OContact> m_map; 80 QMap<int, OPimContact> m_map;
81}; 81};
82 82
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
index 07ad29a..0adba68 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
@@ -55,5 +55,5 @@ using namespace Opie;
55 55
56namespace Opie { 56namespace Opie {
57OContactAccessBackend_XML::OContactAccessBackend_XML ( const QString& appname, const QString& filename ): 57OPimContactAccessBackend_XML::OPimContactAccessBackend_XML ( const QString& appname, const QString& filename ):
58 m_changed( false ) 58 m_changed( false )
59{ 59{
@@ -79,5 +79,5 @@ OContactAccessBackend_XML::OContactAccessBackend_XML ( const QString& appname, c
79} 79}
80 80
81bool OContactAccessBackend_XML::save() 81bool OPimContactAccessBackend_XML::save()
82{ 82{
83 83
@@ -105,5 +105,5 @@ bool OContactAccessBackend_XML::save()
105 105
106 // Write all contacts 106 // Write all contacts
107 QListIterator<OContact> it( m_contactList ); 107 QListIterator<OPimContact> it( m_contactList );
108 for ( ; it.current(); ++it ) { 108 for ( ; it.current(); ++it ) {
109 // qWarning(" Uid %d at Offset: %x", (*it)->uid(), idx_offset ); 109 // qWarning(" Uid %d at Offset: %x", (*it)->uid(), idx_offset );
@@ -149,5 +149,5 @@ bool OContactAccessBackend_XML::save()
149} 149}
150 150
151bool OContactAccessBackend_XML::load () 151bool OPimContactAccessBackend_XML::load ()
152{ 152{
153 m_contactList.clear(); 153 m_contactList.clear();
@@ -168,5 +168,5 @@ bool OContactAccessBackend_XML::load ()
168} 168}
169 169
170void OContactAccessBackend_XML::clear () 170void OPimContactAccessBackend_XML::clear ()
171{ 171{
172 m_contactList.clear(); 172 m_contactList.clear();
@@ -176,5 +176,5 @@ void OContactAccessBackend_XML::clear ()
176} 176}
177 177
178bool OContactAccessBackend_XML::wasChangedExternally() 178bool OPimContactAccessBackend_XML::wasChangedExternally()
179{ 179{
180 QFileInfo fi( m_fileName ); 180 QFileInfo fi( m_fileName );
@@ -185,10 +185,10 @@ bool OContactAccessBackend_XML::wasChangedExternally()
185} 185}
186 186
187QArray<int> OContactAccessBackend_XML::allRecords() const 187QArray<int> OPimContactAccessBackend_XML::allRecords() const
188{ 188{
189 QArray<int> uid_list( m_contactList.count() ); 189 QArray<int> uid_list( m_contactList.count() );
190 190
191 uint counter = 0; 191 uint counter = 0;
192 QListIterator<OContact> it( m_contactList ); 192 QListIterator<OPimContact> it( m_contactList );
193 for( ; it.current(); ++it ){ 193 for( ; it.current(); ++it ){
194 uid_list[counter++] = (*it)->uid(); 194 uid_list[counter++] = (*it)->uid();
@@ -198,9 +198,9 @@ QArray<int> OContactAccessBackend_XML::allRecords() const
198} 198}
199 199
200OContact OContactAccessBackend_XML::find ( int uid ) const 200OPimContact OPimContactAccessBackend_XML::find ( int uid ) const
201{ 201{
202 OContact foundContact; //Create empty contact 202 OPimContact foundContact; //Create empty contact
203 203
204 OContact* found = m_uidToContact.find( QString().setNum( uid ) ); 204 OPimContact* found = m_uidToContact.find( QString().setNum( uid ) );
205 205
206 if ( found ){ 206 if ( found ){
@@ -211,10 +211,10 @@ OContact OContactAccessBackend_XML::find ( int uid ) const
211} 211}
212 212
213QArray<int> OContactAccessBackend_XML::queryByExample ( const OContact &query, int settings, 213QArray<int> OPimContactAccessBackend_XML::queryByExample ( const OPimContact &query, int settings,
214 const QDateTime& d ) 214 const QDateTime& d )
215{ 215{
216 216
217 QArray<int> m_currentQuery( m_contactList.count() ); 217 QArray<int> m_currentQuery( m_contactList.count() );
218 QListIterator<OContact> it( m_contactList ); 218 QListIterator<OPimContact> it( m_contactList );
219 uint arraycounter = 0; 219 uint arraycounter = 0;
220 220
@@ -241,17 +241,17 @@ QArray<int> OContactAccessBackend_XML::queryByExample ( const OContact &query, i
241 if ( queryDate->isValid() ){ 241 if ( queryDate->isValid() ){
242 if( checkDate->isValid() ){ 242 if( checkDate->isValid() ){
243 if ( settings & OContactAccess::DateYear ){ 243 if ( settings & OPimContactAccess::DateYear ){
244 if ( queryDate->year() != checkDate->year() ) 244 if ( queryDate->year() != checkDate->year() )
245 allcorrect = false; 245 allcorrect = false;
246 } 246 }
247 if ( settings & OContactAccess::DateMonth ){ 247 if ( settings & OPimContactAccess::DateMonth ){
248 if ( queryDate->month() != checkDate->month() ) 248 if ( queryDate->month() != checkDate->month() )
249 allcorrect = false; 249 allcorrect = false;
250 } 250 }
251 if ( settings & OContactAccess::DateDay ){ 251 if ( settings & OPimContactAccess::DateDay ){
252 if ( queryDate->day() != checkDate->day() ) 252 if ( queryDate->day() != checkDate->day() )
253 allcorrect = false; 253 allcorrect = false;
254 } 254 }
255 if ( settings & OContactAccess::DateDiff ) { 255 if ( settings & OPimContactAccess::DateDiff ) {
256 QDate current; 256 QDate current;
257 // If we get an additional date, we 257 // If we get an additional date, we
@@ -302,15 +302,15 @@ QArray<int> OContactAccessBackend_XML::queryByExample ( const OContact &query, i
302 /* Just compare fields which are not empty in the query object */ 302 /* Just compare fields which are not empty in the query object */
303 if ( !query.field(i).isEmpty() ){ 303 if ( !query.field(i).isEmpty() ){
304 switch ( settings & ~( OContactAccess::IgnoreCase 304 switch ( settings & ~( OPimContactAccess::IgnoreCase
305 | OContactAccess::DateDiff 305 | OPimContactAccess::DateDiff
306 | OContactAccess::DateYear 306 | OPimContactAccess::DateYear
307 | OContactAccess::DateMonth 307 | OPimContactAccess::DateMonth
308 | OContactAccess::DateDay 308 | OPimContactAccess::DateDay
309 | OContactAccess::MatchOne 309 | OPimContactAccess::MatchOne
310 ) ){ 310 ) ){
311 311
312 case OContactAccess::RegExp:{ 312 case OPimContactAccess::RegExp:{
313 QRegExp expr ( query.field(i), 313 QRegExp expr ( query.field(i),
314 !(settings & OContactAccess::IgnoreCase), 314 !(settings & OPimContactAccess::IgnoreCase),
315 false ); 315 false );
316 if ( expr.find ( (*it)->field(i), 0 ) == -1 ) 316 if ( expr.find ( (*it)->field(i), 0 ) == -1 )
@@ -318,7 +318,7 @@ QArray<int> OContactAccessBackend_XML::queryByExample ( const OContact &query, i
318 } 318 }
319 break; 319 break;
320 case OContactAccess::WildCards:{ 320 case OPimContactAccess::WildCards:{
321 QRegExp expr ( query.field(i), 321 QRegExp expr ( query.field(i),
322 !(settings & OContactAccess::IgnoreCase), 322 !(settings & OPimContactAccess::IgnoreCase),
323 true ); 323 true );
324 if ( expr.find ( (*it)->field(i), 0 ) == -1 ) 324 if ( expr.find ( (*it)->field(i), 0 ) == -1 )
@@ -326,6 +326,6 @@ QArray<int> OContactAccessBackend_XML::queryByExample ( const OContact &query, i
326 } 326 }
327 break; 327 break;
328 case OContactAccess::ExactMatch:{ 328 case OPimContactAccess::ExactMatch:{
329 if (settings & OContactAccess::IgnoreCase){ 329 if (settings & OPimContactAccess::IgnoreCase){
330 if ( query.field(i).upper() != 330 if ( query.field(i).upper() !=
331 (*it)->field(i).upper() ) 331 (*it)->field(i).upper() )
@@ -352,8 +352,8 @@ QArray<int> OContactAccessBackend_XML::queryByExample ( const OContact &query, i
352} 352}
353 353
354QArray<int> OContactAccessBackend_XML::matchRegexp( const QRegExp &r ) const 354QArray<int> OPimContactAccessBackend_XML::matchRegexp( const QRegExp &r ) const
355{ 355{
356 QArray<int> m_currentQuery( m_contactList.count() ); 356 QArray<int> m_currentQuery( m_contactList.count() );
357 QListIterator<OContact> it( m_contactList ); 357 QListIterator<OPimContact> it( m_contactList );
358 uint arraycounter = 0; 358 uint arraycounter = 0;
359 359
@@ -370,20 +370,20 @@ QArray<int> OContactAccessBackend_XML::matchRegexp( const QRegExp &r ) const
370} 370}
371 371
372const uint OContactAccessBackend_XML::querySettings() 372const uint OPimContactAccessBackend_XML::querySettings()
373{ 373{
374 return ( OContactAccess::WildCards 374 return ( OPimContactAccess::WildCards
375 | OContactAccess::IgnoreCase 375 | OPimContactAccess::IgnoreCase
376 | OContactAccess::RegExp 376 | OPimContactAccess::RegExp
377 | OContactAccess::ExactMatch 377 | OPimContactAccess::ExactMatch
378 | OContactAccess::DateDiff 378 | OPimContactAccess::DateDiff
379 | OContactAccess::DateYear 379 | OPimContactAccess::DateYear
380 | OContactAccess::DateMonth 380 | OPimContactAccess::DateMonth
381 | OContactAccess::DateDay 381 | OPimContactAccess::DateDay
382 ); 382 );
383} 383}
384 384
385bool OContactAccessBackend_XML::hasQuerySettings (uint querySettings) const 385bool OPimContactAccessBackend_XML::hasQuerySettings (uint querySettings) const
386{ 386{
387 /* OContactAccess::IgnoreCase, DateDiff, DateYear, DateMonth, DateDay 387 /* OPimContactAccess::IgnoreCase, DateDiff, DateYear, DateMonth, DateDay
388 * may be added with any of the other settings. IgnoreCase should never used alone. 388 * may be added with any of the other settings. IgnoreCase should never used alone.
389 * Wildcards, RegExp, ExactMatch should never used at the same time... 389 * Wildcards, RegExp, ExactMatch should never used at the same time...
@@ -392,12 +392,12 @@ bool OContactAccessBackend_XML::hasQuerySettings (uint querySettings) const
392 // Step 1: Check whether the given settings are supported by this backend 392 // Step 1: Check whether the given settings are supported by this backend
393 if ( ( querySettings & ( 393 if ( ( querySettings & (
394 OContactAccess::IgnoreCase 394 OPimContactAccess::IgnoreCase
395 | OContactAccess::WildCards 395 | OPimContactAccess::WildCards
396 | OContactAccess::DateDiff 396 | OPimContactAccess::DateDiff
397 | OContactAccess::DateYear 397 | OPimContactAccess::DateYear
398 | OContactAccess::DateMonth 398 | OPimContactAccess::DateMonth
399 | OContactAccess::DateDay 399 | OPimContactAccess::DateDay
400 | OContactAccess::RegExp 400 | OPimContactAccess::RegExp
401 | OContactAccess::ExactMatch 401 | OPimContactAccess::ExactMatch
402 ) ) != querySettings ) 402 ) ) != querySettings )
403 return false; 403 return false;
@@ -406,20 +406,20 @@ bool OContactAccessBackend_XML::hasQuerySettings (uint querySettings) const
406 406
407 // IngoreCase alone is invalid 407 // IngoreCase alone is invalid
408 if ( querySettings == OContactAccess::IgnoreCase ) 408 if ( querySettings == OPimContactAccess::IgnoreCase )
409 return false; 409 return false;
410 410
411 // WildCards, RegExp and ExactMatch should never used at the same time 411 // WildCards, RegExp and ExactMatch should never used at the same time
412 switch ( querySettings & ~( OContactAccess::IgnoreCase 412 switch ( querySettings & ~( OPimContactAccess::IgnoreCase
413 | OContactAccess::DateDiff 413 | OPimContactAccess::DateDiff
414 | OContactAccess::DateYear 414 | OPimContactAccess::DateYear
415 | OContactAccess::DateMonth 415 | OPimContactAccess::DateMonth
416 | OContactAccess::DateDay 416 | OPimContactAccess::DateDay
417 ) 417 )
418 ){ 418 ){
419 case OContactAccess::RegExp: 419 case OPimContactAccess::RegExp:
420 return ( true ); 420 return ( true );
421 case OContactAccess::WildCards: 421 case OPimContactAccess::WildCards:
422 return ( true ); 422 return ( true );
423 case OContactAccess::ExactMatch: 423 case OPimContactAccess::ExactMatch:
424 return ( true ); 424 return ( true );
425 case 0: // one of the upper removed bits were set.. 425 case 0: // one of the upper removed bits were set..
@@ -431,5 +431,5 @@ bool OContactAccessBackend_XML::hasQuerySettings (uint querySettings) const
431 431
432// Currently only asc implemented.. 432// Currently only asc implemented..
433QArray<int> OContactAccessBackend_XML::sorted( bool asc, int , int , int ) 433QArray<int> OPimContactAccessBackend_XML::sorted( bool asc, int , int , int )
434{ 434{
435 QMap<QString, int> nameToUid; 435 QMap<QString, int> nameToUid;
@@ -439,5 +439,5 @@ QArray<int> OContactAccessBackend_XML::sorted( bool asc, int , int , int )
439 // First fill map and StringList with all Names 439 // First fill map and StringList with all Names
440 // Afterwards sort namelist and use map to fill array to return.. 440 // Afterwards sort namelist and use map to fill array to return..
441 QListIterator<OContact> it( m_contactList ); 441 QListIterator<OPimContact> it( m_contactList );
442 for( ; it.current(); ++it ){ 442 for( ; it.current(); ++it ){
443 names.append( (*it)->fileAs() + QString::number( (*it)->uid() ) ); 443 names.append( (*it)->fileAs() + QString::number( (*it)->uid() ) );
@@ -459,5 +459,5 @@ QArray<int> OContactAccessBackend_XML::sorted( bool asc, int , int , int )
459} 459}
460 460
461bool OContactAccessBackend_XML::add ( const OContact &newcontact ) 461bool OPimContactAccessBackend_XML::add ( const OPimContact &newcontact )
462{ 462{
463 //qWarning("odefaultbackend: ACTION::ADD"); 463 //qWarning("odefaultbackend: ACTION::ADD");
@@ -470,12 +470,12 @@ bool OContactAccessBackend_XML::add ( const OContact &newcontact )
470} 470}
471 471
472bool OContactAccessBackend_XML::replace ( const OContact &contact ) 472bool OPimContactAccessBackend_XML::replace ( const OPimContact &contact )
473{ 473{
474 m_changed = true; 474 m_changed = true;
475 475
476 OContact* found = m_uidToContact.find ( QString().setNum( contact.uid() ) ); 476 OPimContact* found = m_uidToContact.find ( QString().setNum( contact.uid() ) );
477 477
478 if ( found ) { 478 if ( found ) {
479 OContact* newCont = new OContact( contact ); 479 OPimContact* newCont = new OPimContact( contact );
480 480
481 updateJournal ( *newCont, ACTION_REPLACE); 481 updateJournal ( *newCont, ACTION_REPLACE);
@@ -492,9 +492,9 @@ bool OContactAccessBackend_XML::replace ( const OContact &contact )
492} 492}
493 493
494bool OContactAccessBackend_XML::remove ( int uid ) 494bool OPimContactAccessBackend_XML::remove ( int uid )
495{ 495{
496 m_changed = true; 496 m_changed = true;
497 497
498 OContact* found = m_uidToContact.find ( QString().setNum( uid ) ); 498 OPimContact* found = m_uidToContact.find ( QString().setNum( uid ) );
499 499
500 if ( found ) { 500 if ( found ) {
@@ -508,12 +508,12 @@ bool OContactAccessBackend_XML::remove ( int uid )
508} 508}
509 509
510bool OContactAccessBackend_XML::reload(){ 510bool OPimContactAccessBackend_XML::reload(){
511 /* Reload is the same as load in this implementation */ 511 /* Reload is the same as load in this implementation */
512 return ( load() ); 512 return ( load() );
513} 513}
514 514
515void OContactAccessBackend_XML::addContact_p( const OContact &newcontact ) 515void OPimContactAccessBackend_XML::addContact_p( const OPimContact &newcontact )
516{ 516{
517 OContact* contRef = new OContact( newcontact ); 517 OPimContact* contRef = new OPimContact( newcontact );
518 518
519 m_contactList.append ( contRef ); 519 m_contactList.append ( contRef );
@@ -522,5 +522,5 @@ void OContactAccessBackend_XML::addContact_p( const OContact &newcontact )
522 522
523/* This function loads the xml-database and the journalfile */ 523/* This function loads the xml-database and the journalfile */
524bool OContactAccessBackend_XML::load( const QString filename, bool isJournal ) 524bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal )
525{ 525{
526 526
@@ -591,5 +591,5 @@ bool OContactAccessBackend_XML::load( const QString filename, bool isJournal )
591 dict.insert( "actionrow", new int(JOURNALROW) ); 591 dict.insert( "actionrow", new int(JOURNALROW) );
592 592
593 //qWarning( "OContactDefaultBackEnd::loading %s", filename.latin1() ); 593 //qWarning( "OPimContactDefaultBackEnd::loading %s", filename.latin1() );
594 594
595 XMLElement *root = XMLElement::load( filename ); 595 XMLElement *root = XMLElement::load( filename );
@@ -599,5 +599,5 @@ bool OContactAccessBackend_XML::load( const QString filename, bool isJournal )
599 */ 599 */
600 XMLElement *element = root->firstChild(); 600 XMLElement *element = root->firstChild();
601 //qWarning("OContactAccess::load tagName(): %s", root->tagName().latin1() ); 601 //qWarning("OPimContactAccess::load tagName(): %s", root->tagName().latin1() );
602 element = element->firstChild(); 602 element = element->firstChild();
603 603
@@ -605,5 +605,5 @@ bool OContactAccessBackend_XML::load( const QString filename, bool isJournal )
605 while( element && !isJournal ){ 605 while( element && !isJournal ){
606 if( element->tagName() != QString::fromLatin1("Contacts") ){ 606 if( element->tagName() != QString::fromLatin1("Contacts") ){
607 //qWarning ("OContactDefBack::Searching for Tag \"Contacts\"! Found: %s", 607 //qWarning ("OPimContactDefBack::Searching for Tag \"Contacts\"! Found: %s",
608 // element->tagName().latin1()); 608 // element->tagName().latin1());
609 element = element->nextChild(); 609 element = element->nextChild();
@@ -616,5 +616,5 @@ bool OContactAccessBackend_XML::load( const QString filename, bool isJournal )
616 while( element ){ 616 while( element ){
617 if( element->tagName() != QString::fromLatin1("Contact") ){ 617 if( element->tagName() != QString::fromLatin1("Contact") ){
618 //qWarning ("OContactDefBack::Searching for Tag \"Contact\"! Found: %s", 618 //qWarning ("OPimContactDefBack::Searching for Tag \"Contact\"! Found: %s",
619 // element->tagName().latin1()); 619 // element->tagName().latin1());
620 element = element->nextChild(); 620 element = element->nextChild();
@@ -624,5 +624,5 @@ bool OContactAccessBackend_XML::load( const QString filename, bool isJournal )
624 * attributes contained 624 * attributes contained
625 */ 625 */
626 //qWarning("OContactDefBack::load element tagName() : %s", 626 //qWarning("OPimContactDefBack::load element tagName() : %s",
627 // element->tagName().latin1() ); 627 // element->tagName().latin1() );
628 QString dummy; 628 QString dummy;
@@ -671,5 +671,5 @@ bool OContactAccessBackend_XML::load( const QString filename, bool isJournal )
671 } 671 }
672 /* now generate the Contact contact */ 672 /* now generate the Contact contact */
673 OContact contact( contactMap ); 673 OPimContact contact( contactMap );
674 674
675 for (customIt = customMap.begin(); customIt != customMap.end(); ++customIt ) { 675 for (customIt = customMap.begin(); customIt != customMap.end(); ++customIt ) {
@@ -714,5 +714,5 @@ bool OContactAccessBackend_XML::load( const QString filename, bool isJournal )
714 714
715 715
716void OContactAccessBackend_XML::updateJournal( const OContact& cnt, 716void OPimContactAccessBackend_XML::updateJournal( const OPimContact& cnt,
717 journal_action action ) 717 journal_action action )
718{ 718{
@@ -742,5 +742,5 @@ void OContactAccessBackend_XML::updateJournal( const OContact& cnt,
742} 742}
743 743
744void OContactAccessBackend_XML::removeJournal() 744void OPimContactAccessBackend_XML::removeJournal()
745{ 745{
746 QFile f ( m_journalName ); 746 QFile f ( m_journalName );
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.h b/libopie2/opiepim/backend/ocontactaccessbackend_xml.h
index f439c4c..eaea352 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.h
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.h
@@ -31,6 +31,6 @@
31 */ 31 */
32 32
33#ifndef _OContactAccessBackend_XML_ 33#ifndef _OPimContactAccessBackend_XML_
34#define _OContactAccessBackend_XML_ 34#define _OPimContactAccessBackend_XML_
35 35
36#include <opie2/ocontactaccessbackend.h> 36#include <opie2/ocontactaccessbackend.h>
@@ -44,10 +44,10 @@ namespace Opie {
44/** 44/**
45 * This class is the XML implementation of a Contact backend 45 * This class is the XML implementation of a Contact backend
46 * it does implement everything available for OContact. 46 * it does implement everything available for OPimContact.
47 * @see OPimAccessBackend for more information of available methods 47 * @see OPimAccessBackend for more information of available methods
48 */ 48 */
49class OContactAccessBackend_XML : public OContactAccessBackend { 49class OPimContactAccessBackend_XML : public OPimContactAccessBackend {
50 public: 50 public:
51 OContactAccessBackend_XML ( const QString& appname, const QString& filename = QString::null ); 51 OPimContactAccessBackend_XML ( const QString& appname, const QString& filename = QString::null );
52 52
53 bool save(); 53 bool save();
@@ -61,7 +61,7 @@ class OContactAccessBackend_XML : public OContactAccessBackend {
61 QArray<int> allRecords() const; 61 QArray<int> allRecords() const;
62 62
63 OContact find ( int uid ) const; 63 OPimContact find ( int uid ) const;
64 64
65 QArray<int> queryByExample ( const OContact &query, int settings, const QDateTime& d = QDateTime() ); 65 QArray<int> queryByExample ( const OPimContact &query, int settings, const QDateTime& d = QDateTime() );
66 66
67 QArray<int> matchRegexp( const QRegExp &r ) const; 67 QArray<int> matchRegexp( const QRegExp &r ) const;
@@ -73,7 +73,7 @@ class OContactAccessBackend_XML : public OContactAccessBackend {
73 // Currently only asc implemented.. 73 // Currently only asc implemented..
74 QArray<int> sorted( bool asc, int , int , int ); 74 QArray<int> sorted( bool asc, int , int , int );
75 bool add ( const OContact &newcontact ); 75 bool add ( const OPimContact &newcontact );
76 76
77 bool replace ( const OContact &contact ); 77 bool replace ( const OPimContact &contact );
78 78
79 bool remove ( int uid ); 79 bool remove ( int uid );
@@ -84,5 +84,5 @@ class OContactAccessBackend_XML : public OContactAccessBackend {
84 enum journal_action { ACTION_ADD, ACTION_REMOVE, ACTION_REPLACE }; 84 enum journal_action { ACTION_ADD, ACTION_REMOVE, ACTION_REPLACE };
85 85
86 void addContact_p( const OContact &newcontact ); 86 void addContact_p( const OPimContact &newcontact );
87 87
88 /* This function loads the xml-database and the journalfile */ 88 /* This function loads the xml-database and the journalfile */
@@ -90,5 +90,5 @@ class OContactAccessBackend_XML : public OContactAccessBackend {
90 90
91 91
92 void updateJournal( const OContact& cnt, journal_action action ); 92 void updateJournal( const OPimContact& cnt, journal_action action );
93 void removeJournal(); 93 void removeJournal();
94 94
@@ -98,8 +98,8 @@ class OContactAccessBackend_XML : public OContactAccessBackend {
98 QString m_fileName; 98 QString m_fileName;
99 QString m_appName; 99 QString m_appName;
100 QList<OContact> m_contactList; 100 QList<OPimContact> m_contactList;
101 QDateTime m_readtime; 101 QDateTime m_readtime;
102 102
103 QDict<OContact> m_uidToContact; 103 QDict<OPimContact> m_uidToContact;
104}; 104};
105 105
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend.cpp b/libopie2/opiepim/backend/odatebookaccessbackend.cpp
index 9bf4bf0..f3b7b5f 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend.cpp
+++ b/libopie2/opiepim/backend/odatebookaccessbackend.cpp
@@ -29,5 +29,5 @@
29#include <qtl.h> 29#include <qtl.h>
30 30
31#include <opie2/orecur.h> 31#include <opie2/opimrecurrence.h>
32 32
33#include <opie2/odatebookaccessbackend.h> 33#include <opie2/odatebookaccessbackend.h>
@@ -37,9 +37,9 @@ using namespace Opie;
37namespace { 37namespace {
38/* a small helper to get all NonRepeating events for a range of time */ 38/* a small helper to get all NonRepeating events for a range of time */
39 void events( OEffectiveEvent::ValueList& tmpList, const OEvent::ValueList& events, 39 void events( OEffectiveEvent::ValueList& tmpList, const OPimEvent::ValueList& events,
40 const QDate& from, const QDate& to ) { 40 const QDate& from, const QDate& to ) {
41 QDateTime dtStart, dtEnd; 41 QDateTime dtStart, dtEnd;
42 42
43 for ( OEvent::ValueList::ConstIterator it = events.begin(); it != events.end(); ++it ) { 43 for ( OPimEvent::ValueList::ConstIterator it = events.begin(); it != events.end(); ++it ) {
44 dtStart = (*it).startDateTime(); 44 dtStart = (*it).startDateTime();
45 dtEnd = (*it).endDateTime(); 45 dtEnd = (*it).endDateTime();
@@ -92,11 +92,11 @@ namespace {
92 } 92 }
93 93
94 void repeat( OEffectiveEvent::ValueList& tmpList, const OEvent::ValueList& list, 94 void repeat( OEffectiveEvent::ValueList& tmpList, const OPimEvent::ValueList& list,
95 const QDate& from, const QDate& to ) { 95 const QDate& from, const QDate& to ) {
96 QDate repeat; 96 QDate repeat;
97 for ( OEvent::ValueList::ConstIterator it = list.begin(); it != list.end(); ++it ) { 97 for ( OPimEvent::ValueList::ConstIterator it = list.begin(); it != list.end(); ++it ) {
98 int dur = (*it).startDateTime().date().daysTo( (*it).endDateTime().date() ); 98 int dur = (*it).startDateTime().date().daysTo( (*it).endDateTime().date() );
99 QDate itDate = from.addDays(-dur ); 99 QDate itDate = from.addDays(-dur );
100 ORecur rec = (*it).recurrence(); 100 OPimRecurrence rec = (*it).recurrence();
101 if ( !rec.hasEndDate() || rec.endDate() > to ) { 101 if ( !rec.hasEndDate() || rec.endDate() > to ) {
102 rec.setEndDate( to ); 102 rec.setEndDate( to );
@@ -153,5 +153,5 @@ namespace Opie {
153 153
154ODateBookAccessBackend::ODateBookAccessBackend() 154ODateBookAccessBackend::ODateBookAccessBackend()
155 : OPimAccessBackend<OEvent>() 155 : OPimAccessBackend<OPimEvent>()
156{ 156{
157 157
@@ -163,5 +163,5 @@ OEffectiveEvent::ValueList ODateBookAccessBackend::effectiveEvents( const QDate&
163 const QDate& to ) { 163 const QDate& to ) {
164 OEffectiveEvent::ValueList tmpList; 164 OEffectiveEvent::ValueList tmpList;
165 OEvent::ValueList list = directNonRepeats(); 165 OPimEvent::ValueList list = directNonRepeats();
166 166
167 events( tmpList, list, from, to ); 167 events( tmpList, list, from, to );
@@ -191,5 +191,5 @@ OEffectiveEvent::ValueList ODateBookAccessBackend::effectiveNonRepeatingEvents(
191 const QDate& to ) { 191 const QDate& to ) {
192 OEffectiveEvent::ValueList tmpList; 192 OEffectiveEvent::ValueList tmpList;
193 OEvent::ValueList list = directNonRepeats(); 193 OPimEvent::ValueList list = directNonRepeats();
194 194
195 events( tmpList, list, from, to ); 195 events( tmpList, list, from, to );
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend.h b/libopie2/opiepim/backend/odatebookaccessbackend.h
index 6853670..a9cce6a 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend.h
+++ b/libopie2/opiepim/backend/odatebookaccessbackend.h
@@ -33,5 +33,5 @@
33 33
34#include <opie2/opimaccessbackend.h> 34#include <opie2/opimaccessbackend.h>
35#include <opie2/oevent.h> 35#include <opie2/opimevent.h>
36 36
37namespace Opie { 37namespace Opie {
@@ -41,5 +41,5 @@ namespace Opie {
41 * 41 *
42 */ 42 */
43class ODateBookAccessBackend : public OPimAccessBackend<OEvent> { 43class ODateBookAccessBackend : public OPimAccessBackend<OPimEvent> {
44public: 44public:
45 typedef int UID; 45 typedef int UID;
@@ -77,10 +77,10 @@ public:
77 * This method can return empty lists if effectiveEvents is implememted 77 * This method can return empty lists if effectiveEvents is implememted
78 */ 78 */
79 virtual OEvent::ValueList directNonRepeats() = 0; 79 virtual OPimEvent::ValueList directNonRepeats() = 0;
80 80
81 /** 81 /**
82 * Same as above but return raw repeats! 82 * Same as above but return raw repeats!
83 */ 83 */
84 virtual OEvent::ValueList directRawRepeats() = 0; 84 virtual OPimEvent::ValueList directRawRepeats() = 0;
85 85
86 /* is implemented by default but you can reimplement it*/ 86 /* is implemented by default but you can reimplement it*/
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp
index e79696c..2ee76cc 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp
+++ b/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp
@@ -44,5 +44,5 @@
44#include <opie2/osqlquery.h> 44#include <opie2/osqlquery.h>
45 45
46#include <opie2/orecur.h> 46#include <opie2/opimrecurrence.h>
47#include <opie2/odatebookaccessbackend_sql.h> 47#include <opie2/odatebookaccessbackend_sql.h>
48 48
@@ -76,25 +76,25 @@ void ODateBookAccessBackend_SQL::initFields()
76 // This map contains the translation of the fieldtype id's to 76 // This map contains the translation of the fieldtype id's to
77 // the names of the table columns 77 // the names of the table columns
78 m_fieldMap.insert( OEvent::FUid, "uid" ); 78 m_fieldMap.insert( OPimEvent::FUid, "uid" );
79 m_fieldMap.insert( OEvent::FCategories, "Categories" ); 79 m_fieldMap.insert( OPimEvent::FCategories, "Categories" );
80 m_fieldMap.insert( OEvent::FDescription, "Description" ); 80 m_fieldMap.insert( OPimEvent::FDescription, "Description" );
81 m_fieldMap.insert( OEvent::FLocation, "Location" ); 81 m_fieldMap.insert( OPimEvent::FLocation, "Location" );
82 m_fieldMap.insert( OEvent::FType, "Type" ); 82 m_fieldMap.insert( OPimEvent::FType, "Type" );
83 m_fieldMap.insert( OEvent::FAlarm, "Alarm" ); 83 m_fieldMap.insert( OPimEvent::FAlarm, "Alarm" );
84 m_fieldMap.insert( OEvent::FSound, "Sound" ); 84 m_fieldMap.insert( OPimEvent::FSound, "Sound" );
85 m_fieldMap.insert( OEvent::FRType, "RType" ); 85 m_fieldMap.insert( OPimEvent::FRType, "RType" );
86 m_fieldMap.insert( OEvent::FRWeekdays, "RWeekdays" ); 86 m_fieldMap.insert( OPimEvent::FRWeekdays, "RWeekdays" );
87 m_fieldMap.insert( OEvent::FRPosition, "RPosition" ); 87 m_fieldMap.insert( OPimEvent::FRPosition, "RPosition" );
88 m_fieldMap.insert( OEvent::FRFreq, "RFreq" ); 88 m_fieldMap.insert( OPimEvent::FRFreq, "RFreq" );
89 m_fieldMap.insert( OEvent::FRHasEndDate, "RHasEndDate" ); 89 m_fieldMap.insert( OPimEvent::FRHasEndDate, "RHasEndDate" );
90 m_fieldMap.insert( OEvent::FREndDate, "REndDate" ); 90 m_fieldMap.insert( OPimEvent::FREndDate, "REndDate" );
91 m_fieldMap.insert( OEvent::FRCreated, "RCreated" ); 91 m_fieldMap.insert( OPimEvent::FRCreated, "RCreated" );
92 m_fieldMap.insert( OEvent::FRExceptions, "RExceptions" ); 92 m_fieldMap.insert( OPimEvent::FRExceptions, "RExceptions" );
93 m_fieldMap.insert( OEvent::FStart, "Start" ); 93 m_fieldMap.insert( OPimEvent::FStart, "Start" );
94 m_fieldMap.insert( OEvent::FEnd, "End" ); 94 m_fieldMap.insert( OPimEvent::FEnd, "End" );
95 m_fieldMap.insert( OEvent::FNote, "Note" ); 95 m_fieldMap.insert( OPimEvent::FNote, "Note" );
96 m_fieldMap.insert( OEvent::FTimeZone, "TimeZone" ); 96 m_fieldMap.insert( OPimEvent::FTimeZone, "TimeZone" );
97 m_fieldMap.insert( OEvent::FRecParent, "RecParent" ); 97 m_fieldMap.insert( OPimEvent::FRecParent, "RecParent" );
98 m_fieldMap.insert( OEvent::FRecChildren, "Recchildren" ); 98 m_fieldMap.insert( OPimEvent::FRecChildren, "Recchildren" );
99 99
100 // Create a map that maps the column name to the id 100 // Create a map that maps the column name to the id
@@ -166,5 +166,5 @@ QArray<int> ODateBookAccessBackend_SQL::allRecords()const
166} 166}
167 167
168QArray<int> ODateBookAccessBackend_SQL::queryByExample(const OEvent&, int, const QDateTime& ) { 168QArray<int> ODateBookAccessBackend_SQL::queryByExample(const OPimEvent&, int, const QDateTime& ) {
169 return QArray<int>(); 169 return QArray<int>();
170} 170}
@@ -182,5 +182,5 @@ void ODateBookAccessBackend_SQL::clear()
182 182
183 183
184OEvent ODateBookAccessBackend_SQL::find( int uid ) const{ 184OPimEvent ODateBookAccessBackend_SQL::find( int uid ) const{
185 QString qu = "select *"; 185 QString qu = "select *";
186 qu += "from datebook where uid = " + QString::number(uid); 186 qu += "from datebook where uid = " + QString::number(uid);
@@ -193,5 +193,5 @@ OEvent ODateBookAccessBackend_SQL::find( int uid ) const{
193 // Create Map for date event and insert UID 193 // Create Map for date event and insert UID
194 QMap<int,QString> dateEventMap; 194 QMap<int,QString> dateEventMap;
195 dateEventMap.insert( OEvent::FUid, QString::number( uid ) ); 195 dateEventMap.insert( OPimEvent::FUid, QString::number( uid ) );
196 196
197 // Now insert the data out of the columns into the map. 197 // Now insert the data out of the columns into the map.
@@ -202,5 +202,5 @@ OEvent ODateBookAccessBackend_SQL::find( int uid ) const{
202 202
203 // Last step: Put map into date event and return it 203 // Last step: Put map into date event and return it
204 OEvent retDate( dateEventMap ); 204 OPimEvent retDate( dateEventMap );
205 205
206 return retDate; 206 return retDate;
@@ -208,5 +208,5 @@ OEvent ODateBookAccessBackend_SQL::find( int uid ) const{
208 208
209// FIXME: Speed up update of uid's.. 209// FIXME: Speed up update of uid's..
210bool ODateBookAccessBackend_SQL::add( const OEvent& ev ) 210bool ODateBookAccessBackend_SQL::add( const OPimEvent& ev )
211{ 211{
212 QMap<int,QString> eventMap = ev.toMap(); 212 QMap<int,QString> eventMap = ev.toMap();
@@ -273,5 +273,5 @@ bool ODateBookAccessBackend_SQL::remove( int uid )
273} 273}
274 274
275bool ODateBookAccessBackend_SQL::replace( const OEvent& ev ) 275bool ODateBookAccessBackend_SQL::replace( const OPimEvent& ev )
276{ 276{
277 remove( ev.uid() ); 277 remove( ev.uid() );
@@ -310,8 +310,8 @@ QArray<int> ODateBookAccessBackend_SQL::nonRepeats()const
310} 310}
311 311
312OEvent::ValueList ODateBookAccessBackend_SQL::directNonRepeats() 312OPimEvent::ValueList ODateBookAccessBackend_SQL::directNonRepeats()
313{ 313{
314 QArray<int> nonRepUids = nonRepeats(); 314 QArray<int> nonRepUids = nonRepeats();
315 OEvent::ValueList list; 315 OPimEvent::ValueList list;
316 316
317 for (uint i = 0; i < nonRepUids.count(); ++i ){ 317 for (uint i = 0; i < nonRepUids.count(); ++i ){
@@ -322,8 +322,8 @@ OEvent::ValueList ODateBookAccessBackend_SQL::directNonRepeats()
322 322
323} 323}
324OEvent::ValueList ODateBookAccessBackend_SQL::directRawRepeats() 324OPimEvent::ValueList ODateBookAccessBackend_SQL::directRawRepeats()
325{ 325{
326 QArray<int> rawRepUids = rawRepeats(); 326 QArray<int> rawRepUids = rawRepeats();
327 OEvent::ValueList list; 327 OPimEvent::ValueList list;
328 328
329 for (uint i = 0; i < rawRepUids.count(); ++i ){ 329 for (uint i = 0; i < rawRepUids.count(); ++i ){
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_sql.h b/libopie2/opiepim/backend/odatebookaccessbackend_sql.h
index 89939ef..cbfeb97 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend_sql.h
+++ b/libopie2/opiepim/backend/odatebookaccessbackend_sql.h
@@ -56,10 +56,10 @@ public:
56 QArray<int> allRecords()const; 56 QArray<int> allRecords()const;
57 QArray<int> matchRegexp(const QRegExp &r) const; 57 QArray<int> matchRegexp(const QRegExp &r) const;
58 QArray<int> queryByExample( const OEvent&, int, const QDateTime& d = QDateTime() ); 58 QArray<int> queryByExample( const OPimEvent&, int, const QDateTime& d = QDateTime() );
59 OEvent find( int uid )const; 59 OPimEvent find( int uid )const;
60 void clear(); 60 void clear();
61 bool add( const OEvent& ev ); 61 bool add( const OPimEvent& ev );
62 bool remove( int uid ); 62 bool remove( int uid );
63 bool replace( const OEvent& ev ); 63 bool replace( const OPimEvent& ev );
64 64
65 QArray<UID> rawEvents()const; 65 QArray<UID> rawEvents()const;
@@ -67,6 +67,6 @@ public:
67 QArray<UID> nonRepeats()const; 67 QArray<UID> nonRepeats()const;
68 68
69 OEvent::ValueList directNonRepeats(); 69 OPimEvent::ValueList directNonRepeats();
70 OEvent::ValueList directRawRepeats(); 70 OPimEvent::ValueList directRawRepeats();
71 71
72private: 72private:
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp
index 0ebda98..77c0253 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp
+++ b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp
@@ -47,6 +47,6 @@
47 47
48#include <opie2/opimnotifymanager.h> 48#include <opie2/opimnotifymanager.h>
49#include <opie2/orecur.h> 49#include <opie2/opimrecurrence.h>
50#include <opie2/otimezone.h> 50#include <opie2/opimtimezone.h>
51#include <opie2/odatebookaccessbackend_xml.h> 51#include <opie2/odatebookaccessbackend_xml.h>
52 52
@@ -82,8 +82,8 @@ char *strstrlen(const char *haystack, int hLen, const char* needle, int nLen)
82namespace { 82namespace {
83 time_t start, end, created, rp_end; 83 time_t start, end, created, rp_end;
84 ORecur* rec; 84 OPimRecurrence* rec;
85 ORecur* recur() { 85 OPimRecurrence* recur() {
86 if (!rec) 86 if (!rec)
87 rec = new ORecur; 87 rec = new OPimRecurrence;
88 88
89 return rec; 89 return rec;
@@ -115,6 +115,6 @@ namespace {
115 }; 115 };
116 116
117 // FIXME: Use OEvent::toMap() here !! (eilers) 117 // FIXME: Use OPimEvent::toMap() here !! (eilers)
118 inline void save( const OEvent& ev, QString& buf ) { 118 inline void save( const OPimEvent& ev, QString& buf ) {
119 qWarning("Saving %d %s", ev.uid(), ev.description().latin1() ); 119 qWarning("Saving %d %s", ev.uid(), ev.description().latin1() );
120 buf += " description=\"" + Qtopia::escapeString(ev.description() ) + "\""; 120 buf += " description=\"" + Qtopia::escapeString(ev.description() ) + "\"";
@@ -147,7 +147,7 @@ namespace {
147 * and then we'll create a nice time_t 147 * and then we'll create a nice time_t
148 */ 148 */
149 OTimeZone zone( ev.timeZone().isEmpty() ? OTimeZone::current() : ev.timeZone() ); 149 OPimTimeZone zone( ev.timeZone().isEmpty() ? OPimTimeZone::current() : ev.timeZone() );
150 buf += " start=\"" + QString::number( zone.fromUTCDateTime( zone.toDateTime( ev.startDateTime(), OTimeZone::utc() ) ) ) + "\""; 150 buf += " start=\"" + QString::number( zone.fromUTCDateTime( zone.toDateTime( ev.startDateTime(), OPimTimeZone::utc() ) ) ) + "\"";
151 buf += " end=\"" + QString::number( zone.fromUTCDateTime( zone.toDateTime( ev.endDateTime() , OTimeZone::utc() ) ) ) + "\""; 151 buf += " end=\"" + QString::number( zone.fromUTCDateTime( zone.toDateTime( ev.endDateTime() , OPimTimeZone::utc() ) ) ) + "\"";
152 if (!ev.note().isEmpty() ) { 152 if (!ev.note().isEmpty() ) {
153 buf += " note=\"" + Qtopia::escapeString( ev.note() ) + "\""; 153 buf += " note=\"" + Qtopia::escapeString( ev.note() ) + "\"";
@@ -178,6 +178,6 @@ namespace {
178 } 178 }
179 179
180 inline bool forAll( const QMap<int, OEvent>& list, QFile& file ) { 180 inline bool forAll( const QMap<int, OPimEvent>& list, QFile& file ) {
181 QMap<int, OEvent>::ConstIterator it; 181 QMap<int, OPimEvent>::ConstIterator it;
182 QString buf; 182 QString buf;
183 QCString str; 183 QCString str;
@@ -265,5 +265,5 @@ QArray<int> ODateBookAccessBackend_XML::allRecords()const {
265 QArray<int> ints( m_raw.count()+ m_rep.count() ); 265 QArray<int> ints( m_raw.count()+ m_rep.count() );
266 uint i = 0; 266 uint i = 0;
267 QMap<int, OEvent>::ConstIterator it; 267 QMap<int, OPimEvent>::ConstIterator it;
268 268
269 for ( it = m_raw.begin(); it != m_raw.end(); ++it ) { 269 for ( it = m_raw.begin(); it != m_raw.end(); ++it ) {
@@ -278,5 +278,5 @@ QArray<int> ODateBookAccessBackend_XML::allRecords()const {
278 return ints; 278 return ints;
279} 279}
280QArray<int> ODateBookAccessBackend_XML::queryByExample(const OEvent&, int, const QDateTime& ) { 280QArray<int> ODateBookAccessBackend_XML::queryByExample(const OPimEvent&, int, const QDateTime& ) {
281 return QArray<int>(); 281 return QArray<int>();
282} 282}
@@ -286,5 +286,5 @@ void ODateBookAccessBackend_XML::clear() {
286 m_rep.clear(); 286 m_rep.clear();
287} 287}
288OEvent ODateBookAccessBackend_XML::find( int uid ) const{ 288OPimEvent ODateBookAccessBackend_XML::find( int uid ) const{
289 if ( m_raw.contains( uid ) ) 289 if ( m_raw.contains( uid ) )
290 return m_raw[uid]; 290 return m_raw[uid];
@@ -292,5 +292,5 @@ OEvent ODateBookAccessBackend_XML::find( int uid ) const{
292 return m_rep[uid]; 292 return m_rep[uid];
293} 293}
294bool ODateBookAccessBackend_XML::add( const OEvent& ev ) { 294bool ODateBookAccessBackend_XML::add( const OPimEvent& ev ) {
295 m_changed = true; 295 m_changed = true;
296 if (ev.hasRecurrence() ) 296 if (ev.hasRecurrence() )
@@ -308,5 +308,5 @@ bool ODateBookAccessBackend_XML::remove( int uid ) {
308 return true; 308 return true;
309} 309}
310bool ODateBookAccessBackend_XML::replace( const OEvent& ev ) { 310bool ODateBookAccessBackend_XML::replace( const OPimEvent& ev ) {
311 replace( ev.uid() ); // ??? Shouldn't this be "remove( ev.uid() ) ??? (eilers) 311 replace( ev.uid() ); // ??? Shouldn't this be "remove( ev.uid() ) ??? (eilers)
312 return add( ev ); 312 return add( ev );
@@ -318,5 +318,5 @@ QArray<int> ODateBookAccessBackend_XML::rawRepeats()const {
318 QArray<int> ints( m_rep.count() ); 318 QArray<int> ints( m_rep.count() );
319 uint i = 0; 319 uint i = 0;
320 QMap<int, OEvent>::ConstIterator it; 320 QMap<int, OPimEvent>::ConstIterator it;
321 321
322 for ( it = m_rep.begin(); it != m_rep.end(); ++it ) { 322 for ( it = m_rep.begin(); it != m_rep.end(); ++it ) {
@@ -330,5 +330,5 @@ QArray<int> ODateBookAccessBackend_XML::nonRepeats()const {
330 QArray<int> ints( m_raw.count() ); 330 QArray<int> ints( m_raw.count() );
331 uint i = 0; 331 uint i = 0;
332 QMap<int, OEvent>::ConstIterator it; 332 QMap<int, OPimEvent>::ConstIterator it;
333 333
334 for ( it = m_raw.begin(); it != m_raw.end(); ++it ) { 334 for ( it = m_raw.begin(); it != m_raw.end(); ++it ) {
@@ -339,7 +339,7 @@ QArray<int> ODateBookAccessBackend_XML::nonRepeats()const {
339 return ints; 339 return ints;
340} 340}
341OEvent::ValueList ODateBookAccessBackend_XML::directNonRepeats() { 341OPimEvent::ValueList ODateBookAccessBackend_XML::directNonRepeats() {
342 OEvent::ValueList list; 342 OPimEvent::ValueList list;
343 QMap<int, OEvent>::ConstIterator it; 343 QMap<int, OPimEvent>::ConstIterator it;
344 for (it = m_raw.begin(); it != m_raw.end(); ++it ) 344 for (it = m_raw.begin(); it != m_raw.end(); ++it )
345 list.append( it.data() ); 345 list.append( it.data() );
@@ -347,7 +347,7 @@ OEvent::ValueList ODateBookAccessBackend_XML::directNonRepeats() {
347 return list; 347 return list;
348} 348}
349OEvent::ValueList ODateBookAccessBackend_XML::directRawRepeats() { 349OPimEvent::ValueList ODateBookAccessBackend_XML::directRawRepeats() {
350 OEvent::ValueList list; 350 OPimEvent::ValueList list;
351 QMap<int, OEvent>::ConstIterator it; 351 QMap<int, OPimEvent>::ConstIterator it;
352 for (it = m_rep.begin(); it != m_rep.end(); ++it ) 352 for (it = m_rep.begin(); it != m_rep.end(); ++it )
353 list.append( it.data() ); 353 list.append( it.data() );
@@ -356,5 +356,5 @@ OEvent::ValueList ODateBookAccessBackend_XML::directRawRepeats() {
356} 356}
357 357
358// FIXME: Use OEvent::fromMap() (eilers) 358// FIXME: Use OPimEvent::fromMap() (eilers)
359bool ODateBookAccessBackend_XML::loadFile() { 359bool ODateBookAccessBackend_XML::loadFile() {
360 m_changed = false; 360 m_changed = false;
@@ -415,5 +415,5 @@ bool ODateBookAccessBackend_XML::loadFile() {
415 snd = 0; // silent 415 snd = 0; // silent
416 416
417 OEvent ev; 417 OPimEvent ev;
418 rec = 0; 418 rec = 0;
419 419
@@ -481,9 +481,9 @@ bool ODateBookAccessBackend_XML::loadFile() {
481} 481}
482 482
483// FIXME: Use OEvent::fromMap() which makes this obsolete.. (eilers) 483// FIXME: Use OPimEvent::fromMap() which makes this obsolete.. (eilers)
484void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) { 484void ODateBookAccessBackend_XML::finalizeRecord( OPimEvent& ev ) {
485 /* AllDay is alway in UTC */ 485 /* AllDay is alway in UTC */
486 if ( ev.isAllDay() ) { 486 if ( ev.isAllDay() ) {
487 OTimeZone utc = OTimeZone::utc(); 487 OPimTimeZone utc = OPimTimeZone::utc();
488 ev.setStartDateTime( utc.fromUTCDateTime( start ) ); 488 ev.setStartDateTime( utc.fromUTCDateTime( start ) );
489 ev.setEndDateTime ( utc.fromUTCDateTime( end ) ); 489 ev.setEndDateTime ( utc.fromUTCDateTime( end ) );
@@ -492,15 +492,15 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) {
492 /* to current date time */ 492 /* to current date time */
493 // qWarning(" Start is %d", start ); 493 // qWarning(" Start is %d", start );
494 OTimeZone zone( ev.timeZone().isEmpty() ? OTimeZone::current() : ev.timeZone() ); 494 OPimTimeZone zone( ev.timeZone().isEmpty() ? OPimTimeZone::current() : ev.timeZone() );
495 QDateTime date = zone.toDateTime( start ); 495 QDateTime date = zone.toDateTime( start );
496 qWarning(" Start is %s", date.toString().latin1() ); 496 qWarning(" Start is %s", date.toString().latin1() );
497 ev.setStartDateTime( zone.toDateTime( date, OTimeZone::current() ) ); 497 ev.setStartDateTime( zone.toDateTime( date, OPimTimeZone::current() ) );
498 498
499 date = zone.toDateTime( end ); 499 date = zone.toDateTime( end );
500 ev.setEndDateTime ( zone.toDateTime( date, OTimeZone::current() ) ); 500 ev.setEndDateTime ( zone.toDateTime( date, OPimTimeZone::current() ) );
501 } 501 }
502 if ( rec && rec->doesRecur() ) { 502 if ( rec && rec->doesRecur() ) {
503 OTimeZone utc = OTimeZone::utc(); 503 OPimTimeZone utc = OPimTimeZone::utc();
504 ORecur recu( *rec ); // call copy c'tor; 504 OPimRecurrence recu( *rec ); // call copy c'tor;
505 recu.setEndDate ( utc.fromUTCDateTime( rp_end ).date() ); 505 recu.setEndDate ( utc.fromUTCDateTime( rp_end ).date() );
506 recu.setCreatedDateTime( utc.fromUTCDateTime( created ) ); 506 recu.setCreatedDateTime( utc.fromUTCDateTime( created ) );
@@ -525,5 +525,5 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) {
525 525
526} 526}
527void ODateBookAccessBackend_XML::setField( OEvent& e, int id, const QString& value) { 527void ODateBookAccessBackend_XML::setField( OPimEvent& e, int id, const QString& value) {
528// qWarning(" setting %s", value.latin1() ); 528// qWarning(" setting %s", value.latin1() );
529 switch( id ) { 529 switch( id ) {
@@ -555,15 +555,15 @@ void ODateBookAccessBackend_XML::setField( OEvent& e, int id, const QString& val
555 case FRType: 555 case FRType:
556 if ( value == "Daily" ) 556 if ( value == "Daily" )
557 recur()->setType( ORecur::Daily ); 557 recur()->setType( OPimRecurrence::Daily );
558 else if ( value == "Weekly" ) 558 else if ( value == "Weekly" )
559 recur()->setType( ORecur::Weekly); 559 recur()->setType( OPimRecurrence::Weekly);
560 else if ( value == "MonthlyDay" ) 560 else if ( value == "MonthlyDay" )
561 recur()->setType( ORecur::MonthlyDay ); 561 recur()->setType( OPimRecurrence::MonthlyDay );
562 else if ( value == "MonthlyDate" ) 562 else if ( value == "MonthlyDate" )
563 recur()->setType( ORecur::MonthlyDate ); 563 recur()->setType( OPimRecurrence::MonthlyDate );
564 else if ( value == "Yearly" ) 564 else if ( value == "Yearly" )
565 recur()->setType( ORecur::Yearly ); 565 recur()->setType( OPimRecurrence::Yearly );
566 else 566 else
567 recur()->setType( ORecur::NoRepeat ); 567 recur()->setType( OPimRecurrence::NoRepeat );
568 break; 568 break;
569 case FRWeekdays: 569 case FRWeekdays:
@@ -628,5 +628,5 @@ QArray<int> ODateBookAccessBackend_XML::matchRegexp( const QRegExp &r ) const
628 QArray<int> m_currentQuery( m_raw.count()+ m_rep.count() ); 628 QArray<int> m_currentQuery( m_raw.count()+ m_rep.count() );
629 uint arraycounter = 0; 629 uint arraycounter = 0;
630 QMap<int, OEvent>::ConstIterator it; 630 QMap<int, OPimEvent>::ConstIterator it;
631 631
632 for ( it = m_raw.begin(); it != m_raw.end(); ++it ) 632 for ( it = m_raw.begin(); it != m_raw.end(); ++it )
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_xml.h b/libopie2/opiepim/backend/odatebookaccessbackend_xml.h
index 29f5f4f..6823ce6 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend_xml.h
+++ b/libopie2/opiepim/backend/odatebookaccessbackend_xml.h
@@ -53,10 +53,10 @@ public:
53 QArray<int> allRecords()const; 53 QArray<int> allRecords()const;
54 QArray<int> matchRegexp(const QRegExp &r) const; 54 QArray<int> matchRegexp(const QRegExp &r) const;
55 QArray<int> queryByExample( const OEvent&, int, const QDateTime& d = QDateTime() ); 55 QArray<int> queryByExample( const OPimEvent&, int, const QDateTime& d = QDateTime() );
56 OEvent find( int uid )const; 56 OPimEvent find( int uid )const;
57 void clear(); 57 void clear();
58 bool add( const OEvent& ev ); 58 bool add( const OPimEvent& ev );
59 bool remove( int uid ); 59 bool remove( int uid );
60 bool replace( const OEvent& ev ); 60 bool replace( const OPimEvent& ev );
61 61
62 QArray<UID> rawEvents()const; 62 QArray<UID> rawEvents()const;
@@ -64,15 +64,15 @@ public:
64 QArray<UID> nonRepeats()const; 64 QArray<UID> nonRepeats()const;
65 65
66 OEvent::ValueList directNonRepeats(); 66 OPimEvent::ValueList directNonRepeats();
67 OEvent::ValueList directRawRepeats(); 67 OPimEvent::ValueList directRawRepeats();
68 68
69private: 69private:
70 bool m_changed :1 ; 70 bool m_changed :1 ;
71 bool loadFile(); 71 bool loadFile();
72 inline void finalizeRecord( OEvent& ev ); 72 inline void finalizeRecord( OPimEvent& ev );
73 inline void setField( OEvent&, int field, const QString& val ); 73 inline void setField( OPimEvent&, int field, const QString& val );
74 QString m_name; 74 QString m_name;
75 QMap<int, OEvent> m_raw; 75 QMap<int, OPimEvent> m_raw;
76 QMap<int, OEvent> m_rep; 76 QMap<int, OPimEvent> m_rep;
77 77
78 struct Data; 78 struct Data;
diff --git a/libopie2/opiepim/backend/opimaccessbackend.h b/libopie2/opiepim/backend/opimaccessbackend.h
index 505358e..0682063 100644
--- a/libopie2/opiepim/backend/opimaccessbackend.h
+++ b/libopie2/opiepim/backend/opimaccessbackend.h
@@ -33,5 +33,5 @@
33#include <qdatetime.h> 33#include <qdatetime.h>
34 34
35#include <opie2/otemplatebase.h> 35#include <opie2/opimtemplatebase.h>
36#include <opie2/opimrecord.h> 36#include <opie2/opimrecord.h>
37 37
diff --git a/libopie2/opiepim/backend/otodoaccessbackend.cpp b/libopie2/opiepim/backend/otodoaccessbackend.cpp
index d27f5ef..790a764 100644
--- a/libopie2/opiepim/backend/otodoaccessbackend.cpp
+++ b/libopie2/opiepim/backend/otodoaccessbackend.cpp
@@ -31,9 +31,9 @@
31 31
32namespace Opie { 32namespace Opie {
33OTodoAccessBackend::OTodoAccessBackend() 33OPimTodoAccessBackend::OPimTodoAccessBackend()
34 : OPimAccessBackend<OTodo>() 34 : OPimAccessBackend<OPimTodo>()
35{ 35{
36} 36}
37OTodoAccessBackend::~OTodoAccessBackend() { 37OPimTodoAccessBackend::~OPimTodoAccessBackend() {
38 38
39} 39}
diff --git a/libopie2/opiepim/backend/otodoaccessbackend.h b/libopie2/opiepim/backend/otodoaccessbackend.h
index 54b52cc..9dfda45 100644
--- a/libopie2/opiepim/backend/otodoaccessbackend.h
+++ b/libopie2/opiepim/backend/otodoaccessbackend.h
@@ -32,12 +32,12 @@
32#include <qbitarray.h> 32#include <qbitarray.h>
33 33
34#include <opie2/otodo.h> 34#include <opie2/opimtodo.h>
35#include <opie2/opimaccessbackend.h> 35#include <opie2/opimaccessbackend.h>
36 36
37namespace Opie { 37namespace Opie {
38class OTodoAccessBackend : public OPimAccessBackend<OTodo> { 38class OPimTodoAccessBackend : public OPimAccessBackend<OPimTodo> {
39public: 39public:
40 OTodoAccessBackend(); 40 OPimTodoAccessBackend();
41 ~OTodoAccessBackend(); 41 ~OPimTodoAccessBackend();
42 virtual QArray<int> effectiveToDos( const QDate& start, 42 virtual QArray<int> effectiveToDos( const QDate& start,
43 const QDate& end, 43 const QDate& end,
diff --git a/libopie2/opiepim/backend/otodoaccesssql.cpp b/libopie2/opiepim/backend/otodoaccesssql.cpp
index 944f82a..72232e5 100644
--- a/libopie2/opiepim/backend/otodoaccesssql.cpp
+++ b/libopie2/opiepim/backend/otodoaccesssql.cpp
@@ -40,5 +40,5 @@
40#include <opie2/opimstate.h> 40#include <opie2/opimstate.h>
41#include <opie2/opimnotifymanager.h> 41#include <opie2/opimnotifymanager.h>
42#include <opie2/orecur.h> 42#include <opie2/opimrecurrence.h>
43 43
44using namespace Opie; 44using namespace Opie;
@@ -74,13 +74,13 @@ namespace {
74 74
75 /** 75 /**
76 * inserts/adds a OTodo to the table 76 * inserts/adds a OPimTodo to the table
77 */ 77 */
78 class InsertQuery : public OSQLQuery { 78 class InsertQuery : public OSQLQuery {
79 public: 79 public:
80 InsertQuery(const OTodo& ); 80 InsertQuery(const OPimTodo& );
81 ~InsertQuery(); 81 ~InsertQuery();
82 QString query()const; 82 QString query()const;
83 private: 83 private:
84 OTodo m_todo; 84 OPimTodo m_todo;
85 }; 85 };
86 86
@@ -153,5 +153,5 @@ namespace {
153 qu += "create table todolist( uid PRIMARY KEY, categories, completed, "; 153 qu += "create table todolist( uid PRIMARY KEY, categories, completed, ";
154 qu += "description, summary, priority, DueDate, progress , state, "; 154 qu += "description, summary, priority, DueDate, progress , state, ";
155 // This is the recurrance-stuff .. Exceptions are currently not supported (see ORecur.cpp) ! (eilers) 155 // This is the recurrance-stuff .. Exceptions are currently not supported (see OPimRecurrence.cpp) ! (eilers)
156 qu += "RType, RWeekdays, RPosition, RFreq, RHasEndDate, EndDate, Created, Exceptions, "; 156 qu += "RType, RWeekdays, RPosition, RFreq, RHasEndDate, EndDate, Created, Exceptions, ";
157 qu += "reminders, alarms, maintainer, startdate, completeddate);"; 157 qu += "reminders, alarms, maintainer, startdate, completeddate);";
@@ -171,5 +171,5 @@ namespace {
171 } 171 }
172 172
173 InsertQuery::InsertQuery( const OTodo& todo ) 173 InsertQuery::InsertQuery( const OPimTodo& todo )
174 : OSQLQuery(), m_todo( todo ) { 174 : OSQLQuery(), m_todo( todo ) {
175 } 175 }
@@ -177,5 +177,5 @@ namespace {
177 } 177 }
178 /* 178 /*
179 * converts from a OTodo to a query 179 * converts from a OPimTodo to a query
180 * we leave out X-Ref + Alarms 180 * we leave out X-Ref + Alarms
181 */ 181 */
@@ -219,12 +219,12 @@ namespace {
219 + QString::number( m_todo.progress() ) + "," 219 + QString::number( m_todo.progress() ) + ","
220 + QString::number( m_todo.state().state() ) + "," 220 + QString::number( m_todo.state().state() ) + ","
221 + "'" + recMap[ ORecur::RType ] + "'" + "," 221 + "'" + recMap[ OPimRecurrence::RType ] + "'" + ","
222 + "'" + recMap[ ORecur::RWeekdays ] + "'" + "," 222 + "'" + recMap[ OPimRecurrence::RWeekdays ] + "'" + ","
223 + "'" + recMap[ ORecur::RPosition ] + "'" + "," 223 + "'" + recMap[ OPimRecurrence::RPosition ] + "'" + ","
224 + "'" + recMap[ ORecur::RFreq ] + "'" + "," 224 + "'" + recMap[ OPimRecurrence::RFreq ] + "'" + ","
225 + "'" + recMap[ ORecur::RHasEndDate ] + "'" + "," 225 + "'" + recMap[ OPimRecurrence::RHasEndDate ] + "'" + ","
226 + "'" + recMap[ ORecur::EndDate ] + "'" + "," 226 + "'" + recMap[ OPimRecurrence::EndDate ] + "'" + ","
227 + "'" + recMap[ ORecur::Created ] + "'" + "," 227 + "'" + recMap[ OPimRecurrence::Created ] + "'" + ","
228 + "'" + recMap[ ORecur::Exceptions ] + "'" + ","; 228 + "'" + recMap[ OPimRecurrence::Exceptions ] + "'" + ",";
229 229
230 if ( m_todo.hasNotifiers() ) { 230 if ( m_todo.hasNotifiers() ) {
@@ -330,6 +330,6 @@ namespace {
330 330
331namespace Opie { 331namespace Opie {
332OTodoAccessBackendSQL::OTodoAccessBackendSQL( const QString& file ) 332OPimTodoAccessBackendSQL::OPimTodoAccessBackendSQL( const QString& file )
333 : OTodoAccessBackend(), m_dict(15), m_driver(NULL), m_dirty(true) 333 : OPimTodoAccessBackend(), m_dict(15), m_driver(NULL), m_dirty(true)
334{ 334{
335 QString fi = file; 335 QString fi = file;
@@ -342,10 +342,10 @@ OTodoAccessBackendSQL::OTodoAccessBackendSQL( const QString& file )
342} 342}
343 343
344OTodoAccessBackendSQL::~OTodoAccessBackendSQL(){ 344OPimTodoAccessBackendSQL::~OPimTodoAccessBackendSQL(){
345 if( m_driver ) 345 if( m_driver )
346 delete m_driver; 346 delete m_driver;
347} 347}
348 348
349bool OTodoAccessBackendSQL::load(){ 349bool OPimTodoAccessBackendSQL::load(){
350 if (!m_driver->open() ) 350 if (!m_driver->open() )
351 return false; 351 return false;
@@ -357,12 +357,12 @@ bool OTodoAccessBackendSQL::load(){
357 return true; 357 return true;
358} 358}
359bool OTodoAccessBackendSQL::reload(){ 359bool OPimTodoAccessBackendSQL::reload(){
360 return load(); 360 return load();
361} 361}
362 362
363bool OTodoAccessBackendSQL::save(){ 363bool OPimTodoAccessBackendSQL::save(){
364 return m_driver->close(); // Shouldn't m_driver->sync be better than close ? (eilers) 364 return m_driver->close(); // Shouldn't m_driver->sync be better than close ? (eilers)
365} 365}
366QArray<int> OTodoAccessBackendSQL::allRecords()const { 366QArray<int> OPimTodoAccessBackendSQL::allRecords()const {
367 if (m_dirty ) 367 if (m_dirty )
368 update(); 368 update();
@@ -370,14 +370,14 @@ QArray<int> OTodoAccessBackendSQL::allRecords()const {
370 return m_uids; 370 return m_uids;
371} 371}
372QArray<int> OTodoAccessBackendSQL::queryByExample( const OTodo& , int, const QDateTime& ){ 372QArray<int> OPimTodoAccessBackendSQL::queryByExample( const OPimTodo& , int, const QDateTime& ){
373 QArray<int> ints(0); 373 QArray<int> ints(0);
374 return ints; 374 return ints;
375} 375}
376OTodo OTodoAccessBackendSQL::find(int uid ) const{ 376OPimTodo OPimTodoAccessBackendSQL::find(int uid ) const{
377 FindQuery query( uid ); 377 FindQuery query( uid );
378 return todo( m_driver->query(&query) ); 378 return todo( m_driver->query(&query) );
379 379
380} 380}
381OTodo OTodoAccessBackendSQL::find( int uid, const QArray<int>& ints, 381OPimTodo OPimTodoAccessBackendSQL::find( int uid, const QArray<int>& ints,
382 uint cur, Frontend::CacheDirection dir ) const{ 382 uint cur, Frontend::CacheDirection dir ) const{
383 uint CACHE = readAhead(); 383 uint CACHE = readAhead();
@@ -385,5 +385,5 @@ OTodo OTodoAccessBackendSQL::find( int uid, const QArray<int>& ints,
385 QArray<int> search( CACHE ); 385 QArray<int> search( CACHE );
386 uint size =0; 386 uint size =0;
387 OTodo to; 387 OPimTodo to;
388 388
389 // we try to cache CACHE items 389 // we try to cache CACHE items
@@ -413,5 +413,5 @@ OTodo OTodoAccessBackendSQL::find( int uid, const QArray<int>& ints,
413 return todo( res ); 413 return todo( res );
414} 414}
415void OTodoAccessBackendSQL::clear() { 415void OPimTodoAccessBackendSQL::clear() {
416 ClearQuery cle; 416 ClearQuery cle;
417 OSQLResult res = m_driver->query( &cle ); 417 OSQLResult res = m_driver->query( &cle );
@@ -419,5 +419,5 @@ void OTodoAccessBackendSQL::clear() {
419 res = m_driver->query(&qu); 419 res = m_driver->query(&qu);
420} 420}
421bool OTodoAccessBackendSQL::add( const OTodo& t) { 421bool OPimTodoAccessBackendSQL::add( const OPimTodo& t) {
422 InsertQuery ins( t ); 422 InsertQuery ins( t );
423 OSQLResult res = m_driver->query( &ins ); 423 OSQLResult res = m_driver->query( &ins );
@@ -431,5 +431,5 @@ bool OTodoAccessBackendSQL::add( const OTodo& t) {
431 return true; 431 return true;
432} 432}
433bool OTodoAccessBackendSQL::remove( int uid ) { 433bool OPimTodoAccessBackendSQL::remove( int uid ) {
434 RemoveQuery rem( uid ); 434 RemoveQuery rem( uid );
435 OSQLResult res = m_driver->query(&rem ); 435 OSQLResult res = m_driver->query(&rem );
@@ -446,5 +446,5 @@ bool OTodoAccessBackendSQL::remove( int uid ) {
446 * now we remove 446 * now we remove
447 */ 447 */
448bool OTodoAccessBackendSQL::replace( const OTodo& t) { 448bool OPimTodoAccessBackendSQL::replace( const OPimTodo& t) {
449 remove( t.uid() ); 449 remove( t.uid() );
450 bool b= add(t); 450 bool b= add(t);
@@ -452,9 +452,9 @@ bool OTodoAccessBackendSQL::replace( const OTodo& t) {
452 return b; 452 return b;
453} 453}
454QArray<int> OTodoAccessBackendSQL::overDue() { 454QArray<int> OPimTodoAccessBackendSQL::overDue() {
455 OverDueQuery qu; 455 OverDueQuery qu;
456 return uids( m_driver->query(&qu ) ); 456 return uids( m_driver->query(&qu ) );
457} 457}
458QArray<int> OTodoAccessBackendSQL::effectiveToDos( const QDate& s, 458QArray<int> OPimTodoAccessBackendSQL::effectiveToDos( const QDate& s,
459 const QDate& t, 459 const QDate& t,
460 bool u) { 460 bool u) {
@@ -465,5 +465,5 @@ QArray<int> OTodoAccessBackendSQL::effectiveToDos( const QDate& s,
465 * 465 *
466 */ 466 */
467QArray<int> OTodoAccessBackendSQL::sorted( bool asc, int sortOrder, 467QArray<int> OPimTodoAccessBackendSQL::sorted( bool asc, int sortOrder,
468 int sortFilter, int cat ) { 468 int sortFilter, int cat ) {
469 qWarning("sorted %d, %d", asc, sortOrder ); 469 qWarning("sorted %d, %d", asc, sortOrder );
@@ -531,5 +531,5 @@ QArray<int> OTodoAccessBackendSQL::sorted( bool asc, int sortOrder,
531 return uids( m_driver->query(&raw) ); 531 return uids( m_driver->query(&raw) );
532} 532}
533bool OTodoAccessBackendSQL::date( QDate& da, const QString& str ) const{ 533bool OPimTodoAccessBackendSQL::date( QDate& da, const QString& str ) const{
534 if ( str == "0-0-0" ) 534 if ( str == "0-0-0" )
535 return false; 535 return false;
@@ -544,7 +544,7 @@ bool OTodoAccessBackendSQL::date( QDate& da, const QString& str ) const{
544 } 544 }
545} 545}
546OTodo OTodoAccessBackendSQL::todo( const OSQLResult& res) const{ 546OPimTodo OPimTodoAccessBackendSQL::todo( const OSQLResult& res) const{
547 if ( res.state() == OSQLResult::Failure ) { 547 if ( res.state() == OSQLResult::Failure ) {
548 OTodo to; 548 OPimTodo to;
549 return to; 549 return to;
550 } 550 }
@@ -553,5 +553,5 @@ OTodo OTodoAccessBackendSQL::todo( const OSQLResult& res) const{
553 OSQLResultItem::ValueList::Iterator it = list.begin(); 553 OSQLResultItem::ValueList::Iterator it = list.begin();
554 qWarning("todo1"); 554 qWarning("todo1");
555 OTodo to = todo( (*it) ); 555 OPimTodo to = todo( (*it) );
556 cache( to ); 556 cache( to );
557 ++it; 557 ++it;
@@ -563,5 +563,5 @@ OTodo OTodoAccessBackendSQL::todo( const OSQLResult& res) const{
563 return to; 563 return to;
564} 564}
565OTodo OTodoAccessBackendSQL::todo( OSQLResultItem& item )const { 565OPimTodo OPimTodoAccessBackendSQL::todo( OSQLResultItem& item )const {
566 qWarning("todo"); 566 qWarning("todo");
567 bool hasDueDate = false; QDate dueDate = QDate::currentDate(); 567 bool hasDueDate = false; QDate dueDate = QDate::currentDate();
@@ -571,5 +571,5 @@ OTodo OTodoAccessBackendSQL::todo( OSQLResultItem& item )const {
571 qWarning("Item is completed: %d", item.data("completed").toInt() ); 571 qWarning("Item is completed: %d", item.data("completed").toInt() );
572 572
573 OTodo to( (bool)item.data("completed").toInt(), item.data("priority").toInt(), 573 OPimTodo to( (bool)item.data("completed").toInt(), item.data("priority").toInt(),
574 cats, item.data("summary"), item.data("description"), 574 cats, item.data("summary"), item.data("description"),
575 item.data("progress").toUShort(), hasDueDate, dueDate, 575 item.data("progress").toUShort(), hasDueDate, dueDate,
@@ -600,14 +600,14 @@ OTodo OTodoAccessBackendSQL::todo( OSQLResultItem& item )const {
600 600
601 QMap<int, QString> recMap; 601 QMap<int, QString> recMap;
602 recMap.insert( ORecur::RType , item.data("RType") ); 602 recMap.insert( OPimRecurrence::RType , item.data("RType") );
603 recMap.insert( ORecur::RWeekdays , item.data("RWeekdays") ); 603 recMap.insert( OPimRecurrence::RWeekdays , item.data("RWeekdays") );
604 recMap.insert( ORecur::RPosition , item.data("RPosition") ); 604 recMap.insert( OPimRecurrence::RPosition , item.data("RPosition") );
605 recMap.insert( ORecur::RFreq , item.data("RFreq") ); 605 recMap.insert( OPimRecurrence::RFreq , item.data("RFreq") );
606 recMap.insert( ORecur::RHasEndDate, item.data("RHasEndDate") ); 606 recMap.insert( OPimRecurrence::RHasEndDate, item.data("RHasEndDate") );
607 recMap.insert( ORecur::EndDate , item.data("EndDate") ); 607 recMap.insert( OPimRecurrence::EndDate , item.data("EndDate") );
608 recMap.insert( ORecur::Created , item.data("Created") ); 608 recMap.insert( OPimRecurrence::Created , item.data("Created") );
609 recMap.insert( ORecur::Exceptions , item.data("Exceptions") ); 609 recMap.insert( OPimRecurrence::Exceptions , item.data("Exceptions") );
610 610
611 ORecur recur; 611 OPimRecurrence recur;
612 recur.fromMap( recMap ); 612 recur.fromMap( recMap );
613 to.setRecurrence( recur ); 613 to.setRecurrence( recur );
@@ -615,5 +615,5 @@ OTodo OTodoAccessBackendSQL::todo( OSQLResultItem& item )const {
615 return to; 615 return to;
616} 616}
617OTodo OTodoAccessBackendSQL::todo( int uid )const { 617OPimTodo OPimTodoAccessBackendSQL::todo( int uid )const {
618 FindQuery find( uid ); 618 FindQuery find( uid );
619 return todo( m_driver->query(&find) ); 619 return todo( m_driver->query(&find) );
@@ -622,5 +622,5 @@ OTodo OTodoAccessBackendSQL::todo( int uid )const {
622 * update the dict 622 * update the dict
623 */ 623 */
624void OTodoAccessBackendSQL::fillDict() { 624void OPimTodoAccessBackendSQL::fillDict() {
625 /* initialize dict */ 625 /* initialize dict */
626 /* 626 /*
@@ -629,19 +629,19 @@ void OTodoAccessBackendSQL::fillDict() {
629 */ 629 */
630 m_dict.setAutoDelete( TRUE ); 630 m_dict.setAutoDelete( TRUE );
631 m_dict.insert("Categories" , new int(OTodo::Category) ); 631 m_dict.insert("Categories" , new int(OPimTodo::Category) );
632 m_dict.insert("Uid" , new int(OTodo::Uid) ); 632 m_dict.insert("Uid" , new int(OPimTodo::Uid) );
633 m_dict.insert("HasDate" , new int(OTodo::HasDate) ); 633 m_dict.insert("HasDate" , new int(OPimTodo::HasDate) );
634 m_dict.insert("Completed" , new int(OTodo::Completed) ); 634 m_dict.insert("Completed" , new int(OPimTodo::Completed) );
635 m_dict.insert("Description" , new int(OTodo::Description) ); 635 m_dict.insert("Description" , new int(OPimTodo::Description) );
636 m_dict.insert("Summary" , new int(OTodo::Summary) ); 636 m_dict.insert("Summary" , new int(OPimTodo::Summary) );
637 m_dict.insert("Priority" , new int(OTodo::Priority) ); 637 m_dict.insert("Priority" , new int(OPimTodo::Priority) );
638 m_dict.insert("DateDay" , new int(OTodo::DateDay) ); 638 m_dict.insert("DateDay" , new int(OPimTodo::DateDay) );
639 m_dict.insert("DateMonth" , new int(OTodo::DateMonth) ); 639 m_dict.insert("DateMonth" , new int(OPimTodo::DateMonth) );
640 m_dict.insert("DateYear" , new int(OTodo::DateYear) ); 640 m_dict.insert("DateYear" , new int(OPimTodo::DateYear) );
641 m_dict.insert("Progress" , new int(OTodo::Progress) ); 641 m_dict.insert("Progress" , new int(OPimTodo::Progress) );
642 m_dict.insert("Completed", new int(OTodo::Completed) ); // Why twice ? (eilers) 642 m_dict.insert("Completed", new int(OPimTodo::Completed) ); // Why twice ? (eilers)
643 m_dict.insert("CrossReference", new int(OTodo::CrossReference) ); 643 m_dict.insert("CrossReference", new int(OPimTodo::CrossReference) );
644// m_dict.insert("HasAlarmDateTime",new int(OTodo::HasAlarmDateTime) ); // old stuff (eilers) 644// m_dict.insert("HasAlarmDateTime",new int(OPimTodo::HasAlarmDateTime) ); // old stuff (eilers)
645// m_dict.insert("AlarmDateTime", new int(OTodo::AlarmDateTime) ); // old stuff (eilers) 645// m_dict.insert("AlarmDateTime", new int(OPimTodo::AlarmDateTime) ); // old stuff (eilers)
646} 646}
647/* 647/*
@@ -649,6 +649,6 @@ void OTodoAccessBackendSQL::fillDict() {
649 * compiler :( 649 * compiler :(
650 */ 650 */
651void OTodoAccessBackendSQL::update()const { 651void OPimTodoAccessBackendSQL::update()const {
652 ((OTodoAccessBackendSQL*)this)->m_dirty = false; 652 ((OPimTodoAccessBackendSQL*)this)->m_dirty = false;
653 LoadQuery lo; 653 LoadQuery lo;
654 OSQLResult res = m_driver->query(&lo); 654 OSQLResult res = m_driver->query(&lo);
@@ -656,7 +656,7 @@ void OTodoAccessBackendSQL::update()const {
656 return; 656 return;
657 657
658 ((OTodoAccessBackendSQL*)this)->m_uids = uids( res ); 658 ((OPimTodoAccessBackendSQL*)this)->m_uids = uids( res );
659} 659}
660QArray<int> OTodoAccessBackendSQL::uids( const OSQLResult& res) const{ 660QArray<int> OPimTodoAccessBackendSQL::uids( const OSQLResult& res) const{
661 661
662 OSQLResultItem::ValueList list = res.results(); 662 OSQLResultItem::ValueList list = res.results();
@@ -673,8 +673,8 @@ QArray<int> OTodoAccessBackendSQL::uids( const OSQLResult& res) const{
673} 673}
674 674
675QArray<int> OTodoAccessBackendSQL::matchRegexp( const QRegExp &r ) const 675QArray<int> OPimTodoAccessBackendSQL::matchRegexp( const QRegExp &r ) const
676{ 676{
677 677
678#warning OTodoAccessBackendSQL::matchRegexp() not implemented !! 678#warning OPimTodoAccessBackendSQL::matchRegexp() not implemented !!
679 679
680#if 0 680#if 0
@@ -687,5 +687,5 @@ QArray<int> OTodoAccessBackendSQL::matchRegexp( const QRegExp &r ) const
687 687
688 688
689 QMap<int, OTodo>::ConstIterator it; 689 QMap<int, OPimTodo>::ConstIterator it;
690 for (it = m_events.begin(); it != m_events.end(); ++it ) { 690 for (it = m_events.begin(); it != m_events.end(); ++it ) {
691 if ( it.data().match( r ) ) 691 if ( it.data().match( r ) )
@@ -701,24 +701,24 @@ QArray<int> OTodoAccessBackendSQL::matchRegexp( const QRegExp &r ) const
701 return empty; 701 return empty;
702} 702}
703QBitArray OTodoAccessBackendSQL::supports()const { 703QBitArray OPimTodoAccessBackendSQL::supports()const {
704 704
705 return sup(); 705 return sup();
706} 706}
707 707
708QBitArray OTodoAccessBackendSQL::sup() const{ 708QBitArray OPimTodoAccessBackendSQL::sup() const{
709 709
710 QBitArray ar( OTodo::CompletedDate + 1 ); 710 QBitArray ar( OPimTodo::CompletedDate + 1 );
711 ar.fill( true ); 711 ar.fill( true );
712 ar[OTodo::CrossReference] = false; 712 ar[OPimTodo::CrossReference] = false;
713 ar[OTodo::State ] = false; 713 ar[OPimTodo::State ] = false;
714 ar[OTodo::Reminders] = false; 714 ar[OPimTodo::Reminders] = false;
715 ar[OTodo::Notifiers] = false; 715 ar[OPimTodo::Notifiers] = false;
716 ar[OTodo::Maintainer] = false; 716 ar[OPimTodo::Maintainer] = false;
717 717
718 return ar; 718 return ar;
719} 719}
720 720
721void OTodoAccessBackendSQL::removeAllCompleted(){ 721void OPimTodoAccessBackendSQL::removeAllCompleted(){
722#warning OTodoAccessBackendSQL::removeAllCompleted() not implemented !! 722#warning OPimTodoAccessBackendSQL::removeAllCompleted() not implemented !!
723 723
724} 724}
diff --git a/libopie2/opiepim/backend/otodoaccesssql.h b/libopie2/opiepim/backend/otodoaccesssql.h
index 1a6f614..e945863 100644
--- a/libopie2/opiepim/backend/otodoaccesssql.h
+++ b/libopie2/opiepim/backend/otodoaccesssql.h
@@ -40,8 +40,8 @@ class OSQLResultItem;
40namespace Opie { 40namespace Opie {
41 41
42class OTodoAccessBackendSQL : public OTodoAccessBackend { 42class OPimTodoAccessBackendSQL : public OPimTodoAccessBackend {
43public: 43public:
44 OTodoAccessBackendSQL( const QString& file ); 44 OPimTodoAccessBackendSQL( const QString& file );
45 ~OTodoAccessBackendSQL(); 45 ~OPimTodoAccessBackendSQL();
46 46
47 bool load(); 47 bool load();
@@ -50,11 +50,11 @@ public:
50 QArray<int> allRecords()const; 50 QArray<int> allRecords()const;
51 51
52 QArray<int> queryByExample( const OTodo& t, int settings, const QDateTime& d = QDateTime() ); 52 QArray<int> queryByExample( const OPimTodo& t, int settings, const QDateTime& d = QDateTime() );
53 OTodo find(int uid)const; 53 OPimTodo find(int uid)const;
54 OTodo find(int uid, const QArray<int>&, uint cur, Frontend::CacheDirection )const; 54 OPimTodo find(int uid, const QArray<int>&, uint cur, Frontend::CacheDirection )const;
55 void clear(); 55 void clear();
56 bool add( const OTodo& t ); 56 bool add( const OPimTodo& t );
57 bool remove( int uid ); 57 bool remove( int uid );
58 bool replace( const OTodo& t ); 58 bool replace( const OPimTodo& t );
59 59
60 QArray<int> overDue(); 60 QArray<int> overDue();
@@ -72,8 +72,8 @@ private:
72 void fillDict(); 72 void fillDict();
73 inline bool date( QDate& date, const QString& )const; 73 inline bool date( QDate& date, const QString& )const;
74 inline OTodo todo( const OSQLResult& )const; 74 inline OPimTodo todo( const OSQLResult& )const;
75 inline OTodo todo( OSQLResultItem& )const; 75 inline OPimTodo todo( OSQLResultItem& )const;
76 inline QArray<int> uids( const OSQLResult& )const; 76 inline QArray<int> uids( const OSQLResult& )const;
77 OTodo todo( int uid )const; 77 OPimTodo todo( int uid )const;
78 QBitArray sup() const; 78 QBitArray sup() const;
79 79
diff --git a/libopie2/opiepim/backend/otodoaccessvcal.cpp b/libopie2/opiepim/backend/otodoaccessvcal.cpp
index e364ee2..0a1baf9 100644
--- a/libopie2/opiepim/backend/otodoaccessvcal.cpp
+++ b/libopie2/opiepim/backend/otodoaccessvcal.cpp
@@ -38,6 +38,6 @@ using namespace Opie;
38 38
39namespace { 39namespace {
40 static OTodo eventByVObj( VObject *obj ){ 40 static OPimTodo eventByVObj( VObject *obj ){
41 OTodo event; 41 OPimTodo event;
42 VObject *ob; 42 VObject *ob;
43 QCString name; 43 QCString name;
@@ -92,5 +92,5 @@ namespace {
92 return event; 92 return event;
93 }; 93 };
94 static VObject *vobjByEvent( const OTodo &event ) { 94 static VObject *vobjByEvent( const OPimTodo &event ) {
95 VObject *task = newVObject( VCTodoProp ); 95 VObject *task = newVObject( VCTodoProp );
96 if( task == 0 ) 96 if( task == 0 )
@@ -139,11 +139,11 @@ namespace {
139 139
140namespace Opie { 140namespace Opie {
141OTodoAccessVCal::OTodoAccessVCal( const QString& path ) 141OPimTodoAccessVCal::OPimTodoAccessVCal( const QString& path )
142 : m_dirty(false), m_file( path ) 142 : m_dirty(false), m_file( path )
143{ 143{
144} 144}
145OTodoAccessVCal::~OTodoAccessVCal() { 145OPimTodoAccessVCal::~OPimTodoAccessVCal() {
146} 146}
147bool OTodoAccessVCal::load() { 147bool OPimTodoAccessVCal::load() {
148 m_map.clear(); 148 m_map.clear();
149 m_dirty = false; 149 m_dirty = false;
@@ -164,5 +164,5 @@ bool OTodoAccessVCal::load() {
164 QCString name = ::vObjectName( vobj ); 164 QCString name = ::vObjectName( vobj );
165 if( name == VCTodoProp ){ 165 if( name == VCTodoProp ){
166 OTodo to = eventByVObj( vobj ); 166 OPimTodo to = eventByVObj( vobj );
167 m_map.insert( to.uid(), to ); 167 m_map.insert( to.uid(), to );
168 } 168 }
@@ -173,8 +173,8 @@ bool OTodoAccessVCal::load() {
173 return true; 173 return true;
174} 174}
175bool OTodoAccessVCal::reload() { 175bool OPimTodoAccessVCal::reload() {
176 return load(); 176 return load();
177} 177}
178bool OTodoAccessVCal::save() { 178bool OPimTodoAccessVCal::save() {
179 if (!m_dirty ) 179 if (!m_dirty )
180 return true; 180 return true;
@@ -188,5 +188,5 @@ bool OTodoAccessVCal::save() {
188 addPropValue( obj, VCVersionProp, "1.0" ); 188 addPropValue( obj, VCVersionProp, "1.0" );
189 VObject *vo; 189 VObject *vo;
190 for(QMap<int, OTodo>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){ 190 for(QMap<int, OPimTodo>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){
191 vo = vobjByEvent( it.data() ); 191 vo = vobjByEvent( it.data() );
192 addVObjectProp(obj, vo ); 192 addVObjectProp(obj, vo );
@@ -199,39 +199,39 @@ bool OTodoAccessVCal::save() {
199 return true; 199 return true;
200} 200}
201void OTodoAccessVCal::clear() { 201void OPimTodoAccessVCal::clear() {
202 m_map.clear(); 202 m_map.clear();
203 m_dirty = true; 203 m_dirty = true;
204} 204}
205bool OTodoAccessVCal::add( const OTodo& to ) { 205bool OPimTodoAccessVCal::add( const OPimTodo& to ) {
206 m_map.insert( to.uid(), to ); 206 m_map.insert( to.uid(), to );
207 m_dirty = true; 207 m_dirty = true;
208 return true; 208 return true;
209} 209}
210bool OTodoAccessVCal::remove( int uid ) { 210bool OPimTodoAccessVCal::remove( int uid ) {
211 m_map.remove( uid ); 211 m_map.remove( uid );
212 m_dirty = true; 212 m_dirty = true;
213 return true; 213 return true;
214} 214}
215void OTodoAccessVCal::removeAllCompleted() { 215void OPimTodoAccessVCal::removeAllCompleted() {
216 for ( QMap<int, OTodo>::Iterator it = m_map.begin(); it != m_map.end(); ++it ) { 216 for ( QMap<int, OPimTodo>::Iterator it = m_map.begin(); it != m_map.end(); ++it ) {
217 if ( (*it).isCompleted() ) 217 if ( (*it).isCompleted() )
218 m_map.remove( it ); 218 m_map.remove( it );
219 } 219 }
220} 220}
221bool OTodoAccessVCal::replace( const OTodo& to ) { 221bool OPimTodoAccessVCal::replace( const OPimTodo& to ) {
222 m_map.replace( to.uid(), to ); 222 m_map.replace( to.uid(), to );
223 m_dirty = true; 223 m_dirty = true;
224 return true; 224 return true;
225} 225}
226OTodo OTodoAccessVCal::find(int uid )const { 226OPimTodo OPimTodoAccessVCal::find(int uid )const {
227 return m_map[uid]; 227 return m_map[uid];
228} 228}
229QArray<int> OTodoAccessVCal::sorted( bool, int, int, int ) { 229QArray<int> OPimTodoAccessVCal::sorted( bool, int, int, int ) {
230 QArray<int> ar(0); 230 QArray<int> ar(0);
231 return ar; 231 return ar;
232} 232}
233QArray<int> OTodoAccessVCal::allRecords()const { 233QArray<int> OPimTodoAccessVCal::allRecords()const {
234 QArray<int> ar( m_map.count() ); 234 QArray<int> ar( m_map.count() );
235 QMap<int, OTodo>::ConstIterator it; 235 QMap<int, OPimTodo>::ConstIterator it;
236 int i = 0; 236 int i = 0;
237 for ( it = m_map.begin(); it != m_map.end(); ++it ) { 237 for ( it = m_map.begin(); it != m_map.end(); ++it ) {
@@ -241,13 +241,13 @@ QArray<int> OTodoAccessVCal::allRecords()const {
241 return ar; 241 return ar;
242} 242}
243QArray<int> OTodoAccessVCal::matchRegexp(const QRegExp& /* r */)const { 243QArray<int> OPimTodoAccessVCal::matchRegexp(const QRegExp& /* r */)const {
244 QArray<int> ar(0); 244 QArray<int> ar(0);
245 return ar; 245 return ar;
246} 246}
247QArray<int> OTodoAccessVCal::queryByExample( const OTodo&, int, const QDateTime& ) { 247QArray<int> OPimTodoAccessVCal::queryByExample( const OPimTodo&, int, const QDateTime& ) {
248 QArray<int> ar(0); 248 QArray<int> ar(0);
249 return ar; 249 return ar;
250} 250}
251QArray<int> OTodoAccessVCal::effectiveToDos( const QDate& , 251QArray<int> OPimTodoAccessVCal::effectiveToDos( const QDate& ,
252 const QDate& , 252 const QDate& ,
253 bool ) { 253 bool ) {
@@ -255,25 +255,25 @@ QArray<int> OTodoAccessVCal::effectiveToDos( const QDate& ,
255 return ar; 255 return ar;
256} 256}
257QArray<int> OTodoAccessVCal::overDue() { 257QArray<int> OPimTodoAccessVCal::overDue() {
258 QArray<int> ar(0); 258 QArray<int> ar(0);
259 return ar; 259 return ar;
260} 260}
261QBitArray OTodoAccessVCal::supports()const { 261QBitArray OPimTodoAccessVCal::supports()const {
262 static QBitArray ar = sup(); 262 static QBitArray ar = sup();
263 263
264 return ar; 264 return ar;
265} 265}
266QBitArray OTodoAccessVCal::sup() { 266QBitArray OPimTodoAccessVCal::sup() {
267 QBitArray ar ( OTodo::CompletedDate +1 ); 267 QBitArray ar ( OPimTodo::CompletedDate +1 );
268 ar.fill( true ); 268 ar.fill( true );
269 269
270 ar[OTodo::CrossReference] = false; 270 ar[OPimTodo::CrossReference] = false;
271 ar[OTodo::State ] = false; 271 ar[OPimTodo::State ] = false;
272 ar[OTodo::Reminders] = false; 272 ar[OPimTodo::Reminders] = false;
273 ar[OTodo::Notifiers] = false; 273 ar[OPimTodo::Notifiers] = false;
274 ar[OTodo::Maintainer] = false; 274 ar[OPimTodo::Maintainer] = false;
275 ar[OTodo::Progress] = false; 275 ar[OPimTodo::Progress] = false;
276 ar[OTodo::Alarms ] = false; 276 ar[OPimTodo::Alarms ] = false;
277 ar[OTodo::Recurrence] = false; 277 ar[OPimTodo::Recurrence] = false;
278 278
279 return ar; 279 return ar;
diff --git a/libopie2/opiepim/backend/otodoaccessvcal.h b/libopie2/opiepim/backend/otodoaccessvcal.h
index f9323fb..1e106d3 100644
--- a/libopie2/opiepim/backend/otodoaccessvcal.h
+++ b/libopie2/opiepim/backend/otodoaccessvcal.h
@@ -34,8 +34,8 @@
34namespace Opie { 34namespace Opie {
35 35
36class OTodoAccessVCal : public OTodoAccessBackend { 36class OPimTodoAccessVCal : public OPimTodoAccessBackend {
37public: 37public:
38 OTodoAccessVCal(const QString& ); 38 OPimTodoAccessVCal(const QString& );
39 ~OTodoAccessVCal(); 39 ~OPimTodoAccessVCal();
40 40
41 bool load(); 41 bool load();
@@ -45,5 +45,5 @@ public:
45 QArray<int> allRecords()const; 45 QArray<int> allRecords()const;
46 QArray<int> matchRegexp(const QRegExp &r) const; 46 QArray<int> matchRegexp(const QRegExp &r) const;
47 QArray<int> queryByExample( const OTodo& t, int sort, const QDateTime& d = QDateTime() ); 47 QArray<int> queryByExample( const OPimTodo& t, int sort, const QDateTime& d = QDateTime() );
48 QArray<int> effectiveToDos( const QDate& start, 48 QArray<int> effectiveToDos( const QDate& start,
49 const QDate& end, 49 const QDate& end,
@@ -52,9 +52,9 @@ public:
52 QArray<int> sorted( bool asc, int sortOrder, int sortFilter, 52 QArray<int> sorted( bool asc, int sortOrder, int sortFilter,
53 int cat ); 53 int cat );
54 OTodo find(int uid)const; 54 OPimTodo find(int uid)const;
55 void clear(); 55 void clear();
56 bool add( const OTodo& ); 56 bool add( const OPimTodo& );
57 bool remove( int uid ); 57 bool remove( int uid );
58 bool replace( const OTodo& ); 58 bool replace( const OPimTodo& );
59 59
60 void removeAllCompleted(); 60 void removeAllCompleted();
@@ -65,5 +65,5 @@ private:
65 bool m_dirty : 1; 65 bool m_dirty : 1;
66 QString m_file; 66 QString m_file;
67 QMap<int, OTodo> m_map; 67 QMap<int, OPimTodo> m_map;
68}; 68};
69 69
diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp
index 2d50ecd..cce6111 100644
--- a/libopie2/opiepim/backend/otodoaccessxml.cpp
+++ b/libopie2/opiepim/backend/otodoaccessxml.cpp
@@ -44,9 +44,9 @@
44#include <qpe/timeconversion.h> 44#include <qpe/timeconversion.h>
45 45
46#include <opie2/oconversion.h> 46#include <opie2/opimdateconversion.h>
47#include <opie2/opimstate.h> 47#include <opie2/opimstate.h>
48#include <opie2/otimezone.h> 48#include <opie2/opimtimezone.h>
49#include <opie2/opimnotifymanager.h> 49#include <opie2/opimnotifymanager.h>
50#include <opie2/orecur.h> 50#include <opie2/opimrecurrence.h>
51#include <opie2/otodoaccessxml.h> 51#include <opie2/otodoaccessxml.h>
52 52
@@ -55,12 +55,12 @@ using namespace Opie;
55namespace { 55namespace {
56 time_t rp_end; 56 time_t rp_end;
57 ORecur* rec; 57 OPimRecurrence* rec;
58 ORecur *recur() { 58 OPimRecurrence *recur() {
59 if (!rec ) rec = new ORecur; 59 if (!rec ) rec = new OPimRecurrence;
60 return rec; 60 return rec;
61 } 61 }
62 int snd; 62 int snd;
63 enum MoreAttributes { 63 enum MoreAttributes {
64 FRType = OTodo::CompletedDate + 2, 64 FRType = OPimTodo::CompletedDate + 2,
65 FRWeekdays, 65 FRWeekdays,
66 FRPosition, 66 FRPosition,
@@ -99,7 +99,7 @@ char *strstrlen(const char *haystack, int hLen, const char* needle, int nLen)
99namespace Opie { 99namespace Opie {
100 100
101OTodoAccessXML::OTodoAccessXML( const QString& appName, 101OPimTodoAccessXML::OPimTodoAccessXML( const QString& appName,
102 const QString& fileName ) 102 const QString& fileName )
103 : OTodoAccessBackend(), m_app( appName ), m_opened( false ), m_changed( false ) 103 : OPimTodoAccessBackend(), m_app( appName ), m_opened( false ), m_changed( false )
104{ 104{
105 if (!fileName.isEmpty() ) 105 if (!fileName.isEmpty() )
@@ -108,8 +108,8 @@ OTodoAccessXML::OTodoAccessXML( const QString& appName,
108 m_file = Global::applicationFileName( "todolist", "todolist.xml" ); 108 m_file = Global::applicationFileName( "todolist", "todolist.xml" );
109} 109}
110OTodoAccessXML::~OTodoAccessXML() { 110OPimTodoAccessXML::~OPimTodoAccessXML() {
111 111
112} 112}
113bool OTodoAccessXML::load() { 113bool OPimTodoAccessXML::load() {
114 rec = 0; 114 rec = 0;
115 m_opened = true; 115 m_opened = true;
@@ -121,23 +121,23 @@ bool OTodoAccessXML::load() {
121 QAsciiDict<int> dict(26); 121 QAsciiDict<int> dict(26);
122 dict.setAutoDelete( TRUE ); 122 dict.setAutoDelete( TRUE );
123 dict.insert("Categories" , new int(OTodo::Category) ); 123 dict.insert("Categories" , new int(OPimTodo::Category) );
124 dict.insert("Uid" , new int(OTodo::Uid) ); 124 dict.insert("Uid" , new int(OPimTodo::Uid) );
125 dict.insert("HasDate" , new int(OTodo::HasDate) ); 125 dict.insert("HasDate" , new int(OPimTodo::HasDate) );
126 dict.insert("Completed" , new int(OTodo::Completed) ); 126 dict.insert("Completed" , new int(OPimTodo::Completed) );
127 dict.insert("Description" , new int(OTodo::Description) ); 127 dict.insert("Description" , new int(OPimTodo::Description) );
128 dict.insert("Summary" , new int(OTodo::Summary) ); 128 dict.insert("Summary" , new int(OPimTodo::Summary) );
129 dict.insert("Priority" , new int(OTodo::Priority) ); 129 dict.insert("Priority" , new int(OPimTodo::Priority) );
130 dict.insert("DateDay" , new int(OTodo::DateDay) ); 130 dict.insert("DateDay" , new int(OPimTodo::DateDay) );
131 dict.insert("DateMonth" , new int(OTodo::DateMonth) ); 131 dict.insert("DateMonth" , new int(OPimTodo::DateMonth) );
132 dict.insert("DateYear" , new int(OTodo::DateYear) ); 132 dict.insert("DateYear" , new int(OPimTodo::DateYear) );
133 dict.insert("Progress" , new int(OTodo::Progress) ); 133 dict.insert("Progress" , new int(OPimTodo::Progress) );
134 dict.insert("CompletedDate", new int(OTodo::CompletedDate) ); 134 dict.insert("CompletedDate", new int(OPimTodo::CompletedDate) );
135 dict.insert("StartDate", new int(OTodo::StartDate) ); 135 dict.insert("StartDate", new int(OPimTodo::StartDate) );
136 dict.insert("CrossReference", new int(OTodo::CrossReference) ); 136 dict.insert("CrossReference", new int(OPimTodo::CrossReference) );
137 dict.insert("State", new int(OTodo::State) ); 137 dict.insert("State", new int(OPimTodo::State) );
138 dict.insert("Alarms", new int(OTodo::Alarms) ); 138 dict.insert("Alarms", new int(OPimTodo::Alarms) );
139 dict.insert("Reminders", new int(OTodo::Reminders) ); 139 dict.insert("Reminders", new int(OPimTodo::Reminders) );
140 dict.insert("Notifiers", new int(OTodo::Notifiers) ); 140 dict.insert("Notifiers", new int(OPimTodo::Notifiers) );
141 dict.insert("Maintainer", new int(OTodo::Maintainer) ); 141 dict.insert("Maintainer", new int(OPimTodo::Maintainer) );
142 dict.insert("rtype", new int(FRType) ); 142 dict.insert("rtype", new int(FRType) );
143 dict.insert("rweekdays", new int(FRWeekdays) ); 143 dict.insert("rweekdays", new int(FRWeekdays) );
@@ -180,5 +180,5 @@ bool OTodoAccessXML::load() {
180 qWarning("Found a start at %d %d", i, (point-dt) ); 180 qWarning("Found a start at %d %d", i, (point-dt) );
181 181
182 OTodo ev; 182 OPimTodo ev;
183 m_year = m_month = m_day = 0; 183 m_year = m_month = m_day = 0;
184 184
@@ -243,6 +243,6 @@ bool OTodoAccessXML::load() {
243 } 243 }
244 if ( rec && rec->doesRecur() ) { 244 if ( rec && rec->doesRecur() ) {
245 OTimeZone utc = OTimeZone::utc(); 245 OPimTimeZone utc = OPimTimeZone::utc();
246 ORecur recu( *rec ); // call copy c'tor 246 OPimRecurrence recu( *rec ); // call copy c'tor
247 recu.setEndDate( utc.fromUTCDateTime( rp_end ).date() ); 247 recu.setEndDate( utc.fromUTCDateTime( rp_end ).date() );
248 recu.setStart( ev.dueDate() ); 248 recu.setStart( ev.dueDate() );
@@ -260,9 +260,9 @@ bool OTodoAccessXML::load() {
260 return true; 260 return true;
261} 261}
262bool OTodoAccessXML::reload() { 262bool OPimTodoAccessXML::reload() {
263 m_events.clear(); 263 m_events.clear();
264 return load(); 264 return load();
265} 265}
266bool OTodoAccessXML::save() { 266bool OPimTodoAccessXML::save() {
267// qWarning("saving"); 267// qWarning("saving");
268 if (!m_opened || !m_changed ) { 268 if (!m_opened || !m_changed ) {
@@ -280,5 +280,5 @@ bool OTodoAccessXML::save() {
280 280
281 // for all todos 281 // for all todos
282 QMap<int, OTodo>::Iterator it; 282 QMap<int, OPimTodo>::Iterator it;
283 for (it = m_events.begin(); it != m_events.end(); ++it ) { 283 for (it = m_events.begin(); it != m_events.end(); ++it ) {
284 out+= "<Task " + toString( (*it) ) + " />\n"; 284 out+= "<Task " + toString( (*it) ) + " />\n";
@@ -315,7 +315,7 @@ bool OTodoAccessXML::save() {
315 return true; 315 return true;
316} 316}
317QArray<int> OTodoAccessXML::allRecords()const { 317QArray<int> OPimTodoAccessXML::allRecords()const {
318 QArray<int> ids( m_events.count() ); 318 QArray<int> ids( m_events.count() );
319 QMap<int, OTodo>::ConstIterator it; 319 QMap<int, OPimTodo>::ConstIterator it;
320 int i = 0; 320 int i = 0;
321 321
@@ -326,12 +326,12 @@ QArray<int> OTodoAccessXML::allRecords()const {
326 return ids; 326 return ids;
327} 327}
328QArray<int> OTodoAccessXML::queryByExample( const OTodo&, int, const QDateTime& ) { 328QArray<int> OPimTodoAccessXML::queryByExample( const OPimTodo&, int, const QDateTime& ) {
329 QArray<int> ids(0); 329 QArray<int> ids(0);
330 return ids; 330 return ids;
331} 331}
332OTodo OTodoAccessXML::find( int uid )const { 332OPimTodo OPimTodoAccessXML::find( int uid )const {
333 OTodo todo; 333 OPimTodo todo;
334 todo.setUid( 0 ); // isEmpty() 334 todo.setUid( 0 ); // isEmpty()
335 QMap<int, OTodo>::ConstIterator it = m_events.find( uid ); 335 QMap<int, OPimTodo>::ConstIterator it = m_events.find( uid );
336 if ( it != m_events.end() ) 336 if ( it != m_events.end() )
337 todo = it.data(); 337 todo = it.data();
@@ -339,5 +339,5 @@ OTodo OTodoAccessXML::find( int uid )const {
339 return todo; 339 return todo;
340} 340}
341void OTodoAccessXML::clear() { 341void OPimTodoAccessXML::clear() {
342 if (m_opened ) 342 if (m_opened )
343 m_changed = true; 343 m_changed = true;
@@ -345,5 +345,5 @@ void OTodoAccessXML::clear() {
345 m_events.clear(); 345 m_events.clear();
346} 346}
347bool OTodoAccessXML::add( const OTodo& todo ) { 347bool OPimTodoAccessXML::add( const OPimTodo& todo ) {
348// qWarning("add"); 348// qWarning("add");
349 m_changed = true; 349 m_changed = true;
@@ -352,5 +352,5 @@ bool OTodoAccessXML::add( const OTodo& todo ) {
352 return true; 352 return true;
353} 353}
354bool OTodoAccessXML::remove( int uid ) { 354bool OPimTodoAccessXML::remove( int uid ) {
355 m_changed = true; 355 m_changed = true;
356 m_events.remove( uid ); 356 m_events.remove( uid );
@@ -358,5 +358,5 @@ bool OTodoAccessXML::remove( int uid ) {
358 return true; 358 return true;
359} 359}
360bool OTodoAccessXML::replace( const OTodo& todo) { 360bool OPimTodoAccessXML::replace( const OPimTodo& todo) {
361 m_changed = true; 361 m_changed = true;
362 m_events.replace( todo.uid(), todo ); 362 m_events.replace( todo.uid(), todo );
@@ -364,9 +364,9 @@ bool OTodoAccessXML::replace( const OTodo& todo) {
364 return true; 364 return true;
365} 365}
366QArray<int> OTodoAccessXML::effectiveToDos( const QDate& start, 366QArray<int> OPimTodoAccessXML::effectiveToDos( const QDate& start,
367 const QDate& end, 367 const QDate& end,
368 bool includeNoDates ) { 368 bool includeNoDates ) {
369 QArray<int> ids( m_events.count() ); 369 QArray<int> ids( m_events.count() );
370 QMap<int, OTodo>::Iterator it; 370 QMap<int, OPimTodo>::Iterator it;
371 371
372 int i = 0; 372 int i = 0;
@@ -386,9 +386,9 @@ QArray<int> OTodoAccessXML::effectiveToDos( const QDate& start,
386 return ids; 386 return ids;
387} 387}
388QArray<int> OTodoAccessXML::overDue() { 388QArray<int> OPimTodoAccessXML::overDue() {
389 QArray<int> ids( m_events.count() ); 389 QArray<int> ids( m_events.count() );
390 int i = 0; 390 int i = 0;
391 391
392 QMap<int, OTodo>::Iterator it; 392 QMap<int, OPimTodo>::Iterator it;
393 for ( it = m_events.begin(); it != m_events.end(); ++it ) { 393 for ( it = m_events.begin(); it != m_events.end(); ++it ) {
394 if ( it.data().isOverdue() ) { 394 if ( it.data().isOverdue() ) {
@@ -403,5 +403,5 @@ QArray<int> OTodoAccessXML::overDue() {
403 403
404/* private */ 404/* private */
405void OTodoAccessXML::todo( QAsciiDict<int>* dict, OTodo& ev, 405void OPimTodoAccessXML::todo( QAsciiDict<int>* dict, OPimTodo& ev,
406 const QCString& attr, const QString& val) { 406 const QCString& attr, const QString& val) {
407// qWarning("parse to do from XMLElement" ); 407// qWarning("parse to do from XMLElement" );
@@ -417,47 +417,47 @@ void OTodoAccessXML::todo( QAsciiDict<int>* dict, OTodo& ev,
417 417
418 switch( *find ) { 418 switch( *find ) {
419 case OTodo::Uid: 419 case OPimTodo::Uid:
420 ev.setUid( val.toInt() ); 420 ev.setUid( val.toInt() );
421 break; 421 break;
422 case OTodo::Category: 422 case OPimTodo::Category:
423 ev.setCategories( ev.idsFromString( val ) ); 423 ev.setCategories( ev.idsFromString( val ) );
424 break; 424 break;
425 case OTodo::HasDate: 425 case OPimTodo::HasDate:
426 ev.setHasDueDate( val.toInt() ); 426 ev.setHasDueDate( val.toInt() );
427 break; 427 break;
428 case OTodo::Completed: 428 case OPimTodo::Completed:
429 ev.setCompleted( val.toInt() ); 429 ev.setCompleted( val.toInt() );
430 break; 430 break;
431 case OTodo::Description: 431 case OPimTodo::Description:
432 ev.setDescription( val ); 432 ev.setDescription( val );
433 break; 433 break;
434 case OTodo::Summary: 434 case OPimTodo::Summary:
435 ev.setSummary( val ); 435 ev.setSummary( val );
436 break; 436 break;
437 case OTodo::Priority: 437 case OPimTodo::Priority:
438 ev.setPriority( val.toInt() ); 438 ev.setPriority( val.toInt() );
439 break; 439 break;
440 case OTodo::DateDay: 440 case OPimTodo::DateDay:
441 m_day = val.toInt(); 441 m_day = val.toInt();
442 break; 442 break;
443 case OTodo::DateMonth: 443 case OPimTodo::DateMonth:
444 m_month = val.toInt(); 444 m_month = val.toInt();
445 break; 445 break;
446 case OTodo::DateYear: 446 case OPimTodo::DateYear:
447 m_year = val.toInt(); 447 m_year = val.toInt();
448 break; 448 break;
449 case OTodo::Progress: 449 case OPimTodo::Progress:
450 ev.setProgress( val.toInt() ); 450 ev.setProgress( val.toInt() );
451 break; 451 break;
452 case OTodo::CompletedDate: 452 case OPimTodo::CompletedDate:
453 ev.setCompletedDate( OConversion::dateFromString( val ) ); 453 ev.setCompletedDate( OPimDateConversion::dateFromString( val ) );
454 break; 454 break;
455 case OTodo::StartDate: 455 case OPimTodo::StartDate:
456 ev.setStartDate( OConversion::dateFromString( val ) ); 456 ev.setStartDate( OPimDateConversion::dateFromString( val ) );
457 break; 457 break;
458 case OTodo::State: 458 case OPimTodo::State:
459 ev.setState( val.toInt() ); 459 ev.setState( val.toInt() );
460 break; 460 break;
461 case OTodo::Alarms:{ 461 case OPimTodo::Alarms:{
462 OPimNotifyManager &manager = ev.notifiers(); 462 OPimNotifyManager &manager = ev.notifiers();
463 QStringList als = QStringList::split(";", val ); 463 QStringList als = QStringList::split(";", val );
@@ -465,11 +465,11 @@ void OTodoAccessXML::todo( QAsciiDict<int>* dict, OTodo& ev,
465 QStringList alarm = QStringList::split(":", (*it), TRUE ); // allow empty 465 QStringList alarm = QStringList::split(":", (*it), TRUE ); // allow empty
466 qWarning("alarm: %s", alarm.join("___").latin1() ); 466 qWarning("alarm: %s", alarm.join("___").latin1() );
467 qWarning("alarm[0]: %s %s", alarm[0].latin1(), OConversion::dateTimeFromString( alarm[0] ).toString().latin1() ); 467 qWarning("alarm[0]: %s %s", alarm[0].latin1(), OPimDateConversion::dateTimeFromString( alarm[0] ).toString().latin1() );
468 OPimAlarm al( alarm[2].toInt(), OConversion::dateTimeFromString( alarm[0] ), alarm[1].toInt() ); 468 OPimAlarm al( alarm[2].toInt(), OPimDateConversion::dateTimeFromString( alarm[0] ), alarm[1].toInt() );
469 manager.add( al ); 469 manager.add( al );
470 } 470 }
471 } 471 }
472 break; 472 break;
473 case OTodo::Reminders:{ 473 case OPimTodo::Reminders:{
474 OPimNotifyManager &manager = ev.notifiers(); 474 OPimNotifyManager &manager = ev.notifiers();
475 QStringList rems = QStringList::split(";", val ); 475 QStringList rems = QStringList::split(";", val );
@@ -480,5 +480,5 @@ void OTodoAccessXML::todo( QAsciiDict<int>* dict, OTodo& ev,
480 } 480 }
481 break; 481 break;
482 case OTodo::CrossReference: 482 case OPimTodo::CrossReference:
483 { 483 {
484 /* 484 /*
@@ -500,15 +500,15 @@ void OTodoAccessXML::todo( QAsciiDict<int>* dict, OTodo& ev,
500 case FRType: 500 case FRType:
501 if ( val == "Daily" ) 501 if ( val == "Daily" )
502 recur()->setType( ORecur::Daily ); 502 recur()->setType( OPimRecurrence::Daily );
503 else if ( val == "Weekly" ) 503 else if ( val == "Weekly" )
504 recur()->setType( ORecur::Weekly); 504 recur()->setType( OPimRecurrence::Weekly);
505 else if ( val == "MonthlyDay" ) 505 else if ( val == "MonthlyDay" )
506 recur()->setType( ORecur::MonthlyDay ); 506 recur()->setType( OPimRecurrence::MonthlyDay );
507 else if ( val == "MonthlyDate" ) 507 else if ( val == "MonthlyDate" )
508 recur()->setType( ORecur::MonthlyDate ); 508 recur()->setType( OPimRecurrence::MonthlyDate );
509 else if ( val == "Yearly" ) 509 else if ( val == "Yearly" )
510 recur()->setType( ORecur::Yearly ); 510 recur()->setType( OPimRecurrence::Yearly );
511 else 511 else
512 recur()->setType( ORecur::NoRepeat ); 512 recur()->setType( OPimRecurrence::NoRepeat );
513 break; 513 break;
514 case FRWeekdays: 514 case FRWeekdays:
@@ -554,5 +554,5 @@ QString customToXml(const QMap<QString, QString>& customMap )
554} 554}
555 555
556QString OTodoAccessXML::toString( const OTodo& ev )const { 556QString OPimTodoAccessXML::toString( const OPimTodo& ev )const {
557 QString str; 557 QString str;
558 558
@@ -592,7 +592,7 @@ QString OTodoAccessXML::toString( const OTodo& ev )const {
592 } 592 }
593 if ( ev.hasStartDate() ) 593 if ( ev.hasStartDate() )
594 str += "StartDate=\""+ OConversion::dateToString( ev.startDate() ) +"\" "; 594 str += "StartDate=\""+ OPimDateConversion::dateToString( ev.startDate() ) +"\" ";
595 if ( ev.hasCompletedDate() ) 595 if ( ev.hasCompletedDate() )
596 str += "CompletedDate=\""+ OConversion::dateToString( ev.completedDate() ) +"\" "; 596 str += "CompletedDate=\""+ OPimDateConversion::dateToString( ev.completedDate() ) +"\" ";
597 if ( ev.hasState() ) 597 if ( ev.hasState() )
598 str += "State=\""+QString::number( ev.state().state() )+"\" "; 598 str += "State=\""+QString::number( ev.state().state() )+"\" ";
@@ -611,5 +611,5 @@ QString OTodoAccessXML::toString( const OTodo& ev )const {
611 /* only if time is valid */ 611 /* only if time is valid */
612 if ( (*it).dateTime().isValid() ) { 612 if ( (*it).dateTime().isValid() ) {
613 als << OConversion::dateTimeToString( (*it).dateTime() ) 613 als << OPimDateConversion::dateTimeToString( (*it).dateTime() )
614 + ":" + QString::number( (*it).duration() ) 614 + ":" + QString::number( (*it).duration() )
615 + ":" + QString::number( (*it).sound() ) 615 + ":" + QString::number( (*it).sound() )
@@ -623,5 +623,5 @@ QString OTodoAccessXML::toString( const OTodo& ev )const {
623 623
624 /* 624 /*
625 * now the same for reminders but more easy. We just save the uid of the OEvent. 625 * now the same for reminders but more easy. We just save the uid of the OPimEvent.
626 */ 626 */
627 OPimNotifyManager::Reminders reminders = manager.reminders(); 627 OPimNotifyManager::Reminders reminders = manager.reminders();
@@ -640,5 +640,5 @@ QString OTodoAccessXML::toString( const OTodo& ev )const {
640 return str; 640 return str;
641} 641}
642QString OTodoAccessXML::toString( const QArray<int>& ints ) const { 642QString OPimTodoAccessXML::toString( const QArray<int>& ints ) const {
643 return Qtopia::Record::idsToString( ints ); 643 return Qtopia::Record::idsToString( ints );
644} 644}
@@ -649,15 +649,15 @@ QString OTodoAccessXML::toString( const QArray<int>& ints ) const {
649 */ 649 */
650 650
651struct OTodoXMLContainer { 651struct OPimTodoXMLContainer {
652 OTodo todo; 652 OPimTodo todo;
653}; 653};
654 654
655namespace { 655namespace {
656 inline QString string( const OTodo& todo) { 656 inline QString string( const OPimTodo& todo) {
657 return todo.summary().isEmpty() ? 657 return todo.summary().isEmpty() ?
658 todo.description().left(20 ) : 658 todo.description().left(20 ) :
659 todo.summary(); 659 todo.summary();
660 } 660 }
661 inline int completed( const OTodo& todo1, const OTodo& todo2) { 661 inline int completed( const OPimTodo& todo1, const OPimTodo& todo2) {
662 int ret = 0; 662 int ret = 0;
663 if ( todo1.isCompleted() ) ret++; 663 if ( todo1.isCompleted() ) ret++;
@@ -665,11 +665,11 @@ namespace {
665 return ret; 665 return ret;
666 } 666 }
667 inline int priority( const OTodo& t1, const OTodo& t2) { 667 inline int priority( const OPimTodo& t1, const OPimTodo& t2) {
668 return ( t1.priority() - t2.priority() ); 668 return ( t1.priority() - t2.priority() );
669 } 669 }
670 inline int description( const OTodo& t1, const OTodo& t2) { 670 inline int description( const OPimTodo& t1, const OPimTodo& t2) {
671 return QString::compare( string(t1), string(t2) ); 671 return QString::compare( string(t1), string(t2) );
672 } 672 }
673 inline int deadline( const OTodo& t1, const OTodo& t2) { 673 inline int deadline( const OPimTodo& t1, const OPimTodo& t2) {
674 int ret = 0; 674 int ret = 0;
675 if ( t1.hasDueDate() && 675 if ( t1.hasDueDate() &&
@@ -704,8 +704,8 @@ namespace {
704 * 704 *
705 */ 705 */
706class OTodoXMLVector : public QVector<OTodoXMLContainer> { 706class OPimTodoXMLVector : public QVector<OPimTodoXMLContainer> {
707public: 707public:
708 OTodoXMLVector(int size, bool asc, int sort) 708 OPimTodoXMLVector(int size, bool asc, int sort)
709 : QVector<OTodoXMLContainer>( size ) 709 : QVector<OPimTodoXMLContainer>( size )
710 { 710 {
711 setAutoDelete( true ); 711 setAutoDelete( true );
@@ -714,5 +714,5 @@ public:
714 } 714 }
715 /* return the summary/description */ 715 /* return the summary/description */
716 QString string( const OTodo& todo) { 716 QString string( const OPimTodo& todo) {
717 return todo.summary().isEmpty() ? 717 return todo.summary().isEmpty() ?
718 todo.description().left(20 ) : 718 todo.description().left(20 ) :
@@ -727,6 +727,6 @@ public:
727 seComp = sePrio = seDeadline = seDesc = false; 727 seComp = sePrio = seDeadline = seDesc = false;
728 int ret =0; 728 int ret =0;
729 OTodoXMLContainer* con1 = (OTodoXMLContainer*)d1; 729 OPimTodoXMLContainer* con1 = (OPimTodoXMLContainer*)d1;
730 OTodoXMLContainer* con2 = (OTodoXMLContainer*)d2; 730 OPimTodoXMLContainer* con2 = (OPimTodoXMLContainer*)d2;
731 731
732 /* same item */ 732 /* same item */
@@ -817,8 +817,8 @@ public:
817}; 817};
818 818
819QArray<int> OTodoAccessXML::sorted( bool asc, int sortOrder, 819QArray<int> OPimTodoAccessXML::sorted( bool asc, int sortOrder,
820 int sortFilter, int cat ) { 820 int sortFilter, int cat ) {
821 OTodoXMLVector vector(m_events.count(), asc,sortOrder ); 821 OPimTodoXMLVector vector(m_events.count(), asc,sortOrder );
822 QMap<int, OTodo>::Iterator it; 822 QMap<int, OPimTodo>::Iterator it;
823 int item = 0; 823 int item = 0;
824 824
@@ -852,5 +852,5 @@ QArray<int> OTodoAccessXML::sorted( bool asc, int sortOrder,
852 852
853 853
854 OTodoXMLContainer* con = new OTodoXMLContainer(); 854 OPimTodoXMLContainer* con = new OPimTodoXMLContainer();
855 con->todo = (*it); 855 con->todo = (*it);
856 vector.insert(item, con ); 856 vector.insert(item, con );
@@ -867,7 +867,7 @@ QArray<int> OTodoAccessXML::sorted( bool asc, int sortOrder,
867 return array; 867 return array;
868}; 868};
869void OTodoAccessXML::removeAllCompleted() { 869void OPimTodoAccessXML::removeAllCompleted() {
870 QMap<int, OTodo> events = m_events; 870 QMap<int, OPimTodo> events = m_events;
871 for ( QMap<int, OTodo>::Iterator it = m_events.begin(); it != m_events.end(); ++it ) { 871 for ( QMap<int, OPimTodo>::Iterator it = m_events.begin(); it != m_events.end(); ++it ) {
872 if ( (*it).isCompleted() ) 872 if ( (*it).isCompleted() )
873 events.remove( it.key() ); 873 events.remove( it.key() );
@@ -875,25 +875,25 @@ void OTodoAccessXML::removeAllCompleted() {
875 m_events = events; 875 m_events = events;
876} 876}
877QBitArray OTodoAccessXML::supports()const { 877QBitArray OPimTodoAccessXML::supports()const {
878 static QBitArray ar = sup(); 878 static QBitArray ar = sup();
879 return ar; 879 return ar;
880} 880}
881QBitArray OTodoAccessXML::sup() { 881QBitArray OPimTodoAccessXML::sup() {
882 QBitArray ar( OTodo::CompletedDate +1 ); 882 QBitArray ar( OPimTodo::CompletedDate +1 );
883 ar.fill( true ); 883 ar.fill( true );
884 ar[OTodo::CrossReference] = false; 884 ar[OPimTodo::CrossReference] = false;
885 ar[OTodo::State ] = false; 885 ar[OPimTodo::State ] = false;
886 ar[OTodo::Reminders] = false; 886 ar[OPimTodo::Reminders] = false;
887 ar[OTodo::Notifiers] = false; 887 ar[OPimTodo::Notifiers] = false;
888 ar[OTodo::Maintainer] = false; 888 ar[OPimTodo::Maintainer] = false;
889 889
890 return ar; 890 return ar;
891} 891}
892QArray<int> OTodoAccessXML::matchRegexp( const QRegExp &r ) const 892QArray<int> OPimTodoAccessXML::matchRegexp( const QRegExp &r ) const
893{ 893{
894 QArray<int> m_currentQuery( m_events.count() ); 894 QArray<int> m_currentQuery( m_events.count() );
895 uint arraycounter = 0; 895 uint arraycounter = 0;
896 896
897 QMap<int, OTodo>::ConstIterator it; 897 QMap<int, OPimTodo>::ConstIterator it;
898 for (it = m_events.begin(); it != m_events.end(); ++it ) { 898 for (it = m_events.begin(); it != m_events.end(); ++it ) {
899 if ( it.data().match( r ) ) 899 if ( it.data().match( r ) )
diff --git a/libopie2/opiepim/backend/otodoaccessxml.h b/libopie2/opiepim/backend/otodoaccessxml.h
index d634398..3a51543 100644
--- a/libopie2/opiepim/backend/otodoaccessxml.h
+++ b/libopie2/opiepim/backend/otodoaccessxml.h
@@ -38,12 +38,12 @@ namespace Opie {
38 class XMLElement; 38 class XMLElement;
39 39
40class OTodoAccessXML : public OTodoAccessBackend { 40class OPimTodoAccessXML : public OPimTodoAccessBackend {
41public: 41public:
42 /** 42 /**
43 * fileName if Empty we will use the default path 43 * fileName if Empty we will use the default path
44 */ 44 */
45 OTodoAccessXML( const QString& appName, 45 OPimTodoAccessXML( const QString& appName,
46 const QString& fileName = QString::null ); 46 const QString& fileName = QString::null );
47 ~OTodoAccessXML(); 47 ~OPimTodoAccessXML();
48 48
49 bool load(); 49 bool load();
@@ -53,11 +53,11 @@ public:
53 QArray<int> allRecords()const; 53 QArray<int> allRecords()const;
54 QArray<int> matchRegexp(const QRegExp &r) const; 54 QArray<int> matchRegexp(const QRegExp &r) const;
55 QArray<int> queryByExample( const OTodo&, int querysettings, const QDateTime& d = QDateTime() ); 55 QArray<int> queryByExample( const OPimTodo&, int querysettings, const QDateTime& d = QDateTime() );
56 OTodo find( int uid )const; 56 OPimTodo find( int uid )const;
57 void clear(); 57 void clear();
58 bool add( const OTodo& ); 58 bool add( const OPimTodo& );
59 bool remove( int uid ); 59 bool remove( int uid );
60 void removeAllCompleted(); 60 void removeAllCompleted();
61 bool replace( const OTodo& ); 61 bool replace( const OPimTodo& );
62 62
63 /* our functions */ 63 /* our functions */
@@ -71,14 +71,14 @@ public:
71private: 71private:
72 static QBitArray sup(); 72 static QBitArray sup();
73 void todo( QAsciiDict<int>*, OTodo&,const QCString&,const QString& ); 73 void todo( QAsciiDict<int>*, OPimTodo&,const QCString&,const QString& );
74 QString toString( const OTodo& )const; 74 QString toString( const OPimTodo& )const;
75 QString toString( const QArray<int>& ints ) const; 75 QString toString( const QArray<int>& ints ) const;
76 QMap<int, OTodo> m_events; 76 QMap<int, OPimTodo> m_events;
77 QString m_file; 77 QString m_file;
78 QString m_app; 78 QString m_app;
79 bool m_opened : 1; 79 bool m_opened : 1;
80 bool m_changed : 1; 80 bool m_changed : 1;
81 class OTodoAccessXMLPrivate; 81 class OPimTodoAccessXMLPrivate;
82 OTodoAccessXMLPrivate* d; 82 OPimTodoAccessXMLPrivate* d;
83 int m_year, m_month, m_day; 83 int m_year, m_month, m_day;
84 84
diff --git a/libopie2/opiepim/core/core.pro b/libopie2/opiepim/core/core.pro
index 0473622..597b1e8 100644
--- a/libopie2/opiepim/core/core.pro
+++ b/libopie2/opiepim/core/core.pro
@@ -1,3 +1,4 @@
1HEADERS += core/oconversion.h \ 1HEADERS += \
2 core/opimdateconversion.h \
2 core/opimcache.h \ 3 core/opimcache.h \
3 core/opimmaintainer.h \ 4 core/opimmaintainer.h \
@@ -7,9 +8,10 @@ HEADERS += core/oconversion.h \
7 core/opimxrefmanager.h \ 8 core/opimxrefmanager.h \
8 core/opimxrefpartner.h \ 9 core/opimxrefpartner.h \
9 core/orecur.h \ 10 core/opimrecurrence.h \
10 core/otemplatebase.h \ 11 core/opimtemplatebase.h \
11 core/otimezone.h 12 core/opimtimezone.h
12 13
13SOURCES += core/oconversion.cpp \ 14SOURCES += \
15 core/opimdateconversion.cpp \
14 core/opimmaintainer.cpp \ 16 core/opimmaintainer.cpp \
15 core/opimresolver.cpp \ 17 core/opimresolver.cpp \
@@ -18,4 +20,4 @@ SOURCES += core/oconversion.cpp \
18 core/opimxrefmanager.cpp \ 20 core/opimxrefmanager.cpp \
19 core/opimxrefpartner.cpp \ 21 core/opimxrefpartner.cpp \
20 core/orecur.cpp \ 22 core/opimrecurrence.cpp \
21 core/otimezone.cpp 23 core/opimtimezone.cpp
diff --git a/libopie2/opiepim/core/ocontactaccess.cpp b/libopie2/opiepim/core/ocontactaccess.cpp
index f67a40c..c12e138 100644
--- a/libopie2/opiepim/core/ocontactaccess.cpp
+++ b/libopie2/opiepim/core/ocontactaccess.cpp
@@ -56,7 +56,7 @@
56namespace Opie { 56namespace Opie {
57 57
58OContactAccess::OContactAccess ( const QString appname, const QString , 58OPimContactAccess::OPimContactAccess ( const QString appname, const QString ,
59 OContactAccessBackend* end, bool autosync ): 59 OPimContactAccessBackend* end, bool autosync ):
60 OPimAccessTemplate<OContact>( end ) 60 OPimAccessTemplate<OPimContact>( end )
61{ 61{
62 /* take care of the backend. If there is no one defined, we 62 /* take care of the backend. If there is no one defined, we
@@ -65,9 +65,9 @@ OContactAccess::OContactAccess ( const QString appname, const QString ,
65 if( end == 0 ) { 65 if( end == 0 ) {
66 qWarning ("Using BackendFactory !"); 66 qWarning ("Using BackendFactory !");
67 end = OBackendFactory<OContactAccessBackend>::Default( "contact", appname ); 67 end = OBackendFactory<OPimContactAccessBackend>::Default( "contact", appname );
68 } 68 }
69 // Set backend locally and in template 69 // Set backend locally and in template
70 m_backEnd = end; 70 m_backEnd = end;
71 OPimAccessTemplate<OContact>::setBackEnd (end); 71 OPimAccessTemplate<OPimContact>::setBackEnd (end);
72 72
73 73
@@ -84,5 +84,5 @@ OContactAccess::OContactAccess ( const QString appname, const QString ,
84 84
85} 85}
86OContactAccess::~OContactAccess () 86OPimContactAccess::~OPimContactAccess ()
87{ 87{
88 /* The user may forget to save the changed database, therefore try to 88 /* The user may forget to save the changed database, therefore try to
@@ -94,5 +94,5 @@ OContactAccess::~OContactAccess ()
94 94
95 95
96bool OContactAccess::save () 96bool OPimContactAccess::save ()
97{ 97{
98 /* If the database was changed externally, we could not save the 98 /* If the database was changed externally, we could not save the
@@ -100,8 +100,8 @@ bool OContactAccess::save ()
100 * Therefore: Reload database and merge the data... 100 * Therefore: Reload database and merge the data...
101 */ 101 */
102 if ( OPimAccessTemplate<OContact>::wasChangedExternally() ) 102 if ( OPimAccessTemplate<OPimContact>::wasChangedExternally() )
103 reload(); 103 reload();
104 104
105 bool status = OPimAccessTemplate<OContact>::save(); 105 bool status = OPimAccessTemplate<OPimContact>::save();
106 if ( !status ) return false; 106 if ( !status ) return false;
107 107
@@ -113,21 +113,21 @@ bool OContactAccess::save ()
113} 113}
114 114
115const uint OContactAccess::querySettings() 115const uint OPimContactAccess::querySettings()
116{ 116{
117 return ( m_backEnd->querySettings() ); 117 return ( m_backEnd->querySettings() );
118} 118}
119 119
120bool OContactAccess::hasQuerySettings ( int querySettings ) const 120bool OPimContactAccess::hasQuerySettings ( int querySettings ) const
121{ 121{
122 return ( m_backEnd->hasQuerySettings ( querySettings ) ); 122 return ( m_backEnd->hasQuerySettings ( querySettings ) );
123} 123}
124ORecordList<OContact> OContactAccess::sorted( bool ascending, int sortOrder, int sortFilter, int cat ) const 124OPimRecordList<OPimContact> OPimContactAccess::sorted( bool ascending, int sortOrder, int sortFilter, int cat ) const
125{ 125{
126 QArray<int> matchingContacts = m_backEnd -> sorted( ascending, sortOrder, sortFilter, cat ); 126 QArray<int> matchingContacts = m_backEnd -> sorted( ascending, sortOrder, sortFilter, cat );
127 return ( ORecordList<OContact>(matchingContacts, this) ); 127 return ( OPimRecordList<OPimContact>(matchingContacts, this) );
128} 128}
129 129
130 130
131bool OContactAccess::wasChangedExternally()const 131bool OPimContactAccess::wasChangedExternally()const
132{ 132{
133 return ( m_backEnd->wasChangedExternally() ); 133 return ( m_backEnd->wasChangedExternally() );
@@ -135,14 +135,14 @@ bool OContactAccess::wasChangedExternally()const
135 135
136 136
137void OContactAccess::copMessage( const QCString &msg, const QByteArray & ) 137void OPimContactAccess::copMessage( const QCString &msg, const QByteArray & )
138{ 138{
139 if ( msg == "addressbookUpdated()" ){ 139 if ( msg == "addressbookUpdated()" ){
140 qWarning ("OContactAccess: Received addressbokUpdated()"); 140 qWarning ("OPimContactAccess: Received addressbokUpdated()");
141 emit signalChanged ( this ); 141 emit signalChanged ( this );
142 } else if ( msg == "flush()" ) { 142 } else if ( msg == "flush()" ) {
143 qWarning ("OContactAccess: Received flush()"); 143 qWarning ("OPimContactAccess: Received flush()");
144 save (); 144 save ();
145 } else if ( msg == "reload()" ) { 145 } else if ( msg == "reload()" ) {
146 qWarning ("OContactAccess: Received reload()"); 146 qWarning ("OPimContactAccess: Received reload()");
147 reload (); 147 reload ();
148 emit signalChanged ( this ); 148 emit signalChanged ( this );
diff --git a/libopie2/opiepim/core/ocontactaccess.h b/libopie2/opiepim/core/ocontactaccess.h
index 505c87b..cf5333a 100644
--- a/libopie2/opiepim/core/ocontactaccess.h
+++ b/libopie2/opiepim/core/ocontactaccess.h
@@ -42,5 +42,5 @@
42#include <qfileinfo.h> 42#include <qfileinfo.h>
43 43
44#include <opie2/ocontact.h> 44#include <opie2/opimcontact.h>
45#include <opie2/ocontactaccessbackend.h> 45#include <opie2/ocontactaccessbackend.h>
46#include <opie2/opimaccesstemplate.h> 46#include <opie2/opimaccesstemplate.h>
@@ -56,5 +56,5 @@ namespace Opie {
56 * @see OPimAccessTemplate 56 * @see OPimAccessTemplate
57 */ 57 */
58class OContactAccess: public QObject, public OPimAccessTemplate<OContact> 58class OPimContactAccess: public QObject, public OPimAccessTemplate<OPimContact>
59{ 59{
60 Q_OBJECT 60 Q_OBJECT
@@ -73,9 +73,9 @@ class OContactAccess: public QObject, public OPimAccessTemplate<OContact>
73 * which are used before and after synchronisation. If the application wants 73 * which are used before and after synchronisation. If the application wants
74 * to react itself, it should be disabled by setting it to <b>false</b> 74 * to react itself, it should be disabled by setting it to <b>false</b>
75 * @see OContactAccessBackend 75 * @see OPimContactAccessBackend
76 */ 76 */
77 OContactAccess (const QString appname, const QString filename = 0l, 77 OPimContactAccess (const QString appname, const QString filename = 0l,
78 OContactAccessBackend* backend = 0l, bool handlesync = true); 78 OPimContactAccessBackend* backend = 0l, bool handlesync = true);
79 ~OContactAccess (); 79 ~OPimContactAccess ();
80 80
81 /** Constants for query. 81 /** Constants for query.
@@ -136,11 +136,11 @@ class OContactAccess: public QObject, public OPimAccessTemplate<OContact>
136 * @see reload() 136 * @see reload()
137 */ 137 */
138 void signalChanged ( const OContactAccess *which ); 138 void signalChanged ( const OPimContactAccess *which );
139 139
140 140
141 private: 141 private:
142 // class OContactAccessPrivate; 142 // class OPimContactAccessPrivate;
143 // OContactAccessPrivate* d; 143 // OPimContactAccessPrivate* d;
144 OContactAccessBackend *m_backEnd; 144 OPimContactAccessBackend *m_backEnd;
145 bool m_loading:1; 145 bool m_loading:1;
146 146
diff --git a/libopie2/opiepim/core/odatebookaccess.cpp b/libopie2/opiepim/core/odatebookaccess.cpp
index 8c527f6..ac310c1 100644
--- a/libopie2/opiepim/core/odatebookaccess.cpp
+++ b/libopie2/opiepim/core/odatebookaccess.cpp
@@ -39,5 +39,5 @@ namespace Opie {
39 */ 39 */
40ODateBookAccess::ODateBookAccess( ODateBookAccessBackend* back, enum Access ac ) 40ODateBookAccess::ODateBookAccess( ODateBookAccessBackend* back, enum Access ac )
41 : OPimAccessTemplate<OEvent>( back ) 41 : OPimAccessTemplate<OPimEvent>( back )
42{ 42{
43 if (!back ) 43 if (!back )
diff --git a/libopie2/opiepim/core/odatebookaccess.h b/libopie2/opiepim/core/odatebookaccess.h
index 38dc754..6c9290f 100644
--- a/libopie2/opiepim/core/odatebookaccess.h
+++ b/libopie2/opiepim/core/odatebookaccess.h
@@ -33,5 +33,5 @@
33#include "opimaccesstemplate.h" 33#include "opimaccesstemplate.h"
34 34
35#include <opie2/oevent.h> 35#include <opie2/opimevent.h>
36 36
37namespace Opie { 37namespace Opie {
@@ -45,5 +45,5 @@ namespace Opie {
45 * @author Holger Freyther, Stefan Eilers 45 * @author Holger Freyther, Stefan Eilers
46 */ 46 */
47class ODateBookAccess : public OPimAccessTemplate<OEvent> { 47class ODateBookAccess : public OPimAccessTemplate<OPimEvent> {
48public: 48public:
49 ODateBookAccess( ODateBookAccessBackend* = 0l, enum Access acc = Random ); 49 ODateBookAccess( ODateBookAccessBackend* = 0l, enum Access acc = Random );
diff --git a/libopie2/opiepim/core/opimaccesstemplate.h b/libopie2/opiepim/core/opimaccesstemplate.h
index 5826cbc..f1bcc44 100644
--- a/libopie2/opiepim/core/opimaccesstemplate.h
+++ b/libopie2/opiepim/core/opimaccesstemplate.h
@@ -34,8 +34,8 @@
34#include <opie2/opimrecord.h> 34#include <opie2/opimrecord.h>
35#include <opie2/opimaccessbackend.h> 35#include <opie2/opimaccessbackend.h>
36#include <opie2/orecordlist.h> 36#include <opie2/opimrecordlist.h>
37 37
38#include <opie2/opimcache.h> 38#include <opie2/opimcache.h>
39#include <opie2/otemplatebase.h> 39#include <opie2/opimtemplatebase.h>
40 40
41namespace Opie { 41namespace Opie {
@@ -58,5 +58,5 @@ public:
58 SortedAccess 58 SortedAccess
59 }; 59 };
60 typedef ORecordList<T> List; 60 typedef OPimRecordList<T> List;
61 typedef OPimAccessBackend<T> BackEnd; 61 typedef OPimAccessBackend<T> BackEnd;
62 typedef OPimCache<T> Cache; 62 typedef OPimCache<T> Cache;
diff --git a/libopie2/opiepim/ocontact.cpp b/libopie2/opiepim/core/opimcontact.cpp
index fa5313f..a5df597 100644
--- a/libopie2/opiepim/ocontact.cpp
+++ b/libopie2/opiepim/core/opimcontact.cpp
@@ -30,9 +30,9 @@
30#define QTOPIA_INTERNAL_CONTACT_MRE 30#define QTOPIA_INTERNAL_CONTACT_MRE
31 31
32#include "ocontact.h" 32#include "opimcontact.h"
33 33
34/* OPIE */ 34/* OPIE */
35#include <opie2/opimresolver.h> 35#include <opie2/opimresolver.h>
36#include <opie2/oconversion.h> 36#include <opie2/opimdateconversion.h>
37#include <qpe/stringutil.h> 37#include <qpe/stringutil.h>
38#include <qpe/timestring.h> 38#include <qpe/timestring.h>
@@ -66,5 +66,5 @@ namespace Opie
66 Creates a new, empty contact. 66 Creates a new, empty contact.
67*/ 67*/
68OContact::OContact():OPimRecord(), mMap(), d( 0 ) 68OPimContact::OPimContact():OPimRecord(), mMap(), d( 0 )
69{} 69{}
70 70
@@ -74,5 +74,5 @@ OContact::OContact():OPimRecord(), mMap(), d( 0 )
74 set from \a fromMap. 74 set from \a fromMap.
75*/ 75*/
76OContact::OContact( const QMap<int, QString> &fromMap ):OPimRecord(), mMap( fromMap ), d( 0 ) 76OPimContact::OPimContact( const QMap<int, QString> &fromMap ):OPimRecord(), mMap( fromMap ), d( 0 )
77{ 77{
78 QString cats = mMap[ Qtopia::AddressCategory ]; 78 QString cats = mMap[ Qtopia::AddressCategory ];
@@ -97,335 +97,335 @@ OContact::OContact( const QMap<int, QString> &fromMap ):OPimRecord(), mMap( from
97 Destroys a contact. 97 Destroys a contact.
98*/ 98*/
99OContact::~OContact() 99OPimContact::~OPimContact()
100{} 100{}
101 101
102/*! \fn void OContact::setTitle( const QString &str ) 102/*! \fn void OPimContact::setTitle( const QString &str )
103 Sets the title of the contact to \a str. 103 Sets the title of the contact to \a str.
104*/ 104*/
105 105
106/*! \fn void OContact::setFirstName( const QString &str ) 106/*! \fn void OPimContact::setFirstName( const QString &str )
107 Sets the first name of the contact to \a str. 107 Sets the first name of the contact to \a str.
108*/ 108*/
109 109
110/*! \fn void OContact::setMiddleName( const QString &str ) 110/*! \fn void OPimContact::setMiddleName( const QString &str )
111 Sets the middle name of the contact to \a str. 111 Sets the middle name of the contact to \a str.
112*/ 112*/
113 113
114/*! \fn void OContact::setLastName( const QString &str ) 114/*! \fn void OPimContact::setLastName( const QString &str )
115 Sets the last name of the contact to \a str. 115 Sets the last name of the contact to \a str.
116*/ 116*/
117 117
118/*! \fn void OContact::setSuffix( const QString &str ) 118/*! \fn void OPimContact::setSuffix( const QString &str )
119 Sets the suffix of the contact to \a str. 119 Sets the suffix of the contact to \a str.
120*/ 120*/
121 121
122/*! \fn void OContact::setFileAs( const QString &str ) 122/*! \fn void OPimContact::setFileAs( const QString &str )
123 Sets the contact to filed as \a str. 123 Sets the contact to filed as \a str.
124*/ 124*/
125 125
126/*! \fn void OContact::setDefaultEmail( const QString &str ) 126/*! \fn void OPimContact::setDefaultEmail( const QString &str )
127 Sets the default email of the contact to \a str. 127 Sets the default email of the contact to \a str.
128*/ 128*/
129 129
130/*! \fn void OContact::setHomeStreet( const QString &str ) 130/*! \fn void OPimContact::setHomeStreet( const QString &str )
131 Sets the home street address of the contact to \a str. 131 Sets the home street address of the contact to \a str.
132*/ 132*/
133 133
134/*! \fn void OContact::setHomeCity( const QString &str ) 134/*! \fn void OPimContact::setHomeCity( const QString &str )
135 Sets the home city of the contact to \a str. 135 Sets the home city of the contact to \a str.
136*/ 136*/
137 137
138/*! \fn void OContact::setHomeState( const QString &str ) 138/*! \fn void OPimContact::setHomeState( const QString &str )
139 Sets the home state of the contact to \a str. 139 Sets the home state of the contact to \a str.
140*/ 140*/
141 141
142/*! \fn void OContact::setHomeZip( const QString &str ) 142/*! \fn void OPimContact::setHomeZip( const QString &str )
143 Sets the home zip code of the contact to \a str. 143 Sets the home zip code of the contact to \a str.
144*/ 144*/
145 145
146/*! \fn void OContact::setHomeCountry( const QString &str ) 146/*! \fn void OPimContact::setHomeCountry( const QString &str )
147 Sets the home country of the contact to \a str. 147 Sets the home country of the contact to \a str.
148*/ 148*/
149 149
150/*! \fn void OContact::setHomePhone( const QString &str ) 150/*! \fn void OPimContact::setHomePhone( const QString &str )
151 Sets the home phone number of the contact to \a str. 151 Sets the home phone number of the contact to \a str.
152*/ 152*/
153 153
154/*! \fn void OContact::setHomeFax( const QString &str ) 154/*! \fn void OPimContact::setHomeFax( const QString &str )
155 Sets the home fax number of the contact to \a str. 155 Sets the home fax number of the contact to \a str.
156*/ 156*/
157 157
158/*! \fn void OContact::setHomeMobile( const QString &str ) 158/*! \fn void OPimContact::setHomeMobile( const QString &str )
159 Sets the home mobile phone number of the contact to \a str. 159 Sets the home mobile phone number of the contact to \a str.
160*/ 160*/
161 161
162/*! \fn void OContact::setHomeWebpage( const QString &str ) 162/*! \fn void OPimContact::setHomeWebpage( const QString &str )
163 Sets the home webpage of the contact to \a str. 163 Sets the home webpage of the contact to \a str.
164*/ 164*/
165 165
166/*! \fn void OContact::setCompany( const QString &str ) 166/*! \fn void OPimContact::setCompany( const QString &str )
167 Sets the company for contact to \a str. 167 Sets the company for contact to \a str.
168*/ 168*/
169 169
170/*! \fn void OContact::setJobTitle( const QString &str ) 170/*! \fn void OPimContact::setJobTitle( const QString &str )
171 Sets the job title of the contact to \a str. 171 Sets the job title of the contact to \a str.
172*/ 172*/
173 173
174/*! \fn void OContact::setDepartment( const QString &str ) 174/*! \fn void OPimContact::setDepartment( const QString &str )
175 Sets the department for contact to \a str. 175 Sets the department for contact to \a str.
176*/ 176*/
177 177
178/*! \fn void OContact::setOffice( const QString &str ) 178/*! \fn void OPimContact::setOffice( const QString &str )
179 Sets the office for contact to \a str. 179 Sets the office for contact to \a str.
180*/ 180*/
181 181
182/*! \fn void OContact::setBusinessStreet( const QString &str ) 182/*! \fn void OPimContact::setBusinessStreet( const QString &str )
183 Sets the business street address of the contact to \a str. 183 Sets the business street address of the contact to \a str.
184*/ 184*/
185 185
186/*! \fn void OContact::setBusinessCity( const QString &str ) 186/*! \fn void OPimContact::setBusinessCity( const QString &str )
187 Sets the business city of the contact to \a str. 187 Sets the business city of the contact to \a str.
188*/ 188*/
189 189
190/*! \fn void OContact::setBusinessState( const QString &str ) 190/*! \fn void OPimContact::setBusinessState( const QString &str )
191 Sets the business state of the contact to \a str. 191 Sets the business state of the contact to \a str.
192*/ 192*/
193 193
194/*! \fn void OContact::setBusinessZip( const QString &str ) 194/*! \fn void OPimContact::setBusinessZip( const QString &str )
195 Sets the business zip code of the contact to \a str. 195 Sets the business zip code of the contact to \a str.
196*/ 196*/
197 197
198/*! \fn void OContact::setBusinessCountry( const QString &str ) 198/*! \fn void OPimContact::setBusinessCountry( const QString &str )
199 Sets the business country of the contact to \a str. 199 Sets the business country of the contact to \a str.
200*/ 200*/
201 201
202/*! \fn void OContact::setBusinessPhone( const QString &str ) 202/*! \fn void OPimContact::setBusinessPhone( const QString &str )
203 Sets the business phone number of the contact to \a str. 203 Sets the business phone number of the contact to \a str.
204*/ 204*/
205 205
206/*! \fn void OContact::setBusinessFax( const QString &str ) 206/*! \fn void OPimContact::setBusinessFax( const QString &str )
207 Sets the business fax number of the contact to \a str. 207 Sets the business fax number of the contact to \a str.
208*/ 208*/
209 209
210/*! \fn void OContact::setBusinessMobile( const QString &str ) 210/*! \fn void OPimContact::setBusinessMobile( const QString &str )
211 Sets the business mobile phone number of the contact to \a str. 211 Sets the business mobile phone number of the contact to \a str.
212*/ 212*/
213 213
214/*! \fn void OContact::setBusinessPager( const QString &str ) 214/*! \fn void OPimContact::setBusinessPager( const QString &str )
215 Sets the business pager number of the contact to \a str. 215 Sets the business pager number of the contact to \a str.
216*/ 216*/
217 217
218/*! \fn void OContact::setBusinessWebpage( const QString &str ) 218/*! \fn void OPimContact::setBusinessWebpage( const QString &str )
219 Sets the business webpage of the contact to \a str. 219 Sets the business webpage of the contact to \a str.
220*/ 220*/
221 221
222/*! \fn void OContact::setProfession( const QString &str ) 222/*! \fn void OPimContact::setProfession( const QString &str )
223 Sets the profession of the contact to \a str. 223 Sets the profession of the contact to \a str.
224*/ 224*/
225 225
226/*! \fn void OContact::setAssistant( const QString &str ) 226/*! \fn void OPimContact::setAssistant( const QString &str )
227 Sets the assistant of the contact to \a str. 227 Sets the assistant of the contact to \a str.
228*/ 228*/
229 229
230/*! \fn void OContact::setManager( const QString &str ) 230/*! \fn void OPimContact::setManager( const QString &str )
231 Sets the manager of the contact to \a str. 231 Sets the manager of the contact to \a str.
232*/ 232*/
233 233
234/*! \fn void OContact::setSpouse( const QString &str ) 234/*! \fn void OPimContact::setSpouse( const QString &str )
235 Sets the spouse of the contact to \a str. 235 Sets the spouse of the contact to \a str.
236*/ 236*/
237 237
238/*! \fn void OContact::setGender( const QString &str ) 238/*! \fn void OPimContact::setGender( const QString &str )
239 Sets the gender of the contact to \a str. 239 Sets the gender of the contact to \a str.
240*/ 240*/
241 241
242/*! \fn void OContact::setNickname( const QString &str ) 242/*! \fn void OPimContact::setNickname( const QString &str )
243 Sets the nickname of the contact to \a str. 243 Sets the nickname of the contact to \a str.
244*/ 244*/
245 245
246/*! \fn void OContact::setNotes( const QString &str ) 246/*! \fn void OPimContact::setNotes( const QString &str )
247 Sets the notes about the contact to \a str. 247 Sets the notes about the contact to \a str.
248*/ 248*/
249 249
250/*! \fn QString OContact::title() const 250/*! \fn QString OPimContact::title() const
251 Returns the title of the contact. 251 Returns the title of the contact.
252*/ 252*/
253 253
254/*! \fn QString OContact::firstName() const 254/*! \fn QString OPimContact::firstName() const
255 Returns the first name of the contact. 255 Returns the first name of the contact.
256*/ 256*/
257 257
258/*! \fn QString OContact::middleName() const 258/*! \fn QString OPimContact::middleName() const
259 Returns the middle name of the contact. 259 Returns the middle name of the contact.
260*/ 260*/
261 261
262/*! \fn QString OContact::lastName() const 262/*! \fn QString OPimContact::lastName() const
263 Returns the last name of the contact. 263 Returns the last name of the contact.
264*/ 264*/
265 265
266/*! \fn QString OContact::suffix() const 266/*! \fn QString OPimContact::suffix() const
267 Returns the suffix of the contact. 267 Returns the suffix of the contact.
268*/ 268*/
269 269
270/*! \fn QString OContact::fileAs() const 270/*! \fn QString OPimContact::fileAs() const
271 Returns the string the contact is filed as. 271 Returns the string the contact is filed as.
272*/ 272*/
273 273
274/*! \fn QString OContact::defaultEmail() const 274/*! \fn QString OPimContact::defaultEmail() const
275 Returns the default email address of the contact. 275 Returns the default email address of the contact.
276*/ 276*/
277 277
278/*! \fn QString OContact::emails() const 278/*! \fn QString OPimContact::emails() const
279 Returns the list of email address for a contact separated by ';'s in a single 279 Returns the list of email address for a contact separated by ';'s in a single
280 string. 280 string.
281*/ 281*/
282 282
283/*! \fn QString OContact::homeStreet() const 283/*! \fn QString OPimContact::homeStreet() const
284 Returns the home street address of the contact. 284 Returns the home street address of the contact.
285*/ 285*/
286 286
287/*! \fn QString OContact::homeCity() const 287/*! \fn QString OPimContact::homeCity() const
288 Returns the home city of the contact. 288 Returns the home city of the contact.
289*/ 289*/
290 290
291/*! \fn QString OContact::homeState() const 291/*! \fn QString OPimContact::homeState() const
292 Returns the home state of the contact. 292 Returns the home state of the contact.
293*/ 293*/
294 294
295/*! \fn QString OContact::homeZip() const 295/*! \fn QString OPimContact::homeZip() const
296 Returns the home zip of the contact. 296 Returns the home zip of the contact.
297*/ 297*/
298 298
299/*! \fn QString OContact::homeCountry() const 299/*! \fn QString OPimContact::homeCountry() const
300 Returns the home country of the contact. 300 Returns the home country of the contact.
301*/ 301*/
302 302
303/*! \fn QString OContact::homePhone() const 303/*! \fn QString OPimContact::homePhone() const
304 Returns the home phone number of the contact. 304 Returns the home phone number of the contact.
305*/ 305*/
306 306
307/*! \fn QString OContact::homeFax() const 307/*! \fn QString OPimContact::homeFax() const
308 Returns the home fax number of the contact. 308 Returns the home fax number of the contact.
309*/ 309*/
310 310
311/*! \fn QString OContact::homeMobile() const 311/*! \fn QString OPimContact::homeMobile() const
312 Returns the home mobile number of the contact. 312 Returns the home mobile number of the contact.
313*/ 313*/
314 314
315/*! \fn QString OContact::homeWebpage() const 315/*! \fn QString OPimContact::homeWebpage() const
316 Returns the home webpage of the contact. 316 Returns the home webpage of the contact.
317*/ 317*/
318 318
319/*! \fn QString OContact::company() const 319/*! \fn QString OPimContact::company() const
320 Returns the company for the contact. 320 Returns the company for the contact.
321*/ 321*/
322 322
323/*! \fn QString OContact::department() const 323/*! \fn QString OPimContact::department() const
324 Returns the department for the contact. 324 Returns the department for the contact.
325*/ 325*/
326 326
327/*! \fn QString OContact::office() const 327/*! \fn QString OPimContact::office() const
328 Returns the office for the contact. 328 Returns the office for the contact.
329*/ 329*/
330 330
331/*! \fn QString OContact::jobTitle() const 331/*! \fn QString OPimContact::jobTitle() const
332 Returns the job title of the contact. 332 Returns the job title of the contact.
333*/ 333*/
334 334
335/*! \fn QString OContact::profession() const 335/*! \fn QString OPimContact::profession() const
336 Returns the profession of the contact. 336 Returns the profession of the contact.
337*/ 337*/
338 338
339/*! \fn QString OContact::assistant() const 339/*! \fn QString OPimContact::assistant() const
340 Returns the assistant of the contact. 340 Returns the assistant of the contact.
341*/ 341*/
342 342
343/*! \fn QString OContact::manager() const 343/*! \fn QString OPimContact::manager() const
344 Returns the manager of the contact. 344 Returns the manager of the contact.
345*/ 345*/
346 346
347/*! \fn QString OContact::businessStreet() const 347/*! \fn QString OPimContact::businessStreet() const
348 Returns the business street address of the contact. 348 Returns the business street address of the contact.
349*/ 349*/
350 350
351/*! \fn QString OContact::businessCity() const 351/*! \fn QString OPimContact::businessCity() const
352 Returns the business city of the contact. 352 Returns the business city of the contact.
353*/ 353*/
354 354
355/*! \fn QString OContact::businessState() const 355/*! \fn QString OPimContact::businessState() const
356 Returns the business state of the contact. 356 Returns the business state of the contact.
357*/ 357*/
358 358
359/*! \fn QString OContact::businessZip() const 359/*! \fn QString OPimContact::businessZip() const
360 Returns the business zip of the contact. 360 Returns the business zip of the contact.
361*/ 361*/
362 362
363/*! \fn QString OContact::businessCountry() const 363/*! \fn QString OPimContact::businessCountry() const
364 Returns the business country of the contact. 364 Returns the business country of the contact.
365*/ 365*/
366 366
367/*! \fn QString OContact::businessPhone() const 367/*! \fn QString OPimContact::businessPhone() const
368 Returns the business phone number of the contact. 368 Returns the business phone number of the contact.
369*/ 369*/
370 370
371/*! \fn QString OContact::businessFax() const 371/*! \fn QString OPimContact::businessFax() const
372 Returns the business fax number of the contact. 372 Returns the business fax number of the contact.
373*/ 373*/
374 374
375/*! \fn QString OContact::businessMobile() const 375/*! \fn QString OPimContact::businessMobile() const
376 Returns the business mobile number of the contact. 376 Returns the business mobile number of the contact.
377*/ 377*/
378 378
379/*! \fn QString OContact::businessPager() const 379/*! \fn QString OPimContact::businessPager() const
380 Returns the business pager number of the contact. 380 Returns the business pager number of the contact.
381*/ 381*/
382 382
383/*! \fn QString OContact::businessWebpage() const 383/*! \fn QString OPimContact::businessWebpage() const
384 Returns the business webpage of the contact. 384 Returns the business webpage of the contact.
385*/ 385*/
386 386
387/*! \fn QString OContact::spouse() const 387/*! \fn QString OPimContact::spouse() const
388 Returns the spouse of the contact. 388 Returns the spouse of the contact.
389*/ 389*/
390 390
391/*! \fn QString OContact::gender() const 391/*! \fn QString OPimContact::gender() const
392 Returns the gender of the contact. 392 Returns the gender of the contact.
393*/ 393*/
394 394
395/*! \fn QString OContact::nickname() const 395/*! \fn QString OPimContact::nickname() const
396 Returns the nickname of the contact. 396 Returns the nickname of the contact.
397*/ 397*/
398 398
399/*! \fn QString OContact::children() const 399/*! \fn QString OPimContact::children() const
400 Returns the children of the contact. 400 Returns the children of the contact.
401*/ 401*/
402 402
403/*! \fn QString OContact::notes() const 403/*! \fn QString OPimContact::notes() const
404 Returns the notes relating to the the contact. 404 Returns the notes relating to the the contact.
405*/ 405*/
406 406
407/*! \fn QString OContact::groups() const 407/*! \fn QString OPimContact::groups() const
408 \internal 408 \internal
409 Returns the groups for the contact. 409 Returns the groups for the contact.
410*/ 410*/
411 411
412/*! \fn QStringList OContact::groupList() const 412/*! \fn QStringList OPimContact::groupList() const
413 \internal 413 \internal
414*/ 414*/
415 415
416/*! \fn QString OContact::field(int) const 416/*! \fn QString OPimContact::field(int) const
417 \internal 417 \internal
418*/ 418*/
419 419
420/*! \fn void OContact::saveJournal( journal_action, const QString & = QString::null ) 420/*! \fn void OPimContact::saveJournal( journal_action, const QString & = QString::null )
421 \internal 421 \internal
422*/ 422*/
423 423
424/*! \fn void OContact::setUid( int id ) 424/*! \fn void OPimContact::setUid( int id )
425 \internal 425 \internal
426 Sets the uid for this record to \a id. 426 Sets the uid for this record to \a id.
427*/ 427*/
428 428
429/*! \enum OContact::journal_action 429/*! \enum OPimContact::journal_action
430 \internal 430 \internal
431*/ 431*/
@@ -434,5 +434,5 @@ OContact::~OContact()
434 \internal 434 \internal
435*/ 435*/
436QMap<int, QString> OContact::toMap() const 436QMap<int, QString> OPimContact::toMap() const
437{ 437{
438 QMap<int, QString> map = mMap; 438 QMap<int, QString> map = mMap;
@@ -446,5 +446,5 @@ QMap<int, QString> OContact::toMap() const
446 Returns a rich text formatted QString representing the contents the contact. 446 Returns a rich text formatted QString representing the contents the contact.
447*/ 447*/
448QString OContact::toRichText() const 448QString OPimContact::toRichText() const
449{ 449{
450 QString text; 450 QString text;
@@ -781,5 +781,5 @@ QString OContact::toRichText() const
781 \internal 781 \internal
782*/ 782*/
783void OContact::insert( int key, const QString &v ) 783void OPimContact::insert( int key, const QString &v )
784{ 784{
785 QString value = v.stripWhiteSpace(); 785 QString value = v.stripWhiteSpace();
@@ -793,5 +793,5 @@ void OContact::insert( int key, const QString &v )
793 \internal 793 \internal
794*/ 794*/
795void OContact::replace( int key, const QString & v ) 795void OPimContact::replace( int key, const QString & v )
796{ 796{
797 QString value = v.stripWhiteSpace(); 797 QString value = v.stripWhiteSpace();
@@ -805,5 +805,5 @@ void OContact::replace( int key, const QString & v )
805 \internal 805 \internal
806*/ 806*/
807QString OContact::find( int key ) const 807QString OPimContact::find( int key ) const
808{ 808{
809 return mMap[ key ]; 809 return mMap[ key ];
@@ -813,5 +813,5 @@ QString OContact::find( int key ) const
813 \internal 813 \internal
814*/ 814*/
815QString OContact::displayAddress( const QString &street, 815QString OPimContact::displayAddress( const QString &street,
816 const QString &city, 816 const QString &city,
817 const QString &state, 817 const QString &state,
@@ -838,5 +838,5 @@ QString OContact::displayAddress( const QString &street,
838 \internal 838 \internal
839*/ 839*/
840QString OContact::displayBusinessAddress() const 840QString OPimContact::displayBusinessAddress() const
841{ 841{
842 return displayAddress( businessStreet(), businessCity(), 842 return displayAddress( businessStreet(), businessCity(),
@@ -848,5 +848,5 @@ QString OContact::displayBusinessAddress() const
848 \internal 848 \internal
849*/ 849*/
850QString OContact::displayHomeAddress() const 850QString OPimContact::displayHomeAddress() const
851{ 851{
852 return displayAddress( homeStreet(), homeCity(), 852 return displayAddress( homeStreet(), homeCity(),
@@ -858,5 +858,5 @@ QString OContact::displayHomeAddress() const
858 Returns the full name of the contact 858 Returns the full name of the contact
859*/ 859*/
860QString OContact::fullName() const 860QString OPimContact::fullName() const
861{ 861{
862 QString title = find( Qtopia::Title ); 862 QString title = find( Qtopia::Title );
@@ -897,10 +897,10 @@ QString OContact::fullName() const
897 Returns a list of the names of the children of the contact. 897 Returns a list of the names of the children of the contact.
898*/ 898*/
899QStringList OContact::childrenList() const 899QStringList OPimContact::childrenList() const
900{ 900{
901 return QStringList::split( " ", find( Qtopia::Children ) ); 901 return QStringList::split( " ", find( Qtopia::Children ) );
902} 902}
903 903
904/*! \fn void OContact::insertEmail( const QString &email ) 904/*! \fn void OPimContact::insertEmail( const QString &email )
905 905
906 Insert \a email into the email list. Ensures \a email can only be added 906 Insert \a email into the email list. Ensures \a email can only be added
@@ -908,5 +908,5 @@ QStringList OContact::childrenList() const
908*/ 908*/
909 909
910/*! \fn void OContact::removeEmail( const QString &email ) 910/*! \fn void OPimContact::removeEmail( const QString &email )
911 911
912 Removes the \a email from the email list. If the default email was \a email, 912 Removes the \a email from the email list. If the default email was \a email,
@@ -915,10 +915,10 @@ QStringList OContact::childrenList() const
915*/ 915*/
916 916
917/*! \fn void OContact::clearEmails() 917/*! \fn void OPimContact::clearEmails()
918 918
919 Clears the email list. 919 Clears the email list.
920 */ 920 */
921 921
922/*! \fn void OContact::insertEmails( const QStringList &emailList ) 922/*! \fn void OPimContact::insertEmails( const QStringList &emailList )
923 923
924 Appends the \a emailList to the exiting email list 924 Appends the \a emailList to the exiting email list
@@ -929,5 +929,5 @@ QStringList OContact::childrenList() const
929 the default email address. 929 the default email address.
930*/ 930*/
931QStringList OContact::emailList() const 931QStringList OPimContact::emailList() const
932{ 932{
933 QString emailStr = emails(); 933 QString emailStr = emails();
@@ -951,5 +951,5 @@ QStringList OContact::emailList() const
951 middle and last name of the contact. 951 middle and last name of the contact.
952*/ 952*/
953void OContact::setFileAs() 953void OPimContact::setFileAs()
954{ 954{
955 QString lastName, firstName, middleName, fileas; 955 QString lastName, firstName, middleName, fileas;
@@ -976,5 +976,5 @@ void OContact::setFileAs()
976 Appends the contact information to \a buf. 976 Appends the contact information to \a buf.
977*/ 977*/
978void OContact::save( QString &buf ) const 978void OPimContact::save( QString &buf ) const
979{ 979{
980 static const QStringList SLFIELDS = fields(); 980 static const QStringList SLFIELDS = fields();
@@ -1009,5 +1009,5 @@ void OContact::save( QString &buf ) const
1009 enum AddressBookFields !! 1009 enum AddressBookFields !!
1010*/ 1010*/
1011QStringList OContact::fields() 1011QStringList OPimContact::fields()
1012{ 1012{
1013 QStringList list; 1013 QStringList list;
@@ -1072,5 +1072,5 @@ QStringList OContact::fields()
1072 Email address should be separated by ';'s. 1072 Email address should be separated by ';'s.
1073*/ 1073*/
1074void OContact::setEmails( const QString &str ) 1074void OPimContact::setEmails( const QString &str )
1075{ 1075{
1076 replace( Qtopia::Emails, str ); 1076 replace( Qtopia::Emails, str );
@@ -1082,5 +1082,5 @@ void OContact::setEmails( const QString &str )
1082 Sets the list of children for the contact to those contained in \a str. 1082 Sets the list of children for the contact to those contained in \a str.
1083*/ 1083*/
1084void OContact::setChildren( const QString &str ) 1084void OPimContact::setChildren( const QString &str )
1085{ 1085{
1086 replace( Qtopia::Children, str ); 1086 replace( Qtopia::Children, str );
@@ -1092,5 +1092,5 @@ void OContact::setChildren( const QString &str )
1092 Otherwise returns FALSE. 1092 Otherwise returns FALSE.
1093*/ 1093*/
1094bool OContact::match( const QRegExp &r ) const 1094bool OPimContact::match( const QRegExp &r ) const
1095{ 1095{
1096 setLastHitField( -1 ); 1096 setLastHitField( -1 );
@@ -1111,5 +1111,5 @@ bool OContact::match( const QRegExp &r ) const
1111 1111
1112 1112
1113QString OContact::toShortText() const 1113QString OPimContact::toShortText() const
1114{ 1114{
1115 return ( fullName() ); 1115 return ( fullName() );
@@ -1117,11 +1117,11 @@ QString OContact::toShortText() const
1117 1117
1118 1118
1119QString OContact::type() const 1119QString OPimContact::type() const
1120{ 1120{
1121 return QString::fromLatin1( "OContact" ); 1121 return QString::fromLatin1( "OPimContact" );
1122} 1122}
1123 1123
1124 1124
1125class QString OContact::recordField( int pos ) const 1125class QString OPimContact::recordField( int pos ) const
1126{ 1126{
1127 QStringList SLFIELDS = fields(); // ?? why this ? (se) 1127 QStringList SLFIELDS = fields(); // ?? why this ? (se)
@@ -1133,9 +1133,9 @@ class QString OContact::recordField( int pos ) const
1133// QString is always too complicate to interprete (DD.MM.YY, DD/MM/YY, MM/DD/YY, etc..)(se) 1133// QString is always too complicate to interprete (DD.MM.YY, DD/MM/YY, MM/DD/YY, etc..)(se)
1134 1134
1135/*! \fn void OContact::setBirthday( const QDate& date ) 1135/*! \fn void OPimContact::setBirthday( const QDate& date )
1136 Sets the birthday for the contact to \a date. If date is null 1136 Sets the birthday for the contact to \a date. If date is null
1137 the current stored date will be removed. 1137 the current stored date will be removed.
1138*/ 1138*/
1139void OContact::setBirthday( const QDate &v ) 1139void OPimContact::setBirthday( const QDate &v )
1140{ 1140{
1141 if ( v.isNull() ) 1141 if ( v.isNull() )
@@ -1147,14 +1147,14 @@ void OContact::setBirthday( const QDate &v )
1147 1147
1148 if ( v.isValid() ) 1148 if ( v.isValid() )
1149 replace( Qtopia::Birthday, OConversion::dateToString( v ) ); 1149 replace( Qtopia::Birthday, OPimDateConversion::dateToString( v ) );
1150 1150
1151} 1151}
1152 1152
1153 1153
1154/*! \fn void OContact::setAnniversary( const QDate &date ) 1154/*! \fn void OPimContact::setAnniversary( const QDate &date )
1155 Sets the anniversary of the contact to \a date. If date is 1155 Sets the anniversary of the contact to \a date. If date is
1156 null, the current stored date will be removed. 1156 null, the current stored date will be removed.
1157*/ 1157*/
1158void OContact::setAnniversary( const QDate &v ) 1158void OPimContact::setAnniversary( const QDate &v )
1159{ 1159{
1160 if ( v.isNull() ) 1160 if ( v.isNull() )
@@ -1166,17 +1166,17 @@ void OContact::setAnniversary( const QDate &v )
1166 1166
1167 if ( v.isValid() ) 1167 if ( v.isValid() )
1168 replace( Qtopia::Anniversary, OConversion::dateToString( v ) ); 1168 replace( Qtopia::Anniversary, OPimDateConversion::dateToString( v ) );
1169} 1169}
1170 1170
1171 1171
1172/*! \fn QDate OContact::birthday() const 1172/*! \fn QDate OPimContact::birthday() const
1173 Returns the birthday of the contact. 1173 Returns the birthday of the contact.
1174*/ 1174*/
1175QDate OContact::birthday() const 1175QDate OPimContact::birthday() const
1176{ 1176{
1177 QString str = find( Qtopia::Birthday ); 1177 QString str = find( Qtopia::Birthday );
1178 // qWarning ("Birthday %s", str.latin1() ); 1178 // qWarning ("Birthday %s", str.latin1() );
1179 if ( !str.isEmpty() ) 1179 if ( !str.isEmpty() )
1180 return OConversion::dateFromString ( str ); 1180 return OPimDateConversion::dateFromString ( str );
1181 else 1181 else
1182 return QDate(); 1182 return QDate();
@@ -1184,8 +1184,8 @@ QDate OContact::birthday() const
1184 1184
1185 1185
1186/*! \fn QDate OContact::anniversary() const 1186/*! \fn QDate OPimContact::anniversary() const
1187 Returns the anniversary of the contact. 1187 Returns the anniversary of the contact.
1188*/ 1188*/
1189QDate OContact::anniversary() const 1189QDate OPimContact::anniversary() const
1190{ 1190{
1191 QDate empty; 1191 QDate empty;
@@ -1193,5 +1193,5 @@ QDate OContact::anniversary() const
1193 // qWarning ("Anniversary %s", str.latin1() ); 1193 // qWarning ("Anniversary %s", str.latin1() );
1194 if ( !str.isEmpty() ) 1194 if ( !str.isEmpty() )
1195 return OConversion::dateFromString ( str ); 1195 return OPimDateConversion::dateFromString ( str );
1196 else 1196 else
1197 return empty; 1197 return empty;
@@ -1199,5 +1199,5 @@ QDate OContact::anniversary() const
1199 1199
1200 1200
1201void OContact::insertEmail( const QString &v ) 1201void OPimContact::insertEmail( const QString &v )
1202{ 1202{
1203 //qDebug("insertEmail %s", v.latin1()); 1203 //qDebug("insertEmail %s", v.latin1());
@@ -1223,5 +1223,5 @@ void OContact::insertEmail( const QString &v )
1223 1223
1224 1224
1225 void OContact::removeEmail( const QString &v ) 1225 void OPimContact::removeEmail( const QString &v )
1226{ 1226{
1227 QString e = v.simplifyWhiteSpace(); 1227 QString e = v.simplifyWhiteSpace();
@@ -1253,5 +1253,5 @@ void OContact::insertEmail( const QString &v )
1253 1253
1254 1254
1255void OContact::clearEmails() 1255void OPimContact::clearEmails()
1256{ 1256{
1257 mMap.remove( Qtopia::DefaultEmail ); 1257 mMap.remove( Qtopia::DefaultEmail );
@@ -1260,9 +1260,9 @@ void OContact::clearEmails()
1260 1260
1261 1261
1262void OContact::setDefaultEmail( const QString &v ) 1262void OPimContact::setDefaultEmail( const QString &v )
1263{ 1263{
1264 QString e = v.simplifyWhiteSpace(); 1264 QString e = v.simplifyWhiteSpace();
1265 1265
1266 //qDebug("OContact::setDefaultEmail %s", e.latin1()); 1266 //qDebug("OPimContact::setDefaultEmail %s", e.latin1());
1267 replace( Qtopia::DefaultEmail, e ); 1267 replace( Qtopia::DefaultEmail, e );
1268 1268
@@ -1273,5 +1273,5 @@ void OContact::setDefaultEmail( const QString &v )
1273 1273
1274 1274
1275void OContact::insertEmails( const QStringList &v ) 1275void OPimContact::insertEmails( const QStringList &v )
1276{ 1276{
1277 for ( QStringList::ConstIterator it = v.begin(); it != v.end(); ++it ) 1277 for ( QStringList::ConstIterator it = v.begin(); it != v.end(); ++it )
@@ -1280,5 +1280,5 @@ void OContact::insertEmails( const QStringList &v )
1280 1280
1281 1281
1282int OContact::rtti() 1282int OPimContact::rtti()
1283{ 1283{
1284 return OPimResolver::AddressBook; 1284 return OPimResolver::AddressBook;
@@ -1286,5 +1286,5 @@ int OContact::rtti()
1286 1286
1287 1287
1288void OContact::setUid( int i ) 1288void OPimContact::setUid( int i )
1289{ 1289{
1290 OPimRecord::setUid( i ); 1290 OPimRecord::setUid( i );
diff --git a/libopie2/opiepim/ocontact.h b/libopie2/opiepim/core/opimcontact.h
index 445fd7d..c08f7ed 100644
--- a/libopie2/opiepim/ocontact.h
+++ b/libopie2/opiepim/core/opimcontact.h
@@ -47,8 +47,8 @@ QPC_TEMPLATEEXTERN template class QPC_EXPORT QMap<int, QString>;
47namespace Opie 47namespace Opie
48{ 48{
49class OContactPrivate; 49class OPimContactPrivate;
50 50
51/** 51/**
52 * OContact class represents a specialised PIM Record for contacts. 52 * OPimContact class represents a specialised PIM Record for contacts.
53 * It does store all kind of persopn related information. 53 * It does store all kind of persopn related information.
54 * 54 *
@@ -56,12 +56,12 @@ class OContactPrivate;
56 * @author TT, Stefan Eiler, Holger Freyther 56 * @author TT, Stefan Eiler, Holger Freyther
57 */ 57 */
58class QPC_EXPORT OContact : public OPimRecord 58class QPC_EXPORT OPimContact : public OPimRecord
59{ 59{
60 friend class DataSet; 60 friend class DataSet;
61 61
62 public: 62 public:
63 OContact(); 63 OPimContact();
64 OContact( const QMap<int, QString> &fromMap ); 64 OPimContact( const QMap<int, QString> &fromMap );
65 virtual ~OContact(); 65 virtual ~OPimContact();
66 66
67 enum DateFormat{ 67 enum DateFormat{
@@ -233,5 +233,5 @@ class QPC_EXPORT OContact : public OPimRecord
233 private: 233 private:
234 // The XML Backend needs some access to the private functions 234 // The XML Backend needs some access to the private functions
235 friend class OContactAccessBackend_XML; 235 friend class OPimContactAccessBackend_XML;
236 236
237 void insert( int key, const QString &value ); 237 void insert( int key, const QString &value );
@@ -249,5 +249,5 @@ class QPC_EXPORT OContact : public OPimRecord
249 249
250 QMap<int, QString> mMap; 250 QMap<int, QString> mMap;
251 OContactPrivate *d; 251 OPimContactPrivate *d;
252}; 252};
253 253
diff --git a/libopie2/opiepim/ocontactfields.cpp b/libopie2/opiepim/core/opimcontactfields.cpp
index bec00f7..4b0ba3b 100644
--- a/libopie2/opiepim/ocontactfields.cpp
+++ b/libopie2/opiepim/core/opimcontactfields.cpp
@@ -28,8 +28,8 @@
28*/ 28*/
29 29
30#include "ocontactfields.h" 30#include "opimcontactfields.h"
31 31
32/* OPIE */ 32/* OPIE */
33#include <opie2/ocontact.h> 33#include <opie2/opimcontact.h>
34#include <qpe/recordfields.h> // We should use our own enum in the future .. 34#include <qpe/recordfields.h> // We should use our own enum in the future ..
35#include <qpe/config.h> 35#include <qpe/config.h>
@@ -46,5 +46,5 @@ namespace Opie
46 Returns a list of personal field names for a contact. 46 Returns a list of personal field names for a contact.
47*/ 47*/
48QStringList OContactFields::personalfields( bool sorted, bool translated ) 48QStringList OPimContactFields::personalfields( bool sorted, bool translated )
49{ 49{
50 QStringList list; 50 QStringList list;
@@ -80,5 +80,5 @@ QStringList OContactFields::personalfields( bool sorted, bool translated )
80 Returns a list of details field names for a contact. 80 Returns a list of details field names for a contact.
81*/ 81*/
82QStringList OContactFields::detailsfields( bool sorted, bool translated ) 82QStringList OPimContactFields::detailsfields( bool sorted, bool translated )
83{ 83{
84 QStringList list; 84 QStringList list;
@@ -109,5 +109,5 @@ QStringList OContactFields::detailsfields( bool sorted, bool translated )
109 Returns a list of phone field names for a contact. 109 Returns a list of phone field names for a contact.
110*/ 110*/
111QStringList OContactFields::phonefields( bool sorted, bool translated ) 111QStringList OPimContactFields::phonefields( bool sorted, bool translated )
112{ 112{
113 QStringList list; 113 QStringList list;
@@ -142,5 +142,5 @@ QStringList OContactFields::phonefields( bool sorted, bool translated )
142 Returns a list of field names for a contact. 142 Returns a list of field names for a contact.
143*/ 143*/
144QStringList OContactFields::fields( bool sorted, bool translated ) 144QStringList OPimContactFields::fields( bool sorted, bool translated )
145{ 145{
146 QStringList list; 146 QStringList list;
@@ -179,5 +179,5 @@ QStringList OContactFields::fields( bool sorted, bool translated )
179 Returns an untranslated list of personal field names for a contact. 179 Returns an untranslated list of personal field names for a contact.
180*/ 180*/
181QStringList OContactFields::untrpersonalfields( bool sorted ) 181QStringList OPimContactFields::untrpersonalfields( bool sorted )
182{ 182{
183 return personalfields( sorted, false ); 183 return personalfields( sorted, false );
@@ -189,5 +189,5 @@ QStringList OContactFields::untrpersonalfields( bool sorted )
189 Returns a translated list of personal field names for a contact. 189 Returns a translated list of personal field names for a contact.
190*/ 190*/
191QStringList OContactFields::trpersonalfields( bool sorted ) 191QStringList OPimContactFields::trpersonalfields( bool sorted )
192{ 192{
193 return personalfields( sorted, true ); 193 return personalfields( sorted, true );
@@ -199,5 +199,5 @@ QStringList OContactFields::trpersonalfields( bool sorted )
199 Returns an untranslated list of details field names for a contact. 199 Returns an untranslated list of details field names for a contact.
200*/ 200*/
201QStringList OContactFields::untrdetailsfields( bool sorted ) 201QStringList OPimContactFields::untrdetailsfields( bool sorted )
202{ 202{
203 return detailsfields( sorted, false ); 203 return detailsfields( sorted, false );
@@ -209,5 +209,5 @@ QStringList OContactFields::untrdetailsfields( bool sorted )
209 Returns a translated list of details field names for a contact. 209 Returns a translated list of details field names for a contact.
210*/ 210*/
211QStringList OContactFields::trdetailsfields( bool sorted ) 211QStringList OPimContactFields::trdetailsfields( bool sorted )
212{ 212{
213 return detailsfields( sorted, true ); 213 return detailsfields( sorted, true );
@@ -219,5 +219,5 @@ QStringList OContactFields::trdetailsfields( bool sorted )
219 Returns a translated list of phone field names for a contact. 219 Returns a translated list of phone field names for a contact.
220*/ 220*/
221QStringList OContactFields::trphonefields( bool sorted ) 221QStringList OPimContactFields::trphonefields( bool sorted )
222{ 222{
223 return phonefields( sorted, true ); 223 return phonefields( sorted, true );
@@ -228,5 +228,5 @@ QStringList OContactFields::trphonefields( bool sorted )
228 Returns an untranslated list of phone field names for a contact. 228 Returns an untranslated list of phone field names for a contact.
229*/ 229*/
230QStringList OContactFields::untrphonefields( bool sorted ) 230QStringList OPimContactFields::untrphonefields( bool sorted )
231{ 231{
232 return phonefields( sorted, false ); 232 return phonefields( sorted, false );
@@ -238,5 +238,5 @@ QStringList OContactFields::untrphonefields( bool sorted )
238 Returns a translated list of field names for a contact. 238 Returns a translated list of field names for a contact.
239*/ 239*/
240QStringList OContactFields::trfields( bool sorted ) 240QStringList OPimContactFields::trfields( bool sorted )
241{ 241{
242 return fields( sorted, true ); 242 return fields( sorted, true );
@@ -247,10 +247,10 @@ QStringList OContactFields::trfields( bool sorted )
247 Returns an untranslated list of field names for a contact. 247 Returns an untranslated list of field names for a contact.
248*/ 248*/
249QStringList OContactFields::untrfields( bool sorted ) 249QStringList OPimContactFields::untrfields( bool sorted )
250{ 250{
251 return fields( sorted, false ); 251 return fields( sorted, false );
252} 252}
253 253
254QMap<int, QString> OContactFields::idToTrFields() 254QMap<int, QString> OPimContactFields::idToTrFields()
255{ 255{
256 QMap<int, QString> ret_map; 256 QMap<int, QString> ret_map;
@@ -318,5 +318,5 @@ QMap<int, QString> OContactFields::idToTrFields()
318} 318}
319 319
320QMap<int, QString> OContactFields::idToUntrFields() 320QMap<int, QString> OPimContactFields::idToUntrFields()
321{ 321{
322 QMap<int, QString> ret_map; 322 QMap<int, QString> ret_map;
@@ -385,5 +385,5 @@ QMap<int, QString> OContactFields::idToUntrFields()
385} 385}
386 386
387QMap<QString, int> OContactFields::trFieldsToId() 387QMap<QString, int> OPimContactFields::trFieldsToId()
388{ 388{
389 QMap<int, QString> idtostr = idToTrFields(); 389 QMap<int, QString> idtostr = idToTrFields();
@@ -401,5 +401,5 @@ QMap<QString, int> OContactFields::trFieldsToId()
401/* ======================================================================= */ 401/* ======================================================================= */
402 402
403QMap<QString, int> OContactFields::untrFieldsToId() 403QMap<QString, int> OPimContactFields::untrFieldsToId()
404{ 404{
405 QMap<int, QString> idtostr = idToUntrFields(); 405 QMap<int, QString> idtostr = idToUntrFields();
@@ -416,5 +416,5 @@ QMap<QString, int> OContactFields::untrFieldsToId()
416 416
417 417
418OContactFields::OContactFields() : 418OPimContactFields::OPimContactFields() :
419 fieldOrder( DEFAULT_FIELD_ORDER ), 419 fieldOrder( DEFAULT_FIELD_ORDER ),
420 changedFieldOrder( false ) 420 changedFieldOrder( false )
@@ -427,5 +427,5 @@ OContactFields::OContactFields() :
427} 427}
428 428
429OContactFields::~OContactFields() 429OPimContactFields::~OPimContactFields()
430{ 430{
431 431
@@ -442,5 +442,5 @@ OContactFields::~OContactFields()
442 442
443 443
444void OContactFields::saveToRecord( OContact &cnt ) 444void OPimContactFields::saveToRecord( OPimContact &cnt )
445{ 445{
446 446
@@ -455,5 +455,5 @@ void OContactFields::saveToRecord( OContact &cnt )
455} 455}
456 456
457void OContactFields::loadFromRecord( const OContact &cnt ) 457void OPimContactFields::loadFromRecord( const OPimContact &cnt )
458{ 458{
459 qDebug( "ocontactfields loadFromRecord" ); 459 qDebug( "ocontactfields loadFromRecord" );
@@ -476,5 +476,5 @@ void OContactFields::loadFromRecord( const OContact &cnt )
476} 476}
477 477
478void OContactFields::setFieldOrder( int num, int index ) 478void OPimContactFields::setFieldOrder( int num, int index )
479{ 479{
480 qDebug( "qcontactfields setfieldorder pos %i -> %i", num, index ); 480 qDebug( "qcontactfields setfieldorder pos %i -> %i", num, index );
@@ -490,5 +490,5 @@ void OContactFields::setFieldOrder( int num, int index )
490} 490}
491 491
492int OContactFields::getFieldOrder( int num, int defIndex ) 492int OPimContactFields::getFieldOrder( int num, int defIndex )
493{ 493{
494 qDebug( "ocontactfields getFieldOrder" ); 494 qDebug( "ocontactfields getFieldOrder" );
diff --git a/libopie2/opiepim/ocontactfields.h b/libopie2/opiepim/core/opimcontactfields.h
index 9e89532..3aa3894 100644
--- a/libopie2/opiepim/ocontactfields.h
+++ b/libopie2/opiepim/core/opimcontactfields.h
@@ -34,5 +34,5 @@ class QStringList;
34 34
35/* OPIE */ 35/* OPIE */
36#include <opie2/ocontact.h> 36#include <opie2/opimcontact.h>
37 37
38/* QT */ 38/* QT */
@@ -45,10 +45,10 @@ class QStringList;
45namespace Opie 45namespace Opie
46{ 46{
47class OContactFields 47class OPimContactFields
48{ 48{
49 49
50 public: 50 public:
51 OContactFields(); 51 OPimContactFields();
52 ~OContactFields(); 52 ~OPimContactFields();
53 /** Set the index for combo boxes. 53 /** Set the index for combo boxes.
54 * Sets the <b>index</b> of combo <b>num</b>. 54 * Sets the <b>index</b> of combo <b>num</b>.
@@ -69,7 +69,7 @@ class OContactFields
69 69
70 /** Store fieldorder to contact. */ 70 /** Store fieldorder to contact. */
71 void saveToRecord( OContact& ); 71 void saveToRecord( OPimContact& );
72 /** Get Fieldorder from contact. */ 72 /** Get Fieldorder from contact. */
73 void loadFromRecord( const OContact& ); 73 void loadFromRecord( const OPimContact& );
74 74
75 private: 75 private:
diff --git a/libopie2/opiepim/core/oconversion.cpp b/libopie2/opiepim/core/opimdateconversion.cpp
index 160c2c6..8bf891b 100644
--- a/libopie2/opiepim/core/oconversion.cpp
+++ b/libopie2/opiepim/core/opimdateconversion.cpp
@@ -28,5 +28,5 @@ _;:, .> :=|. This program is free software; you can
28 28
29/* OPIE */ 29/* OPIE */
30#include <opie2/oconversion.h> 30#include <opie2/opimdateconversion.h>
31#include <qpe/timeconversion.h> 31#include <qpe/timeconversion.h>
32 32
@@ -34,5 +34,5 @@ namespace Opie
34{ 34{
35 35
36QString OConversion::dateToString( const QDate &d ) 36QString OPimDateConversion::dateToString( const QDate &d )
37{ 37{
38 if ( d.isNull() || !d.isValid() ) 38 if ( d.isNull() || !d.isValid() )
@@ -53,5 +53,5 @@ QString OConversion::dateToString( const QDate &d )
53 53
54 54
55QDate OConversion::dateFromString( const QString& s ) 55QDate OPimDateConversion::dateFromString( const QString& s )
56{ 56{
57 QDate date; 57 QDate date;
@@ -100,5 +100,5 @@ QDate OConversion::dateFromString( const QString& s )
100 100
101 101
102QString OConversion::dateTimeToString( const QDateTime& dt ) 102QString OPimDateConversion::dateTimeToString( const QDateTime& dt )
103{ 103{
104 if ( !dt.isValid() || dt.isNull() ) 104 if ( !dt.isValid() || dt.isNull() )
@@ -123,5 +123,5 @@ QString OConversion::dateTimeToString( const QDateTime& dt )
123 123
124 124
125QDateTime OConversion::dateTimeFromString( const QString& str ) 125QDateTime OPimDateConversion::dateTimeFromString( const QString& str )
126{ 126{
127 127
diff --git a/libopie2/opiepim/core/oconversion.h b/libopie2/opiepim/core/opimdateconversion.h
index eeb97e5..45536da 100644
--- a/libopie2/opiepim/core/oconversion.h
+++ b/libopie2/opiepim/core/opimdateconversion.h
@@ -36,5 +36,5 @@
36namespace Opie { 36namespace Opie {
37 37
38class OConversion 38class OPimDateConversion
39{ 39{
40public: 40public:
diff --git a/libopie2/opiepim/oevent.cpp b/libopie2/opiepim/core/opimevent.cpp
index d9cee2b..3ddbf85 100644
--- a/libopie2/opiepim/oevent.cpp
+++ b/libopie2/opiepim/core/opimevent.cpp
@@ -28,8 +28,8 @@
28*/ 28*/
29 29
30#include "oevent.h" 30#include "opimevent.h"
31 31
32/* OPIE */ 32/* OPIE */
33#include <opie2/orecur.h> 33#include <opie2/opimrecurrence.h>
34#include <opie2/opimresolver.h> 34#include <opie2/opimresolver.h>
35#include <opie2/opimnotifymanager.h> 35#include <opie2/opimnotifymanager.h>
@@ -71,6 +71,6 @@ int OCalendarHelper::dayOfWeek( char day )
71{ 71{
72 int dayOfWeek = 1; 72 int dayOfWeek = 1;
73 char i = ORecur::MON; 73 char i = OPimRecurrence::MON;
74 while ( !( i & day ) && i <= ORecur::SUN ) 74 while ( !( i & day ) && i <= OPimRecurrence::SUN )
75 { 75 {
76 i <<= 1; 76 i <<= 1;
@@ -88,5 +88,5 @@ int OCalendarHelper::monthDiff( const QDate& first, const QDate& second )
88 88
89 89
90struct OEvent::Data : public QShared 90struct OPimEvent::Data : public QShared
91{ 91{
92 Data() : QShared() 92 Data() : QShared()
@@ -106,5 +106,5 @@ struct OEvent::Data : public QShared
106 QString location; 106 QString location;
107 OPimNotifyManager* manager; 107 OPimNotifyManager* manager;
108 ORecur* recur; 108 OPimRecurrence* recur;
109 QString note; 109 QString note;
110 QDateTime created; 110 QDateTime created;
@@ -118,5 +118,5 @@ bool isAllDay : 1;
118 118
119 119
120OEvent::OEvent( int uid ) 120OPimEvent::OPimEvent( int uid )
121 : OPimRecord( uid ) 121 : OPimRecord( uid )
122{ 122{
@@ -125,5 +125,5 @@ OEvent::OEvent( int uid )
125 125
126 126
127OEvent::OEvent( const OEvent& ev ) 127OPimEvent::OPimEvent( const OPimEvent& ev )
128 : OPimRecord( ev ), data( ev.data ) 128 : OPimRecord( ev ), data( ev.data )
129{ 129{
@@ -132,5 +132,5 @@ OEvent::OEvent( const OEvent& ev )
132 132
133 133
134OEvent::OEvent( const QMap<int, QString> map ) 134OPimEvent::OPimEvent( const QMap<int, QString> map )
135 : OPimRecord( 0 ) 135 : OPimRecord( 0 )
136{ 136{
@@ -141,5 +141,5 @@ OEvent::OEvent( const QMap<int, QString> map )
141 141
142 142
143OEvent::~OEvent() 143OPimEvent::~OPimEvent()
144{ 144{
145 if ( data->deref() ) 145 if ( data->deref() )
@@ -151,5 +151,5 @@ OEvent::~OEvent()
151 151
152 152
153OEvent& OEvent::operator=( const OEvent& ev ) 153OPimEvent& OPimEvent::operator=( const OPimEvent& ev )
154{ 154{
155 if ( this == &ev ) return * this; 155 if ( this == &ev ) return * this;
@@ -165,5 +165,5 @@ OEvent& OEvent::operator=( const OEvent& ev )
165 165
166 166
167QString OEvent::description() const 167QString OPimEvent::description() const
168{ 168{
169 return data->description; 169 return data->description;
@@ -171,5 +171,5 @@ QString OEvent::description() const
171 171
172 172
173void OEvent::setDescription( const QString& description ) 173void OPimEvent::setDescription( const QString& description )
174{ 174{
175 changeOrModify(); 175 changeOrModify();
@@ -178,5 +178,5 @@ void OEvent::setDescription( const QString& description )
178 178
179 179
180void OEvent::setLocation( const QString& loc ) 180void OPimEvent::setLocation( const QString& loc )
181{ 181{
182 changeOrModify(); 182 changeOrModify();
@@ -185,5 +185,5 @@ void OEvent::setLocation( const QString& loc )
185 185
186 186
187QString OEvent::location() const 187QString OPimEvent::location() const
188{ 188{
189 return data->location; 189 return data->location;
@@ -191,5 +191,5 @@ QString OEvent::location() const
191 191
192 192
193OPimNotifyManager &OEvent::notifiers() const 193OPimNotifyManager &OPimEvent::notifiers() const
194{ 194{
195 // I hope we can skip the changeOrModify here 195 // I hope we can skip the changeOrModify here
@@ -203,5 +203,5 @@ OPimNotifyManager &OEvent::notifiers() const
203 203
204 204
205bool OEvent::hasNotifiers() const 205bool OPimEvent::hasNotifiers() const
206{ 206{
207 if ( !data->manager ) 207 if ( !data->manager )
@@ -215,8 +215,8 @@ bool OEvent::hasNotifiers() const
215 215
216 216
217ORecur OEvent::recurrence() const 217OPimRecurrence OPimEvent::recurrence() const
218{ 218{
219 if ( !data->recur ) 219 if ( !data->recur )
220 data->recur = new ORecur; 220 data->recur = new OPimRecurrence;
221 221
222 return *data->recur; 222 return *data->recur;
@@ -224,5 +224,5 @@ ORecur OEvent::recurrence() const
224 224
225 225
226void OEvent::setRecurrence( const ORecur& rec ) 226void OPimEvent::setRecurrence( const OPimRecurrence& rec )
227{ 227{
228 changeOrModify(); 228 changeOrModify();
@@ -230,9 +230,9 @@ void OEvent::setRecurrence( const ORecur& rec )
230 ( *data->recur ) = rec; 230 ( *data->recur ) = rec;
231 else 231 else
232 data->recur = new ORecur( rec ); 232 data->recur = new OPimRecurrence( rec );
233} 233}
234 234
235 235
236bool OEvent::hasRecurrence() const 236bool OPimEvent::hasRecurrence() const
237{ 237{
238 if ( !data->recur ) return false; 238 if ( !data->recur ) return false;
@@ -241,5 +241,5 @@ bool OEvent::hasRecurrence() const
241 241
242 242
243QString OEvent::note() const 243QString OPimEvent::note() const
244{ 244{
245 return data->note; 245 return data->note;
@@ -247,5 +247,5 @@ QString OEvent::note() const
247 247
248 248
249void OEvent::setNote( const QString& note ) 249void OPimEvent::setNote( const QString& note )
250{ 250{
251 changeOrModify(); 251 changeOrModify();
@@ -254,5 +254,5 @@ void OEvent::setNote( const QString& note )
254 254
255 255
256QDateTime OEvent::createdDateTime() const 256QDateTime OPimEvent::createdDateTime() const
257{ 257{
258 return data->created; 258 return data->created;
@@ -260,5 +260,5 @@ QDateTime OEvent::createdDateTime() const
260 260
261 261
262void OEvent::setCreatedDateTime( const QDateTime& time ) 262void OPimEvent::setCreatedDateTime( const QDateTime& time )
263{ 263{
264 changeOrModify(); 264 changeOrModify();
@@ -267,5 +267,5 @@ void OEvent::setCreatedDateTime( const QDateTime& time )
267 267
268 268
269QDateTime OEvent::startDateTime() const 269QDateTime OPimEvent::startDateTime() const
270{ 270{
271 if ( data->isAllDay ) 271 if ( data->isAllDay )
@@ -275,15 +275,15 @@ QDateTime OEvent::startDateTime() const
275 275
276 276
277QDateTime OEvent::startDateTimeInZone() const 277QDateTime OPimEvent::startDateTimeInZone() const
278{ 278{
279 /* if no timezone, or all day event or if the current and this timeZone match... */ 279 /* if no timezone, or all day event or if the current and this timeZone match... */
280 if ( data->timezone.isEmpty() || data->isAllDay || data->timezone == OTimeZone::current().timeZone() ) return startDateTime(); 280 if ( data->timezone.isEmpty() || data->isAllDay || data->timezone == OPimTimeZone::current().timeZone() ) return startDateTime();
281 281
282 OTimeZone zone( data->timezone ); 282 OPimTimeZone zone( data->timezone );
283 return zone.toDateTime( data->start, OTimeZone::current() ); 283 return zone.toDateTime( data->start, OPimTimeZone::current() );
284} 284}
285 285
286 286
287void OEvent::setStartDateTime( const QDateTime& dt ) 287void OPimEvent::setStartDateTime( const QDateTime& dt )
288{ 288{
289 changeOrModify(); 289 changeOrModify();
@@ -292,5 +292,5 @@ void OEvent::setStartDateTime( const QDateTime& dt )
292 292
293 293
294QDateTime OEvent::endDateTime() const 294QDateTime OPimEvent::endDateTime() const
295{ 295{
296 /* 296 /*
@@ -304,15 +304,15 @@ QDateTime OEvent::endDateTime() const
304 304
305 305
306QDateTime OEvent::endDateTimeInZone() const 306QDateTime OPimEvent::endDateTimeInZone() const
307{ 307{
308 /* if no timezone, or all day event or if the current and this timeZone match... */ 308 /* if no timezone, or all day event or if the current and this timeZone match... */
309 if ( data->timezone.isEmpty() || data->isAllDay || data->timezone == OTimeZone::current().timeZone() ) return endDateTime(); 309 if ( data->timezone.isEmpty() || data->isAllDay || data->timezone == OPimTimeZone::current().timeZone() ) return endDateTime();
310 310
311 OTimeZone zone( data->timezone ); 311 OPimTimeZone zone( data->timezone );
312 return zone.toDateTime( data->end, OTimeZone::current() ); 312 return zone.toDateTime( data->end, OPimTimeZone::current() );
313} 313}
314 314
315 315
316void OEvent::setEndDateTime( const QDateTime& dt ) 316void OPimEvent::setEndDateTime( const QDateTime& dt )
317{ 317{
318 changeOrModify(); 318 changeOrModify();
@@ -321,5 +321,5 @@ void OEvent::setEndDateTime( const QDateTime& dt )
321 321
322 322
323bool OEvent::isMultipleDay() const 323bool OPimEvent::isMultipleDay() const
324{ 324{
325 return data->end.date().day() - data->start.date().day(); 325 return data->end.date().day() - data->start.date().day();
@@ -327,5 +327,5 @@ bool OEvent::isMultipleDay() const
327 327
328 328
329bool OEvent::isAllDay() const 329bool OPimEvent::isAllDay() const
330{ 330{
331 return data->isAllDay; 331 return data->isAllDay;
@@ -333,5 +333,5 @@ bool OEvent::isAllDay() const
333 333
334 334
335void OEvent::setAllDay( bool allDay ) 335void OPimEvent::setAllDay( bool allDay )
336{ 336{
337 changeOrModify(); 337 changeOrModify();
@@ -341,5 +341,5 @@ void OEvent::setAllDay( bool allDay )
341 341
342 342
343void OEvent::setTimeZone( const QString& tz ) 343void OPimEvent::setTimeZone( const QString& tz )
344{ 344{
345 changeOrModify(); 345 changeOrModify();
@@ -348,5 +348,5 @@ void OEvent::setTimeZone( const QString& tz )
348 348
349 349
350QString OEvent::timeZone() const 350QString OPimEvent::timeZone() const
351{ 351{
352 if ( data->isAllDay ) return QString::fromLatin1( "UTC" ); 352 if ( data->isAllDay ) return QString::fromLatin1( "UTC" );
@@ -355,5 +355,5 @@ QString OEvent::timeZone() const
355 355
356 356
357bool OEvent::match( const QRegExp& re ) const 357bool OPimEvent::match( const QRegExp& re ) const
358{ 358{
359 if ( re.match( data->description ) != -1 ) 359 if ( re.match( data->description ) != -1 )
@@ -386,5 +386,5 @@ bool OEvent::match( const QRegExp& re ) const
386 386
387 387
388QString OEvent::toRichText() const 388QString OPimEvent::toRichText() const
389{ 389{
390 QString text, value; 390 QString text, value;
@@ -455,5 +455,5 @@ QString OEvent::toRichText() const
455 455
456 456
457QString OEvent::toShortText() const 457QString OPimEvent::toShortText() const
458{ 458{
459 QString text; 459 QString text;
@@ -473,11 +473,11 @@ QString OEvent::toShortText() const
473 473
474 474
475QString OEvent::type() const 475QString OPimEvent::type() const
476{ 476{
477 return QString::fromLatin1( "OEvent" ); 477 return QString::fromLatin1( "OPimEvent" );
478} 478}
479 479
480 480
481QString OEvent::recordField( int /*id */ ) const 481QString OPimEvent::recordField( int /*id */ ) const
482{ 482{
483 return QString::null; 483 return QString::null;
@@ -485,5 +485,5 @@ QString OEvent::recordField( int /*id */ ) const
485 485
486 486
487int OEvent::rtti() 487int OPimEvent::rtti()
488{ 488{
489 return OPimResolver::DateBook; 489 return OPimResolver::DateBook;
@@ -491,5 +491,5 @@ int OEvent::rtti()
491 491
492 492
493bool OEvent::loadFromStream( QDataStream& ) 493bool OPimEvent::loadFromStream( QDataStream& )
494{ 494{
495 return true; 495 return true;
@@ -497,5 +497,5 @@ bool OEvent::loadFromStream( QDataStream& )
497 497
498 498
499bool OEvent::saveToStream( QDataStream& ) const 499bool OPimEvent::saveToStream( QDataStream& ) const
500{ 500{
501 return true; 501 return true;
@@ -503,5 +503,5 @@ bool OEvent::saveToStream( QDataStream& ) const
503 503
504 504
505void OEvent::changeOrModify() 505void OPimEvent::changeOrModify()
506{ 506{
507 if ( data->count != 1 ) 507 if ( data->count != 1 )
@@ -516,5 +516,5 @@ void OEvent::changeOrModify()
516 516
517 if ( data->recur ) 517 if ( data->recur )
518 d2->recur = new ORecur( *data->recur ); 518 d2->recur = new OPimRecurrence( *data->recur );
519 519
520 d2->note = data->note; 520 d2->note = data->note;
@@ -537,5 +537,5 @@ void OEvent::changeOrModify()
537 537
538 538
539void OEvent::deref() 539void OPimEvent::deref()
540{ 540{
541 if ( data->deref() ) 541 if ( data->deref() )
@@ -550,24 +550,24 @@ void OEvent::deref()
550// for it and for all other places.. 550// for it and for all other places..
551// Encoding should happen at one place, only ! (eilers) 551// Encoding should happen at one place, only ! (eilers)
552QMap<int, QString> OEvent::toMap() const 552QMap<int, QString> OPimEvent::toMap() const
553{ 553{
554 QMap<int, QString> retMap; 554 QMap<int, QString> retMap;
555 555
556 retMap.insert( OEvent::FUid, QString::number( uid() ) ); 556 retMap.insert( OPimEvent::FUid, QString::number( uid() ) );
557 retMap.insert( OEvent::FCategories, Qtopia::escapeString( Qtopia::Record::idsToString( categories() ) ) ); 557 retMap.insert( OPimEvent::FCategories, Qtopia::escapeString( Qtopia::Record::idsToString( categories() ) ) );
558 retMap.insert( OEvent::FDescription, Qtopia::escapeString( description() ) ); 558 retMap.insert( OPimEvent::FDescription, Qtopia::escapeString( description() ) );
559 retMap.insert( OEvent::FLocation, Qtopia::escapeString( location() ) ); 559 retMap.insert( OPimEvent::FLocation, Qtopia::escapeString( location() ) );
560 retMap.insert( OEvent::FType, isAllDay() ? "AllDay" : "" ); 560 retMap.insert( OPimEvent::FType, isAllDay() ? "AllDay" : "" );
561 OPimAlarm alarm = notifiers().alarms() [ 0 ]; 561 OPimAlarm alarm = notifiers().alarms() [ 0 ];
562 retMap.insert( OEvent::FAlarm, QString::number( alarm.dateTime().secsTo( startDateTime() ) / 60 ) ); 562 retMap.insert( OPimEvent::FAlarm, QString::number( alarm.dateTime().secsTo( startDateTime() ) / 60 ) );
563 retMap.insert( OEvent::FSound, ( alarm.sound() == OPimAlarm::Loud ) ? "loud" : "silent" ); 563 retMap.insert( OPimEvent::FSound, ( alarm.sound() == OPimAlarm::Loud ) ? "loud" : "silent" );
564 564
565 OTimeZone zone( timeZone().isEmpty() ? OTimeZone::current() : timeZone() ); 565 OPimTimeZone zone( timeZone().isEmpty() ? OPimTimeZone::current() : timeZone() );
566 retMap.insert( OEvent::FStart, QString::number( zone.fromUTCDateTime( zone.toDateTime( startDateTime(), OTimeZone::utc() ) ) ) ); 566 retMap.insert( OPimEvent::FStart, QString::number( zone.fromUTCDateTime( zone.toDateTime( startDateTime(), OPimTimeZone::utc() ) ) ) );
567 retMap.insert( OEvent::FEnd, QString::number( zone.fromUTCDateTime( zone.toDateTime( endDateTime(), OTimeZone::utc() ) ) ) ); 567 retMap.insert( OPimEvent::FEnd, QString::number( zone.fromUTCDateTime( zone.toDateTime( endDateTime(), OPimTimeZone::utc() ) ) ) );
568 retMap.insert( OEvent::FNote, Qtopia::escapeString( note() ) ); 568 retMap.insert( OPimEvent::FNote, Qtopia::escapeString( note() ) );
569 retMap.insert( OEvent::FTimeZone, timeZone().isEmpty() ? QString( "None" ) : timeZone() ); 569 retMap.insert( OPimEvent::FTimeZone, timeZone().isEmpty() ? QString( "None" ) : timeZone() );
570 if ( parent() ) 570 if ( parent() )
571 retMap.insert( OEvent::FRecParent, QString::number( parent() ) ); 571 retMap.insert( OPimEvent::FRecParent, QString::number( parent() ) );
572 if ( children().count() ) 572 if ( children().count() )
573 { 573 {
@@ -579,5 +579,5 @@ QMap<int, QString> OEvent::toMap() const
579 buf += QString::number( childr[ i ] ); 579 buf += QString::number( childr[ i ] );
580 } 580 }
581 retMap.insert( OEvent::FRecChildren, buf ); 581 retMap.insert( OPimEvent::FRecChildren, buf );
582 } 582 }
583 583
@@ -585,20 +585,20 @@ QMap<int, QString> OEvent::toMap() const
585 if ( hasRecurrence() ) 585 if ( hasRecurrence() )
586 { 586 {
587 ORecur recur = recurrence(); 587 OPimRecurrence recur = recurrence();
588 QMap<int, QString> recFields = recur.toMap(); 588 QMap<int, QString> recFields = recur.toMap();
589 retMap.insert( OEvent::FRType, recFields[ ORecur::RType ] ); 589 retMap.insert( OPimEvent::FRType, recFields[ OPimRecurrence::RType ] );
590 retMap.insert( OEvent::FRWeekdays, recFields[ ORecur::RWeekdays ] ); 590 retMap.insert( OPimEvent::FRWeekdays, recFields[ OPimRecurrence::RWeekdays ] );
591 retMap.insert( OEvent::FRPosition, recFields[ ORecur::RPosition ] ); 591 retMap.insert( OPimEvent::FRPosition, recFields[ OPimRecurrence::RPosition ] );
592 retMap.insert( OEvent::FRFreq, recFields[ ORecur::RFreq ] ); 592 retMap.insert( OPimEvent::FRFreq, recFields[ OPimRecurrence::RFreq ] );
593 retMap.insert( OEvent::FRHasEndDate, recFields[ ORecur::RHasEndDate ] ); 593 retMap.insert( OPimEvent::FRHasEndDate, recFields[ OPimRecurrence::RHasEndDate ] );
594 retMap.insert( OEvent::FREndDate, recFields[ ORecur::EndDate ] ); 594 retMap.insert( OPimEvent::FREndDate, recFields[ OPimRecurrence::EndDate ] );
595 retMap.insert( OEvent::FRCreated, recFields[ ORecur::Created ] ); 595 retMap.insert( OPimEvent::FRCreated, recFields[ OPimRecurrence::Created ] );
596 retMap.insert( OEvent::FRExceptions, recFields[ ORecur::Exceptions ] ); 596 retMap.insert( OPimEvent::FRExceptions, recFields[ OPimRecurrence::Exceptions ] );
597 } 597 }
598 else 598 else
599 { 599 {
600 ORecur recur = recurrence(); 600 OPimRecurrence recur = recurrence();
601 QMap<int, QString> recFields = recur.toMap(); 601 QMap<int, QString> recFields = recur.toMap();
602 retMap.insert( OEvent::FRType, recFields[ ORecur::RType ] ); 602 retMap.insert( OPimEvent::FRType, recFields[ OPimRecurrence::RType ] );
603 } 603 }
604 604
@@ -607,16 +607,16 @@ QMap<int, QString> OEvent::toMap() const
607 607
608 608
609void OEvent::fromMap( const QMap<int, QString>& map ) 609void OPimEvent::fromMap( const QMap<int, QString>& map )
610{ 610{
611 611
612 // We just want to set the UID if it is really stored. 612 // We just want to set the UID if it is really stored.
613 if ( !map[ OEvent::FUid ].isEmpty() ) 613 if ( !map[ OPimEvent::FUid ].isEmpty() )
614 setUid( map[ OEvent::FUid ].toInt() ); 614 setUid( map[ OPimEvent::FUid ].toInt() );
615 615
616 setCategories( idsFromString( map[ OEvent::FCategories ] ) ); 616 setCategories( idsFromString( map[ OPimEvent::FCategories ] ) );
617 setDescription( map[ OEvent::FDescription ] ); 617 setDescription( map[ OPimEvent::FDescription ] );
618 setLocation( map[ OEvent::FLocation ] ); 618 setLocation( map[ OPimEvent::FLocation ] );
619 619
620 if ( map[ OEvent::FType ] == "AllDay" ) 620 if ( map[ OPimEvent::FType ] == "AllDay" )
621 setAllDay( true ); 621 setAllDay( true );
622 else 622 else
@@ -624,8 +624,8 @@ void OEvent::fromMap( const QMap<int, QString>& map )
624 624
625 int alarmTime = -1; 625 int alarmTime = -1;
626 if ( !map[ OEvent::FAlarm ].isEmpty() ) 626 if ( !map[ OPimEvent::FAlarm ].isEmpty() )
627 alarmTime = map[ OEvent::FAlarm ].toInt(); 627 alarmTime = map[ OPimEvent::FAlarm ].toInt();
628 628
629 int sound = ( ( map[ OEvent::FSound ] == "loud" ) ? OPimAlarm::Loud : OPimAlarm::Silent ); 629 int sound = ( ( map[ OPimEvent::FSound ] == "loud" ) ? OPimAlarm::Loud : OPimAlarm::Silent );
630 if ( ( alarmTime != -1 ) ) 630 if ( ( alarmTime != -1 ) )
631 { 631 {
@@ -634,16 +634,16 @@ void OEvent::fromMap( const QMap<int, QString>& map )
634 notifiers().add( al ); 634 notifiers().add( al );
635 } 635 }
636 if ( !map[ OEvent::FTimeZone ].isEmpty() && ( map[ OEvent::FTimeZone ] != "None" ) ) 636 if ( !map[ OPimEvent::FTimeZone ].isEmpty() && ( map[ OPimEvent::FTimeZone ] != "None" ) )
637 { 637 {
638 setTimeZone( map[ OEvent::FTimeZone ] ); 638 setTimeZone( map[ OPimEvent::FTimeZone ] );
639 } 639 }
640 640
641 time_t start = ( time_t ) map[ OEvent::FStart ].toLong(); 641 time_t start = ( time_t ) map[ OPimEvent::FStart ].toLong();
642 time_t end = ( time_t ) map[ OEvent::FEnd ].toLong(); 642 time_t end = ( time_t ) map[ OPimEvent::FEnd ].toLong();
643 643
644 /* AllDay is always in UTC */ 644 /* AllDay is always in UTC */
645 if ( isAllDay() ) 645 if ( isAllDay() )
646 { 646 {
647 OTimeZone utc = OTimeZone::utc(); 647 OPimTimeZone utc = OPimTimeZone::utc();
648 setStartDateTime( utc.fromUTCDateTime( start ) ); 648 setStartDateTime( utc.fromUTCDateTime( start ) );
649 setEndDateTime ( utc.fromUTCDateTime( end ) ); 649 setEndDateTime ( utc.fromUTCDateTime( end ) );
@@ -654,19 +654,19 @@ void OEvent::fromMap( const QMap<int, QString>& map )
654 /* to current date time */ 654 /* to current date time */
655 // qWarning(" Start is %d", start ); 655 // qWarning(" Start is %d", start );
656 OTimeZone zone( timeZone().isEmpty() ? OTimeZone::current() : timeZone() ); 656 OPimTimeZone zone( timeZone().isEmpty() ? OPimTimeZone::current() : timeZone() );
657 QDateTime date = zone.toDateTime( start ); 657 QDateTime date = zone.toDateTime( start );
658 qWarning( " Start is %s", date.toString().latin1() ); 658 qWarning( " Start is %s", date.toString().latin1() );
659 setStartDateTime( zone.toDateTime( date, OTimeZone::current() ) ); 659 setStartDateTime( zone.toDateTime( date, OPimTimeZone::current() ) );
660 660
661 date = zone.toDateTime( end ); 661 date = zone.toDateTime( end );
662 setEndDateTime ( zone.toDateTime( date, OTimeZone::current() ) ); 662 setEndDateTime ( zone.toDateTime( date, OPimTimeZone::current() ) );
663 } 663 }
664 664
665 if ( !map[ OEvent::FRecParent ].isEmpty() ) 665 if ( !map[ OPimEvent::FRecParent ].isEmpty() )
666 setParent( map[ OEvent::FRecParent ].toInt() ); 666 setParent( map[ OPimEvent::FRecParent ].toInt() );
667 667
668 if ( !map[ OEvent::FRecChildren ].isEmpty() ) 668 if ( !map[ OPimEvent::FRecChildren ].isEmpty() )
669 { 669 {
670 QStringList list = QStringList::split( ' ', map[ OEvent::FRecChildren ] ); 670 QStringList list = QStringList::split( ' ', map[ OPimEvent::FRecChildren ] );
671 for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) 671 for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
672 { 672 {
@@ -675,17 +675,17 @@ void OEvent::fromMap( const QMap<int, QString>& map )
675 } 675 }
676 676
677 // Fill recurrence stuff and put it directly into the ORecur-Object using fromMap.. 677 // Fill recurrence stuff and put it directly into the OPimRecurrence-Object using fromMap..
678 if ( !map[ OEvent::FRType ].isEmpty() ) 678 if ( !map[ OPimEvent::FRType ].isEmpty() )
679 { 679 {
680 QMap<int, QString> recFields; 680 QMap<int, QString> recFields;
681 recFields.insert( ORecur::RType, map[ OEvent::FRType ] ); 681 recFields.insert( OPimRecurrence::RType, map[ OPimEvent::FRType ] );
682 recFields.insert( ORecur::RWeekdays, map[ OEvent::FRWeekdays ] ); 682 recFields.insert( OPimRecurrence::RWeekdays, map[ OPimEvent::FRWeekdays ] );
683 recFields.insert( ORecur::RPosition, map[ OEvent::FRPosition ] ); 683 recFields.insert( OPimRecurrence::RPosition, map[ OPimEvent::FRPosition ] );
684 recFields.insert( ORecur::RFreq, map[ OEvent::FRFreq ] ); 684 recFields.insert( OPimRecurrence::RFreq, map[ OPimEvent::FRFreq ] );
685 recFields.insert( ORecur::RHasEndDate, map[ OEvent::FRHasEndDate ] ); 685 recFields.insert( OPimRecurrence::RHasEndDate, map[ OPimEvent::FRHasEndDate ] );
686 recFields.insert( ORecur::EndDate, map[ OEvent::FREndDate ] ); 686 recFields.insert( OPimRecurrence::EndDate, map[ OPimEvent::FREndDate ] );
687 recFields.insert( ORecur::Created, map[ OEvent::FRCreated ] ); 687 recFields.insert( OPimRecurrence::Created, map[ OPimEvent::FRCreated ] );
688 recFields.insert( ORecur::Exceptions, map[ OEvent::FRExceptions ] ); 688 recFields.insert( OPimRecurrence::Exceptions, map[ OPimEvent::FRExceptions ] );
689 ORecur recur( recFields ); 689 OPimRecurrence recur( recFields );
690 setRecurrence( recur ); 690 setRecurrence( recur );
691 } 691 }
@@ -694,5 +694,5 @@ void OEvent::fromMap( const QMap<int, QString>& map )
694 694
695 695
696int OEvent::parent() const 696int OPimEvent::parent() const
697{ 697{
698 return data->parent; 698 return data->parent;
@@ -700,5 +700,5 @@ int OEvent::parent() const
700 700
701 701
702void OEvent::setParent( int uid ) 702void OPimEvent::setParent( int uid )
703{ 703{
704 changeOrModify(); 704 changeOrModify();
@@ -707,5 +707,5 @@ void OEvent::setParent( int uid )
707 707
708 708
709QArray<int> OEvent::children() const 709QArray<int> OPimEvent::children() const
710{ 710{
711 if ( !data->child ) return QArray<int>(); 711 if ( !data->child ) return QArray<int>();
@@ -715,5 +715,5 @@ QArray<int> OEvent::children() const
715 715
716 716
717void OEvent::setChildren( const QArray<int>& arr ) 717void OPimEvent::setChildren( const QArray<int>& arr )
718{ 718{
719 changeOrModify(); 719 changeOrModify();
@@ -725,5 +725,5 @@ void OEvent::setChildren( const QArray<int>& arr )
725 725
726 726
727void OEvent::addChild( int uid ) 727void OPimEvent::addChild( int uid )
728{ 728{
729 changeOrModify(); 729 changeOrModify();
@@ -742,5 +742,5 @@ void OEvent::addChild( int uid )
742 742
743 743
744void OEvent::removeChild( int uid ) 744void OPimEvent::removeChild( int uid )
745{ 745{
746 if ( !data->child || !data->child->contains( uid ) ) return ; 746 if ( !data->child || !data->child->contains( uid ) ) return ;
@@ -765,5 +765,5 @@ struct OEffectiveEvent::Data : public QShared
765 Data() : QShared() 765 Data() : QShared()
766 {} 766 {}
767 OEvent event; 767 OPimEvent event;
768 QDate date; 768 QDate date;
769 QTime start, end; 769 QTime start, end;
@@ -782,5 +782,5 @@ OEffectiveEvent::OEffectiveEvent()
782 782
783 783
784OEffectiveEvent::OEffectiveEvent( const OEvent& ev, const QDate& startDate, 784OEffectiveEvent::OEffectiveEvent( const OPimEvent& ev, const QDate& startDate,
785 Position pos ) 785 Position pos )
786{ 786{
@@ -845,5 +845,5 @@ void OEffectiveEvent::setEndTime( const QTime& en )
845 845
846 846
847void OEffectiveEvent::setEvent( const OEvent& ev ) 847void OEffectiveEvent::setEvent( const OPimEvent& ev )
848{ 848{
849 changeOrModify(); 849 changeOrModify();
@@ -891,5 +891,5 @@ QString OEffectiveEvent::note() const
891 891
892 892
893OEvent OEffectiveEvent::event() const 893OPimEvent OEffectiveEvent::event() const
894{ 894{
895 return data->event; 895 return data->event;
diff --git a/libopie2/opiepim/oevent.h b/libopie2/opiepim/core/opimevent.h
index dc5e4d6..949f263 100644
--- a/libopie2/opiepim/oevent.h
+++ b/libopie2/opiepim/core/opimevent.h
@@ -33,5 +33,5 @@
33 33
34/* OPIE */ 34/* OPIE */
35#include <opie2/otimezone.h> 35#include <opie2/opimtimezone.h>
36#include <opie2/opimrecord.h> 36#include <opie2/opimrecord.h>
37#include <qpe/recordfields.h> 37#include <qpe/recordfields.h>
@@ -62,5 +62,5 @@ struct OCalendarHelper
62 62
63class OPimNotifyManager; 63class OPimNotifyManager;
64class ORecur; 64class OPimRecurrence;
65 65
66/** 66/**
@@ -69,8 +69,8 @@ class ORecur;
69 * @short container for events. 69 * @short container for events.
70 */ 70 */
71class OEvent : public OPimRecord 71class OPimEvent : public OPimRecord
72{ 72{
73 public: 73 public:
74 typedef QValueList<OEvent> ValueList; 74 typedef QValueList<OPimEvent> ValueList;
75 /** 75 /**
76 * RecordFields contain possible attributes 76 * RecordFields contain possible attributes
@@ -102,20 +102,20 @@ class OEvent : public OPimRecord
102 102
103 /** 103 /**
104 * Start with an Empty OEvent. UID == 0 means that it is empty 104 * Start with an Empty OPimEvent. UID == 0 means that it is empty
105 */ 105 */
106 OEvent( int uid = 0 ); 106 OPimEvent( int uid = 0 );
107 107
108 /** 108 /**
109 * copy c'tor 109 * copy c'tor
110 */ 110 */
111 OEvent( const OEvent& ); 111 OPimEvent( const OPimEvent& );
112 112
113 /** 113 /**
114 * Create OEvent, initialized by map 114 * Create OPimEvent, initialized by map
115 * @see enum RecordFields 115 * @see enum RecordFields
116 */ 116 */
117 OEvent( const QMap<int, QString> map ); 117 OPimEvent( const QMap<int, QString> map );
118 ~OEvent(); 118 ~OPimEvent();
119 OEvent &operator=( const OEvent& ); 119 OPimEvent &operator=( const OPimEvent& );
120 120
121 QString description() const; 121 QString description() const;
@@ -128,6 +128,6 @@ class OEvent : public OPimRecord
128 OPimNotifyManager &notifiers() const; 128 OPimNotifyManager &notifiers() const;
129 129
130 ORecur recurrence() const; 130 OPimRecurrence recurrence() const;
131 void setRecurrence( const ORecur& ); 131 void setRecurrence( const OPimRecurrence& );
132 bool hasRecurrence() const; 132 bool hasRecurrence() const;
133 133
@@ -170,5 +170,5 @@ class OEvent : public OPimRecord
170 void removeChild( int uid ); 170 void removeChild( int uid );
171 171
172 /** return the parent OEvent */ 172 /** return the parent OPimEvent */
173 int parent() const; 173 int parent() const;
174 void setParent( int uid ); 174 void setParent( int uid );
@@ -189,10 +189,10 @@ class OEvent : public OPimRecord
189 bool saveToStream( QDataStream& ) const; 189 bool saveToStream( QDataStream& ) const;
190 190
191 /* bool operator==( const OEvent& ); 191 /* bool operator==( const OPimEvent& );
192 bool operator!=( const OEvent& ); 192 bool operator!=( const OPimEvent& );
193 bool operator<( const OEvent& ); 193 bool operator<( const OPimEvent& );
194 bool operator<=( const OEvent& ); 194 bool operator<=( const OPimEvent& );
195 bool operator>( const OEvent& ); 195 bool operator>( const OPimEvent& );
196 bool operator>=(const OEvent& ); 196 bool operator>=(const OPimEvent& );
197 */ 197 */
198 198
@@ -227,5 +227,5 @@ class OEffectiveEvent
227 // here we draw start time -> end time 227 // here we draw start time -> end time
228 OEffectiveEvent(); 228 OEffectiveEvent();
229 OEffectiveEvent( const OEvent& event, const QDate& startDate, Position pos = StartEnd ); 229 OEffectiveEvent( const OPimEvent& event, const QDate& startDate, Position pos = StartEnd );
230 OEffectiveEvent( const OEffectiveEvent& ); 230 OEffectiveEvent( const OEffectiveEvent& );
231 OEffectiveEvent &operator=( const OEffectiveEvent& ); 231 OEffectiveEvent &operator=( const OEffectiveEvent& );
@@ -234,5 +234,5 @@ class OEffectiveEvent
234 void setStartTime( const QTime& ); 234 void setStartTime( const QTime& );
235 void setEndTime( const QTime& ); 235 void setEndTime( const QTime& );
236 void setEvent( const OEvent& ); 236 void setEvent( const OPimEvent& );
237 void setDate( const QDate& ); 237 void setDate( const QDate& );
238 238
@@ -242,5 +242,5 @@ class OEffectiveEvent
242 QString location() const; 242 QString location() const;
243 QString note() const; 243 QString note() const;
244 OEvent event() const; 244 OPimEvent event() const;
245 QTime startTime() const; 245 QTime startTime() const;
246 QTime endTime() const; 246 QTime endTime() const;
diff --git a/libopie2/opiepim/core/opimnotify.h b/libopie2/opiepim/core/opimnotify.h
index d0e40ca..4f74d2e 100644
--- a/libopie2/opiepim/core/opimnotify.h
+++ b/libopie2/opiepim/core/opimnotify.h
@@ -139,5 +139,5 @@ class OPimAlarm : public OPimNotify
139 * datebook 139 * datebook
140 * Note that the returned dateTime() may be not valid. 140 * Note that the returned dateTime() may be not valid.
141 * In these cases one must resolve the uid and get the OEvent 141 * In these cases one must resolve the uid and get the OPimEvent
142 */ 142 */
143class OPimReminder : public OPimNotify 143class OPimReminder : public OPimNotify
diff --git a/libopie2/opiepim/core/opimnotifymanager.cpp b/libopie2/opiepim/core/opimnotifymanager.cpp
index a54d597..573340a 100644
--- a/libopie2/opiepim/core/opimnotifymanager.cpp
+++ b/libopie2/opiepim/core/opimnotifymanager.cpp
@@ -31,5 +31,5 @@
31 31
32/* OPIE */ 32/* OPIE */
33#include <opie2/oconversion.h> 33#include <opie2/opimdateconversion.h>
34 34
35/* QT */ 35/* QT */
@@ -185,5 +185,5 @@ QString OPimNotifyManager::alarmsToString() const
185 if ( ( *it ).dateTime().isValid() ) 185 if ( ( *it ).dateTime().isValid() )
186 { 186 {
187 als << OConversion::dateTimeToString( ( *it ).dateTime() ) 187 als << OPimDateConversion::dateTimeToString( ( *it ).dateTime() )
188 + ":" + QString::number( ( *it ).duration() ) 188 + ":" + QString::number( ( *it ).duration() )
189 + ":" + QString::number( ( *it ).sound() ) 189 + ":" + QString::number( ( *it ).sound() )
@@ -228,6 +228,6 @@ void OPimNotifyManager::alarmsFromString( const QString& str )
228 qWarning( "alarm: %s", alarm.join( "___" ).latin1() ); 228 qWarning( "alarm: %s", alarm.join( "___" ).latin1() );
229 qWarning( "alarm[0]: %s %s", alarm[ 0 ].latin1(), 229 qWarning( "alarm[0]: %s %s", alarm[ 0 ].latin1(),
230 OConversion::dateTimeFromString( alarm[ 0 ] ).toString().latin1() ); 230 OPimDateConversion::dateTimeFromString( alarm[ 0 ] ).toString().latin1() );
231 OPimAlarm al( alarm[ 2 ].toInt(), OConversion::dateTimeFromString( alarm[ 0 ] ), 231 OPimAlarm al( alarm[ 2 ].toInt(), OPimDateConversion::dateTimeFromString( alarm[ 0 ] ),
232 alarm[ 1 ].toInt() ); 232 alarm[ 1 ].toInt() );
233 add( al ); 233 add( al );
diff --git a/libopie2/opiepim/orecordlist.h b/libopie2/opiepim/core/opimrecordlist.h
index 1742dcc..b23138d 100644
--- a/libopie2/opiepim/orecordlist.h
+++ b/libopie2/opiepim/core/opimrecordlist.h
@@ -32,5 +32,5 @@
32 32
33/* OPIE */ 33/* OPIE */
34#include <opie2/otemplatebase.h> 34#include <opie2/opimtemplatebase.h>
35#include <opie2/opimrecord.h> 35#include <opie2/opimrecord.h>
36 36
@@ -41,5 +41,5 @@ namespace Opie
41{ 41{
42 42
43class ORecordListIteratorPrivate; 43class OPimRecordListIteratorPrivate;
44/** 44/**
45 * Our List Iterator 45 * Our List Iterator
@@ -49,9 +49,9 @@ class ORecordListIteratorPrivate;
49 * doSomeCoolStuff( (*it) ); 49 * doSomeCoolStuff( (*it) );
50 */ 50 */
51template <class T> class ORecordList; 51template <class T> class OPimRecordList;
52template <class T = OPimRecord> 52template <class T = OPimRecord>
53class ORecordListIterator 53class OPimRecordListIterator
54{ 54{
55 friend class ORecordList<T>; 55 friend class OPimRecordList<T>;
56 56
57 public: 57 public:
@@ -60,16 +60,16 @@ class ORecordListIterator
60 /** 60 /**
61 * The c'tor used internally from 61 * The c'tor used internally from
62 * ORecordList 62 * OPimRecordList
63 */ 63 */
64 ORecordListIterator( const QArray<int>, const Base* ); 64 OPimRecordListIterator( const QArray<int>, const Base* );
65 65
66 /** 66 /**
67 * The standard c'tor 67 * The standard c'tor
68 */ 68 */
69 ORecordListIterator(); 69 OPimRecordListIterator();
70 ~ORecordListIterator(); 70 ~OPimRecordListIterator();
71 71
72 ORecordListIterator( const ORecordListIterator& ); 72 OPimRecordListIterator( const OPimRecordListIterator& );
73 ORecordListIterator &operator=( const ORecordListIterator& ); 73 OPimRecordListIterator &operator=( const OPimRecordListIterator& );
74 74
75 /** 75 /**
@@ -78,9 +78,9 @@ class ORecordListIterator
78 */ 78 */
79 T operator*(); 79 T operator*();
80 ORecordListIterator &operator++(); 80 OPimRecordListIterator &operator++();
81 ORecordListIterator &operator--(); 81 OPimRecordListIterator &operator--();
82 82
83 bool operator==( const ORecordListIterator& it ); 83 bool operator==( const OPimRecordListIterator& it );
84 bool operator!=( const ORecordListIterator& it ); 84 bool operator!=( const OPimRecordListIterator& it );
85 85
86 /** 86 /**
@@ -108,9 +108,9 @@ class ORecordListIterator
108 108
109 /* d pointer for future versions */ 109 /* d pointer for future versions */
110 ORecordListIteratorPrivate *d; 110 OPimRecordListIteratorPrivate *d;
111}; 111};
112 112
113 113
114class ORecordListPrivate; 114class OPimRecordListPrivate;
115/** 115/**
116 * The recordlist used as a return type 116 * The recordlist used as a return type
@@ -118,18 +118,18 @@ class ORecordListPrivate;
118 */ 118 */
119template <class T = OPimRecord > 119template <class T = OPimRecord >
120class ORecordList 120class OPimRecordList
121{ 121{
122 public: 122 public:
123 typedef OTemplateBase<T> Base; 123 typedef OTemplateBase<T> Base;
124 typedef ORecordListIterator<T> Iterator; 124 typedef OPimRecordListIterator<T> Iterator;
125 125
126 /** 126 /**
127 * c'tor 127 * c'tor
128 */ 128 */
129 ORecordList () 129 OPimRecordList ()
130 {} 130 {}
131 ORecordList( const QArray<int>& ids, 131 OPimRecordList( const QArray<int>& ids,
132 const Base* ); 132 const Base* );
133 ~ORecordList(); 133 ~OPimRecordList();
134 134
135 /** 135 /**
@@ -163,5 +163,5 @@ class ORecordList
163 QArray<int> m_ids; 163 QArray<int> m_ids;
164 const Base* m_acc; 164 const Base* m_acc;
165 ORecordListPrivate *d; 165 OPimRecordListPrivate *d;
166}; 166};
167 167
@@ -169,5 +169,5 @@ class ORecordList
169/* ok now implement it */ 169/* ok now implement it */
170template <class T> 170template <class T>
171ORecordListIterator<T>::ORecordListIterator() 171OPimRecordListIterator<T>::OPimRecordListIterator()
172{ 172{
173 m_current = 0; 173 m_current = 0;
@@ -181,5 +181,5 @@ ORecordListIterator<T>::ORecordListIterator()
181 181
182template <class T> 182template <class T>
183ORecordListIterator<T>::~ORecordListIterator() 183OPimRecordListIterator<T>::~OPimRecordListIterator()
184{ 184{
185 /* nothing to delete */ 185 /* nothing to delete */
@@ -188,7 +188,7 @@ ORecordListIterator<T>::~ORecordListIterator()
188 188
189template <class T> 189template <class T>
190ORecordListIterator<T>::ORecordListIterator( const ORecordListIterator<T>& it ) 190OPimRecordListIterator<T>::OPimRecordListIterator( const OPimRecordListIterator<T>& it )
191{ 191{
192 // qWarning("ORecordListIterator copy c'tor"); 192 // qWarning("OPimRecordListIterator copy c'tor");
193 m_uids = it.m_uids; 193 m_uids = it.m_uids;
194 m_current = it.m_current; 194 m_current = it.m_current;
@@ -201,5 +201,5 @@ ORecordListIterator<T>::ORecordListIterator( const ORecordListIterator<T>& it )
201 201
202template <class T> 202template <class T>
203ORecordListIterator<T> &ORecordListIterator<T>::operator=( const ORecordListIterator<T>& it ) 203OPimRecordListIterator<T> &OPimRecordListIterator<T>::operator=( const OPimRecordListIterator<T>& it )
204{ 204{
205 m_uids = it.m_uids; 205 m_uids = it.m_uids;
@@ -214,5 +214,5 @@ ORecordListIterator<T> &ORecordListIterator<T>::operator=( const ORecordListIter
214 214
215template <class T> 215template <class T>
216T ORecordListIterator<T>::operator*() 216T OPimRecordListIterator<T>::operator*()
217{ 217{
218 //qWarning("operator* %d %d", m_current, m_uids[m_current] ); 218 //qWarning("operator* %d %d", m_current, m_uids[m_current] );
@@ -229,5 +229,5 @@ T ORecordListIterator<T>::operator*()
229 229
230template <class T> 230template <class T>
231ORecordListIterator<T> &ORecordListIterator<T>::operator++() 231OPimRecordListIterator<T> &OPimRecordListIterator<T>::operator++()
232{ 232{
233 m_direction = true; 233 m_direction = true;
@@ -245,5 +245,5 @@ ORecordListIterator<T> &ORecordListIterator<T>::operator++()
245 245
246template <class T> 246template <class T>
247ORecordListIterator<T> &ORecordListIterator<T>::operator--() 247OPimRecordListIterator<T> &OPimRecordListIterator<T>::operator--()
248{ 248{
249 m_direction = false; 249 m_direction = false;
@@ -261,5 +261,5 @@ ORecordListIterator<T> &ORecordListIterator<T>::operator--()
261 261
262template <class T> 262template <class T>
263bool ORecordListIterator<T>::operator==( const ORecordListIterator<T>& it ) 263bool OPimRecordListIterator<T>::operator==( const OPimRecordListIterator<T>& it )
264{ 264{
265 265
@@ -276,5 +276,5 @@ bool ORecordListIterator<T>::operator==( const ORecordListIterator<T>& it )
276 276
277template <class T> 277template <class T>
278bool ORecordListIterator<T>::operator!=( const ORecordListIterator<T>& it ) 278bool OPimRecordListIterator<T>::operator!=( const OPimRecordListIterator<T>& it )
279{ 279{
280 return !( *this == it ); 280 return !( *this == it );
@@ -283,5 +283,5 @@ bool ORecordListIterator<T>::operator!=( const ORecordListIterator<T>& it )
283 283
284template <class T> 284template <class T>
285ORecordListIterator<T>::ORecordListIterator( const QArray<int> uids, 285OPimRecordListIterator<T>::OPimRecordListIterator( const QArray<int> uids,
286 const Base* t ) 286 const Base* t )
287 : m_uids( uids ), m_current( 0 ), m_temp( t ), m_end( false ), 287 : m_uids( uids ), m_current( 0 ), m_temp( t ), m_end( false ),
@@ -295,5 +295,5 @@ ORecordListIterator<T>::ORecordListIterator( const QArray<int> uids,
295 295
296template <class T> 296template <class T>
297uint ORecordListIterator<T>::current() const 297uint OPimRecordListIterator<T>::current() const
298{ 298{
299 return m_current; 299 return m_current;
@@ -302,5 +302,5 @@ uint ORecordListIterator<T>::current() const
302 302
303template <class T> 303template <class T>
304void ORecordListIterator<T>::setCurrent( uint cur ) 304void OPimRecordListIterator<T>::setCurrent( uint cur )
305{ 305{
306 if ( cur < m_uids.count() ) 306 if ( cur < m_uids.count() )
@@ -311,5 +311,5 @@ void ORecordListIterator<T>::setCurrent( uint cur )
311} 311}
312template <class T> 312template <class T>
313uint ORecordListIterator<T>::count() const 313uint OPimRecordListIterator<T>::count() const
314{ 314{
315 return m_uids.count(); 315 return m_uids.count();
@@ -318,5 +318,5 @@ uint ORecordListIterator<T>::count() const
318 318
319template <class T> 319template <class T>
320ORecordList<T>::ORecordList( const QArray<int>& ids, 320OPimRecordList<T>::OPimRecordList( const QArray<int>& ids,
321 const Base* acc ) 321 const Base* acc )
322 : m_ids( ids ), m_acc( acc ) 322 : m_ids( ids ), m_acc( acc )
@@ -325,5 +325,5 @@ ORecordList<T>::ORecordList( const QArray<int>& ids,
325 325
326template <class T> 326template <class T>
327ORecordList<T>::~ORecordList() 327OPimRecordList<T>::~OPimRecordList()
328{ 328{
329 /* nothing to do here */ 329 /* nothing to do here */
@@ -332,5 +332,5 @@ ORecordList<T>::~ORecordList()
332 332
333template <class T> 333template <class T>
334typename ORecordList<T>::Iterator ORecordList<T>::begin() 334typename OPimRecordList<T>::Iterator OPimRecordList<T>::begin()
335{ 335{
336 Iterator it( m_ids, m_acc ); 336 Iterator it( m_ids, m_acc );
@@ -340,5 +340,5 @@ typename ORecordList<T>::Iterator ORecordList<T>::begin()
340 340
341template <class T> 341template <class T>
342typename ORecordList<T>::Iterator ORecordList<T>::end() 342typename OPimRecordList<T>::Iterator OPimRecordList<T>::end()
343{ 343{
344 Iterator it( m_ids, m_acc ); 344 Iterator it( m_ids, m_acc );
@@ -351,5 +351,5 @@ typename ORecordList<T>::Iterator ORecordList<T>::end()
351 351
352template <class T> 352template <class T>
353uint ORecordList<T>::count() const 353uint OPimRecordList<T>::count() const
354{ 354{
355 return m_ids.count(); 355 return m_ids.count();
@@ -358,5 +358,5 @@ uint ORecordList<T>::count() const
358 358
359template <class T> 359template <class T>
360T ORecordList<T>::operator[] ( uint i ) 360T OPimRecordList<T>::operator[] ( uint i )
361{ 361{
362 if ( i >= m_ids.count() ) 362 if ( i >= m_ids.count() )
@@ -368,5 +368,5 @@ T ORecordList<T>::operator[] ( uint i )
368 368
369template <class T> 369template <class T>
370int ORecordList<T>::uidAt( uint i ) 370int OPimRecordList<T>::uidAt( uint i )
371{ 371{
372 return m_ids[ i ]; 372 return m_ids[ i ];
@@ -375,5 +375,5 @@ int ORecordList<T>::uidAt( uint i )
375 375
376template <class T> 376template <class T>
377bool ORecordList<T>::remove( int uid ) 377bool OPimRecordList<T>::remove( int uid )
378{ 378{
379 QArray<int> copy( m_ids.count() ); 379 QArray<int> copy( m_ids.count() );
diff --git a/libopie2/opiepim/core/orecur.cpp b/libopie2/opiepim/core/opimrecurrence.cpp
index 5e2da25..98bd647 100644
--- a/libopie2/opiepim/core/orecur.cpp
+++ b/libopie2/opiepim/core/opimrecurrence.cpp
@@ -28,8 +28,8 @@
28*/ 28*/
29 29
30#include "orecur.h" 30#include "opimrecurrence.h"
31 31
32/* OPIE */ 32/* OPIE */
33#include <opie2/otimezone.h> 33#include <opie2/opimtimezone.h>
34#include <qpe/timeconversion.h> 34#include <qpe/timeconversion.h>
35 35
@@ -42,7 +42,7 @@
42namespace Opie { 42namespace Opie {
43 43
44struct ORecur::Data : public QShared { 44struct OPimRecurrence::Data : public QShared {
45 Data() : QShared() { 45 Data() : QShared() {
46 type = ORecur::NoRepeat; 46 type = OPimRecurrence::NoRepeat;
47 freq = -1; 47 freq = -1;
48 days = 0; 48 days = 0;
@@ -53,5 +53,5 @@ struct ORecur::Data : public QShared {
53 } 53 }
54 char days; // Q_UINT8 for 8 seven days;) 54 char days; // Q_UINT8 for 8 seven days;)
55 ORecur::RepeatType type; 55 OPimRecurrence::RepeatType type;
56 int freq; 56 int freq;
57 int pos; 57 int pos;
@@ -66,16 +66,16 @@ struct ORecur::Data : public QShared {
66 66
67 67
68ORecur::ORecur() { 68OPimRecurrence::OPimRecurrence() {
69 data = new Data; 69 data = new Data;
70} 70}
71 71
72ORecur::ORecur( const QMap<int, QString>& map ) 72OPimRecurrence::OPimRecurrence( const QMap<int, QString>& map )
73{ 73{
74 ORecur(); 74 OPimRecurrence();
75 fromMap( map ); 75 fromMap( map );
76} 76}
77 77
78 78
79ORecur::ORecur( const ORecur& rec) 79OPimRecurrence::OPimRecurrence( const OPimRecurrence& rec)
80 : data( rec.data ) 80 : data( rec.data )
81{ 81{
@@ -84,5 +84,5 @@ ORecur::ORecur( const ORecur& rec)
84 84
85 85
86ORecur::~ORecur() { 86OPimRecurrence::~OPimRecurrence() {
87 if ( data->deref() ) { 87 if ( data->deref() ) {
88 delete data; 88 delete data;
@@ -92,5 +92,5 @@ ORecur::~ORecur() {
92 92
93 93
94void ORecur::deref() { 94void OPimRecurrence::deref() {
95 if ( data->deref() ) { 95 if ( data->deref() ) {
96 delete data; 96 delete data;
@@ -100,10 +100,10 @@ void ORecur::deref() {
100 100
101 101
102bool ORecur::operator==( const ORecur& )const { 102bool OPimRecurrence::operator==( const OPimRecurrence& )const {
103 return false; 103 return false;
104} 104}
105 105
106 106
107ORecur &ORecur::operator=( const ORecur& re) { 107OPimRecurrence &OPimRecurrence::operator=( const OPimRecurrence& re) {
108 if ( *this == re ) return *this; 108 if ( *this == re ) return *this;
109 109
@@ -116,5 +116,5 @@ ORecur &ORecur::operator=( const ORecur& re) {
116 116
117 117
118bool ORecur::doesRecur()const { 118bool OPimRecurrence::doesRecur()const {
119 return !( type() == NoRepeat ); 119 return !( type() == NoRepeat );
120} 120}
@@ -125,5 +125,5 @@ bool ORecur::doesRecur()const {
125 * 125 *
126 */ 126 */
127bool ORecur::doesRecur( const QDate& date ) { 127bool OPimRecurrence::doesRecur( const QDate& date ) {
128 /* the day before the recurrance */ 128 /* the day before the recurrance */
129 QDate da = date.addDays(-1); 129 QDate da = date.addDays(-1);
@@ -140,5 +140,5 @@ bool ORecur::doesRecur( const QDate& date ) {
140// GPL from Datebookdb.cpp 140// GPL from Datebookdb.cpp
141// FIXME exception list! 141// FIXME exception list!
142bool ORecur::nextOcurrence( const QDate& from, QDate& next ) { 142bool OPimRecurrence::nextOcurrence( const QDate& from, QDate& next ) {
143 bool stillLooking; 143 bool stillLooking;
144 stillLooking = p_nextOccurrence( from, next ); 144 stillLooking = p_nextOccurrence( from, next );
@@ -150,5 +150,5 @@ bool ORecur::nextOcurrence( const QDate& from, QDate& next ) {
150 150
151 151
152bool ORecur::p_nextOccurrence( const QDate& from, QDate& next ) { 152bool OPimRecurrence::p_nextOccurrence( const QDate& from, QDate& next ) {
153 153
154 // easy checks, first are we too far in the future or too far in the past? 154 // easy checks, first are we too far in the future or too far in the past?
@@ -424,60 +424,60 @@ bool ORecur::p_nextOccurrence( const QDate& from, QDate& next ) {
424 424
425 425
426ORecur::RepeatType ORecur::type()const{ 426OPimRecurrence::RepeatType OPimRecurrence::type()const{
427 return data->type; 427 return data->type;
428} 428}
429 429
430 430
431int ORecur::frequency()const { 431int OPimRecurrence::frequency()const {
432 return data->freq; 432 return data->freq;
433} 433}
434 434
435 435
436int ORecur::position()const { 436int OPimRecurrence::position()const {
437 return data->pos; 437 return data->pos;
438} 438}
439 439
440 440
441char ORecur::days() const{ 441char OPimRecurrence::days() const{
442 return data->days; 442 return data->days;
443} 443}
444 444
445 445
446bool ORecur::hasEndDate()const { 446bool OPimRecurrence::hasEndDate()const {
447 return data->hasEnd; 447 return data->hasEnd;
448} 448}
449 449
450 450
451QDate ORecur::endDate()const { 451QDate OPimRecurrence::endDate()const {
452 return data->end; 452 return data->end;
453} 453}
454 454
455 455
456QDate ORecur::start()const{ 456QDate OPimRecurrence::start()const{
457 return data->start; 457 return data->start;
458} 458}
459 459
460 460
461QDateTime ORecur::createdDateTime()const { 461QDateTime OPimRecurrence::createdDateTime()const {
462 return data->create; 462 return data->create;
463} 463}
464 464
465 465
466int ORecur::repetition()const { 466int OPimRecurrence::repetition()const {
467 return data->rep; 467 return data->rep;
468} 468}
469 469
470 470
471QString ORecur::service()const { 471QString OPimRecurrence::service()const {
472 return data->app; 472 return data->app;
473} 473}
474 474
475 475
476ORecur::ExceptionList& ORecur::exceptions() { 476OPimRecurrence::ExceptionList& OPimRecurrence::exceptions() {
477 return data->list; 477 return data->list;
478} 478}
479 479
480 480
481void ORecur::setType( const RepeatType& z) { 481void OPimRecurrence::setType( const RepeatType& z) {
482 checkOrModify(); 482 checkOrModify();
483 data->type = z; 483 data->type = z;
@@ -485,5 +485,5 @@ void ORecur::setType( const RepeatType& z) {
485 485
486 486
487void ORecur::setFrequency( int freq ) { 487void OPimRecurrence::setFrequency( int freq ) {
488 checkOrModify(); 488 checkOrModify();
489 data->freq = freq; 489 data->freq = freq;
@@ -491,5 +491,5 @@ void ORecur::setFrequency( int freq ) {
491 491
492 492
493void ORecur::setPosition( int pos ) { 493void OPimRecurrence::setPosition( int pos ) {
494 checkOrModify(); 494 checkOrModify();
495 data->pos = pos; 495 data->pos = pos;
@@ -497,5 +497,5 @@ void ORecur::setPosition( int pos ) {
497 497
498 498
499void ORecur::setDays( char c ) { 499void OPimRecurrence::setDays( char c ) {
500 checkOrModify(); 500 checkOrModify();
501 data->days = c; 501 data->days = c;
@@ -503,5 +503,5 @@ void ORecur::setDays( char c ) {
503 503
504 504
505void ORecur::setEndDate( const QDate& dt) { 505void OPimRecurrence::setEndDate( const QDate& dt) {
506 checkOrModify(); 506 checkOrModify();
507 data->end = dt; 507 data->end = dt;
@@ -509,5 +509,5 @@ void ORecur::setEndDate( const QDate& dt) {
509 509
510 510
511void ORecur::setCreatedDateTime( const QDateTime& t) { 511void OPimRecurrence::setCreatedDateTime( const QDateTime& t) {
512 checkOrModify(); 512 checkOrModify();
513 data->create = t; 513 data->create = t;
@@ -515,5 +515,5 @@ void ORecur::setCreatedDateTime( const QDateTime& t) {
515 515
516 516
517void ORecur::setHasEndDate( bool b) { 517void OPimRecurrence::setHasEndDate( bool b) {
518 checkOrModify(); 518 checkOrModify();
519 data->hasEnd = b; 519 data->hasEnd = b;
@@ -521,5 +521,5 @@ void ORecur::setHasEndDate( bool b) {
521 521
522 522
523void ORecur::setRepitition( int rep ) { 523void OPimRecurrence::setRepitition( int rep ) {
524 checkOrModify(); 524 checkOrModify();
525 data->rep = rep; 525 data->rep = rep;
@@ -527,5 +527,5 @@ void ORecur::setRepitition( int rep ) {
527 527
528 528
529void ORecur::setService( const QString& app ) { 529void OPimRecurrence::setService( const QString& app ) {
530 checkOrModify(); 530 checkOrModify();
531 data->app = app; 531 data->app = app;
@@ -533,5 +533,5 @@ void ORecur::setService( const QString& app ) {
533 533
534 534
535void ORecur::setStart( const QDate& dt ) { 535void OPimRecurrence::setStart( const QDate& dt ) {
536 checkOrModify(); 536 checkOrModify();
537 data->start = dt; 537 data->start = dt;
@@ -539,5 +539,5 @@ void ORecur::setStart( const QDate& dt ) {
539 539
540 540
541void ORecur::checkOrModify() { 541void OPimRecurrence::checkOrModify() {
542 if ( data->count != 1 ) { 542 if ( data->count != 1 ) {
543 data->deref(); 543 data->deref();
@@ -559,27 +559,27 @@ void ORecur::checkOrModify() {
559 559
560 560
561QString ORecur::toString()const { 561QString OPimRecurrence::toString()const {
562 QString buf; 562 QString buf;
563 QMap<int, QString> recMap = toMap(); 563 QMap<int, QString> recMap = toMap();
564 564
565 buf += " rtype=\""; 565 buf += " rtype=\"";
566 buf += recMap[ORecur::RType]; 566 buf += recMap[OPimRecurrence::RType];
567 buf += "\""; 567 buf += "\"";
568 if (data->days > 0 ) 568 if (data->days > 0 )
569 buf += " rweekdays=\"" + recMap[ORecur::RWeekdays] + "\""; 569 buf += " rweekdays=\"" + recMap[OPimRecurrence::RWeekdays] + "\"";
570 if ( data->pos != 0 ) 570 if ( data->pos != 0 )
571 buf += " rposition=\"" + recMap[ORecur::RPosition] + "\""; 571 buf += " rposition=\"" + recMap[OPimRecurrence::RPosition] + "\"";
572 572
573 buf += " rfreq=\"" + recMap[ORecur::RFreq] + "\""; 573 buf += " rfreq=\"" + recMap[OPimRecurrence::RFreq] + "\"";
574 buf += " rhasenddate=\"" + recMap[ORecur::RHasEndDate]+ "\""; 574 buf += " rhasenddate=\"" + recMap[OPimRecurrence::RHasEndDate]+ "\"";
575 if ( data->hasEnd ) 575 if ( data->hasEnd )
576 buf += " enddt=\"" 576 buf += " enddt=\""
577 + recMap[ORecur::EndDate] 577 + recMap[OPimRecurrence::EndDate]
578 + "\""; 578 + "\"";
579 buf += " created=\"" + recMap[ORecur::Created] + "\""; 579 buf += " created=\"" + recMap[OPimRecurrence::Created] + "\"";
580 580
581 if ( data->list.isEmpty() ) return buf; 581 if ( data->list.isEmpty() ) return buf;
582 buf += " exceptions=\""; 582 buf += " exceptions=\"";
583 buf += recMap[ORecur::Exceptions]; 583 buf += recMap[OPimRecurrence::Exceptions];
584 buf += "\" "; 584 buf += "\" ";
585 585
@@ -587,21 +587,21 @@ QString ORecur::toString()const {
587} 587}
588 588
589QString ORecur::rTypeString() const 589QString OPimRecurrence::rTypeString() const
590{ 590{
591 QString retString; 591 QString retString;
592 switch ( data->type ) { 592 switch ( data->type ) {
593 case ORecur::Daily: 593 case OPimRecurrence::Daily:
594 retString = "Daily"; 594 retString = "Daily";
595 break; 595 break;
596 case ORecur::Weekly: 596 case OPimRecurrence::Weekly:
597 retString = "Weekly"; 597 retString = "Weekly";
598 break; 598 break;
599 case ORecur::MonthlyDay: 599 case OPimRecurrence::MonthlyDay:
600 retString = "MonthlyDay"; 600 retString = "MonthlyDay";
601 break; 601 break;
602 case ORecur::MonthlyDate: 602 case OPimRecurrence::MonthlyDate:
603 retString = "MonthlyDate"; 603 retString = "MonthlyDate";
604 break; 604 break;
605 case ORecur::Yearly: 605 case OPimRecurrence::Yearly:
606 retString = "Yearly"; 606 retString = "Yearly";
607 break; 607 break;
@@ -615,14 +615,14 @@ QString ORecur::rTypeString() const
615} 615}
616 616
617QMap<QString, ORecur::RepeatType> ORecur::rTypeValueConvertMap() const 617QMap<QString, OPimRecurrence::RepeatType> OPimRecurrence::rTypeValueConvertMap() const
618{ 618{
619 QMap<QString, RepeatType> convertMap; 619 QMap<QString, RepeatType> convertMap;
620 620
621 convertMap.insert( QString( "Daily" ), ORecur::Daily ); 621 convertMap.insert( QString( "Daily" ), OPimRecurrence::Daily );
622 convertMap.insert( QString( "Weekly" ), ORecur::Weekly ); 622 convertMap.insert( QString( "Weekly" ), OPimRecurrence::Weekly );
623 convertMap.insert( QString( "MonthlyDay" ), ORecur::MonthlyDay ); 623 convertMap.insert( QString( "MonthlyDay" ), OPimRecurrence::MonthlyDay );
624 convertMap.insert( QString( "MonthlyDate" ), ORecur::MonthlyDate ); 624 convertMap.insert( QString( "MonthlyDate" ), OPimRecurrence::MonthlyDate );
625 convertMap.insert( QString( "Yearly" ), ORecur::Yearly ); 625 convertMap.insert( QString( "Yearly" ), OPimRecurrence::Yearly );
626 convertMap.insert( QString( "NoRepeat" ), ORecur::NoRepeat ); 626 convertMap.insert( QString( "NoRepeat" ), OPimRecurrence::NoRepeat );
627 627
628 return convertMap; 628 return convertMap;
@@ -630,16 +630,16 @@ QMap<QString, ORecur::RepeatType> ORecur::rTypeValueConvertMap() const
630 630
631 631
632QMap<int, QString> ORecur::toMap() const 632QMap<int, QString> OPimRecurrence::toMap() const
633{ 633{
634 QMap<int, QString> retMap; 634 QMap<int, QString> retMap;
635 635
636 retMap.insert( ORecur::RType, rTypeString() ); 636 retMap.insert( OPimRecurrence::RType, rTypeString() );
637 retMap.insert( ORecur::RWeekdays, QString::number( static_cast<int>( data->days ) ) ); 637 retMap.insert( OPimRecurrence::RWeekdays, QString::number( static_cast<int>( data->days ) ) );
638 retMap.insert( ORecur::RPosition, QString::number(data->pos ) ); 638 retMap.insert( OPimRecurrence::RPosition, QString::number(data->pos ) );
639 retMap.insert( ORecur::RFreq, QString::number( data->freq ) ); 639 retMap.insert( OPimRecurrence::RFreq, QString::number( data->freq ) );
640 retMap.insert( ORecur::RHasEndDate, QString::number( static_cast<int>( data->hasEnd ) ) ); 640 retMap.insert( OPimRecurrence::RHasEndDate, QString::number( static_cast<int>( data->hasEnd ) ) );
641 if( data -> hasEnd ) 641 if( data -> hasEnd )
642 retMap.insert( ORecur::EndDate, QString::number( OTimeZone::utc().fromUTCDateTime( QDateTime( data->end, QTime(12,0,0) ) ) ) ); 642 retMap.insert( OPimRecurrence::EndDate, QString::number( OPimTimeZone::utc().fromUTCDateTime( QDateTime( data->end, QTime(12,0,0) ) ) ) );
643 retMap.insert( ORecur::Created, QString::number( OTimeZone::utc().fromUTCDateTime( data->create ) ) ); 643 retMap.insert( OPimRecurrence::Created, QString::number( OPimTimeZone::utc().fromUTCDateTime( data->create ) ) );
644 644
645 if ( data->list.isEmpty() ) return retMap; 645 if ( data->list.isEmpty() ) return retMap;
@@ -657,23 +657,23 @@ QMap<int, QString> ORecur::toMap() const
657 } 657 }
658 658
659 retMap.insert( ORecur::Exceptions, exceptBuf ); 659 retMap.insert( OPimRecurrence::Exceptions, exceptBuf );
660 660
661 return retMap; 661 return retMap;
662} 662}
663 663
664void ORecur::fromMap( const QMap<int, QString>& map ) 664void OPimRecurrence::fromMap( const QMap<int, QString>& map )
665{ 665{
666 QMap<QString, RepeatType> repTypeMap = rTypeValueConvertMap(); 666 QMap<QString, RepeatType> repTypeMap = rTypeValueConvertMap();
667 667
668 data -> type = repTypeMap[ map [ORecur::RType] ]; 668 data -> type = repTypeMap[ map [OPimRecurrence::RType] ];
669 data -> days = (char) map[ ORecur::RWeekdays ].toInt(); 669 data -> days = (char) map[ OPimRecurrence::RWeekdays ].toInt();
670 data -> pos = map[ ORecur::RPosition ].toInt(); 670 data -> pos = map[ OPimRecurrence::RPosition ].toInt();
671 data -> freq = map[ ORecur::RFreq ].toInt(); 671 data -> freq = map[ OPimRecurrence::RFreq ].toInt();
672 data -> hasEnd= map[ ORecur::RHasEndDate ].toInt() ? true : false; 672 data -> hasEnd= map[ OPimRecurrence::RHasEndDate ].toInt() ? true : false;
673 OTimeZone utc = OTimeZone::utc(); 673 OPimTimeZone utc = OPimTimeZone::utc();
674 if ( data -> hasEnd ){ 674 if ( data -> hasEnd ){
675 data -> end = utc.fromUTCDateTime( (time_t) map[ ORecur::EndDate ].toLong() ).date(); 675 data -> end = utc.fromUTCDateTime( (time_t) map[ OPimRecurrence::EndDate ].toLong() ).date();
676 } 676 }
677 data -> create = utc.fromUTCDateTime( (time_t) map[ ORecur::Created ].toLong() ).date(); 677 data -> create = utc.fromUTCDateTime( (time_t) map[ OPimRecurrence::Created ].toLong() ).date();
678 678
679#if 0 679#if 0
@@ -681,5 +681,5 @@ void ORecur::fromMap( const QMap<int, QString>& map )
681 // Convert the list of exceptions from QString into ExceptionList 681 // Convert the list of exceptions from QString into ExceptionList
682 data -> list.clear(); 682 data -> list.clear();
683 QString exceptStr = map[ ORecur::Exceptions ]; 683 QString exceptStr = map[ OPimRecurrence::Exceptions ];
684 QStringList exceptList = QStringList::split( " ", exceptStr ); 684 QStringList exceptList = QStringList::split( " ", exceptStr );
685 ... 685 ...
diff --git a/libopie2/opiepim/core/orecur.h b/libopie2/opiepim/core/opimrecurrence.h
index 7808897..f186cfe 100644
--- a/libopie2/opiepim/core/orecur.h
+++ b/libopie2/opiepim/core/opimrecurrence.h
@@ -44,5 +44,5 @@ namespace Opie {
44 */ 44 */
45 45
46class ORecur { 46class OPimRecurrence {
47 47
48 public: 48 public:
@@ -55,11 +55,11 @@ class ORecur {
55 EndDate, Created, Exceptions }; 55 EndDate, Created, Exceptions };
56 56
57 ORecur(); 57 OPimRecurrence();
58 ORecur( const QMap<int, QString>& map ); 58 OPimRecurrence( const QMap<int, QString>& map );
59 ORecur( const ORecur& ); 59 OPimRecurrence( const OPimRecurrence& );
60 ~ORecur(); 60 ~OPimRecurrence();
61 61
62 ORecur &operator=( const ORecur& ); 62 OPimRecurrence &operator=( const OPimRecurrence& );
63 bool operator==(const ORecur& )const; 63 bool operator==(const OPimRecurrence& )const;
64 64
65 bool doesRecur()const; 65 bool doesRecur()const;
@@ -86,5 +86,5 @@ class ORecur {
86 86
87 /** 87 /**
88 * The module this ORecur belongs to 88 * The module this OPimRecurrence belongs to
89 */ 89 */
90 QString service()const; 90 QString service()const;
@@ -130,6 +130,6 @@ class ORecur {
130 class Data; 130 class Data;
131 Data* data; 131 Data* data;
132 class ORecurPrivate; 132 class OPimRecurrencePrivate;
133 ORecurPrivate *d; 133 OPimRecurrencePrivate *d;
134}; 134};
135 135
diff --git a/libopie2/opiepim/core/opimresolver.cpp b/libopie2/opiepim/core/opimresolver.cpp
index 73d7de1..eb6661a 100644
--- a/libopie2/opiepim/core/opimresolver.cpp
+++ b/libopie2/opiepim/core/opimresolver.cpp
@@ -73,7 +73,7 @@ OPimRecord* OPimResolver::record( int rtti ) {
73 switch( rtti ) { 73 switch( rtti ) {
74 case 1: /* todolist */ 74 case 1: /* todolist */
75 rec = new OTodo(); 75 rec = new OPimTodo();
76 case 2: /* contact */ 76 case 2: /* contact */
77 rec = new OContact(); 77 rec = new OPimContact();
78 default: 78 default:
79 break; 79 break;
@@ -212,10 +212,10 @@ OPimBase* OPimResolver::backend( int rtti ) {
212 switch( rtti ) { 212 switch( rtti ) {
213 case TodoList: 213 case TodoList:
214 base = new OTodoAccess(); 214 base = new OPimTodoAccess();
215 break; 215 break;
216 case DateBook: 216 case DateBook:
217 break; 217 break;
218 case AddressBook: 218 case AddressBook:
219 base = new OContactAccess("Resolver"); 219 base = new OPimContactAccess("Resolver");
220 break; 220 break;
221 default: 221 default:
diff --git a/libopie2/opiepim/core/opimresolver.h b/libopie2/opiepim/core/opimresolver.h
index dd6f07f..0a6dddf 100644
--- a/libopie2/opiepim/core/opimresolver.h
+++ b/libopie2/opiepim/core/opimresolver.h
@@ -31,5 +31,5 @@
31 31
32/* OPIE */ 32/* OPIE */
33#include <opie2/otemplatebase.h> 33#include <opie2/opimtemplatebase.h>
34 34
35/* QT */ 35/* QT */
diff --git a/libopie2/opiepim/core/otemplatebase.h b/libopie2/opiepim/core/opimtemplatebase.h
index 58cbfeb..58cbfeb 100644
--- a/libopie2/opiepim/core/otemplatebase.h
+++ b/libopie2/opiepim/core/opimtemplatebase.h
diff --git a/libopie2/opiepim/core/otimezone.cpp b/libopie2/opiepim/core/opimtimezone.cpp
index e67715f..be21b1b 100644
--- a/libopie2/opiepim/core/otimezone.cpp
+++ b/libopie2/opiepim/core/opimtimezone.cpp
@@ -28,5 +28,5 @@
28*/ 28*/
29 29
30#include "otimezone.h" 30#include "opimtimezone.h"
31 31
32/* STD */ 32/* STD */
@@ -101,14 +101,14 @@ time_t to_Time_t( const QDateTime& utc, const QString& str )
101namespace Opie 101namespace Opie
102{ 102{
103OTimeZone::OTimeZone( const ZoneName& zone ) 103OPimTimeZone::OPimTimeZone( const ZoneName& zone )
104 : m_name( zone ) 104 : m_name( zone )
105{} 105{}
106 106
107 107
108OTimeZone::~OTimeZone() 108OPimTimeZone::~OPimTimeZone()
109{} 109{}
110 110
111 111
112bool OTimeZone::isValid() const 112bool OPimTimeZone::isValid() const
113{ 113{
114 return !m_name.isEmpty(); 114 return !m_name.isEmpty();
@@ -119,17 +119,17 @@ bool OTimeZone::isValid() const
119 * and ask it to convert to the timezone date 119 * and ask it to convert to the timezone date
120 */ 120 */
121QDateTime OTimeZone::toLocalDateTime( const QDateTime& dt ) 121QDateTime OPimTimeZone::toLocalDateTime( const QDateTime& dt )
122{ 122{
123 return OTimeZone::current().toDateTime( dt, *this ); 123 return OPimTimeZone::current().toDateTime( dt, *this );
124} 124}
125 125
126 126
127QDateTime OTimeZone::toUTCDateTime( const QDateTime& dt ) 127QDateTime OPimTimeZone::toUTCDateTime( const QDateTime& dt )
128{ 128{
129 return OTimeZone::utc().toDateTime( dt, *this ); 129 return OPimTimeZone::utc().toDateTime( dt, *this );
130} 130}
131 131
132 132
133QDateTime OTimeZone::fromUTCDateTime( time_t t ) 133QDateTime OPimTimeZone::fromUTCDateTime( time_t t )
134{ 134{
135 return utcTime( t ); 135 return utcTime( t );
@@ -137,5 +137,5 @@ QDateTime OTimeZone::fromUTCDateTime( time_t t )
137 137
138 138
139QDateTime OTimeZone::toDateTime( time_t t ) 139QDateTime OPimTimeZone::toDateTime( time_t t )
140{ 140{
141 return utcTime( t, m_name ); 141 return utcTime( t, m_name );
@@ -147,5 +147,5 @@ QDateTime OTimeZone::toDateTime( time_t t )
147 * convert utc -> timeZoneDT using this->m_name 147 * convert utc -> timeZoneDT using this->m_name
148 */ 148 */
149QDateTime OTimeZone::toDateTime( const QDateTime& dt, const OTimeZone& zone ) 149QDateTime OPimTimeZone::toDateTime( const QDateTime& dt, const OPimTimeZone& zone )
150{ 150{
151 time_t utc = to_Time_t( dt, zone.m_name ); 151 time_t utc = to_Time_t( dt, zone.m_name );
@@ -155,5 +155,5 @@ QDateTime OTimeZone::toDateTime( const QDateTime& dt, const OTimeZone& zone )
155 155
156 156
157time_t OTimeZone::fromDateTime( const QDateTime& time ) 157time_t OPimTimeZone::fromDateTime( const QDateTime& time )
158{ 158{
159 return to_Time_t( time, m_name ); 159 return to_Time_t( time, m_name );
@@ -161,5 +161,5 @@ time_t OTimeZone::fromDateTime( const QDateTime& time )
161 161
162 162
163time_t OTimeZone::fromUTCDateTime( const QDateTime& time ) 163time_t OPimTimeZone::fromUTCDateTime( const QDateTime& time )
164{ 164{
165 return to_Time_t( time, "UTC" ); 165 return to_Time_t( time, "UTC" );
@@ -167,19 +167,19 @@ time_t OTimeZone::fromUTCDateTime( const QDateTime& time )
167 167
168 168
169OTimeZone OTimeZone::current() 169OPimTimeZone OPimTimeZone::current()
170{ 170{
171 QCString str = ::getenv( "TZ" ); 171 QCString str = ::getenv( "TZ" );
172 OTimeZone zone( str ); 172 OPimTimeZone zone( str );
173 return zone; 173 return zone;
174} 174}
175 175
176 176
177OTimeZone OTimeZone::utc() 177OPimTimeZone OPimTimeZone::utc()
178{ 178{
179 return OTimeZone( "UTC" ); 179 return OPimTimeZone( "UTC" );
180} 180}
181 181
182 182
183QString OTimeZone::timeZone() const 183QString OPimTimeZone::timeZone() const
184{ 184{
185 return m_name; 185 return m_name;
diff --git a/libopie2/opiepim/core/otimezone.h b/libopie2/opiepim/core/opimtimezone.h
index f0b4022..284e80f 100644
--- a/libopie2/opiepim/core/otimezone.h
+++ b/libopie2/opiepim/core/opimtimezone.h
@@ -45,10 +45,10 @@ namespace Opie
45 * and time_t 45 * and time_t
46 */ 46 */
47class OTimeZone { 47class OPimTimeZone {
48 48
49 public: 49 public:
50 typedef QString ZoneName; 50 typedef QString ZoneName;
51 OTimeZone( const ZoneName& = ZoneName::null ); 51 OPimTimeZone( const ZoneName& = ZoneName::null );
52 virtual ~OTimeZone(); // just in case. 52 virtual ~OPimTimeZone(); // just in case.
53 53
54 bool isValid()const; 54 bool isValid()const;
@@ -81,5 +81,5 @@ class OTimeZone {
81 * converts the QDateTime from one timezone to this timeZone 81 * converts the QDateTime from one timezone to this timeZone
82 */ 82 */
83 QDateTime toDateTime( const QDateTime&, const OTimeZone& timeZone ); 83 QDateTime toDateTime( const QDateTime&, const OPimTimeZone& timeZone );
84 84
85 /** 85 /**
@@ -93,6 +93,6 @@ class OTimeZone {
93 time_t fromUTCDateTime( const QDateTime& ); 93 time_t fromUTCDateTime( const QDateTime& );
94 94
95 static OTimeZone current(); 95 static OPimTimeZone current();
96 static OTimeZone utc(); 96 static OPimTimeZone utc();
97 97
98 QString timeZone() const; 98 QString timeZone() const;
diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/core/opimtodo.cpp
index f534067..34df807 100644
--- a/libopie2/opiepim/otodo.cpp
+++ b/libopie2/opiepim/core/opimtodo.cpp
@@ -28,9 +28,9 @@
28*/ 28*/
29 29
30#include "otodo.h" 30#include "opimtodo.h"
31 31
32/* OPIE */ 32/* OPIE */
33#include <opie2/opimstate.h> 33#include <opie2/opimstate.h>
34#include <opie2/orecur.h> 34#include <opie2/opimrecurrence.h>
35#include <opie2/opimmaintainer.h> 35#include <opie2/opimmaintainer.h>
36#include <opie2/opimnotifymanager.h> 36#include <opie2/opimnotifymanager.h>
@@ -50,7 +50,7 @@ namespace Opie
50{ 50{
51 51
52struct OTodo::OTodoData : public QShared 52struct OPimTodo::OPimTodoData : public QShared
53{ 53{
54 OTodoData() : QShared() 54 OPimTodoData() : QShared()
55 { 55 {
56 recur = 0; 56 recur = 0;
@@ -59,5 +59,5 @@ struct OTodo::OTodoData : public QShared
59 notifiers = 0; 59 notifiers = 0;
60 }; 60 };
61 ~OTodoData() 61 ~OPimTodoData()
62 { 62 {
63 delete recur; 63 delete recur;
@@ -75,5 +75,5 @@ struct OTodo::OTodoData : public QShared
75 ushort prog; 75 ushort prog;
76 OPimState *state; 76 OPimState *state;
77 ORecur *recur; 77 OPimRecurrence *recur;
78 OPimMaintainer *maintainer; 78 OPimMaintainer *maintainer;
79 QDate start; 79 QDate start;
@@ -83,5 +83,5 @@ struct OTodo::OTodoData : public QShared
83 83
84 84
85OTodo::OTodo( const OTodo &event ) 85OPimTodo::OPimTodo( const OPimTodo &event )
86 : OPimRecord( event ), data( event.data ) 86 : OPimRecord( event ), data( event.data )
87{ 87{
@@ -91,11 +91,11 @@ OTodo::OTodo( const OTodo &event )
91 91
92 92
93OTodo::~OTodo() 93OPimTodo::~OPimTodo()
94{ 94{
95 95
96 // qWarning("~OTodo " ); 96 // qWarning("~OPimTodo " );
97 if ( data->deref() ) 97 if ( data->deref() )
98 { 98 {
99 // qWarning("OTodo::dereffing"); 99 // qWarning("OPimTodo::dereffing");
100 delete data; 100 delete data;
101 data = 0l; 101 data = 0l;
@@ -104,5 +104,5 @@ OTodo::~OTodo()
104 104
105 105
106OTodo::OTodo( bool completed, int priority, 106OPimTodo::OPimTodo( bool completed, int priority,
107 const QArray<int> &category, 107 const QArray<int> &category,
108 const QString& summary, 108 const QString& summary,
@@ -112,8 +112,8 @@ OTodo::OTodo( bool completed, int priority,
112 : OPimRecord( uid ) 112 : OPimRecord( uid )
113{ 113{
114 // qWarning("OTodoData " + summary); 114 // qWarning("OPimTodoData " + summary);
115 setCategories( category ); 115 setCategories( category );
116 116
117 data = new OTodoData; 117 data = new OPimTodoData;
118 118
119 data->date = date; 119 data->date = date;
@@ -127,5 +127,5 @@ OTodo::OTodo( bool completed, int priority,
127 127
128 128
129OTodo::OTodo( bool completed, int priority, 129OPimTodo::OPimTodo( bool completed, int priority,
130 const QStringList &category, 130 const QStringList &category,
131 const QString& summary, 131 const QString& summary,
@@ -135,8 +135,8 @@ OTodo::OTodo( bool completed, int priority,
135 : OPimRecord( uid ) 135 : OPimRecord( uid )
136{ 136{
137 // qWarning("OTodoData" + summary); 137 // qWarning("OPimTodoData" + summary);
138 setCategories( idsFromString( category.join( ";" ) ) ); 138 setCategories( idsFromString( category.join( ";" ) ) );
139 139
140 data = new OTodoData; 140 data = new OPimTodoData;
141 141
142 data->date = date; 142 data->date = date;
@@ -150,5 +150,5 @@ OTodo::OTodo( bool completed, int priority,
150 150
151 151
152bool OTodo::match( const QRegExp &regExp ) const 152bool OPimTodo::match( const QRegExp &regExp ) const
153{ 153{
154 if ( QString::number( data->priority ).find( regExp ) != -1 ) 154 if ( QString::number( data->priority ).find( regExp ) != -1 )
@@ -176,5 +176,5 @@ bool OTodo::match( const QRegExp &regExp ) const
176 176
177 177
178bool OTodo::isCompleted() const 178bool OPimTodo::isCompleted() const
179{ 179{
180 return data->isCompleted; 180 return data->isCompleted;
@@ -182,5 +182,5 @@ bool OTodo::isCompleted() const
182 182
183 183
184bool OTodo::hasDueDate() const 184bool OPimTodo::hasDueDate() const
185{ 185{
186 return data->hasDate; 186 return data->hasDate;
@@ -188,5 +188,5 @@ bool OTodo::hasDueDate() const
188 188
189 189
190bool OTodo::hasStartDate() const 190bool OPimTodo::hasStartDate() const
191{ 191{
192 return data->start.isValid(); 192 return data->start.isValid();
@@ -194,5 +194,5 @@ bool OTodo::hasStartDate() const
194 194
195 195
196bool OTodo::hasCompletedDate() const 196bool OPimTodo::hasCompletedDate() const
197{ 197{
198 return data->completed.isValid(); 198 return data->completed.isValid();
@@ -200,5 +200,5 @@ bool OTodo::hasCompletedDate() const
200 200
201 201
202int OTodo::priority() const 202int OPimTodo::priority() const
203{ 203{
204 return data->priority; 204 return data->priority;
@@ -206,5 +206,5 @@ int OTodo::priority() const
206 206
207 207
208QString OTodo::summary() const 208QString OPimTodo::summary() const
209{ 209{
210 return data->sum; 210 return data->sum;
@@ -212,5 +212,5 @@ QString OTodo::summary() const
212 212
213 213
214ushort OTodo::progress() const 214ushort OPimTodo::progress() const
215{ 215{
216 return data->prog; 216 return data->prog;
@@ -218,5 +218,5 @@ ushort OTodo::progress() const
218 218
219 219
220QDate OTodo::dueDate() const 220QDate OPimTodo::dueDate() const
221{ 221{
222 return data->date; 222 return data->date;
@@ -224,5 +224,5 @@ QDate OTodo::dueDate() const
224 224
225 225
226QDate OTodo::startDate() const 226QDate OPimTodo::startDate() const
227{ 227{
228 return data->start; 228 return data->start;
@@ -230,5 +230,5 @@ QDate OTodo::startDate() const
230 230
231 231
232QDate OTodo::completedDate() const 232QDate OPimTodo::completedDate() const
233{ 233{
234 return data->completed; 234 return data->completed;
@@ -236,5 +236,5 @@ QDate OTodo::completedDate() const
236 236
237 237
238QString OTodo::description() const 238QString OPimTodo::description() const
239{ 239{
240 return data->desc; 240 return data->desc;
@@ -242,5 +242,5 @@ QString OTodo::description() const
242 242
243 243
244bool OTodo::hasState() const 244bool OPimTodo::hasState() const
245{ 245{
246 if ( !data->state ) return false; 246 if ( !data->state ) return false;
@@ -249,5 +249,5 @@ bool OTodo::hasState() const
249 249
250 250
251OPimState OTodo::state() const 251OPimState OPimTodo::state() const
252{ 252{
253 if ( !data->state ) 253 if ( !data->state )
@@ -261,5 +261,5 @@ OPimState OTodo::state() const
261 261
262 262
263bool OTodo::hasRecurrence() const 263bool OPimTodo::hasRecurrence() const
264{ 264{
265 if ( !data->recur ) return false; 265 if ( !data->recur ) return false;
@@ -268,7 +268,7 @@ bool OTodo::hasRecurrence() const
268 268
269 269
270ORecur OTodo::recurrence() const 270OPimRecurrence OPimTodo::recurrence() const
271{ 271{
272 if ( !data->recur ) return ORecur(); 272 if ( !data->recur ) return OPimRecurrence();
273 273
274 return ( *data->recur ); 274 return ( *data->recur );
@@ -276,5 +276,5 @@ ORecur OTodo::recurrence() const
276 276
277 277
278bool OTodo::hasMaintainer() const 278bool OPimTodo::hasMaintainer() const
279{ 279{
280 if ( !data->maintainer ) return false; 280 if ( !data->maintainer ) return false;
@@ -284,5 +284,5 @@ bool OTodo::hasMaintainer() const
284 284
285 285
286OPimMaintainer OTodo::maintainer() const 286OPimMaintainer OPimTodo::maintainer() const
287{ 287{
288 if ( !data->maintainer ) return OPimMaintainer(); 288 if ( !data->maintainer ) return OPimMaintainer();
@@ -292,5 +292,5 @@ OPimMaintainer OTodo::maintainer() const
292 292
293 293
294void OTodo::setCompleted( bool completed ) 294void OPimTodo::setCompleted( bool completed )
295{ 295{
296 changeOrModify(); 296 changeOrModify();
@@ -299,5 +299,5 @@ void OTodo::setCompleted( bool completed )
299 299
300 300
301void OTodo::setHasDueDate( bool hasDate ) 301void OPimTodo::setHasDueDate( bool hasDate )
302{ 302{
303 changeOrModify(); 303 changeOrModify();
@@ -306,5 +306,5 @@ void OTodo::setHasDueDate( bool hasDate )
306 306
307 307
308void OTodo::setDescription( const QString &desc ) 308void OPimTodo::setDescription( const QString &desc )
309{ 309{
310 // qWarning( "desc " + desc ); 310 // qWarning( "desc " + desc );
@@ -314,5 +314,5 @@ void OTodo::setDescription( const QString &desc )
314 314
315 315
316void OTodo::setSummary( const QString& sum ) 316void OPimTodo::setSummary( const QString& sum )
317{ 317{
318 changeOrModify(); 318 changeOrModify();
@@ -321,5 +321,5 @@ void OTodo::setSummary( const QString& sum )
321 321
322 322
323void OTodo::setPriority( int prio ) 323void OPimTodo::setPriority( int prio )
324{ 324{
325 changeOrModify(); 325 changeOrModify();
@@ -328,5 +328,5 @@ void OTodo::setPriority( int prio )
328 328
329 329
330void OTodo::setDueDate( const QDate& date ) 330void OPimTodo::setDueDate( const QDate& date )
331{ 331{
332 changeOrModify(); 332 changeOrModify();
@@ -335,5 +335,5 @@ void OTodo::setDueDate( const QDate& date )
335 335
336 336
337void OTodo::setStartDate( const QDate& date ) 337void OPimTodo::setStartDate( const QDate& date )
338{ 338{
339 changeOrModify(); 339 changeOrModify();
@@ -342,5 +342,5 @@ void OTodo::setStartDate( const QDate& date )
342 342
343 343
344void OTodo::setCompletedDate( const QDate& date ) 344void OPimTodo::setCompletedDate( const QDate& date )
345{ 345{
346 changeOrModify(); 346 changeOrModify();
@@ -349,5 +349,5 @@ void OTodo::setCompletedDate( const QDate& date )
349 349
350 350
351void OTodo::setState( const OPimState& state ) 351void OPimTodo::setState( const OPimState& state )
352{ 352{
353 changeOrModify(); 353 changeOrModify();
@@ -359,5 +359,5 @@ void OTodo::setState( const OPimState& state )
359 359
360 360
361void OTodo::setRecurrence( const ORecur& rec ) 361void OPimTodo::setRecurrence( const OPimRecurrence& rec )
362{ 362{
363 changeOrModify(); 363 changeOrModify();
@@ -365,9 +365,9 @@ void OTodo::setRecurrence( const ORecur& rec )
365 ( *data->recur ) = rec; 365 ( *data->recur ) = rec;
366 else 366 else
367 data->recur = new ORecur( rec ); 367 data->recur = new OPimRecurrence( rec );
368} 368}
369 369
370 370
371void OTodo::setMaintainer( const OPimMaintainer& pim ) 371void OPimTodo::setMaintainer( const OPimMaintainer& pim )
372{ 372{
373 changeOrModify(); 373 changeOrModify();
@@ -380,5 +380,5 @@ void OTodo::setMaintainer( const OPimMaintainer& pim )
380 380
381 381
382bool OTodo::isOverdue( ) 382bool OPimTodo::isOverdue( )
383{ 383{
384 if ( data->hasDate && !data->isCompleted ) 384 if ( data->hasDate && !data->isCompleted )
@@ -388,5 +388,5 @@ bool OTodo::isOverdue( )
388 388
389 389
390void OTodo::setProgress( ushort progress ) 390void OPimTodo::setProgress( ushort progress )
391{ 391{
392 changeOrModify(); 392 changeOrModify();
@@ -395,5 +395,5 @@ void OTodo::setProgress( ushort progress )
395 395
396 396
397QString OTodo::toShortText() const 397QString OPimTodo::toShortText() const
398{ 398{
399 return summary(); 399 return summary();
@@ -404,5 +404,5 @@ QString OTodo::toShortText() const
404 Returns a richt text string 404 Returns a richt text string
405*/ 405*/
406QString OTodo::toRichText() const 406QString OPimTodo::toRichText() const
407{ 407{
408 QString text; 408 QString text;
@@ -474,5 +474,5 @@ QString OTodo::toRichText() const
474 474
475 475
476bool OTodo::hasNotifiers() const 476bool OPimTodo::hasNotifiers() const
477{ 477{
478 if ( !data->notifiers ) return false; 478 if ( !data->notifiers ) return false;
@@ -481,5 +481,5 @@ bool OTodo::hasNotifiers() const
481 481
482 482
483OPimNotifyManager& OTodo::notifiers() 483OPimNotifyManager& OPimTodo::notifiers()
484{ 484{
485 if ( !data->notifiers ) 485 if ( !data->notifiers )
@@ -489,5 +489,5 @@ OPimNotifyManager& OTodo::notifiers()
489 489
490 490
491const OPimNotifyManager& OTodo::notifiers() const 491const OPimNotifyManager& OPimTodo::notifiers() const
492{ 492{
493 if ( !data->notifiers ) 493 if ( !data->notifiers )
@@ -498,5 +498,5 @@ const OPimNotifyManager& OTodo::notifiers() const
498 498
499 499
500bool OTodo::operator<( const OTodo &toDoEvent ) const 500bool OPimTodo::operator<( const OPimTodo &toDoEvent ) const
501{ 501{
502 if ( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; 502 if ( !hasDueDate() && !toDoEvent.hasDueDate() ) return true;
@@ -517,5 +517,5 @@ bool OTodo::operator<( const OTodo &toDoEvent ) const
517 517
518 518
519bool OTodo::operator<=( const OTodo &toDoEvent ) const 519bool OPimTodo::operator<=( const OPimTodo &toDoEvent ) const
520{ 520{
521 if ( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; 521 if ( !hasDueDate() && !toDoEvent.hasDueDate() ) return true;
@@ -536,5 +536,5 @@ bool OTodo::operator<=( const OTodo &toDoEvent ) const
536 536
537 537
538bool OTodo::operator>( const OTodo &toDoEvent ) const 538bool OPimTodo::operator>( const OPimTodo &toDoEvent ) const
539{ 539{
540 if ( !hasDueDate() && !toDoEvent.hasDueDate() ) return false; 540 if ( !hasDueDate() && !toDoEvent.hasDueDate() ) return false;
@@ -555,5 +555,5 @@ bool OTodo::operator>( const OTodo &toDoEvent ) const
555 555
556 556
557bool OTodo::operator>=( const OTodo &toDoEvent ) const 557bool OPimTodo::operator>=( const OPimTodo &toDoEvent ) const
558{ 558{
559 if ( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; 559 if ( !hasDueDate() && !toDoEvent.hasDueDate() ) return true;
@@ -574,5 +574,5 @@ bool OTodo::operator>=( const OTodo &toDoEvent ) const
574 574
575 575
576bool OTodo::operator==( const OTodo &toDoEvent ) const 576bool OPimTodo::operator==( const OPimTodo &toDoEvent ) const
577{ 577{
578 if ( data->priority != toDoEvent.data->priority ) return false; 578 if ( data->priority != toDoEvent.data->priority ) return false;
@@ -590,5 +590,5 @@ bool OTodo::operator==( const OTodo &toDoEvent ) const
590 590
591 591
592void OTodo::deref() 592void OPimTodo::deref()
593{ 593{
594 594
@@ -603,5 +603,5 @@ void OTodo::deref()
603 603
604 604
605OTodo &OTodo::operator=( const OTodo &item ) 605OPimTodo &OPimTodo::operator=( const OPimTodo &item )
606{ 606{
607 if ( this == &item ) return * this; 607 if ( this == &item ) return * this;
@@ -617,5 +617,5 @@ OTodo &OTodo::operator=( const OTodo &item )
617 617
618 618
619QMap<int, QString> OTodo::toMap() const 619QMap<int, QString> OPimTodo::toMap() const
620{ 620{
621 QMap<int, QString> map; 621 QMap<int, QString> map;
@@ -647,5 +647,5 @@ QMap<int, QString> OTodo::toMap() const
647 * right in place 647 * right in place
648 */ 648 */
649void OTodo::changeOrModify() 649void OPimTodo::changeOrModify()
650{ 650{
651 if ( data->count != 1 ) 651 if ( data->count != 1 )
@@ -653,5 +653,5 @@ void OTodo::changeOrModify()
653 qWarning( "changeOrModify" ); 653 qWarning( "changeOrModify" );
654 data->deref(); 654 data->deref();
655 OTodoData* d2 = new OTodoData(); 655 OPimTodoData* d2 = new OPimTodoData();
656 copy( data, d2 ); 656 copy( data, d2 );
657 data = d2; 657 data = d2;
@@ -665,5 +665,5 @@ void OTodo::changeOrModify()
665 * be sure to copy it here 665 * be sure to copy it here
666 */ 666 */
667void OTodo::copy( OTodoData* src, OTodoData* dest ) 667void OPimTodo::copy( OPimTodoData* src, OPimTodoData* dest )
668{ 668{
669 dest->date = src->date; 669 dest->date = src->date;
@@ -680,5 +680,5 @@ void OTodo::copy( OTodoData* src, OTodoData* dest )
680 680
681 if ( src->recur ) 681 if ( src->recur )
682 dest->recur = new ORecur( *src->recur ); 682 dest->recur = new OPimRecurrence( *src->recur );
683 683
684 if ( src->maintainer ) 684 if ( src->maintainer )
@@ -693,11 +693,11 @@ void OTodo::copy( OTodoData* src, OTodoData* dest )
693 693
694 694
695QString OTodo::type() const 695QString OPimTodo::type() const
696{ 696{
697 return QString::fromLatin1( "OTodo" ); 697 return QString::fromLatin1( "OPimTodo" );
698} 698}
699 699
700 700
701QString OTodo::recordField( int /*id*/ ) const 701QString OPimTodo::recordField( int /*id*/ ) const
702{ 702{
703 return QString::null; 703 return QString::null;
@@ -705,5 +705,5 @@ QString OTodo::recordField( int /*id*/ ) const
705 705
706 706
707int OTodo::rtti() 707int OPimTodo::rtti()
708{ 708{
709 return OPimResolver::TodoList; 709 return OPimResolver::TodoList;
diff --git a/libopie2/opiepim/otodo.h b/libopie2/opiepim/core/opimtodo.h
index 04dd269..5304180 100644
--- a/libopie2/opiepim/otodo.h
+++ b/libopie2/opiepim/core/opimtodo.h
@@ -48,11 +48,11 @@ namespace Opie
48 48
49class OPimState; 49class OPimState;
50class ORecur; 50class OPimRecurrence;
51class OPimMaintainer; 51class OPimMaintainer;
52class OPimNotifyManager; 52class OPimNotifyManager;
53class OTodo : public OPimRecord 53class OPimTodo : public OPimRecord
54{ 54{
55 public: 55 public:
56 typedef QValueList<OTodo> ValueList; 56 typedef QValueList<OPimTodo> ValueList;
57 enum RecordFields { 57 enum RecordFields {
58 Uid = Qtopia::UID_ID, 58 Uid = Qtopia::UID_ID,
@@ -91,5 +91,5 @@ class OTodo : public OPimRecord
91 @param uid what is the UUID of this Event 91 @param uid what is the UUID of this Event
92 **/ 92 **/
93 OTodo( bool completed = false, int priority = Normal, 93 OPimTodo( bool completed = false, int priority = Normal,
94 const QStringList &category = QStringList(), 94 const QStringList &category = QStringList(),
95 const QString &summary = QString::null , 95 const QString &summary = QString::null ,
@@ -99,5 +99,5 @@ class OTodo : public OPimRecord
99 int uid = 0 /*empty*/ ); 99 int uid = 0 /*empty*/ );
100 100
101 OTodo( bool completed, int priority, 101 OPimTodo( bool completed, int priority,
102 const QArray<int>& category, 102 const QArray<int>& category,
103 const QString& summary = QString::null, 103 const QString& summary = QString::null,
@@ -110,10 +110,10 @@ class OTodo : public OPimRecord
110 * 110 *
111 */ 111 */
112 OTodo( const OTodo & ); 112 OPimTodo( const OPimTodo & );
113 113
114 /** 114 /**
115 *destructor 115 *destructor
116 */ 116 */
117 ~OTodo(); 117 ~OPimTodo();
118 118
119 /** 119 /**
@@ -160,5 +160,5 @@ class OTodo : public OPimRecord
160 160
161 /** 161 /**
162 * What is the state of this OTodo? 162 * What is the state of this OPimTodo?
163 */ 163 */
164 OPimState state() const; 164 OPimState state() const;
@@ -172,13 +172,13 @@ class OTodo : public OPimRecord
172 * the recurrance of this 172 * the recurrance of this
173 */ 173 */
174 ORecur recurrence() const; 174 OPimRecurrence recurrence() const;
175 175
176 /** 176 /**
177 * does this OTodo have a maintainer? 177 * does this OPimTodo have a maintainer?
178 */ 178 */
179 bool hasMaintainer() const; 179 bool hasMaintainer() const;
180 180
181 /** 181 /**
182 * the Maintainer of this OTodo 182 * the Maintainer of this OPimTodo
183 */ 183 */
184 OPimMaintainer maintainer() const; 184 OPimMaintainer maintainer() const;
@@ -267,5 +267,5 @@ class OTodo : public OPimRecord
267 void setCompletedDate( const QDate& date ); 267 void setCompletedDate( const QDate& date );
268 268
269 void setRecurrence( const ORecur& ); 269 void setRecurrence( const OPimRecurrence& );
270 270
271 void setDescription( const QString& ); 271 void setDescription( const QString& );
@@ -288,28 +288,28 @@ class OTodo : public OPimRecord
288 virtual bool match( const QRegExp &r ) const; 288 virtual bool match( const QRegExp &r ) const;
289 289
290 bool operator<( const OTodo &toDoEvent ) const; 290 bool operator<( const OPimTodo &toDoEvent ) const;
291 bool operator<=( const OTodo &toDoEvent ) const; 291 bool operator<=( const OPimTodo &toDoEvent ) const;
292 bool operator!=( const OTodo &toDoEvent ) const; 292 bool operator!=( const OPimTodo &toDoEvent ) const;
293 bool operator>( const OTodo &toDoEvent ) const; 293 bool operator>( const OPimTodo &toDoEvent ) const;
294 bool operator>=( const OTodo &toDoEvent ) const; 294 bool operator>=( const OPimTodo &toDoEvent ) const;
295 bool operator==( const OTodo &toDoEvent ) const; 295 bool operator==( const OPimTodo &toDoEvent ) const;
296 OTodo &operator=( const OTodo &toDoEvent ); 296 OPimTodo &operator=( const OPimTodo &toDoEvent );
297 297
298 static int rtti(); 298 static int rtti();
299 299
300 private: 300 private:
301 class OTodoPrivate; 301 class OPimTodoPrivate;
302 struct OTodoData; 302 struct OPimTodoData;
303 303
304 void deref(); 304 void deref();
305 inline void changeOrModify(); 305 inline void changeOrModify();
306 void copy( OTodoData* src, OTodoData* dest ); 306 void copy( OPimTodoData* src, OPimTodoData* dest );
307 OTodoPrivate *d; 307 OPimTodoPrivate *d;
308 OTodoData *data; 308 OPimTodoData *data;
309 309
310}; 310};
311 311
312 312
313inline bool OTodo::operator!=( const OTodo &toDoEvent ) const 313inline bool OPimTodo::operator!=( const OPimTodo &toDoEvent ) const
314{ 314{
315 return !( *this == toDoEvent ); 315 return !( *this == toDoEvent );
diff --git a/libopie2/opiepim/core/otodoaccess.cpp b/libopie2/opiepim/core/otodoaccess.cpp
index 2a3695d..83750d5 100644
--- a/libopie2/opiepim/core/otodoaccess.cpp
+++ b/libopie2/opiepim/core/otodoaccess.cpp
@@ -36,26 +36,26 @@
36 36
37namespace Opie { 37namespace Opie {
38OTodoAccess::OTodoAccess( OTodoAccessBackend* end, enum Access ) 38OPimTodoAccess::OPimTodoAccess( OPimTodoAccessBackend* end, enum Access )
39 : QObject(), OPimAccessTemplate<OTodo>( end ), m_todoBackEnd( end ) 39 : QObject(), OPimAccessTemplate<OPimTodo>( end ), m_todoBackEnd( end )
40{ 40{
41// if (end == 0l ) 41// if (end == 0l )
42// m_todoBackEnd = new OTodoAccessBackendSQL( QString::null); 42// m_todoBackEnd = new OPimTodoAccessBackendSQL( QString::null);
43 43
44 // Zecke: Du musst hier noch fr das XML-Backend einen Appnamen bergeben ! 44 // Zecke: Du musst hier noch fr das XML-Backend einen Appnamen bergeben !
45 if (end == 0l ) 45 if (end == 0l )
46 m_todoBackEnd = OBackendFactory<OTodoAccessBackend>::Default ("todo", QString::null); 46 m_todoBackEnd = OBackendFactory<OPimTodoAccessBackend>::Default ("todo", QString::null);
47 47
48 setBackEnd( m_todoBackEnd ); 48 setBackEnd( m_todoBackEnd );
49} 49}
50OTodoAccess::~OTodoAccess() { 50OPimTodoAccess::~OPimTodoAccess() {
51// qWarning("~OTodoAccess"); 51// qWarning("~OPimTodoAccess");
52} 52}
53void OTodoAccess::mergeWith( const QValueList<OTodo>& list ) { 53void OPimTodoAccess::mergeWith( const QValueList<OPimTodo>& list ) {
54 QValueList<OTodo>::ConstIterator it; 54 QValueList<OPimTodo>::ConstIterator it;
55 for ( it = list.begin(); it != list.end(); ++it ) { 55 for ( it = list.begin(); it != list.end(); ++it ) {
56 replace( (*it) ); 56 replace( (*it) );
57 } 57 }
58} 58}
59OTodoAccess::List OTodoAccess::effectiveToDos( const QDate& start, 59OPimTodoAccess::List OPimTodoAccess::effectiveToDos( const QDate& start,
60 const QDate& end, 60 const QDate& end,
61 bool includeNoDates ) { 61 bool includeNoDates ) {
@@ -65,27 +65,27 @@ OTodoAccess::List OTodoAccess::effectiveToDos( const QDate& start,
65 return lis; 65 return lis;
66} 66}
67OTodoAccess::List OTodoAccess::effectiveToDos( const QDate& start, 67OPimTodoAccess::List OPimTodoAccess::effectiveToDos( const QDate& start,
68 bool includeNoDates ) { 68 bool includeNoDates ) {
69 return effectiveToDos( start, QDate::currentDate(), 69 return effectiveToDos( start, QDate::currentDate(),
70 includeNoDates ); 70 includeNoDates );
71} 71}
72OTodoAccess::List OTodoAccess::overDue() { 72OPimTodoAccess::List OPimTodoAccess::overDue() {
73 List lis( m_todoBackEnd->overDue(), this ); 73 List lis( m_todoBackEnd->overDue(), this );
74 return lis; 74 return lis;
75} 75}
76/* sort order */ 76/* sort order */
77OTodoAccess::List OTodoAccess::sorted( bool ascending, int sort,int filter, int cat ) { 77OPimTodoAccess::List OPimTodoAccess::sorted( bool ascending, int sort,int filter, int cat ) {
78 QArray<int> ints = m_todoBackEnd->sorted( ascending, sort, 78 QArray<int> ints = m_todoBackEnd->sorted( ascending, sort,
79 filter, cat ); 79 filter, cat );
80 OTodoAccess::List list( ints, this ); 80 OPimTodoAccess::List list( ints, this );
81 return list; 81 return list;
82} 82}
83void OTodoAccess::removeAllCompleted() { 83void OPimTodoAccess::removeAllCompleted() {
84 m_todoBackEnd->removeAllCompleted(); 84 m_todoBackEnd->removeAllCompleted();
85} 85}
86QBitArray OTodoAccess::backendSupport( const QString& ) const{ 86QBitArray OPimTodoAccess::backendSupport( const QString& ) const{
87 return m_todoBackEnd->supports(); 87 return m_todoBackEnd->supports();
88} 88}
89bool OTodoAccess::backendSupports( int attr, const QString& ar) const{ 89bool OPimTodoAccess::backendSupports( int attr, const QString& ar) const{
90 return backendSupport(ar).testBit( attr ); 90 return backendSupport(ar).testBit( attr );
91} 91}
diff --git a/libopie2/opiepim/core/otodoaccess.h b/libopie2/opiepim/core/otodoaccess.h
index e13d277..51f3793 100644
--- a/libopie2/opiepim/core/otodoaccess.h
+++ b/libopie2/opiepim/core/otodoaccess.h
@@ -33,5 +33,5 @@
33#include <qvaluelist.h> 33#include <qvaluelist.h>
34 34
35#include <opie2/otodo.h> 35#include <opie2/opimtodo.h>
36#include <opie2/otodoaccessbackend.h> 36#include <opie2/otodoaccessbackend.h>
37#include <opie2/opimaccesstemplate.h> 37#include <opie2/opimaccesstemplate.h>
@@ -40,9 +40,9 @@ namespace Opie {
40 40
41/** 41/**
42 * OTodoAccess 42 * OPimTodoAccess
43 * the class to get access to 43 * the class to get access to
44 * the todolist 44 * the todolist
45 */ 45 */
46class OTodoAccess : public QObject, public OPimAccessTemplate<OTodo> { 46class OPimTodoAccess : public QObject, public OPimAccessTemplate<OPimTodo> {
47 Q_OBJECT 47 Q_OBJECT
48public: 48public:
@@ -59,6 +59,6 @@ public:
59 * picked up 59 * picked up
60 */ 60 */
61 OTodoAccess( OTodoAccessBackend* = 0l, enum Access acc = Random ); 61 OPimTodoAccess( OPimTodoAccessBackend* = 0l, enum Access acc = Random );
62 ~OTodoAccess(); 62 ~OPimTodoAccess();
63 63
64 64
@@ -82,5 +82,5 @@ public:
82 82
83 /** 83 /**
84 * return overdue OTodos 84 * return overdue OPimTodos
85 */ 85 */
86 List overDue(); 86 List overDue();
@@ -92,8 +92,8 @@ public:
92 92
93 /** 93 /**
94 * merge a list of OTodos into 94 * merge a list of OPimTodos into
95 * the resource 95 * the resource
96 */ 96 */
97 void mergeWith( const QValueList<OTodo>& ); 97 void mergeWith( const QValueList<OPimTodo>& );
98 98
99 /** 99 /**
@@ -105,5 +105,5 @@ public:
105 * request information about what a backend supports. 105 * request information about what a backend supports.
106 * Supports in the sense of beeing able to store. 106 * Supports in the sense of beeing able to store.
107 * This is related to the enum in OTodo 107 * This is related to the enum in OPimTodo
108 * 108 *
109 * @param backend Will be used in the future when we support multiple backend 109 * @param backend Will be used in the future when we support multiple backend
@@ -119,15 +119,15 @@ public:
119signals: 119signals:
120 /** 120 /**
121 * if the OTodoAccess was changed 121 * if the OPimTodoAccess was changed
122 */ 122 */
123 void changed( const OTodoAccess* ); 123 void changed( const OPimTodoAccess* );
124 void changed( const OTodoAccess*, int uid ); 124 void changed( const OPimTodoAccess*, int uid );
125 void added( const OTodoAccess*, int uid ); 125 void added( const OPimTodoAccess*, int uid );
126 void removed( const OTodoAccess*, int uid ); 126 void removed( const OPimTodoAccess*, int uid );
127private: 127private:
128 int m_cat; 128 int m_cat;
129 OTodoAccessBackend* m_todoBackEnd; 129 OPimTodoAccessBackend* m_todoBackEnd;
130 class OTodoAccessPrivate; 130 class OPimTodoAccessPrivate;
131 OTodoAccessPrivate* d; 131 OPimTodoAccessPrivate* d;
132}; 132};
133 133
diff --git a/libopie2/opiepim/libopiepim2.control b/libopie2/opiepim/libopiepim2.control
index 1b419ad..b548b01 100644
--- a/libopie2/opiepim/libopiepim2.control
+++ b/libopie2/opiepim/libopiepim2.control
@@ -5,6 +5,6 @@ Section: opie/system
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: 1.8.2-$SUB_VERSION.2 7Version: 1.8.3-$SUB_VERSION.2
8Depends: libqpe1, libopiecore2 (1.8.2) 8Depends: libqpe1, libopiecore2 (>=1.8.0)
9Provides: libopiepim2 9Provides: libopiepim2
10Description: Opie library 2.0 PIM 10Description: Opie library 2.0 PIM
diff --git a/libopie2/opiepim/opiepim.pro b/libopie2/opiepim/opiepim.pro
index 82737f4..9a34e29 100644
--- a/libopie2/opiepim/opiepim.pro
+++ b/libopie2/opiepim/opiepim.pro
@@ -2,13 +2,15 @@ TEMPLATE = lib
2CONFIG += qt warn_on debug 2CONFIG += qt warn_on debug
3DESTDIR = $(OPIEDIR)/lib 3DESTDIR = $(OPIEDIR)/lib
4HEADERS = ocontact.h ocontactfields.h opimrecord.h otodo.h opimnotify.h opimnotifymanager.h oevent.h 4HEADERS = opimcontact.h opimcontactfields.h opimrecord.h opimtodo.h opimnotify.h \
5 5 opimnotifymanager.h opimevent.h
6SOURCES = ocontact.cpp ocontactfields.cpp opimrecord.cpp otodo.cpp opimnotify.cpp \ 6
7 opimnotifymanager.cpp oevent.cpp 7SOURCES = opimcontact.cpp opimcontactfields.cpp opimrecord.cpp opimtodo.cpp opimnotify.cpp \
8 opimnotifymanager.cpp opimevent.cpp
8INTERFACES = 9INTERFACES =
9TARGET = opiepim2 10TARGET = opiepim2
10VERSION = 1.8.2 11VERSION = 1.8.3
11INCLUDEPATH += $(OPIEDIR)/include 12INCLUDEPATH += $(OPIEDIR)/include
12DEPENDPATH += $(OPIEDIR)/include 13DEPENDPATH += $(OPIEDIR)/include
14LIBS += -lopiecore2
13 15
14include ( core/core.pro ) 16include ( core/core.pro )
@@ -16,8 +18,4 @@ include ( core/backends/backends.pro )
16include ( ui/ui.pro ) 18include ( ui/ui.pro )
17 19
18MOC_DIR = moc
19OBJECTS_DIR = obj
20
21
22!contains( platform, x11 ) { 20!contains( platform, x11 ) {
23 include ( $(OPIEDIR)/include.pro ) 21 include ( $(OPIEDIR)/include.pro )
@@ -28,3 +26,2 @@ contains( platform, x11 ) {
28} 26}
29 27
30LIBS += -lopiecore2