author | zecke <zecke> | 2002-12-13 21:57:31 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-12-13 21:57:31 (UTC) |
commit | de449c83cf37a64a9d2df586f6d1acecf3bc0c6e (patch) (unidiff) | |
tree | ec75354c1d0c3731b675df639e29e173a2967f7e | |
parent | d00761e2b3b69e1edddcb2115c4c0ae6b5aa4265 (diff) | |
download | opie-de449c83cf37a64a9d2df586f6d1acecf3bc0c6e.zip opie-de449c83cf37a64a9d2df586f6d1acecf3bc0c6e.tar.gz opie-de449c83cf37a64a9d2df586f6d1acecf3bc0c6e.tar.bz2 |
No default arguments in implementation please
-rw-r--r-- | core/pim/addressbook/abview.cpp | 46 |
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 | |||
@@ -56,9 +56,9 @@ AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ): | |||
56 | // Create Layout and put WidgetStack into it. | 56 | // Create Layout and put WidgetStack into it. |
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" ); |
64 | m_abTable->setCurrentCell( 0, 0 ); | 64 | m_abTable->setCurrentCell( 0, 0 ); |
@@ -72,10 +72,10 @@ AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ): | |||
72 | m_ablabel = new AbLabel( cardBox, "CardView"); | 72 | m_ablabel = new AbLabel( cardBox, "CardView"); |
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 | ||
81 | load(); | 81 | load(); |
@@ -104,9 +104,9 @@ void AbView::addEntry( const OContact &newContact ) | |||
104 | { | 104 | { |
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 | } |
110 | void AbView::removeEntry( const int UID ) | 110 | void AbView::removeEntry( const int UID ) |
111 | { | 111 | { |
112 | qWarning("abview:RemoveContact"); | 112 | qWarning("abview:RemoveContact"); |
@@ -150,9 +150,9 @@ void AbView::load() | |||
150 | qWarning("abView:Load data"); | 150 | qWarning("abView:Load data"); |
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{ |
158 | m_list = m_contactdb->sorted( true, 0, 0, 0 ); | 158 | m_list = m_contactdb->sorted( true, 0, 0, 0 ); |
@@ -160,10 +160,10 @@ void AbView::load() | |||
160 | } | 160 | } |
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 | ||
168 | void AbView::reload() | 168 | void AbView::reload() |
169 | { | 169 | { |
@@ -195,9 +195,9 @@ void AbView::setShowByCategory( const QString& cat ) | |||
195 | qWarning ("Categories: Selected %s.. Number: %d", cat.latin1(), m_curr_category); | 195 | qWarning ("Categories: Selected %s.. Number: %d", cat.latin1(), m_curr_category); |
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 | ||
203 | } | 203 | } |
@@ -239,9 +239,9 @@ void AbView::setListOrder( const QValueList<int>& ordered ) | |||
239 | updateView(); | 239 | updateView(); |
240 | } | 240 | } |
241 | 241 | ||
242 | 242 | ||
243 | QString AbView::showCategory() const | 243 | QString AbView::showCategory() const |
244 | { | 244 | { |
245 | return mCat.label( "Contacts", m_curr_category ); | 245 | return mCat.label( "Contacts", m_curr_category ); |
246 | } | 246 | } |
247 | 247 | ||
@@ -258,15 +258,15 @@ void AbView::showPersonal( bool personal ) | |||
258 | // The current default backend will be stored | 258 | // The current default backend will be stored |
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 ) |
272 | return; | 272 | return; |
@@ -279,23 +279,23 @@ void AbView::showPersonal( bool personal ) | |||
279 | m_storedDB = 0l; | 279 | m_storedDB = 0l; |
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 | ||
288 | QStringList AbView::categories() | 288 | QStringList 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 |
296 | void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, | 296 | void 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 | ||
301 | // We reloading the data: Deselect Letterpicker | 301 | // We reloading the data: Deselect Letterpicker |
@@ -314,9 +314,9 @@ void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, | |||
314 | 314 | ||
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 | ||
322 | qWarning( "found: %d", m_list.count() ); | 322 | qWarning( "found: %d", m_list.count() ); |
@@ -328,9 +328,9 @@ void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, | |||
328 | // Now remove all contacts with wrong category (if any selected) | 328 | // Now remove all contacts with wrong category (if any selected) |
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 | } |
336 | 336 | ||
@@ -355,9 +355,9 @@ void AbView::slotSwitch(){ | |||
355 | m_curr_View = TableView; | 355 | m_curr_View = TableView; |
356 | break; | 356 | break; |
357 | } | 357 | } |
358 | updateView(); | 358 | updateView(); |
359 | 359 | ||
360 | } | 360 | } |
361 | 361 | ||
362 | // END: Slots | 362 | // END: Slots |
363 | 363 | ||
@@ -368,9 +368,9 @@ void AbView::clearForCategory() | |||
368 | 368 | ||
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 | } |
376 | } | 376 | } |
@@ -434,9 +434,9 @@ void AbView::updateView( bool newdata ) | |||
434 | } | 434 | } |
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(); |
442 | 442 | ||
@@ -459,9 +459,9 @@ void AbView::updateView( bool newdata ) | |||
459 | m_ablabel -> selectContact( m_curr_Contact ); | 459 | m_ablabel -> selectContact( m_curr_Contact ); |
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 | } |
467 | 467 | ||