author | drw <drw> | 2004-04-02 20:16:47 (UTC) |
---|---|---|
committer | drw <drw> | 2004-04-02 20:16:47 (UTC) |
commit | b4d07df7854800fd3613034f54488c6fa27d94ee (patch) (unidiff) | |
tree | e467a97fe4fe9dd0d96dd22299195dd30227bef1 /core/pim/addressbook/abtable.cpp | |
parent | 97bdc55663590ba430a4f322ad97aab9f4c02bf3 (diff) | |
download | opie-b4d07df7854800fd3613034f54488c6fa27d94ee.zip opie-b4d07df7854800fd3613034f54488c6fa27d94ee.tar.gz opie-b4d07df7854800fd3613034f54488c6fa27d94ee.tar.bz2 |
Use ODebug (135 down...), and remove libopiedb2 from dependencies
Diffstat (limited to 'core/pim/addressbook/abtable.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/abtable.cpp | 57 |
1 files changed, 30 insertions, 27 deletions
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 | ||
136 | AbTable::~AbTable() | 135 | AbTable::~AbTable() |
@@ -152,7 +151,7 @@ void AbTable::init() | |||
152 | 151 | ||
153 | void AbTable::setContacts( const Opie::OPimContactAccess::List& viewList ) | 152 | void 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 | ||
185 | bool AbTable::selectContact( int UID ) | 184 | bool 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 |
215 | void AbTable::insertIntoTable( const Opie::OPimContact& cnt, int row ) | 214 | void 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 | ||
258 | void AbTable::resort() | 258 | void 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 | ||
284 | void AbTable::clear() | 284 | void 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 |
302 | void AbTable::refresh() | 302 | void 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 | ||
358 | void AbTable::moveTo( char c ) | 358 | void 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 | ||
424 | void AbTable::realignTable() | 424 | void 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 | ||
474 | void AbTable::fitColumns() | 474 | void 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 | ||
498 | void AbTable::show() | 498 | void 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 | ||
522 | void AbTable::itemClicked(int,int col) | 522 | void 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 | ||
563 | void AbTable::updateVisible() | 563 | void 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 | ||
599 | void AbTable::setPaintingEnabled( bool e ) | 599 | void 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 | ||
620 | void AbTable::viewportPaintEvent( QPaintEvent* e ) { | 622 | void 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 | ||