summaryrefslogtreecommitdiff
authorzecke <zecke>2002-12-13 21:57:31 (UTC)
committer zecke <zecke>2002-12-13 21:57:31 (UTC)
commitde449c83cf37a64a9d2df586f6d1acecf3bc0c6e (patch) (unidiff)
treeec75354c1d0c3731b675df639e29e173a2967f7e
parentd00761e2b3b69e1edddcb2115c4c0ae6b5aa4265 (diff)
downloadopie-de449c83cf37a64a9d2df586f6d1acecf3bc0c6e.zip
opie-de449c83cf37a64a9d2df586f6d1acecf3bc0c6e.tar.gz
opie-de449c83cf37a64a9d2df586f6d1acecf3bc0c6e.tar.bz2
No default arguments in implementation please
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abview.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp
index 7226e82..161b163 100644
--- a/core/pim/addressbook/abview.cpp
+++ b/core/pim/addressbook/abview.cpp
@@ -57,7 +57,7 @@ AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ):
57 QVBoxLayout *vb = new QVBoxLayout( this ); 57 QVBoxLayout *vb = new QVBoxLayout( this );
58 m_viewStack = new QWidgetStack( this ); 58 m_viewStack = new QWidgetStack( this );
59 vb->addWidget( m_viewStack ); 59 vb->addWidget( m_viewStack );
60 60
61 // Creat TableView 61 // Creat TableView
62 QVBox* tableBox = new QVBox( m_viewStack ); 62 QVBox* tableBox = new QVBox( m_viewStack );
63 m_abTable = new AbTable( m_orderedFields, tableBox, "table" ); 63 m_abTable = new AbTable( m_orderedFields, tableBox, "table" );
@@ -73,8 +73,8 @@ AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ):
73 m_viewStack -> addWidget( cardBox , CardView ); 73 m_viewStack -> addWidget( cardBox , CardView );
74 74
75 // Connect views to me 75 // Connect views to me
76 connect ( m_abTable, SIGNAL( signalSwitch( void ) ), 76 connect ( m_abTable, SIGNAL( signalSwitch( void ) ),
77 this, SLOT( slotSwitch( void ) ) ); 77 this, SLOT( slotSwitch( void ) ) );
78 connect ( m_ablabel, SIGNAL( signalOkPressed( void ) ), 78 connect ( m_ablabel, SIGNAL( signalOkPressed( void ) ),
79 this, SLOT( slotSwitch( void ) ) ); 79 this, SLOT( slotSwitch( void ) ) );
80 80
@@ -105,7 +105,7 @@ void AbView::addEntry( const OContact &newContact )
105 qWarning("abview:AddContact"); 105 qWarning("abview:AddContact");
106 m_contactdb->add ( newContact ); 106 m_contactdb->add ( newContact );
107 load(); 107 load();
108 108
109} 109}
110void AbView::removeEntry( const int UID ) 110void AbView::removeEntry( const int UID )
111{ 111{
@@ -151,7 +151,7 @@ void AbView::load()
151 151
152 // Letter Search is stopped at this place 152 // Letter Search is stopped at this place
153 emit signalClearLetterPicker(); 153 emit signalClearLetterPicker();
154 154
155 if ( m_inPersonal ) 155 if ( m_inPersonal )
156 m_list = m_contactdb->allRecords(); 156 m_list = m_contactdb->allRecords();
157 else{ 157 else{
@@ -161,8 +161,8 @@ void AbView::load()
161 161
162 qWarning ("Number of contacts: %d", m_list.count()); 162 qWarning ("Number of contacts: %d", m_list.count());
163 163
164 updateView( true ); 164 updateView( true );
165 165
166} 166}
167 167
168void AbView::reload() 168void AbView::reload()
@@ -196,7 +196,7 @@ void AbView::setShowByCategory( const QString& cat )
196 196
197 m_curr_category = intCat; 197 m_curr_category = intCat;
198 emit signalClearLetterPicker(); 198 emit signalClearLetterPicker();
199 199
200 load(); 200 load();
201 } 201 }
202 202
@@ -240,7 +240,7 @@ void AbView::setListOrder( const QValueList<int>& ordered )
240} 240}
241 241
242 242
243QString AbView::showCategory() const 243QString AbView::showCategory() const
244{ 244{
245 return mCat.label( "Contacts", m_curr_category ); 245 return mCat.label( "Contacts", m_curr_category );
246} 246}
@@ -259,13 +259,13 @@ void AbView::showPersonal( bool personal )
259 // to avoid unneeded load/stores. 259 // to avoid unneeded load/stores.
260 m_storedDB = m_contactdb; 260 m_storedDB = m_contactdb;
261 261
262 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, 262 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
263 addressbookPersonalVCardName() ); 263 addressbookPersonalVCardName() );
264 m_contactdb = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); 264 m_contactdb = new OContactAccess ( "addressbook", QString::null , vcard_backend, true );
265 265
266 m_inPersonal = true; 266 m_inPersonal = true;
267 m_curr_View = CardView; 267 m_curr_View = CardView;
268 268
269 }else{ 269 }else{
270 270
271 if ( !m_inPersonal ) 271 if ( !m_inPersonal )
@@ -280,21 +280,21 @@ void AbView::showPersonal( bool personal )
280 280
281 m_curr_View = TableView; 281 m_curr_View = TableView;
282 m_inPersonal = false; 282 m_inPersonal = false;
283 283
284 } 284 }
285 load(); 285 load();
286} 286}
287 287
288QStringList AbView::categories() 288QStringList AbView::categories()
289{ 289{
290 mCat.load( categoryFileName() ); 290 mCat.load( categoryFileName() );
291 QStringList categoryList = mCat.labels( "Contacts" ); 291 QStringList categoryList = mCat.labels( "Contacts" );
292 return categoryList; 292 return categoryList;
293} 293}
294 294
295// BEGIN: Slots 295// BEGIN: Slots
296void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, 296void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp,
297 bool , QString cat = QString::null ) 297 bool , QString cat )
298{ 298{
299 qWarning( "void AbView::slotDoFind" ); 299 qWarning( "void AbView::slotDoFind" );
300 300
@@ -315,7 +315,7 @@ void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp,
315 QRegExp r( str ); 315 QRegExp r( str );
316 r.setCaseSensitive( caseSensitive ); 316 r.setCaseSensitive( caseSensitive );
317 r.setWildcard( !useRegExp ); 317 r.setWildcard( !useRegExp );
318 318
319 // Get all matching entries out of the database 319 // Get all matching entries out of the database
320 m_list = m_contactdb->matchRegexp( r ); 320 m_list = m_contactdb->matchRegexp( r );
321 321
@@ -329,7 +329,7 @@ void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp,
329 // This algorithm is a litte bit ineffective, but 329 // This algorithm is a litte bit ineffective, but
330 // we will not have a lot of matching entries.. 330 // we will not have a lot of matching entries..
331 clearForCategory(); 331 clearForCategory();
332 332
333 // Now show all found entries 333 // Now show all found entries
334 updateView( true ); 334 updateView( true );
335} 335}
@@ -356,7 +356,7 @@ void AbView::slotSwitch(){
356 break; 356 break;
357 } 357 }
358 updateView(); 358 updateView();
359 359
360} 360}
361 361
362// END: Slots 362// END: Slots
@@ -369,7 +369,7 @@ void AbView::clearForCategory()
369 OContactAccess::List allList = m_list; 369 OContactAccess::List allList = m_list;
370 if ( m_curr_category != -1 ){ 370 if ( m_curr_category != -1 ){
371 for ( it = allList.begin(); it != allList.end(); ++it ){ 371 for ( it = allList.begin(); it != allList.end(); ++it ){
372 if ( !contactCompare( *it, m_curr_category ) ){ 372 if ( !contactCompare( *it, m_curr_category ) ){
373 qWarning("Removing %d", (*it).uid()); 373 qWarning("Removing %d", (*it).uid());
374 m_list.remove( (*it).uid() ); 374 m_list.remove( (*it).uid() );
375 } 375 }
@@ -435,7 +435,7 @@ void AbView::updateView( bool newdata )
435 }else 435 }else
436 m_curr_Contact = 0; 436 m_curr_Contact = 0;
437 } 437 }
438 438
439 // Feed all views with new lists 439 // Feed all views with new lists
440 if ( newdata ) 440 if ( newdata )
441 updateListinViews(); 441 updateListinViews();
@@ -460,7 +460,7 @@ void AbView::updateView( bool newdata )
460 m_ablabel -> setFocus(); 460 m_ablabel -> setFocus();
461 break; 461 break;
462 } 462 }
463 463
464 // Raise the current View 464 // Raise the current View
465 m_viewStack -> raiseWidget( m_curr_View ); 465 m_viewStack -> raiseWidget( m_curr_View );
466} 466}