summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/abview.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/addressbook/abview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abview.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp
index 8d61582..aa242b7 100644
--- a/core/pim/addressbook/abview.cpp
+++ b/core/pim/addressbook/abview.cpp
@@ -15,13 +15,13 @@
**********************************************************************/
#include "abview.h"
-#include <qlayout.h>
+#include <opie2/ocontactaccessbackend_vcard.h>
#include <qpe/global.h>
-#include <opie/ocontactaccessbackend_vcard.h>
+#include <qlayout.h>
#include <assert.h>
@@ -52,9 +52,9 @@ AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ):
m_orderedFields( ordered )
{
qWarning("AbView::c'tor");
// Load default database and handle syncing myself.. !
- m_contactdb = new OContactAccess ( "addressbook", 0l, 0l, false );
+ m_contactdb = new Opie::OPimContactAccess ( "addressbook", 0l, 0l, false );
m_contactdb -> setReadAhead( 16 ); // Use ReadAhead-Cache if available
mCat.load( categoryFileName() );
// Create Layout and put WidgetStack into it.
@@ -103,9 +103,9 @@ void AbView::setView( Views view )
m_curr_View = view;
load();
}
-void AbView::addEntry( const OContact &newContact )
+void AbView::addEntry( const Opie::OPimContact &newContact )
{
qWarning("abview:AddContact");
m_contactdb->add ( newContact );
load();
@@ -117,19 +117,19 @@ void AbView::removeEntry( const int UID )
m_contactdb->remove( UID );
load();
}
-void AbView::replaceEntry( const OContact &contact )
+void AbView::replaceEntry( const Opie::OPimContact &contact )
{
qWarning("abview:ReplaceContact");
m_contactdb->replace( contact );
load();
}
-OContact AbView::currentEntry()
+Opie::OPimContact AbView::currentEntry()
{
- OContact currentContact;
+ Opie::OPimContact currentContact;
switch ( (int) m_curr_View ) {
case TableView:
currentContact = m_abTable -> currentEntry();
@@ -156,9 +156,9 @@ void AbView::load()
// Letter Search is stopped at this place
emit signalClearLetterPicker();
if ( m_inPersonal )
- // VCard Backend does not sort..
+ // VCard Backend does not sort..
m_list = m_contactdb->allRecords();
else{
m_list = m_contactdb->sorted( true, 0, 0, 0 );
if ( m_curr_category != -1 )
@@ -227,16 +227,16 @@ void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode )
qWarning("void AbView::setShowByLetter( %c, %d )", c, mode );
assert( mode < AbConfig::LASTELEMENT );
- OContact query;
+ Opie::OPimContact query;
if ( c == 0 ){
load();
return;
}else{
- // If the current Backend is unable to solve the query, we will
+ // If the current Backend is unable to solve the query, we will
// ignore the request ..
- if ( ! m_contactdb->hasQuerySettings( OContactAccess::WildCards | OContactAccess::IgnoreCase ) ){
+ if ( ! m_contactdb->hasQuerySettings( Opie::OPimContactAccess::WildCards | Opie::OPimContactAccess::IgnoreCase ) ){
return;
}
switch( mode ){
@@ -250,9 +250,9 @@ void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode )
qWarning( "Unknown Searchmode for AbView::setShowByLetter ! -> %d", mode );
qWarning( "I will ignore it.." );
return;
}
- m_list = m_contactdb->queryByExample( query, OContactAccess::WildCards | OContactAccess::IgnoreCase );
+ m_list = m_contactdb->queryByExample( query, Opie::OPimContactAccess::WildCards | Opie::OPimContactAccess::IgnoreCase );
if ( m_curr_category != -1 )
clearForCategory();
m_curr_Contact = 0;
}
@@ -288,11 +288,11 @@ void AbView::showPersonal( bool personal )
// The current default backend will be stored
// to avoid unneeded load/stores.
m_storedDB = m_contactdb;
- OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
+ Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null,
addressbookPersonalVCardName() );
- m_contactdb = new OContactAccess ( "addressbook", QString::null , vcard_backend, true );
+ m_contactdb = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true );
m_inPersonal = true;
m_curr_View = CardView;
@@ -317,9 +317,9 @@ void AbView::showPersonal( bool personal )
void AbView::setCurrentUid( int uid ){
m_curr_Contact = uid;
- updateView( true ); //true: Don't modificate the UID !
+ updateView( true ); //true: Don't modificate the UID !
}
QStringList AbView::categories()
@@ -400,12 +400,12 @@ void AbView::slotSwitch(){
// END: Slots
void AbView::clearForCategory()
{
- OContactAccess::List::Iterator it;
+ Opie::OPimContactAccess::List::Iterator it;
// Now remove all contacts with wrong category if any category selected
- OContactAccess::List allList = m_list;
+ Opie::OPimContactAccess::List allList = m_list;
if ( m_curr_category != -1 ){
for ( it = allList.begin(); it != allList.end(); ++it ){
if ( !contactCompare( *it, m_curr_category ) ){
// qWarning("Removing %d", (*it).uid());
@@ -415,11 +415,11 @@ void AbView::clearForCategory()
}
}
-bool AbView::contactCompare( const OContact &cnt, int category )
+bool AbView::contactCompare( const Opie::OPimContact &cnt, int category )
{
- // qWarning ("bool AbView::contactCompare( const OContact &cnt, %d )", category);
+ // qWarning ("bool AbView::contactCompare( const Opie::OPimContact &cnt, %d )", category);
bool returnMe;
QArray<int> cats;
cats = cnt.categories();