author | mickeyl <mickeyl> | 2004-02-24 12:46:23 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-02-24 12:46:23 (UTC) |
commit | 911473db35a9fce5f3589f03c27210456faaba86 (patch) (unidiff) | |
tree | 7d55b6117b24de6ab18747b00a4641d38001c0ed /libopie2/opiepim/core/ocontactaccess.cpp | |
parent | a2ead23c3614fe581261455cb4c3f31cee2098f3 (diff) | |
download | opie-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 (limited to 'libopie2/opiepim/core/ocontactaccess.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/ocontactaccess.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
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 @@ | |||
56 | namespace Opie { | 56 | namespace Opie { |
57 | 57 | ||
58 | OContactAccess::OContactAccess ( const QString appname, const QString , | 58 | OPimContactAccess::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 | } |
86 | OContactAccess::~OContactAccess () | 86 | OPimContactAccess::~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 | ||
96 | bool OContactAccess::save () | 96 | bool 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 | ||
115 | const uint OContactAccess::querySettings() | 115 | const uint OPimContactAccess::querySettings() |
116 | { | 116 | { |
117 | return ( m_backEnd->querySettings() ); | 117 | return ( m_backEnd->querySettings() ); |
118 | } | 118 | } |
119 | 119 | ||
120 | bool OContactAccess::hasQuerySettings ( int querySettings ) const | 120 | bool OPimContactAccess::hasQuerySettings ( int querySettings ) const |
121 | { | 121 | { |
122 | return ( m_backEnd->hasQuerySettings ( querySettings ) ); | 122 | return ( m_backEnd->hasQuerySettings ( querySettings ) ); |
123 | } | 123 | } |
124 | ORecordList<OContact> OContactAccess::sorted( bool ascending, int sortOrder, int sortFilter, int cat ) const | 124 | OPimRecordList<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 | ||
131 | bool OContactAccess::wasChangedExternally()const | 131 | bool 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 | ||
137 | void OContactAccess::copMessage( const QCString &msg, const QByteArray & ) | 137 | void 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 ); |