summaryrefslogtreecommitdiff
path: root/core/pim
Unidiff
Diffstat (limited to 'core/pim') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/ablabel.cpp18
-rw-r--r--core/pim/addressbook/abtable.cpp57
-rw-r--r--core/pim/addressbook/abview.cpp61
-rw-r--r--core/pim/addressbook/addressbook.cpp67
-rw-r--r--core/pim/addressbook/configdlg.cpp11
-rw-r--r--core/pim/addressbook/contacteditor.cpp82
-rw-r--r--core/pim/addressbook/opie-addressbook.control2
-rw-r--r--core/pim/addressbook/picker.cpp28
8 files changed, 170 insertions, 156 deletions
diff --git a/core/pim/addressbook/ablabel.cpp b/core/pim/addressbook/ablabel.cpp
index 70a66a0..8216d6f 100644
--- a/core/pim/addressbook/ablabel.cpp
+++ b/core/pim/addressbook/ablabel.cpp
@@ -20,7 +20,7 @@
20 20
21#include "ablabel.h" 21#include "ablabel.h"
22 22
23 23#include <opie2/odebug.h>
24 24
25AbLabel::AbLabel( QWidget *parent, const char *name ): 25AbLabel::AbLabel( QWidget *parent, const char *name ):
26 QTextView( parent, name ), 26 QTextView( parent, name ),
@@ -95,15 +95,15 @@ void AbLabel::keyPressEvent( QKeyEvent *e )
95 if ( !m_empty ){ 95 if ( !m_empty ){
96 switch( e->key() ) { 96 switch( e->key() ) {
97 case Qt::Key_Left: 97 case Qt::Key_Left:
98 qWarning( "Left.."); 98 Opie::Core::owarn << "Left.." << oendl;
99 case Qt::Key_Right: 99 case Qt::Key_Right:
100 qWarning( "Right.."); 100 Opie::Core::owarn << "Right.." << oendl;
101 case Qt::Key_F33: 101 case Qt::Key_F33:
102 qWarning( "OK.."); 102 Opie::Core::owarn << "OK.." << oendl;
103 emit signalOkPressed(); 103 emit signalOkPressed();
104 break; 104 break;
105 case Qt::Key_Up: 105 case Qt::Key_Up:
106 qWarning( "UP.."); 106 Opie::Core::owarn << "Up.." << oendl;
107 if ( ( visibleHeight() < contentsHeight() ) && 107 if ( ( visibleHeight() < contentsHeight() ) &&
108 ( verticalScrollBar()->value() > verticalScrollBar()->minValue() ) ) 108 ( verticalScrollBar()->value() > verticalScrollBar()->minValue() ) )
109 scrollBy( 0, -(visibleHeight()-20) ); 109 scrollBy( 0, -(visibleHeight()-20) );
@@ -117,10 +117,10 @@ void AbLabel::keyPressEvent( QKeyEvent *e )
117 117
118 break; 118 break;
119 case Qt::Key_Down: 119 case Qt::Key_Down:
120 qWarning( "DOWN.."); 120 Opie::Core::owarn << "Down.." << oendl;
121 // qWarning( "visible: %d, content: %d",visibleHeight(),contentsHeight()); 121 // Opie::Core::owarn << "Visible: " << visibleHeight() << ", content: " << contentHeight() << oendl;
122 // qWarning( "value: %d; barMaxValue: %d", verticalScrollBar()->value() 122 // Opie::Core::owarn << "Value: " << verticalScrollBar()->value()
123 // , verticalScrollBar()->maxValue() ); 123 // << ", barMaxValue: " << verticalScrollBar()->maxValue() << oendl;
124 if ( ( visibleHeight() < contentsHeight() ) && 124 if ( ( visibleHeight() < contentsHeight() ) &&
125 ( verticalScrollBar()->value() < verticalScrollBar()->maxValue() ) ) 125 ( verticalScrollBar()->value() < verticalScrollBar()->maxValue() ) )
126 scrollBy( 0, visibleHeight()-20 ); 126 scrollBy( 0, visibleHeight()-20 );
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp
index cd77b13..cb57342 100644
--- a/core/pim/addressbook/abtable.cpp
+++ b/core/pim/addressbook/abtable.cpp
@@ -19,7 +19,7 @@
19** 19**
20**********************************************************************/ 20**********************************************************************/
21 21
22 22#include <opie2/odebug.h>
23#include <opie2/opimrecordlist.h> 23#include <opie2/opimrecordlist.h>
24 24
25#include <qpe/timestring.h> 25#include <qpe/timestring.h>
@@ -121,8 +121,7 @@ AbTable::AbTable( const QValueList<int> order, QWidget *parent, const char *name
121 columnVisible( true ), 121 columnVisible( true ),
122 countNested( 0 ) 122 countNested( 0 )
123{ 123{
124 //qWarning("C'tor start"); 124 //Opie::Core::owarn << "C'tor start" << oendl;
125
126 setSelectionMode( NoSelection ); 125 setSelectionMode( NoSelection );
127 init(); 126 init();
128 setSorting( TRUE ); 127 setSorting( TRUE );
@@ -130,7 +129,7 @@ AbTable::AbTable( const QValueList<int> order, QWidget *parent, const char *name
130 this, SLOT(itemClicked(int,int)) ); 129 this, SLOT(itemClicked(int,int)) );
131 130
132 // contactList.clear(); 131 // contactList.clear();
133 //qWarning("C'tor end"); 132 //Opie::Core::owarn << "C'tor end" << oendl;
134} 133}
135 134
136AbTable::~AbTable() 135AbTable::~AbTable()
@@ -152,7 +151,7 @@ void AbTable::init()
152 151
153void AbTable::setContacts( const Opie::OPimContactAccess::List& viewList ) 152void AbTable::setContacts( const Opie::OPimContactAccess::List& viewList )
154{ 153{
155 qWarning("AbTable::setContacts()"); 154 Opie::Core::owarn << "AbTable::setContacts()" << oendl;
156 155
157 clear(); 156 clear();
158 m_viewList = viewList; 157 m_viewList = viewList;
@@ -184,13 +183,13 @@ void AbTable::setOrderedList( const QValueList<int> ordered )
184 183
185bool AbTable::selectContact( int UID ) 184bool AbTable::selectContact( int UID )
186{ 185{
187 qWarning( "AbTable::selectContact( %d )", UID ); 186 Opie::Core::owarn << "AbTable::selectContact( " << UID << " )" << oendl;
188 int rows = numRows(); 187 int rows = numRows();
189 Opie::OPimContact* foundContact = 0l; 188 Opie::OPimContact* foundContact = 0l;
190 bool found = false; 189 bool found = false;
191 190
192 setPaintingEnabled( FALSE ); 191 setPaintingEnabled( FALSE );
193 qWarning( "search start" ); 192 Opie::Core::owarn << "Search start" << oendl;
194 for ( int r = 0; r < rows; ++r ) { 193 for ( int r = 0; r < rows; ++r ) {
195 if ( m_viewList.uidAt( r ) == UID ){ 194 if ( m_viewList.uidAt( r ) == UID ){
196 ensureCellVisible( r, 0 ); 195 ensureCellVisible( r, 0 );
@@ -199,7 +198,7 @@ bool AbTable::selectContact( int UID )
199 break; 198 break;
200 } 199 }
201 } 200 }
202 qWarning( "search end" ); 201 Opie::Core::owarn << "Search end" << oendl;
203 202
204 if ( !found ){ 203 if ( !found ){
205 ensureCellVisible( 0,0 ); 204 ensureCellVisible( 0,0 );
@@ -214,7 +213,8 @@ bool AbTable::selectContact( int UID )
214#if 0 213#if 0
215void AbTable::insertIntoTable( const Opie::OPimContact& cnt, int row ) 214void AbTable::insertIntoTable( const Opie::OPimContact& cnt, int row )
216{ 215{
217 qWarning( "void AbTable::insertIntoTable( const Opie::OPimContact& cnt, %d )", row ); 216 Opie::Core::owarn << "void AbTable::insertIntoTable( const Opie::OPimContact& cnt, "
217 << row << " )" << oendl;
218 QString strName; 218 QString strName;
219 ContactItem contactItem; 219 ContactItem contactItem;
220 220
@@ -257,7 +257,7 @@ void AbTable::columnClicked( int col )
257 257
258void AbTable::resort() 258void AbTable::resort()
259{ 259{
260 qWarning( "void AbTable::resort() NOT POSSIBLE !!" ); 260 Opie::Core::owarn << "void AbTable::resort() NOT POSSIBLE !!" << oendl;
261#if 0 261#if 0
262 setPaintingEnabled( FALSE ); 262 setPaintingEnabled( FALSE );
263 if ( sorting() ) { 263 if ( sorting() ) {
@@ -283,7 +283,7 @@ int AbTable::currentEntry_UID()
283 283
284void AbTable::clear() 284void AbTable::clear()
285{ 285{
286 qWarning( "void AbTable::clear()" ); 286 Opie::Core::owarn << "void AbTable::clear()" << oendl;
287 // contactList.clear(); 287 // contactList.clear();
288 288
289 setPaintingEnabled( FALSE ); 289 setPaintingEnabled( FALSE );
@@ -301,7 +301,7 @@ void AbTable::clear()
301// Refresh updates column 2 if the contactsettings changed 301// Refresh updates column 2 if the contactsettings changed
302void AbTable::refresh() 302void AbTable::refresh()
303{ 303{
304 qWarning( "void AbTable::refresh() NOT IMPLEMENTED !!" ); 304 Opie::Core::owarn << "void AbTable::refresh() NOT IMPLEMENTED !!" << oendl;
305 305
306#if 0 306#if 0
307 int rows = numRows(); 307 int rows = numRows();
@@ -334,7 +334,7 @@ void AbTable::keyPressEvent( QKeyEvent *e )
334 if ( key >= 'A' && key <= 'Z' ) 334 if ( key >= 'A' && key <= 'Z' )
335 moveTo( key ); 335 moveTo( key );
336 336
337 //qWarning("Received key .."); 337 // Opie::Core::owarn << "Received key .." << oendl;
338 switch( e->key() ) { 338 switch( e->key() ) {
339 case Qt::Key_Space: 339 case Qt::Key_Space:
340 case Qt::Key_Return: 340 case Qt::Key_Return:
@@ -342,11 +342,11 @@ void AbTable::keyPressEvent( QKeyEvent *e )
342 emit signalSwitch(); 342 emit signalSwitch();
343 break; 343 break;
344 // case Qt::Key_Up: 344 // case Qt::Key_Up:
345 // qWarning("a"); 345 // Opie::Core::owarn << "a" << oendl;
346 // emit signalKeyUp(); 346 // emit signalKeyUp();
347 // break; 347 // break;
348 // case Qt::Key_Down: 348 // case Qt::Key_Down:
349 // qWarning("b"); 349 // Opie::Core::owarn << "b" << oendl;
350 // emit signalKeyDown(); 350 // emit signalKeyDown();
351 // break; 351 // break;
352 default: 352 default:
@@ -357,7 +357,7 @@ void AbTable::keyPressEvent( QKeyEvent *e )
357 357
358void AbTable::moveTo( char c ) 358void AbTable::moveTo( char c )
359{ 359{
360 qWarning( "void AbTable::moveTo( char c ) NOT IMPLEMENTED !!" ); 360 Opie::Core::owarn << "void AbTable::moveTo( char c ) NOT IMPLEMENTED !!" << oendl;
361 361
362#if 0 362#if 0
363 int rows = numRows(); 363 int rows = numRows();
@@ -423,7 +423,7 @@ void AbTable::resizeRows() {
423 423
424void AbTable::realignTable() 424void AbTable::realignTable()
425{ 425{
426 //qWarning( "void AbTable::realignTable()" ); 426 //Opie::Core::owarn << "void AbTable::realignTable()" << oendl;
427 427
428 setPaintingEnabled( FALSE ); 428 setPaintingEnabled( FALSE );
429 429
@@ -473,7 +473,7 @@ void QTable::paintEmptyArea( QPainter *p, int cx, int cy, int cw, int ch )
473 473
474void AbTable::fitColumns() 474void AbTable::fitColumns()
475{ 475{
476 qWarning( "void AbTable::fitColumns()" ); 476 Opie::Core::owarn << "void AbTable::fitColumns()" << oendl;
477 int contentsWidth = visibleWidth() / 2; 477 int contentsWidth = visibleWidth() / 2;
478 // Fix to better value 478 // Fix to better value
479 // contentsWidth = 130; 479 // contentsWidth = 130;
@@ -485,7 +485,7 @@ void AbTable::fitColumns()
485 columnVisible = true; 485 columnVisible = true;
486 } 486 }
487 487
488 //qWarning("Width: %d", contentsWidth); 488 //Opie::Core::owarn << "Width: " << contentsWidth << oendl;
489 489
490 setColumnWidth( 0, contentsWidth ); 490 setColumnWidth( 0, contentsWidth );
491 adjustColumn(1); 491 adjustColumn(1);
@@ -497,7 +497,7 @@ void AbTable::fitColumns()
497 497
498void AbTable::show() 498void AbTable::show()
499{ 499{
500 //qWarning( "void AbTable::show()" ); 500 //Opie::Core::owarn << "void AbTable::show()" << oendl;
501 realignTable(); 501 realignTable();
502 QTable::show(); 502 QTable::show();
503} 503}
@@ -521,11 +521,11 @@ void AbTable::setChoiceNames( const QStringList& list)
521 521
522void AbTable::itemClicked(int,int col) 522void AbTable::itemClicked(int,int col)
523{ 523{
524 //qWarning( "AbTable::itemClicked(int, col:%d)", col); 524 //Opie::Core::owarn << "AbTable::itemClicked(int, col: " << col << ")" << oendl;
525 if ( col == 2 ) { 525 if ( col == 2 ) {
526 return; 526 return;
527 } else { 527 } else {
528 // qWarning ("Emitting signalSwitch()"); 528 //Opie::Core::owarn << "Emitting signalSwitch()" << oendl;
529 emit signalSwitch(); 529 emit signalSwitch();
530 } 530 }
531} 531}
@@ -562,7 +562,7 @@ QStringList AbTable::choiceSelection(int /*index*/) const
562 562
563void AbTable::updateVisible() 563void AbTable::updateVisible()
564{ 564{
565 //qWarning("void AbTable::updateVisible()"); 565 //Opie::Core::owarn << "void AbTable::updateVisible()" << oendl;
566 566
567 int visible, 567 int visible,
568 totalRows, 568 totalRows,
@@ -598,7 +598,8 @@ void AbTable::updateVisible()
598 598
599void AbTable::setPaintingEnabled( bool e ) 599void AbTable::setPaintingEnabled( bool e )
600{ 600{
601 //qWarning("IN void AbTable::setPaintingEnabled( %d )->Nested: %d", e, countNested ); 601 //Opie::Core::owarn << "IN void AbTable::setPaintingEnabled( " << e << " )->Nested: "
602 // << countNested << oendl;
602 603
603 if ( e ) { 604 if ( e ) {
604 if ( countNested > 0 ) 605 if ( countNested > 0 )
@@ -614,11 +615,13 @@ void AbTable::setPaintingEnabled( bool e )
614 enablePainting = false; 615 enablePainting = false;
615 setUpdatesEnabled( false ); 616 setUpdatesEnabled( false );
616 } 617 }
617 //qWarning("OUT void AbTable::setPaintingEnabled( %d )->Nested: %d", e, countNested ); 618 //Opie::Core::owarn << "OUT void AbTable::setPaintingEnabled( " << e << " )->Nested: "
619 // << countNested << oendl;
618} 620}
619 621
620void AbTable::viewportPaintEvent( QPaintEvent* e ) { 622void AbTable::viewportPaintEvent( QPaintEvent* e ) {
621 //qWarning(" void AbTable::viewportPaintEvent( QPaintEvent* e ) -> %d", enablePainting); 623 //Opie::Core::owarn << "void AbTable::viewportPaintEvent( QPaintEvent* e ) -> "
624 // << enablePainting << oendl;
622 if ( enablePainting ) 625 if ( enablePainting )
623 QTable::viewportPaintEvent( e ); 626 QTable::viewportPaintEvent( e );
624} 627}
@@ -628,7 +631,7 @@ void AbTable::paintCell(QPainter* p, int row, int col, const QRect& cr, bool )
628 631
629 p->save(); 632 p->save();
630 633
631 //qWarning( "Paint row: %d", row ); 634 //Opie::Core::owarn << "Paint row: " << row << oendl;
632 635
633 Opie::OPimContact act_contact = m_viewList[row]; 636 Opie::OPimContact act_contact = m_viewList[row];
634 637
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp
index aa242b7..52e5f59 100644
--- a/core/pim/addressbook/abview.cpp
+++ b/core/pim/addressbook/abview.cpp
@@ -17,6 +17,7 @@
17#include "abview.h" 17#include "abview.h"
18 18
19#include <opie2/ocontactaccessbackend_vcard.h> 19#include <opie2/ocontactaccessbackend_vcard.h>
20#include <opie2/odebug.h>
20 21
21#include <qpe/global.h> 22#include <qpe/global.h>
22 23
@@ -51,7 +52,7 @@ AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ):
51 m_abTable( 0l ), 52 m_abTable( 0l ),
52 m_orderedFields( ordered ) 53 m_orderedFields( ordered )
53{ 54{
54 qWarning("AbView::c'tor"); 55 Opie::Core::owarn << "AbView::c'tor" << oendl;
55 // Load default database and handle syncing myself.. ! 56 // Load default database and handle syncing myself.. !
56 m_contactdb = new Opie::OPimContactAccess ( "addressbook", 0l, 0l, false ); 57 m_contactdb = new Opie::OPimContactAccess ( "addressbook", 0l, 0l, false );
57 m_contactdb -> setReadAhead( 16 ); // Use ReadAhead-Cache if available 58 m_contactdb -> setReadAhead( 16 ); // Use ReadAhead-Cache if available
@@ -99,28 +100,28 @@ AbView::~AbView()
99 100
100void AbView::setView( Views view ) 101void AbView::setView( Views view )
101{ 102{
102 qWarning("AbView::setView( Views view )"); 103 Opie::Core::owarn << "AbView::setView( Views view )" << oendl;
103 m_curr_View = view; 104 m_curr_View = view;
104 load(); 105 load();
105} 106}
106 107
107void AbView::addEntry( const Opie::OPimContact &newContact ) 108void AbView::addEntry( const Opie::OPimContact &newContact )
108{ 109{
109 qWarning("abview:AddContact"); 110 Opie::Core::owarn << "AbView::AddContact" << oendl;
110 m_contactdb->add ( newContact ); 111 m_contactdb->add ( newContact );
111 load(); 112 load();
112 113
113} 114}
114void AbView::removeEntry( const int UID ) 115void AbView::removeEntry( const int UID )
115{ 116{
116 qWarning("abview:RemoveContact"); 117 Opie::Core::owarn << "AbView;:RemoveContact" << oendl;
117 m_contactdb->remove( UID ); 118 m_contactdb->remove( UID );
118 load(); 119 load();
119} 120}
120 121
121void AbView::replaceEntry( const Opie::OPimContact &contact ) 122void AbView::replaceEntry( const Opie::OPimContact &contact )
122{ 123{
123 qWarning("abview:ReplaceContact"); 124 Opie::Core::owarn << "AbView::ReplaceContact" << oendl;
124 m_contactdb->replace( contact ); 125 m_contactdb->replace( contact );
125 load(); 126 load();
126 127
@@ -144,14 +145,14 @@ Opie::OPimContact AbView::currentEntry()
144 145
145bool AbView::save() 146bool AbView::save()
146{ 147{
147 //qWarning("abView:Save data"); 148 //Opie::Core::owarn << "AbView::Save data" << oendl;
148 149
149 return m_contactdb->save(); 150 return m_contactdb->save();
150} 151}
151 152
152void AbView::load() 153void AbView::load()
153{ 154{
154 qWarning("abView:Load data"); 155 Opie::Core::owarn << "AbView::Load data" << oendl;
155 156
156 // Letter Search is stopped at this place 157 // Letter Search is stopped at this place
157 emit signalClearLetterPicker(); 158 emit signalClearLetterPicker();
@@ -165,7 +166,7 @@ void AbView::load()
165 clearForCategory(); 166 clearForCategory();
166 } 167 }
167 168
168 qWarning ("Number of contacts: %d", m_list.count()); 169 Opie::Core::owarn << "Number of contacts: " << m_list.count() << oendl;
169 170
170 updateView( true ); 171 updateView( true );
171 172
@@ -173,7 +174,7 @@ void AbView::load()
173 174
174void AbView::reload() 175void AbView::reload()
175{ 176{
176 qWarning( "void AbView::reload()" ); 177 Opie::Core::owarn << "AbView::::reload()" << oendl;
177 178
178 m_contactdb->reload(); 179 m_contactdb->reload();
179 load(); 180 load();
@@ -186,7 +187,7 @@ void AbView::clear()
186 187
187void AbView::setShowByCategory( const QString& cat ) 188void AbView::setShowByCategory( const QString& cat )
188{ 189{
189 qWarning("AbView::setShowCategory( const QString& cat )"); 190 Opie::Core::owarn << "AbView::setShowCategory( const QString& cat )" << oendl;
190 191
191 int intCat = 0; 192 int intCat = 0;
192 193
@@ -198,7 +199,8 @@ void AbView::setShowByCategory( const QString& cat )
198 199
199 // Just do anything if we really change the category 200 // Just do anything if we really change the category
200 if ( intCat != m_curr_category ){ 201 if ( intCat != m_curr_category ){
201 // qWarning ("Categories: Selected %s.. Number: %d", cat.latin1(), m_curr_category); 202 // Opie::Core::owarn << "Categories: Selected " << cat << ".. Number: "
203 // << m_curr_category << oendl;
202 204
203 m_curr_category = intCat; 205 m_curr_category = intCat;
204 emit signalClearLetterPicker(); 206 emit signalClearLetterPicker();
@@ -210,10 +212,10 @@ void AbView::setShowByCategory( const QString& cat )
210 212
211void AbView::setShowToView( Views view ) 213void AbView::setShowToView( Views view )
212{ 214{
213 qWarning("void AbView::setShowToView( View %d )", view); 215 Opie::Core::owarn << "void AbView::setShowToView( View " << view << " )" << oendl;
214 216
215 if ( m_curr_View != view ){ 217 if ( m_curr_View != view ){
216 qWarning ("Change the View (Category is: %d)", m_curr_category); 218 Opie::Core::owarn << "Change the View (Category is: " << m_curr_category << ")" << oendl;
217 m_prev_View = m_curr_View; 219 m_prev_View = m_curr_View;
218 m_curr_View = view; 220 m_curr_View = view;
219 221
@@ -224,7 +226,7 @@ void AbView::setShowToView( Views view )
224 226
225void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode ) 227void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode )
226{ 228{
227 qWarning("void AbView::setShowByLetter( %c, %d )", c, mode ); 229 Opie::Core::owarn << "void AbView::setShowByLetter( " << c << ", " << mode << " )" << oendl;
228 230
229 assert( mode < AbConfig::LASTELEMENT ); 231 assert( mode < AbConfig::LASTELEMENT );
230 232
@@ -247,8 +249,8 @@ void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode )
247 query.setFileAs( QString("%1*").arg(c) ); 249 query.setFileAs( QString("%1*").arg(c) );
248 break; 250 break;
249 default: 251 default:
250 qWarning( "Unknown Searchmode for AbView::setShowByLetter ! -> %d", mode ); 252 Opie::Core::owarn << "Unknown Searchmode for AbView::setShowByLetter ! -> " << mode << oendl
251 qWarning( "I will ignore it.." ); 253 << "I will ignore it.." << oendl;
252 return; 254 return;
253 } 255 }
254 m_list = m_contactdb->queryByExample( query, Opie::OPimContactAccess::WildCards | Opie::OPimContactAccess::IgnoreCase ); 256 m_list = m_contactdb->queryByExample( query, Opie::OPimContactAccess::WildCards | Opie::OPimContactAccess::IgnoreCase );
@@ -277,7 +279,7 @@ QString AbView::showCategory() const
277 279
278void AbView::showPersonal( bool personal ) 280void AbView::showPersonal( bool personal )
279{ 281{
280 qWarning ("void AbView::showPersonal( %d )", personal); 282 Opie::Core::owarn << "void AbView::showPersonal( " << personal << " )" << oendl;
281 283
282 if ( personal ){ 284 if ( personal ){
283 285
@@ -333,7 +335,7 @@ QStringList AbView::categories()
333void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, 335void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp,
334 bool , QString cat ) 336 bool , QString cat )
335{ 337{
336 //qWarning( "void AbView::slotDoFind" ); 338 //Opie::Core::owarn << "void AbView::slotDoFind" << oendl;
337 339
338 // We reloading the data: Deselect Letterpicker 340 // We reloading the data: Deselect Letterpicker
339 emit signalClearLetterPicker(); 341 emit signalClearLetterPicker();
@@ -347,7 +349,7 @@ void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp,
347 category = mCat.id("Contacts", cat ); 349 category = mCat.id("Contacts", cat );
348 } 350 }
349 351
350 //qWarning ("Find in Category %d", category); 352 //Opie::Core::owarn << "Find in Category " << category << oendl;
351 353
352 QRegExp r( str ); 354 QRegExp r( str );
353 r.setCaseSensitive( caseSensitive ); 355 r.setCaseSensitive( caseSensitive );
@@ -356,7 +358,7 @@ void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp,
356 // Get all matching entries out of the database 358 // Get all matching entries out of the database
357 m_list = m_contactdb->matchRegexp( r ); 359 m_list = m_contactdb->matchRegexp( r );
358 360
359 //qWarning( "found: %d", m_list.count() ); 361 //Opie::Core::owarn << "Found: " << m_list.count() << oendl;
360 if ( m_list.count() == 0 ){ 362 if ( m_list.count() == 0 ){
361 emit signalNotFound(); 363 emit signalNotFound();
362 return; 364 return;
@@ -380,16 +382,16 @@ void AbView::offSearch()
380} 382}
381 383
382void AbView::slotSwitch(){ 384void AbView::slotSwitch(){
383 //qWarning("AbView::slotSwitch()"); 385 //Opie::Core::owarn << "AbView::slotSwitch()" << oendl;
384 386
385 m_prev_View = m_curr_View; 387 m_prev_View = m_curr_View;
386 switch ( (int) m_curr_View ){ 388 switch ( (int) m_curr_View ){
387 case TableView: 389 case TableView:
388 qWarning("Switching to CardView"); 390 Opie::Core::owarn << "Switching to CardView" << oendl;
389 m_curr_View = CardView; 391 m_curr_View = CardView;
390 break; 392 break;
391 case CardView: 393 case CardView:
392 qWarning("Switching to TableView"); 394 Opie::Core::owarn << "Switching to TableView" << oendl;
393 m_curr_View = TableView; 395 m_curr_View = TableView;
394 break; 396 break;
395 } 397 }
@@ -408,7 +410,7 @@ void AbView::clearForCategory()
408 if ( m_curr_category != -1 ){ 410 if ( m_curr_category != -1 ){
409 for ( it = allList.begin(); it != allList.end(); ++it ){ 411 for ( it = allList.begin(); it != allList.end(); ++it ){
410 if ( !contactCompare( *it, m_curr_category ) ){ 412 if ( !contactCompare( *it, m_curr_category ) ){
411 // qWarning("Removing %d", (*it).uid()); 413 //Opie::Core::owarn << "Removing " << (*it).uid() << oendl;
412 m_list.remove( (*it).uid() ); 414 m_list.remove( (*it).uid() );
413 } 415 }
414 } 416 }
@@ -418,13 +420,14 @@ void AbView::clearForCategory()
418 420
419bool AbView::contactCompare( const Opie::OPimContact &cnt, int category ) 421bool AbView::contactCompare( const Opie::OPimContact &cnt, int category )
420{ 422{
421 //qWarning ("bool AbView::contactCompare( const Opie::OPimContact &cnt, %d )", category); 423 //Opie::Core::owarn << "bool AbView::contactCompare( const Opie::OPimContact &cnt, "
424 // << category << " )" << oendl;
422 425
423 bool returnMe; 426 bool returnMe;
424 QArray<int> cats; 427 QArray<int> cats;
425 cats = cnt.categories(); 428 cats = cnt.categories();
426 429
427 //qWarning ("Number of categories: %d", cats.count() ); 430 //Opie::Core::owarn << "Number of categories: " << cats.count() << oendl;
428 431
429 returnMe = false; 432 returnMe = false;
430 if ( cats.count() == 0 && category == 0 ) 433 if ( cats.count() == 0 && category == 0 )
@@ -433,14 +436,14 @@ bool AbView::contactCompare( const Opie::OPimContact &cnt, int category )
433 else { 436 else {
434 int i; 437 int i;
435 for ( i = 0; i < int(cats.count()); i++ ) { 438 for ( i = 0; i < int(cats.count()); i++ ) {
436 // qWarning("Comparing %d with %d",cats[i],category ); 439 //Opie::Core::owarn << "Comparing " << cats[i] << " with " << category << oendl;
437 if ( cats[i] == category ) { 440 if ( cats[i] == category ) {
438 returnMe = true; 441 returnMe = true;
439 break; 442 break;
440 } 443 }
441 } 444 }
442 } 445 }
443 //qWarning ("Return: %d", returnMe); 446 //Opie::Core::owarn << "Return: " << returnMe << oendl;
444 return returnMe; 447 return returnMe;
445} 448}
446 449
@@ -453,7 +456,7 @@ void AbView::updateListinViews()
453 456
454void AbView::updateView( bool newdata ) 457void AbView::updateView( bool newdata )
455{ 458{
456 //qWarning("AbView::updateView()"); 459 //Opie::Core::owarn << "AbView::updateView()" << oendl;
457 460
458 if ( m_viewStack -> visibleWidget() ){ 461 if ( m_viewStack -> visibleWidget() ){
459 m_viewStack -> visibleWidget() -> clearFocus(); 462 m_viewStack -> visibleWidget() -> clearFocus();
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 9ae66d1..94c0a13 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -22,7 +22,7 @@
22// #include "addresssettings.h" 22// #include "addresssettings.h"
23#include "addressbook.h" 23#include "addressbook.h"
24 24
25 25#include <opie2/odebug.h>
26#include <opie2/ofileselector.h> 26#include <opie2/ofileselector.h>
27#include <opie2/ofiledialog.h> 27#include <opie2/ofiledialog.h>
28#include <opie2/opimcontact.h> 28#include <opie2/opimcontact.h>
@@ -251,7 +251,7 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
251 251
252 setCentralWidget(listContainer); 252 setCentralWidget(listContainer);
253 253
254 // qDebug("adressbook contrsuction: t=%d", t.elapsed() ); 254 //Opie::Core::odebug << "adressbook contrsuction: t=" << t.elapsed() << oendl;
255 connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) ); 255 connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) );
256 connect( qApp, SIGNAL( reload() ), this, SLOT( reload() ) ); 256 connect( qApp, SIGNAL( reload() ), this, SLOT( reload() ) );
257 connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ), 257 connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ),
@@ -267,10 +267,10 @@ void AddressbookWindow::slotConfig()
267 ConfigDlg* dlg = new ConfigDlg( this, "Config" ); 267 ConfigDlg* dlg = new ConfigDlg( this, "Config" );
268 dlg -> setConfig( m_config ); 268 dlg -> setConfig( m_config );
269 if ( QPEApplication::execDialog( dlg ) ) { 269 if ( QPEApplication::execDialog( dlg ) ) {
270 qWarning ("Config Dialog accepted!"); 270 Opie::Core::owarn << "Config Dialog accepted!" << oendl;
271 m_config = dlg -> getConfig(); 271 m_config = dlg -> getConfig();
272 if ( m_curFontSize != m_config.fontSize() ){ 272 if ( m_curFontSize != m_config.fontSize() ){
273 qWarning("Font was changed!"); 273 Opie::Core::owarn << "Font was changed!" << oendl;
274 m_curFontSize = m_config.fontSize(); 274 m_curFontSize = m_config.fontSize();
275 emit slotSetFont( m_curFontSize ); 275 emit slotSetFont( m_curFontSize );
276 } 276 }
@@ -283,7 +283,7 @@ void AddressbookWindow::slotConfig()
283 283
284void AddressbookWindow::slotSetFont( int size ) 284void AddressbookWindow::slotSetFont( int size )
285{ 285{
286 qWarning("void AddressbookWindow::slotSetFont( %d )", size); 286 Opie::Core::owarn << "void AddressbookWindow::slotSetFont( " << size << " )" << oendl;
287 287
288 if (size > 2 || size < 0) 288 if (size > 2 || size < 0)
289 size = 1; 289 size = 1;
@@ -325,10 +325,10 @@ void AddressbookWindow::importvCard() {
325} 325}
326void AddressbookWindow::exportvCard() 326void AddressbookWindow::exportvCard()
327{ 327{
328 qWarning(" void AddressbookWindow::exportvCard()"); 328 Opie::Core::owarn << "void AddressbookWindow::exportvCard()" << oendl;
329 QString filename = Opie::Ui::OFileDialog::getSaveFileName( 1,"/home/"); //,"", "*", this ); 329 QString filename = Opie::Ui::OFileDialog::getSaveFileName( 1,"/home/"); //,"", "*", this );
330 if( !filename.isEmpty() && ( filename[filename.length()-1] != '/' ) ){ 330 if( !filename.isEmpty() && ( filename[filename.length()-1] != '/' ) ){
331 qWarning(" Save to file %s, (%d)", filename.latin1(), filename.length()-1 ); 331 Opie::Core::owarn << " Save to file " << filename << ", (" << filename.length()-1 << ")" << oendl;
332 Opie::OPimContact curCont = m_abView->currentEntry(); 332 Opie::OPimContact curCont = m_abView->currentEntry();
333 if ( !curCont.isEmpty() ){ 333 if ( !curCont.isEmpty() ){
334 Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, 334 Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null,
@@ -350,7 +350,7 @@ void AddressbookWindow::exportvCard()
350 350
351void AddressbookWindow::setDocument( const QString &filename ) 351void AddressbookWindow::setDocument( const QString &filename )
352{ 352{
353 qWarning( "void AddressbookWindow::setDocument( %s )", filename.latin1() ); 353 Opie::Core::owarn << "void AddressbookWindow::setDocument( " << filename << " )" << oendl;
354 354
355 if ( filename.find(".vcf") != int(filename.length()) - 4 ){ 355 if ( filename.find(".vcf") != int(filename.length()) - 4 ){
356 356
@@ -362,10 +362,10 @@ void AddressbookWindow::setDocument( const QString &filename )
362 0, // Enter == button 0 362 0, // Enter == button 0
363 2 ) ) { // Escape == button 2 363 2 ) ) { // Escape == button 2
364 case 0: 364 case 0:
365 qWarning("YES clicked"); 365 Opie::Core::owarn << "YES clicked" << oendl;
366 break; 366 break;
367 case 1: 367 case 1:
368 qWarning("NO clicked"); 368 Opie::Core::owarn << "NO clicked" << oendl;
369 return; 369 return;
370 break; 370 break;
371 } 371 }
@@ -375,7 +375,7 @@ void AddressbookWindow::setDocument( const QString &filename )
375 filename ); 375 filename );
376 Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true ); 376 Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true );
377 Opie::OPimContactAccess::List allList = access->allRecords(); 377 Opie::OPimContactAccess::List allList = access->allRecords();
378 qWarning( "Found number of contacts in File: %d", allList.count() ); 378 Opie::Core::owarn << "Found number of contacts in File: " << allList.count() << oendl;
379 379
380 if ( !allList.count() ) { 380 if ( !allList.count() ) {
381 QMessageBox::information( this, "Import VCard", 381 QMessageBox::information( this, "Import VCard",
@@ -386,7 +386,7 @@ void AddressbookWindow::setDocument( const QString &filename )
386 bool doAsk = true; 386 bool doAsk = true;
387 Opie::OPimContactAccess::List::Iterator it; 387 Opie::OPimContactAccess::List::Iterator it;
388 for ( it = allList.begin(); it != allList.end(); ++it ){ 388 for ( it = allList.begin(); it != allList.end(); ++it ){
389 qWarning("Adding Contact from: %s", (*it).fullName().latin1() ); 389 Opie::Core::owarn << "Adding Contact from: " << (*it).fullName() << oendl;
390 if ( doAsk ){ 390 if ( doAsk ){
391 switch( QMessageBox::information( this, tr ( "Add Contact?" ), 391 switch( QMessageBox::information( this, tr ( "Add Contact?" ),
392 tr( "Do you really want add contact for \n%1?" ) 392 tr( "Do you really want add contact for \n%1?" )
@@ -395,14 +395,14 @@ void AddressbookWindow::setDocument( const QString &filename )
395 0, // Enter == button 0 395 0, // Enter == button 0
396 2 ) ) { // Escape == button 2 396 2 ) ) { // Escape == button 2
397 case 0: 397 case 0:
398 qWarning("YES clicked"); 398 Opie::Core::owarn << "YES clicked" << oendl;
399 m_abView->addEntry( *it ); 399 m_abView->addEntry( *it );
400 break; 400 break;
401 case 1: 401 case 1:
402 qWarning("NO clicked"); 402 Opie::Core::owarn << "NO clicked" << oendl;
403 break; 403 break;
404 case 2: 404 case 2:
405 qWarning("YesAll clicked"); 405 Opie::Core::owarn << "YesAll clicked" << oendl;
406 doAsk = false; 406 doAsk = false;
407 break; 407 break;
408 } 408 }
@@ -538,9 +538,9 @@ void AddressbookWindow::writeMail()
538 // Try to access the preferred. If not possible, try to 538 // Try to access the preferred. If not possible, try to
539 // switch to the other one.. 539 // switch to the other one..
540 if ( m_config.useQtMail() ){ 540 if ( m_config.useQtMail() ){
541 qWarning ("Accessing: %s", (basepath + "/bin/qtmail").latin1()); 541 Opie::Core::owarn << "Accessing: " << (basepath + "/bin/qtmail") << oendl;
542 if ( QFile::exists( basepath + "/bin/qtmail" ) ){ 542 if ( QFile::exists( basepath + "/bin/qtmail" ) ){
543 qWarning ("QCop"); 543 Opie::Core::owarn << "QCop" << oendl;
544 QCopEnvelope e("QPE/Application/qtmail", "writeMail(QString,QString)"); 544 QCopEnvelope e("QPE/Application/qtmail", "writeMail(QString,QString)");
545 e << name << email; 545 e << name << email;
546 return; 546 return;
@@ -548,9 +548,9 @@ void AddressbookWindow::writeMail()
548 m_config.setUseOpieMail( true ); 548 m_config.setUseOpieMail( true );
549 } 549 }
550 if ( m_config.useOpieMail() ){ 550 if ( m_config.useOpieMail() ){
551 qWarning ("Accessing: %s", (basepath + "/bin/opiemail").latin1()); 551 Opie::Core::owarn << "Accessing: " << (basepath + "/bin/opiemail") << oendl;
552 if ( QFile::exists( basepath + "/bin/opiemail" ) ){ 552 if ( QFile::exists( basepath + "/bin/opiemail" ) ){
553 qWarning ("QCop"); 553 Opie::Core::owarn << "QCop" << oendl;
554 QCopEnvelope e("QPE/Application/opiemail", "writeMail(QString,QString)"); 554 QCopEnvelope e("QPE/Application/opiemail", "writeMail(QString,QString)");
555 e << name << email; 555 e << name << email;
556 return; 556 return;
@@ -592,7 +592,7 @@ void AddressbookWindow::slotBeam()
592 beamFilename = beamfile; 592 beamFilename = beamfile;
593 } 593 }
594 594
595 qWarning("Beaming: %s", beamFilename.latin1() ); 595 Opie::Core::owarn << "Beaming: " << beamFilename << oendl;
596 596
597 Ir *ir = new Ir( this ); 597 Ir *ir = new Ir( this );
598 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); 598 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
@@ -639,7 +639,7 @@ static void parseName( const QString& name, QString *first, QString *middle,
639void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) 639void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
640{ 640{
641 bool needShow = FALSE; 641 bool needShow = FALSE;
642 qWarning("Receiving QCop-Call with message %s", QString( msg ).latin1() ); 642 Opie::Core::owarn << "Receiving QCop-Call with message " << msg << oendl;
643 643
644 644
645 if (msg == "editPersonal()") { 645 if (msg == "editPersonal()") {
@@ -655,7 +655,7 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
655 Opie::OPimContact cnt; 655 Opie::OPimContact cnt;
656 QString fn, mn, ln; 656 QString fn, mn, ln;
657 parseName( name, &fn, &mn, &ln ); 657 parseName( name, &fn, &mn, &ln );
658 // qDebug( " %s - %s - %s", fn.latin1(), mn.latin1(), ln.latin1() ); 658 //Opie::Core::odebug << " " << fn << " - " << mn " - " << ln << oendl;
659 cnt.setFirstName( fn ); 659 cnt.setFirstName( fn );
660 cnt.setMiddleName( mn ); 660 cnt.setMiddleName( mn );
661 cnt.setLastName( ln ); 661 cnt.setLastName( ln );
@@ -682,7 +682,7 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
682 int uid; 682 int uid;
683 stream >> uid; 683 stream >> uid;
684 684
685 qWarning( "Showing uid: %d" , uid ); 685 Opie::Core::owarn << "Showing uid: " << uid << oendl;
686 686
687 // Deactivate Personal View.. 687 // Deactivate Personal View..
688 if ( actionPersonal->isOn() ){ 688 if ( actionPersonal->isOn() ){
@@ -762,7 +762,7 @@ void AddressbookWindow::editPersonal()
762 // Switch to personal view if not selected 762 // Switch to personal view if not selected
763 // but take care of the menu, too 763 // but take care of the menu, too
764 if ( ! actionPersonal->isOn() ){ 764 if ( ! actionPersonal->isOn() ){
765 qWarning("*** ++++"); 765 Opie::Core::owarn << "*** ++++" << oendl;
766 actionPersonal->setOn( true ); 766 actionPersonal->setOn( true );
767 slotPersonalView(); 767 slotPersonalView();
768 } 768 }
@@ -781,10 +781,10 @@ void AddressbookWindow::editPersonal()
781 781
782void AddressbookWindow::slotPersonalView() 782void AddressbookWindow::slotPersonalView()
783{ 783{
784 qWarning("slotPersonalView()"); 784 Opie::Core::owarn << "slotPersonalView()" << oendl;
785 if (!actionPersonal->isOn()) { 785 if (!actionPersonal->isOn()) {
786 // we just turned it off 786 // we just turned it off
787 qWarning("slotPersonalView()-> OFF"); 787 Opie::Core::owarn << "slotPersonalView()-> OFF" << oendl;
788 setCaption( tr("Contacts") ); 788 setCaption( tr("Contacts") );
789 actionNew->setEnabled(TRUE); 789 actionNew->setEnabled(TRUE);
790 actionTrash->setEnabled(TRUE); 790 actionTrash->setEnabled(TRUE);
@@ -797,7 +797,7 @@ void AddressbookWindow::slotPersonalView()
797 return; 797 return;
798 } 798 }
799 799
800 qWarning("slotPersonalView()-> ON"); 800 Opie::Core::owarn << "slotPersonalView()-> ON" << oendl;
801 // XXX need to disable some QActions. 801 // XXX need to disable some QActions.
802 actionNew->setEnabled(FALSE); 802 actionNew->setEnabled(FALSE);
803 actionTrash->setEnabled(FALSE); 803 actionTrash->setEnabled(FALSE);
@@ -887,7 +887,7 @@ void AddressbookWindow::slotSave()
887 887
888void AddressbookWindow::slotNotFound() 888void AddressbookWindow::slotNotFound()
889{ 889{
890 qWarning("Got notfound signal!"); 890 Opie::Core::owarn << "Got not found signal!" << oendl;
891 QMessageBox::information( this, tr( "Not Found" ), 891 QMessageBox::information( this, tr( "Not Found" ),
892 "<qt>" + tr( "Unable to find a contact for this search pattern!" ) + "</qt>" ); 892 "<qt>" + tr( "Unable to find a contact for this search pattern!" ) + "</qt>" );
893 893
@@ -895,7 +895,7 @@ void AddressbookWindow::slotNotFound()
895} 895}
896void AddressbookWindow::slotWrapAround() 896void AddressbookWindow::slotWrapAround()
897{ 897{
898 qWarning("Got wrap signal!"); 898 Opie::Core::owarn << "Got wrap signal!" << oendl;
899 // if ( doNotifyWrapAround ) 899 // if ( doNotifyWrapAround )
900 // QMessageBox::information( this, tr( "End of list" ), 900 // QMessageBox::information( this, tr( "End of list" ),
901 // tr( "End of list. Wrap around now...!" ) + "\n" ); 901 // tr( "End of list. Wrap around now...!" ) + "\n" );
@@ -904,7 +904,8 @@ void AddressbookWindow::slotWrapAround()
904 904
905void AddressbookWindow::slotSetCategory( int c ) 905void AddressbookWindow::slotSetCategory( int c )
906{ 906{
907 qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() ); 907 Opie::Core::owarn << "void AddressbookWindow::slotSetCategory( " << c << " ) from "
908 << catMenu->count() << oendl;
908 909
909 QString cat, book; 910 QString cat, book;
910 AbView::Views view = AbView::TableView; 911 AbView::Views view = AbView::TableView;
@@ -939,7 +940,7 @@ void AddressbookWindow::slotSetCategory( int c )
939 cat = QString::null; 940 cat = QString::null;
940 }else if ( i == (unsigned int)catMenu->count() - 1 ){ // last menu option (seperator is counted, too) will be Unfiled 941 }else if ( i == (unsigned int)catMenu->count() - 1 ){ // last menu option (seperator is counted, too) will be Unfiled
941 cat = "Unfiled"; 942 cat = "Unfiled";
942 qWarning ("Unfiled selected!"); 943 Opie::Core::owarn << "Unfiled selected!" << oendl;
943 }else{ 944 }else{
944 cat = m_abView->categories()[i - 4]; 945 cat = m_abView->categories()[i - 4];
945 } 946 }
@@ -962,7 +963,7 @@ void AddressbookWindow::slotSetCategory( int c )
962 963
963void AddressbookWindow::slotViewSwitched( int view ) 964void AddressbookWindow::slotViewSwitched( int view )
964{ 965{
965 qWarning( "void AddressbookWindow::slotViewSwitched( %d )", view ); 966 Opie::Core::owarn << "void AddressbookWindow::slotViewSwitched( " << view << " )" << oendl;
966 int menu = 0; 967 int menu = 0;
967 968
968 // Switch to selected view 969 // Switch to selected view
diff --git a/core/pim/addressbook/configdlg.cpp b/core/pim/addressbook/configdlg.cpp
index 6c98b5d..094dbda 100644
--- a/core/pim/addressbook/configdlg.cpp
+++ b/core/pim/addressbook/configdlg.cpp
@@ -1,5 +1,6 @@
1#include "configdlg.h" 1#include "configdlg.h"
2 2
3#include <opie2/odebug.h>
3#include <opie2/opimcontact.h> 4#include <opie2/opimcontact.h>
4#include "opie2/opimcontactfields.h" 5#include "opie2/opimcontactfields.h"
5 6
@@ -42,7 +43,7 @@ ConfigDlg::ConfigDlg( QWidget *parent, const char *name):
42 43
43void ConfigDlg::slotItemUp() 44void ConfigDlg::slotItemUp()
44{ 45{
45 qWarning( "void ConfigDlg::slotItemUp()" ); 46 Opie::Core::owarn << "void ConfigDlg::slotItemUp()" << oendl;
46 47
47 int i = fieldListBox->currentItem(); 48 int i = fieldListBox->currentItem();
48 if ( i > 0 ) { 49 if ( i > 0 ) {
@@ -56,7 +57,7 @@ void ConfigDlg::slotItemUp()
56 57
57void ConfigDlg::slotItemDown() 58void ConfigDlg::slotItemDown()
58{ 59{
59 qWarning( "void ConfigDlg::slotItemDown()" ); 60 Opie::Core::owarn << "void ConfigDlg::slotItemDown()" << oendl;
60 61
61 int i = fieldListBox->currentItem(); 62 int i = fieldListBox->currentItem();
62 if ( i < (int)fieldListBox->count() - 1 ) { 63 if ( i < (int)fieldListBox->count() - 1 ) {
@@ -69,19 +70,19 @@ void ConfigDlg::slotItemDown()
69 70
70void ConfigDlg::slotItemAdd() 71void ConfigDlg::slotItemAdd()
71{ 72{
72 qWarning( "void ConfigDlg::slotItemAdd()" ); 73 Opie::Core::owarn << "void ConfigDlg::slotItemAdd()" << oendl;
73 74
74 int i = allFieldListBox->currentItem(); 75 int i = allFieldListBox->currentItem();
75 if ( i > 0 ) { 76 if ( i > 0 ) {
76 QString item = allFieldListBox->currentText(); 77 QString item = allFieldListBox->currentText();
77 qWarning("ADding %s", item.latin1()); 78 Opie::Core::owarn << "Adding " << item << oendl;
78 fieldListBox->insertItem( item ); 79 fieldListBox->insertItem( item );
79 } 80 }
80} 81}
81 82
82void ConfigDlg::slotItemRemove() 83void ConfigDlg::slotItemRemove()
83{ 84{
84 qWarning( "void ConfigDlg::slotItemRemove()" ); 85 Opie::Core::owarn << "void ConfigDlg::slotItemRemove()" << oendl;
85 86
86 int i = fieldListBox->currentItem(); 87 int i = fieldListBox->currentItem();
87 if ( i > 0 ) { 88 if ( i > 0 ) {
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index 534666d..e496387 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -21,6 +21,7 @@
21 21
22#include "contacteditor.h" 22#include "contacteditor.h"
23 23
24#include <opie2/odebug.h>
24#include <opie2/opimcontact.h> 25#include <opie2/opimcontact.h>
25 26
26#include <qpe/categoryselect.h> 27#include <qpe/categoryselect.h>
@@ -77,7 +78,7 @@ ContactEditor::~ContactEditor() {
77} 78}
78 79
79void ContactEditor::init() { 80void ContactEditor::init() {
80 qWarning("init() START"); 81 Opie::Core::owarn << "init() START" << oendl;
81 82
82 uint i = 0; 83 uint i = 0;
83 84
@@ -686,18 +687,18 @@ void ContactEditor::init() {
686 687
687 setPersonalView ( m_personalView ); 688 setPersonalView ( m_personalView );
688 689
689 qWarning("init() END"); 690 Opie::Core::owarn << "init() END" << oendl;
690} 691}
691 692
692void ContactEditor::defaultEmailChanged(int i){ 693void ContactEditor::defaultEmailChanged(int i){
693 qDebug("defaultEmailChanged"); 694 Opie::Core::odebug << "defaultEmailChanged" << oendl;
694 695
695 // was sollte das ? (se) 696 // was sollte das ? (se)
696 // int index = cmbChooserField1->currentItem(); 697 // int index = cmbChooserField1->currentItem();
697 // slChooserValues[index] = cmbDefaultEmail->text(i); 698 // slChooserValues[index] = cmbDefaultEmail->text(i);
698 699
699 defaultEmail = cmbDefaultEmail->text(i); 700 defaultEmail = cmbDefaultEmail->text(i);
700 qDebug ("Changed to: %s", defaultEmail.latin1()); 701 Opie::Core::odebug << "Changed to: " << defaultEmail << oendl;
701 702
702} 703}
703 704
@@ -716,12 +717,12 @@ void ContactEditor::populateDefaultEmailCmb(){
716 // Select default email in combo.. 717 // Select default email in combo..
717 bool found = false; 718 bool found = false;
718 for ( int i = 0; i < cmbDefaultEmail->count(); i++){ 719 for ( int i = 0; i < cmbDefaultEmail->count(); i++){
719 qDebug(" populateDefaultEmailCmb text >%s< defaultEmail >%s<", 720 Opie::Core::odebug << " populateDefaultEmailCmb text >" << cmbDefaultEmail->text( i )
720 cmbDefaultEmail->text( i ).latin1(), defaultEmail.latin1()); 721 << "< defaultEmail >" << defaultEmail << "<" << oendl;
721 722
722 if ( cmbDefaultEmail->text( i ).stripWhiteSpace() == defaultEmail.stripWhiteSpace() ){ 723 if ( cmbDefaultEmail->text( i ).stripWhiteSpace() == defaultEmail.stripWhiteSpace() ){
723 cmbDefaultEmail->setCurrentItem( i ); 724 cmbDefaultEmail->setCurrentItem( i );
724 qDebug("set"); 725 Opie::Core::odebug << "set" << oendl;
725 found = true; 726 found = true;
726 } 727 }
727 } 728 }
@@ -737,14 +738,16 @@ void ContactEditor::populateDefaultEmailCmb(){
737// be handled by something else.. 738// be handled by something else..
738bool ContactEditor::cmbChooserChange( int index, QWidgetStack* inputStack, int widgetPos ) { 739bool ContactEditor::cmbChooserChange( int index, QWidgetStack* inputStack, int widgetPos ) {
739 QString type = slChooserNames[index]; 740 QString type = slChooserNames[index];
740 qWarning("ContactEditor::cmbChooserChange -> Type: %s, WidgetPos: %d", type.latin1(), widgetPos ); 741 Opie::Core::owarn << "ContactEditor::cmbChooserChange -> Type: " << type
742 << ", WidgetPos: " << widgetPos << oendl;
741 743
742 if ( !initializing ) 744 if ( !initializing )
743 contactfields.setFieldOrder( widgetPos-1, index ); 745 contactfields.setFieldOrder( widgetPos-1, index );
744 746
745 // Create and connect combobox for selecting the default email 747 // Create and connect combobox for selecting the default email
746 if ( type == "Default Email"){ 748 if ( type == "Default Email"){
747 qWarning("Choosing default-email (defaultEmailChooserPosition= %d) ", defaultEmailChooserPosition); 749 Opie::Core::owarn << "Choosing default-email (defaultEmailChooserPosition= "
750 << defaultEmailChooserPosition << ") " << oendl;
748 751
749 // More than one default-email chooser is not allowed ! 752 // More than one default-email chooser is not allowed !
750 if ( ( defaultEmailChooserPosition != -1 ) && 753 if ( ( defaultEmailChooserPosition != -1 ) &&
@@ -777,7 +780,7 @@ bool ContactEditor::cmbChooserChange( int index, QWidgetStack* inputStack, int w
777 780
778 } else { 781 } else {
779 // Something else was selected: Hide combo.. 782 // Something else was selected: Hide combo..
780 qWarning(" Hiding default-email combo" ); 783 Opie::Core::owarn << " Hiding default-email combo" << oendl;
781 if ( defaultEmailChooserPosition == widgetPos ){ 784 if ( defaultEmailChooserPosition == widgetPos ){
782 defaultEmailChooserPosition = -1; 785 defaultEmailChooserPosition = -1;
783 } 786 }
@@ -802,7 +805,7 @@ bool ContactEditor::cmbChooserChange( int index, QWidgetStack* inputStack, int w
802// Currently accessed when we select default-email more than once ! 805// Currently accessed when we select default-email more than once !
803void ContactEditor::chooserError( int index ) 806void ContactEditor::chooserError( int index )
804{ 807{
805 qWarning("ContactEditor::chooserError( %d )", index); 808 Opie::Core::owarn << "ContactEditor::chooserError( " << index << " )" << oendl;
806 QMessageBox::warning( this, "Chooser Error", 809 QMessageBox::warning( this, "Chooser Error",
807 "Multiple selection of this\n" 810 "Multiple selection of this\n"
808 "Item is not allowed !\n\n" 811 "Item is not allowed !\n\n"
@@ -838,17 +841,18 @@ void ContactEditor::chooserChange( const QString &textChanged, int index,
838 QLineEdit* , int widgetPos ) { 841 QLineEdit* , int widgetPos ) {
839 842
840 QString type = slChooserNames[index]; // :SX 843 QString type = slChooserNames[index]; // :SX
841 qDebug("ContactEditor::chooserChange( type=>%s<, textChanged=>%s< index=%i, widgetPos=%i", 844 Opie::Core::odebug << "ContactEditor::chooserChange( type=>" << type << "<, textChanged=>"
842 type.latin1(),textChanged.latin1(), index, widgetPos ); 845 << textChanged << "< index=" << index << ", widgetPos=" << widgetPos
846 << " )" << oendl;
843 847
844 if ( type == "Default Email"){ 848 if ( type == "Default Email"){
845 qWarning ("??? Wozu??: %s", textChanged.latin1()); 849 Opie::Core::owarn << "??? Wozu??: " << textChanged << oendl;
846 defaultEmail = textChanged; 850 defaultEmail = textChanged;
847 851
848 populateDefaultEmailCmb(); 852 populateDefaultEmailCmb();
849 853
850 }else if (type == "Emails"){ 854 }else if (type == "Emails"){
851 qDebug("emails"); 855 Opie::Core::odebug << "emails" << oendl;
852 856
853 QString de; 857 QString de;
854 emails = QStringList::split (",", textChanged ); 858 emails = QStringList::split (",", textChanged );
@@ -861,23 +865,23 @@ void ContactEditor::chooserChange( const QString &textChanged, int index,
861} 865}
862 866
863void ContactEditor::slotChooser1Change( const QString &textChanged ) { 867void ContactEditor::slotChooser1Change( const QString &textChanged ) {
864 qWarning("ContactEditor::slotChooser1Change( %s )", textChanged.latin1()); 868 Opie::Core::owarn << "ContactEditor::slotChooser1Change( " << textChanged << " )" << oendl;
865 chooserChange( textChanged, cmbChooserField1->currentItem(), txtChooserField1, 1); 869 chooserChange( textChanged, cmbChooserField1->currentItem(), txtChooserField1, 1);
866} 870}
867 871
868void ContactEditor::slotChooser2Change( const QString &textChanged ) { 872void ContactEditor::slotChooser2Change( const QString &textChanged ) {
869 qWarning("ContactEditor::slotChooser2Change( %s )", textChanged.latin1()); 873 Opie::Core::owarn << "ContactEditor::slotChooser2Change( " << textChanged << " )" << oendl;
870 chooserChange( textChanged, cmbChooserField2->currentItem(), txtChooserField2, 2); 874 chooserChange( textChanged, cmbChooserField2->currentItem(), txtChooserField2, 2);
871 875
872} 876}
873 877
874void ContactEditor::slotChooser3Change( const QString &textChanged ) { 878void ContactEditor::slotChooser3Change( const QString &textChanged ) {
875 qWarning("ContactEditor::slotChooser3Change( %s )", textChanged.latin1()); 879 Opie::Core::owarn << "ContactEditor::slotChooser3Change( " << textChanged << " )" << oendl;
876 chooserChange( textChanged, cmbChooserField3->currentItem(), txtChooserField3, 3); 880 chooserChange( textChanged, cmbChooserField3->currentItem(), txtChooserField3, 3);
877} 881}
878 882
879void ContactEditor::slotChooser4Change( const QString &textChanged ) { 883void ContactEditor::slotChooser4Change( const QString &textChanged ) {
880 qWarning("ContactEditor::slotChooser4Change( %s )", textChanged.latin1()); 884 Opie::Core::owarn << "ContactEditor::slotChooser4Change( " << textChanged << " )" << oendl;
881 chooserChange( textChanged, cmbChooserField4->currentItem(), txtChooserField4, 4); 885 chooserChange( textChanged, cmbChooserField4->currentItem(), txtChooserField4, 4);
882} 886}
883 887
@@ -947,7 +951,7 @@ void ContactEditor::slotCountryChange( const QString &textChanged ) {
947 951
948 952
949void ContactEditor::slotCmbChooser1Change( int index ) { 953void ContactEditor::slotCmbChooser1Change( int index ) {
950 qWarning("ContactEditor::slotCmbChooser1Change( %d )", index); 954 Opie::Core::owarn << "ContactEditor::slotCmbChooser1Change( " << index << " )" << oendl;
951 if ( !cmbChooserChange( cmbChooserField1->currentItem(), m_widgetStack1, 1) ){ 955 if ( !cmbChooserChange( cmbChooserField1->currentItem(), m_widgetStack1, 1) ){
952 956
953 txtChooserField1->setText( slChooserValues[index] ); 957 txtChooserField1->setText( slChooserValues[index] );
@@ -958,7 +962,7 @@ void ContactEditor::slotCmbChooser1Change( int index ) {
958} 962}
959 963
960void ContactEditor::slotCmbChooser2Change( int index ) { 964void ContactEditor::slotCmbChooser2Change( int index ) {
961 qWarning("ContactEditor::slotCmbChooser2Change( %d )", index); 965 Opie::Core::owarn << "ContactEditor::slotCmbChooser2Change( " << index << " )" << oendl;
962 966
963 if ( !cmbChooserChange( cmbChooserField2->currentItem(), m_widgetStack2, 2) ){ 967 if ( !cmbChooserChange( cmbChooserField2->currentItem(), m_widgetStack2, 2) ){
964 968
@@ -969,7 +973,7 @@ void ContactEditor::slotCmbChooser2Change( int index ) {
969} 973}
970 974
971void ContactEditor::slotCmbChooser3Change( int index ) { 975void ContactEditor::slotCmbChooser3Change( int index ) {
972 qWarning("ContactEditor::slotCmbChooser3Change( %d )", index); 976 Opie::Core::owarn << "ContactEditor::slotCmbChooser3Change( " << index << " )" << oendl;
973 977
974 if ( !cmbChooserChange( cmbChooserField3->currentItem(), m_widgetStack3, 3) ){ 978 if ( !cmbChooserChange( cmbChooserField3->currentItem(), m_widgetStack3, 3) ){
975 979
@@ -980,7 +984,7 @@ void ContactEditor::slotCmbChooser3Change( int index ) {
980} 984}
981 985
982void ContactEditor::slotCmbChooser4Change( int index ) { 986void ContactEditor::slotCmbChooser4Change( int index ) {
983 qWarning("ContactEditor::slotCmbChooser4Change( %d )", index); 987 Opie::Core::owarn << "ContactEditor::slotCmbChooser4Change( " << index << " )" << oendl;
984 988
985 if ( !cmbChooserChange( cmbChooserField4->currentItem(), m_widgetStack4, 4) ){ 989 if ( !cmbChooserChange( cmbChooserField4->currentItem(), m_widgetStack4, 4) ){
986 990
@@ -1025,7 +1029,7 @@ void ContactEditor::slotAddressTypeChange( int index ) {
1025 1029
1026void ContactEditor::slotFullNameChange( const QString &textChanged ) { 1030void ContactEditor::slotFullNameChange( const QString &textChanged ) {
1027 1031
1028 qWarning( "ContactEditor::slotFullNameChange( %s )", textChanged.latin1() ); 1032 Opie::Core::owarn << "ContactEditor::slotFullNameChange( " << textChanged << " )" << oendl;
1029 1033
1030 int index = cmbFileAs->currentItem(); 1034 int index = cmbFileAs->currentItem();
1031 1035
@@ -1049,7 +1053,7 @@ void ContactEditor::slotSuffixChange( const QString& ) {
1049} 1053}
1050 1054
1051void ContactEditor::slotOrganizationChange( const QString &textChanged ){ 1055void ContactEditor::slotOrganizationChange( const QString &textChanged ){
1052 qWarning( "ContactEditor::slotOrganizationChange( %s )", textChanged.latin1() ); 1056 Opie::Core::owarn << "ContactEditor::slotOrganizationChange( " << textChanged << " )" << oendl;
1053 // Special handling for storing Companies: 1057 // Special handling for storing Companies:
1054 // If no Fullname is given, we store the Company-Name as lastname 1058 // If no Fullname is given, we store the Company-Name as lastname
1055 // to handle it like a person.. 1059 // to handle it like a person..
@@ -1131,11 +1135,11 @@ QString ContactEditor::parseName( const QString fullName, int type ) {
1131 int commapos; 1135 int commapos;
1132 bool haveLastName = false; 1136 bool haveLastName = false;
1133 1137
1134 qWarning("Fullname: %s", simplifiedName.latin1()); 1138 Opie::Core::owarn << "Fullname: " << simplifiedName << oendl;
1135 1139
1136 commapos = simplifiedName.find( ',', 0, TRUE); 1140 commapos = simplifiedName.find( ',', 0, TRUE);
1137 if ( commapos >= 0 ) { 1141 if ( commapos >= 0 ) {
1138 qWarning(" Commapos: %d", commapos ); 1142 Opie::Core::owarn << " Commapos: " << commapos << oendl;
1139 1143
1140 // A comma (",") separates the lastname from one or 1144 // A comma (",") separates the lastname from one or
1141 // many first names. Thus, remove the lastname from the 1145 // many first names. Thus, remove the lastname from the
@@ -1144,7 +1148,7 @@ QString ContactEditor::parseName( const QString fullName, int type ) {
1144 strLastName = simplifiedName.left( commapos ); 1148 strLastName = simplifiedName.left( commapos );
1145 simplifiedName= simplifiedName.mid( commapos + 1 ); 1149 simplifiedName= simplifiedName.mid( commapos + 1 );
1146 haveLastName = true; 1150 haveLastName = true;
1147 qWarning("Fullname without ',': %s", simplifiedName.latin1()); 1151 Opie::Core::owarn << "Fullname without ',': " << simplifiedName << oendl;
1148 1152
1149 // If we have any lastname, we should now split all first names. 1153 // If we have any lastname, we should now split all first names.
1150 // The first one will be the used as first, the rest as "middle names" 1154 // The first one will be the used as first, the rest as "middle names"
@@ -1178,10 +1182,10 @@ QString ContactEditor::parseName( const QString fullName, int type ) {
1178 if ( strFirstName == strLastName ) 1182 if ( strFirstName == strLastName )
1179 strFirstName = ""; 1183 strFirstName = "";
1180 1184
1181 qWarning(" strFirstName: %s", strFirstName.latin1()); 1185 Opie::Core::owarn << "strFirstName: " << strFirstName << oendl;
1182 qWarning(" strMiddleName: %s", strMiddleName.latin1()); 1186 Opie::Core::owarn << "strMiddletName: " << strMiddleName << oendl;
1183 qWarning(" strLastName: %s", strLastName.latin1()); 1187 Opie::Core::owarn << "strLastName: " << strLastName << oendl;
1184 qWarning(" strTitle: %s", strTitle.latin1()); 1188 Opie::Core::owarn << "strTitle: " << strTitle << oendl;
1185 1189
1186 switch (type) { 1190 switch (type) {
1187 case NAME_FL: 1191 case NAME_FL:
@@ -1264,7 +1268,7 @@ void ContactEditor::setEntry( const Opie::OPimContact &entry ) {
1264 emails = QStringList(ent.emailList()); 1268 emails = QStringList(ent.emailList());
1265 defaultEmail = ent.defaultEmail(); 1269 defaultEmail = ent.defaultEmail();
1266 if (defaultEmail.isEmpty()) defaultEmail = emails[0]; 1270 if (defaultEmail.isEmpty()) defaultEmail = emails[0];
1267 qDebug("default email=%s",defaultEmail.latin1()); 1271 Opie::Core::odebug << "default email=" << defaultEmail << oendl;
1268 1272
1269 txtFirstName->setText( ent.firstName() ); 1273 txtFirstName->setText( ent.firstName() );
1270 txtMiddleName->setText( ent.middleName() ); 1274 txtMiddleName->setText( ent.middleName() );
@@ -1324,7 +1328,7 @@ void ContactEditor::setEntry( const Opie::OPimContact &entry ) {
1324 QListIterator<QLineEdit> itLE( listValue ); 1328 QListIterator<QLineEdit> itLE( listValue );
1325 for ( it = slDynamicEntries.begin(); itLE.current()/* != slDynamicEntries.end()*/; ++it, ++itLE) { 1329 for ( it = slDynamicEntries.begin(); itLE.current()/* != slDynamicEntries.end()*/; ++it, ++itLE) {
1326 1330
1327 qWarning(" Filling dynamic Field: %s", (*it).latin1() ); 1331 Opie::Core::owarn << " Filling dynamic Field: " << (*it) << oendl;
1328 1332
1329 if ( *it == "Department" ) 1333 if ( *it == "Department" )
1330 (*itLE)->setText( ent.department() ); 1334 (*itLE)->setText( ent.department() );
@@ -1348,7 +1352,7 @@ void ContactEditor::setEntry( const Opie::OPimContact &entry ) {
1348 (*itLE)->setText( ent.spouse() ); 1352 (*itLE)->setText( ent.spouse() );
1349 1353
1350 if ( *it == "Nickname" ){ 1354 if ( *it == "Nickname" ){
1351 qWarning("**** Nichname: %s", ent.nickname().latin1() ); 1355 Opie::Core::owarn << "**** Nichname: " << ent.nickname() << oendl;
1352 (*itLE)->setText( ent.nickname() ); 1356 (*itLE)->setText( ent.nickname() );
1353 } 1357 }
1354 1358
@@ -1581,8 +1585,8 @@ void ContactEditor::saveEntry() {
1581 QString defaultmail; 1585 QString defaultmail;
1582 parseEmailFrom( emails.join(","), defaultmail, allemail ); 1586 parseEmailFrom( emails.join(","), defaultmail, allemail );
1583 if ( defaultEmail.isEmpty() ){ 1587 if ( defaultEmail.isEmpty() ){
1584 qWarning("Default email was not set by user!"); 1588 Opie::Core::owarn << "Default email was not set by user!" << oendl;
1585 qWarning("Using first email in list: %s", defaultmail.latin1()); 1589 Opie::Core::owarn << "Using first email in list: " << defaultmail << oendl;
1586 ent.setDefaultEmail( defaultmail ); 1590 ent.setDefaultEmail( defaultmail );
1587 } 1591 }
1588 ent.setEmails( allemail ); 1592 ent.setEmails( allemail );
@@ -1734,14 +1738,14 @@ void ContactEditor::slotBirthdayDateChanged( int year, int month, int day)
1734 1738
1735void ContactEditor::slotRemoveBirthday() 1739void ContactEditor::slotRemoveBirthday()
1736{ 1740{
1737 qWarning("void ContactEditor::slotRemoveBirthday()"); 1741 Opie::Core::owarn << "void ContactEditor::slotRemoveBirthday()" << oendl;
1738 ent.setBirthday( QDate() ); 1742 ent.setBirthday( QDate() );
1739 updateDatePicker(); 1743 updateDatePicker();
1740} 1744}
1741 1745
1742void ContactEditor::slotRemoveAnniversary() 1746void ContactEditor::slotRemoveAnniversary()
1743{ 1747{
1744 qWarning("void ContactEditor::slotRemoveAnniversary()"); 1748 Opie::Core::owarn << "void ContactEditor::slotRemoveAnniversary()" << oendl;
1745 ent.setAnniversary( QDate() ); 1749 ent.setAnniversary( QDate() );
1746 updateDatePicker(); 1750 updateDatePicker();
1747} 1751}
diff --git a/core/pim/addressbook/opie-addressbook.control b/core/pim/addressbook/opie-addressbook.control
index 18a3791..882bdf3 100644
--- a/core/pim/addressbook/opie-addressbook.control
+++ b/core/pim/addressbook/opie-addressbook.control
@@ -5,7 +5,7 @@ Section: opie/pim
5Conflicts: qpe-tkcaddressbook 5Conflicts: qpe-tkcaddressbook
6Maintainer: Stefan Eilers <eilers.stefan@epost.de> 6Maintainer: Stefan Eilers <eilers.stefan@epost.de>
7Architecture: arm 7Architecture: arm
8Depends: task-opie-minimal, opie-pics, libopiecore2, libopieui2, libopiepim2, libopiedb2 8Depends: task-opie-minimal, opie-pics, libopiecore2, libopieui2, libopiepim2
9Description: Contacts 9Description: Contacts
10 A simple addressbook for the Opie environment. 10 A simple addressbook for the Opie environment.
11Version: $QPE_VERSION$EXTRAVERSION 11Version: $QPE_VERSION$EXTRAVERSION
diff --git a/core/pim/addressbook/picker.cpp b/core/pim/addressbook/picker.cpp
index 7a20591..df3d6ac 100644
--- a/core/pim/addressbook/picker.cpp
+++ b/core/pim/addressbook/picker.cpp
@@ -1,11 +1,13 @@
1#include "picker.h" 1#include "picker.h"
2 2
3#include <opie2/odebug.h>
4
3#include <qtimer.h> 5#include <qtimer.h>
4#include <qlayout.h> 6#include <qlayout.h>
5 7
6char PickerLabel::lastLetter = '\0'; 8char PickerLabel::lastLetter = '\0';
7 9
8PickerLabel::PickerLabel( QWidget *parent, const char *name ) 10PickerLabel::PickerLabel( QWidget *parent, const char *name )
9 : QLabel ( parent, name ) 11 : QLabel ( parent, name )
10{ 12{
11 currentLetter = 0; 13 currentLetter = 0;
@@ -30,17 +32,17 @@ void PickerLabel::setLetters( char ch1, char ch2, char ch3 )
30{ 32{
31 QString tmpStr; 33 QString tmpStr;
32 34
33 if (ch1 != '\0') 35 if (ch1 != '\0')
34 letter1 = ch1; 36 letter1 = ch1;
35 else 37 else
36 letter1 = ' '; 38 letter1 = ' ';
37 39
38 if (ch2 != '\0') 40 if (ch2 != '\0')
39 letter2 = ch2; 41 letter2 = ch2;
40 else 42 else
41 letter2 = ' '; 43 letter2 = ' ';
42 44
43 if (ch3 != '\0') 45 if (ch3 != '\0')
44 letter3 = ch3; 46 letter3 = ch3;
45 else 47 else
46 letter3 = ' '; 48 letter3 = ' ';
@@ -61,7 +63,7 @@ void PickerLabel::clearLetter()
61{ 63{
62 64
63 QString tmpStr; 65 QString tmpStr;
64 66
65 tmpStr = "<qt>"; 67 tmpStr = "<qt>";
66 tmpStr += letter1; 68 tmpStr += letter1;
67 tmpStr += letter2; 69 tmpStr += letter2;
@@ -76,12 +78,12 @@ void PickerLabel::clearLetter()
76 78
77void PickerLabel::mousePressEvent( QMouseEvent* e ) 79void PickerLabel::mousePressEvent( QMouseEvent* e )
78{ 80{
79 // If one pickerlabel is was, and an other is now selected, we 81 // If one pickerlabel is was, and an other is now selected, we
80 // have to simulate the releaseevent.. Otherwise the new label 82 // have to simulate the releaseevent.. Otherwise the new label
81 // will not get a highlighted letter.. 83 // will not get a highlighted letter..
82 // Maybe there is a more intelligent solution, but this works and I am tired.. (se) 84 // Maybe there is a more intelligent solution, but this works and I am tired.. (se)
83 if ( ( currentLetter == 0 ) && ( lastLetter != '\0' ) ) mouseReleaseEvent( e ); 85 if ( ( currentLetter == 0 ) && ( lastLetter != '\0' ) ) mouseReleaseEvent( e );
84} 86}
85 87
86void PickerLabel::mouseReleaseEvent( QMouseEvent* /* e */ ) 88void PickerLabel::mouseReleaseEvent( QMouseEvent* /* e */ )
87{ 89{
@@ -89,7 +91,7 @@ void PickerLabel::mouseReleaseEvent( QMouseEvent* /* e */ )
89 91
90 if (lastLetter != letter1 && lastLetter != letter2 && lastLetter != letter3 && lastLetter != '\0') 92 if (lastLetter != letter1 && lastLetter != letter2 && lastLetter != letter3 && lastLetter != '\0')
91 QTimer::singleShot( 0, this, SLOT(emitClearSignal()) ); 93 QTimer::singleShot( 0, this, SLOT(emitClearSignal()) );
92 94
93 switch (currentLetter) { 95 switch (currentLetter) {
94 case 0: 96 case 0:
95 tmpStr = "<qt><u><b><font color=\"#FF00FF\">"; 97 tmpStr = "<qt><u><b><font color=\"#FF00FF\">";
@@ -121,7 +123,7 @@ void PickerLabel::mouseReleaseEvent( QMouseEvent* /* e */ )
121 lastLetter = letter2; 123 lastLetter = letter2;
122 emit selectedLetter( letter2 ); 124 emit selectedLetter( letter2 );
123 break; 125 break;
124 126
125 case 2: 127 case 2:
126 tmpStr = "<qt>"; 128 tmpStr = "<qt>";
127 tmpStr += letter1; 129 tmpStr += letter1;
@@ -149,7 +151,7 @@ void PickerLabel::mouseReleaseEvent( QMouseEvent* /* e */ )
149void PickerLabel::emitClearSignal() { 151void PickerLabel::emitClearSignal() {
150 emit clearAll(); 152 emit clearAll();
151} 153}
152 154
153LetterPicker::LetterPicker( QWidget *parent, const char *name ) 155LetterPicker::LetterPicker( QWidget *parent, const char *name )
154 : QFrame( parent, name ) 156 : QFrame( parent, name )
155{ 157{
@@ -157,7 +159,7 @@ LetterPicker::LetterPicker( QWidget *parent, const char *name )
157 159
158 lblABC = new PickerLabel( this ); 160 lblABC = new PickerLabel( this );
159 l->addWidget( lblABC ); 161 l->addWidget( lblABC );
160 162
161 lblDEF = new PickerLabel( this ); 163 lblDEF = new PickerLabel( this );
162 l->addWidget( lblDEF ); 164 l->addWidget( lblDEF );
163 165
@@ -237,7 +239,7 @@ void LetterPicker::clear()
237 239
238void LetterPicker::newLetter( char letter ) 240void LetterPicker::newLetter( char letter )
239{ 241{
240 qWarning("LetterClicked"); 242 Opie::Core::owarn << "LetterClicked" << oendl;
241 emit letterClicked( letter ); 243 emit letterClicked( letter );
242 244
243} 245}