summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views
Unidiff
Diffstat (limited to 'kaddressbook/views') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/cardview.cpp114
-rw-r--r--kaddressbook/views/cardview.h14
-rw-r--r--kaddressbook/views/colorlistbox.cpp25
-rw-r--r--kaddressbook/views/colorlistbox.h15
-rw-r--r--kaddressbook/views/configurecardviewdialog.cpp57
-rw-r--r--kaddressbook/views/configurecardviewdialog.h6
-rw-r--r--kaddressbook/views/configuretableviewdialog.cpp35
-rw-r--r--kaddressbook/views/configuretableviewdialog.h6
-rw-r--r--kaddressbook/views/contactlistview.cpp32
-rw-r--r--kaddressbook/views/contactlistview.h6
-rw-r--r--kaddressbook/views/kaddressbookcardview.cpp19
-rw-r--r--kaddressbook/views/kaddressbookcardview.h3
-rw-r--r--kaddressbook/views/kaddressbookiconview.cpp60
-rw-r--r--kaddressbook/views/kaddressbookiconview.h29
-rw-r--r--kaddressbook/views/kaddressbooktableview.cpp56
-rw-r--r--kaddressbook/views/kaddressbooktableview.h18
16 files changed, 283 insertions, 212 deletions
diff --git a/kaddressbook/views/cardview.cpp b/kaddressbook/views/cardview.cpp
index b6e053f..1a29f41 100644
--- a/kaddressbook/views/cardview.cpp
+++ b/kaddressbook/views/cardview.cpp
@@ -34,6 +34,14 @@
34#include <qcursor.h> 34#include <qcursor.h>
35#include <qtooltip.h> 35#include <qtooltip.h>
36#include <qapplication.h> 36#include <qapplication.h>
37//Added by qt3to4:
38#include <QKeyEvent>
39#include <Q3PtrList>
40#include <QResizeEvent>
41#include <QFocusEvent>
42#include <QMouseEvent>
43#include <QEvent>
44#include <QWheelEvent>
37 45
38#include "kabprefs.h" 46#include "kabprefs.h"
39#include <kdebug.h> 47#include <kdebug.h>
@@ -71,11 +79,11 @@ class CardViewTip : public QLabel {
71// Warning: make sure you use findRef() instead of find() to find an 79// Warning: make sure you use findRef() instead of find() to find an
72// item! Only the pointer value is unique in the list. 80// item! Only the pointer value is unique in the list.
73// 81//
74class CardViewItemList : public QPtrList<CardViewItem> 82class CardViewItemList : public Q3PtrList<CardViewItem>
75{ 83{
76 protected: 84 protected:
77 virtual int compareItems(QPtrCollection::Item item1, 85 virtual int compareItems(Q3PtrCollection::Item item1,
78 QPtrCollection::Item item2) 86 Q3PtrCollection::Item item2)
79 { 87 {
80 CardViewItem *cItem1 = (CardViewItem*)item1; 88 CardViewItem *cItem1 = (CardViewItem*)item1;
81 CardViewItem *cItem2 = (CardViewItem*)item2; 89 CardViewItem *cItem2 = (CardViewItem*)item2;
@@ -161,7 +169,7 @@ class CardViewPrivate
161 {}; 169 {};
162 170
163 CardViewItemList mItemList; 171 CardViewItemList mItemList;
164 QPtrList<CardViewSeparator> mSeparatorList; 172 Q3PtrList<CardViewSeparator> mSeparatorList;
165 QFontMetrics *mFm; 173 QFontMetrics *mFm;
166 QFontMetrics *mBFm; // bold font 174 QFontMetrics *mBFm; // bold font
167 QFont mHeaderFont; // custom header font 175 QFont mHeaderFont; // custom header font
@@ -208,7 +216,7 @@ class CardViewItemPrivate
208 216
209 217
210 QString mCaption; 218 QString mCaption;
211 QPtrList< CardViewItem::Field > mFieldList; 219 Q3PtrList< CardViewItem::Field > mFieldList;
212 bool mSelected; 220 bool mSelected;
213 int x; // horizontal position, set by the view 221 int x; // horizontal position, set by the view
214 int y; // vertical position, set by the view 222 int y; // vertical position, set by the view
@@ -313,7 +321,7 @@ void CardViewItem::paintCard(QPainter *p, QColorGroup &cg)
313 p->restore(); 321 p->restore();
314 322
315 // Go through the fields and draw them 323 // Go through the fields and draw them
316 QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); 324 Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
317 QString label, value; 325 QString label, value;
318 int yPos = mg + 4 + bFm.height()/* + 1*/ + fm.height(); // why the + 1 ??? (anders) 326 int yPos = mg + 4 + bFm.height()/* + 1*/ + fm.height(); // why the + 1 ??? (anders)
319 p->setPen(cg.text()); 327 p->setPen(cg.text());
@@ -408,12 +416,12 @@ int CardViewItem::height( bool allowCache ) const
408 int fieldHeight = 0; 416 int fieldHeight = 0;
409 int lines; 417 int lines;
410 int maxLines( mView->maxFieldLines() ); 418 int maxLines( mView->maxFieldLines() );
411 QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); 419 Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
412 for (iter.toFirst(); iter.current(); ++iter) 420 for (iter.toFirst(); iter.current(); ++iter)
413 { 421 {
414 if ( !sef && (*iter)->second.isEmpty() ) 422 if ( !sef && (*iter)->second.isEmpty() )
415 continue; 423 continue;
416 lines = QMIN( (*iter)->second.contains('\n') + 1, maxLines ); 424 lines = QMIN( (*iter)->second.count('\n') + 1, maxLines );
417 fieldHeight += ( lines * fh ) + 2;//sp; 425 fieldHeight += ( lines * fh ) + 2;//sp;
418 } 426 }
419 427
@@ -450,7 +458,7 @@ void CardViewItem::removeField(const QString &label)
450{ 458{
451 CardViewItem::Field *f; 459 CardViewItem::Field *f;
452 460
453 QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); 461 Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
454 for (iter.toFirst(); iter.current(); ++iter) 462 for (iter.toFirst(); iter.current(); ++iter)
455 { 463 {
456 f = *iter; 464 f = *iter;
@@ -523,7 +531,7 @@ void CardViewItem::setCaption(const QString &caption)
523 531
524QString CardViewItem::fieldValue(const QString &label) 532QString CardViewItem::fieldValue(const QString &label)
525{ 533{
526 QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); 534 Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
527 for (iter.toFirst(); iter.current(); ++iter) 535 for (iter.toFirst(); iter.current(); ++iter)
528 if ((*iter)->first == label) 536 if ((*iter)->first == label)
529 return (*iter)->second; 537 return (*iter)->second;
@@ -569,7 +577,7 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
569 Field *_f; 577 Field *_f;
570 for (_f = d->mFieldList.first(); _f != f; _f = d->mFieldList.next()) 578 for (_f = d->mFieldList.first(); _f != f; _f = d->mFieldList.next())
571 if ( se || ! _f->second.isEmpty() ) 579 if ( se || ! _f->second.isEmpty() )
572 y += ( QMIN(_f->second.contains('\n')+1, maxLines) * fh ) + 2; 580 y += ( QMIN(_f->second.count('\n')+1, maxLines) * fh ) + 2;
573// } 581// }
574 if ( isLabel && itempos.y() > y + fh ) 582 if ( isLabel && itempos.y() > y + fh )
575 return; 583 return;
@@ -586,7 +594,7 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
586 trimmed = mView->d->mFm->width( s ) > mw - colonWidth; 594 trimmed = mView->d->mFm->width( s ) > mw - colonWidth;
587 } else { 595 } else {
588 QRect r( mView->d->mFm->boundingRect( 0, 0, INT_MAX, INT_MAX, Qt::AlignTop|Qt::AlignLeft, s ) ); 596 QRect r( mView->d->mFm->boundingRect( 0, 0, INT_MAX, INT_MAX, Qt::AlignTop|Qt::AlignLeft, s ) );
589 trimmed = r.width() > mw || r.height()/fh > QMIN(s.contains('\n') + 1, maxLines); 597 trimmed = r.width() > mw || r.height()/fh > QMIN(s.count('\n') + 1, maxLines);
590 } 598 }
591 } 599 }
592 if ( trimmed ) 600 if ( trimmed )
@@ -626,7 +634,7 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const
626 for ( f = d->mFieldList.first(); f; f = d->mFieldList.next() ) 634 for ( f = d->mFieldList.first(); f; f = d->mFieldList.next() )
627 { 635 {
628 if ( showEmpty || !f->second.isEmpty() ) 636 if ( showEmpty || !f->second.isEmpty() )
629 ypos += ( QMIN( f->second.contains('\n')+1, maxLines ) *fh)+2; 637 ypos += ( QMIN( f->second.count('\n')+1, maxLines ) *fh)+2;
630 if ( iy <= ypos ) 638 if ( iy <= ypos )
631 break; 639 break;
632 } 640 }
@@ -637,7 +645,7 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const
637//BEGIN CardView 645//BEGIN CardView
638 646
639CardView::CardView(QWidget *parent, const char *name) 647CardView::CardView(QWidget *parent, const char *name)
640 : QScrollView(parent, name), 648 : Q3ScrollView(parent, name),
641 d(new CardViewPrivate()) 649 d(new CardViewPrivate())
642{ 650{
643 mFlagKeyPressed = false; 651 mFlagKeyPressed = false;
@@ -656,13 +664,13 @@ CardView::CardView(QWidget *parent, const char *name)
656 664
657 viewport()->setMouseTracking( true ); 665 viewport()->setMouseTracking( true );
658 viewport()->setFocusProxy(this); 666 viewport()->setFocusProxy(this);
659 viewport()->setFocusPolicy(WheelFocus); 667 viewport()->setFocusPolicy(Qt::WheelFocus);
660 viewport()->setBackgroundMode(PaletteBase); 668 viewport()->setBackgroundMode(Qt::PaletteBase);
661 669
662 connect( d->mTimer, SIGNAL(timeout()), this, SLOT(tryShowFullText()) ); 670 connect( d->mTimer, SIGNAL(timeout()), this, SLOT(tryShowFullText()) );
663 671
664//US setBackgroundMode(PaletteBackground, PaletteBase); 672//US setBackgroundMode(PaletteBackground, PaletteBase);
665 setBackgroundMode(PaletteBackground); 673 setBackgroundMode(Qt::PaletteBackground);
666 674
667 // no reason for a vertical scrollbar 675 // no reason for a vertical scrollbar
668 setVScrollBarMode(AlwaysOff); 676 setVScrollBarMode(AlwaysOff);
@@ -739,7 +747,7 @@ void CardView::setCurrentItem( CardViewItem *item )
739CardViewItem *CardView::itemAt(const QPoint &viewPos) 747CardViewItem *CardView::itemAt(const QPoint &viewPos)
740{ 748{
741 CardViewItem *item = 0; 749 CardViewItem *item = 0;
742 QPtrListIterator<CardViewItem> iter(d->mItemList); 750 Q3PtrListIterator<CardViewItem> iter(d->mItemList);
743 bool found = false; 751 bool found = false;
744 for (iter.toFirst(); iter.current() && !found; ++iter) 752 for (iter.toFirst(); iter.current() && !found; ++iter)
745 { 753 {
@@ -787,7 +795,7 @@ CardView::SelectionMode CardView::selectionMode() const
787 795
788void CardView::selectAll(bool state) 796void CardView::selectAll(bool state)
789{ 797{
790 QPtrListIterator<CardViewItem> iter(d->mItemList); 798 Q3PtrListIterator<CardViewItem> iter(d->mItemList);
791 if (!state) 799 if (!state)
792 { 800 {
793 for (iter.toFirst(); iter.current(); ++iter) 801 for (iter.toFirst(); iter.current(); ++iter)
@@ -878,7 +886,7 @@ bool CardView::isSelected(CardViewItem *item) const
878CardViewItem *CardView::selectedItem() const 886CardViewItem *CardView::selectedItem() const
879{ 887{
880 // find the first selected item 888 // find the first selected item
881 QPtrListIterator<CardViewItem> iter(d->mItemList); 889 Q3PtrListIterator<CardViewItem> iter(d->mItemList);
882 for (iter.toFirst(); iter.current(); ++iter) 890 for (iter.toFirst(); iter.current(); ++iter)
883 { 891 {
884 if ((*iter)->isSelected()) 892 if ((*iter)->isSelected())
@@ -955,7 +963,7 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy,
955 viewport()->erase( QRect ( cX, cY , clipw, cliph ) ); 963 viewport()->erase( QRect ( cX, cY , clipw, cliph ) );
956 964
957 // Now tell the cards to draw, if they are in the clip region 965 // Now tell the cards to draw, if they are in the clip region
958 QPtrListIterator<CardViewItem> iter(d->mItemList); 966 Q3PtrListIterator<CardViewItem> iter(d->mItemList);
959 for (iter.toFirst(); iter.current(); ++iter) 967 for (iter.toFirst(); iter.current(); ++iter)
960 { 968 {
961 item = *iter; 969 item = *iter;
@@ -975,7 +983,7 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy,
975 } 983 }
976 984
977 // Followed by the separators if they are in the clip region 985 // Followed by the separators if they are in the clip region
978 QPtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList); 986 Q3PtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList);
979 for (sepIter.toFirst(); sepIter.current(); ++sepIter) 987 for (sepIter.toFirst(); sepIter.current(); ++sepIter)
980 { 988 {
981 sep = *sepIter; 989 sep = *sepIter;
@@ -993,7 +1001,7 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy,
993 1001
994void CardView::resizeEvent(QResizeEvent *e) 1002void CardView::resizeEvent(QResizeEvent *e)
995{ 1003{
996 QScrollView::resizeEvent(e); 1004 Q3ScrollView::resizeEvent(e);
997 1005
998 setLayoutDirty(true); 1006 setLayoutDirty(true);
999} 1007}
@@ -1013,7 +1021,7 @@ void CardView::calcLayout()
1013 // delete the old separators 1021 // delete the old separators
1014 d->mSeparatorList.clear(); 1022 d->mSeparatorList.clear();
1015 1023
1016 QPtrListIterator<CardViewItem> iter(d->mItemList); 1024 Q3PtrListIterator<CardViewItem> iter(d->mItemList);
1017 CardViewItem *item = 0; 1025 CardViewItem *item = 0;
1018 CardViewSeparator *sep = 0; 1026 CardViewSeparator *sep = 0;
1019 xPos += cardSpacing; 1027 xPos += cardSpacing;
@@ -1056,7 +1064,7 @@ void CardView::calcLayout()
1056 1064
1057 // Update the height of all the separators now that we know the 1065 // Update the height of all the separators now that we know the
1058 // max height of a column 1066 // max height of a column
1059 QPtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList); 1067 Q3PtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList);
1060 for (sepIter.toFirst(); sepIter.current(); ++sepIter) 1068 for (sepIter.toFirst(); sepIter.current(); ++sepIter)
1061 { 1069 {
1062 (*sepIter)->mRect.setHeight(maxHeight - 2*cardSpacing - 2*d->mItemMargin); 1070 (*sepIter)->mRect.setHeight(maxHeight - 2*cardSpacing - 2*d->mItemMargin);
@@ -1101,7 +1109,7 @@ void CardView::setItemSpacing( uint spacing )
1101 1109
1102void CardView::contentsMousePressEvent(QMouseEvent *e) 1110void CardView::contentsMousePressEvent(QMouseEvent *e)
1103{ 1111{
1104 QScrollView::contentsMousePressEvent(e); 1112 Q3ScrollView::contentsMousePressEvent(e);
1105 1113
1106 QPoint pos = e->pos(); 1114 QPoint pos = e->pos();
1107 d->mLastClickPos = pos; 1115 d->mLastClickPos = pos;
@@ -1171,7 +1179,7 @@ void CardView::contentsMousePressEvent(QMouseEvent *e)
1171 1179
1172 bool s = ! item->isSelected(); 1180 bool s = ! item->isSelected();
1173 1181
1174 if ( s && ! (e->state() & ControlButton) ) 1182 if ( s && ! (e->state() & Qt::ControlButton) )
1175 { 1183 {
1176 bool b = signalsBlocked(); 1184 bool b = signalsBlocked();
1177 blockSignals(true); 1185 blockSignals(true);
@@ -1219,7 +1227,7 @@ void CardView::contentsMousePressEvent(QMouseEvent *e)
1219 1227
1220void CardView::contentsMouseReleaseEvent(QMouseEvent *e) 1228void CardView::contentsMouseReleaseEvent(QMouseEvent *e)
1221{ 1229{
1222 QScrollView::contentsMouseReleaseEvent(e); 1230 Q3ScrollView::contentsMouseReleaseEvent(e);
1223 1231
1224 if ( d->mResizeAnchor ) 1232 if ( d->mResizeAnchor )
1225 { 1233 {
@@ -1257,7 +1265,7 @@ void CardView::contentsMouseReleaseEvent(QMouseEvent *e)
1257 1265
1258void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e) 1266void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e)
1259{ 1267{
1260 QScrollView::contentsMouseDoubleClickEvent(e); 1268 Q3ScrollView::contentsMouseDoubleClickEvent(e);
1261 1269
1262 CardViewItem *item = itemAt(e->pos()); 1270 CardViewItem *item = itemAt(e->pos());
1263 1271
@@ -1302,12 +1310,12 @@ void CardView::contentsMouseMoveEvent( QMouseEvent *e )
1302 int m = e->x()%colw; 1310 int m = e->x()%colw;
1303 if ( m >= colcontentw && m > 0 ) 1311 if ( m >= colcontentw && m > 0 )
1304 { 1312 {
1305 setCursor( SplitVCursor ); // Why does this fail sometimes? 1313 setCursor( Qt::SplitVCursor ); // Why does this fail sometimes?
1306 d->mOnSeparator = true; 1314 d->mOnSeparator = true;
1307 } 1315 }
1308 else 1316 else
1309 { 1317 {
1310 setCursor( ArrowCursor ); 1318 setCursor( Qt::ArrowCursor );
1311 d->mOnSeparator = false; 1319 d->mOnSeparator = false;
1312 } 1320 }
1313 } 1321 }
@@ -1324,7 +1332,7 @@ void CardView::leaveEvent( QEvent * )
1324 if (d->mOnSeparator) 1332 if (d->mOnSeparator)
1325 { 1333 {
1326 d->mOnSeparator = false; 1334 d->mOnSeparator = false;
1327 setCursor( ArrowCursor ); 1335 setCursor( Qt::ArrowCursor );
1328 } 1336 }
1329} 1337}
1330 1338
@@ -1368,21 +1376,21 @@ void CardView::keyPressEvent( QKeyEvent *e )
1368 1376
1369 switch ( e->key() ) 1377 switch ( e->key() )
1370 { 1378 {
1371 case Key_Up: 1379 case Qt::Key_Up:
1372 if ( pos > 0 ) 1380 if ( pos > 0 )
1373 { 1381 {
1374 aItem = d->mItemList.at( pos - 1 ); 1382 aItem = d->mItemList.at( pos - 1 );
1375 setCurrentItem( aItem ); 1383 setCurrentItem( aItem );
1376 } 1384 }
1377 break; 1385 break;
1378 case Key_Down: 1386 case Qt::Key_Down:
1379 if ( pos < d->mItemList.count() - 1 ) 1387 if ( pos < d->mItemList.count() - 1 )
1380 { 1388 {
1381 aItem = d->mItemList.at( pos + 1 ); 1389 aItem = d->mItemList.at( pos + 1 );
1382 setCurrentItem( aItem ); 1390 setCurrentItem( aItem );
1383 } 1391 }
1384 break; 1392 break;
1385 case Key_Left: 1393 case Qt::Key_Left:
1386 { 1394 {
1387 // look for an item in the previous/next column, starting from 1395 // look for an item in the previous/next column, starting from
1388 // the vertical middle of the current item. 1396 // the vertical middle of the current item.
@@ -1400,7 +1408,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
1400 setCurrentItem( aItem ); 1408 setCurrentItem( aItem );
1401 } 1409 }
1402 break; 1410 break;
1403 case Key_Right: 1411 case Qt::Key_Right:
1404 { 1412 {
1405 // FIXME use nice calculated measures!!! 1413 // FIXME use nice calculated measures!!!
1406 QPoint aPoint( d->mCurrentItem->d->x + d->mItemWidth, d->mCurrentItem->d->y ); 1414 QPoint aPoint( d->mCurrentItem->d->x + d->mItemWidth, d->mCurrentItem->d->y );
@@ -1415,15 +1423,15 @@ void CardView::keyPressEvent( QKeyEvent *e )
1415 setCurrentItem( aItem ); 1423 setCurrentItem( aItem );
1416 } 1424 }
1417 break; 1425 break;
1418 case Key_Home: 1426 case Qt::Key_Home:
1419 aItem = d->mItemList.first(); 1427 aItem = d->mItemList.first();
1420 setCurrentItem( aItem ); 1428 setCurrentItem( aItem );
1421 break; 1429 break;
1422 case Key_End: 1430 case Qt::Key_End:
1423 aItem = d->mItemList.last(); 1431 aItem = d->mItemList.last();
1424 setCurrentItem( aItem ); 1432 setCurrentItem( aItem );
1425 break; 1433 break;
1426 case Key_Prior: // PageUp 1434 case Qt::Key_Prior: // PageUp
1427 { 1435 {
1428 // QListView: "Make the item above the top visible and current" 1436 // QListView: "Make the item above the top visible and current"
1429 // TODO if contentsY(), pick the top item of the leftmost visible column 1437 // TODO if contentsY(), pick the top item of the leftmost visible column
@@ -1436,7 +1444,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
1436 setCurrentItem( aItem ); 1444 setCurrentItem( aItem );
1437 } 1445 }
1438 break; 1446 break;
1439 case Key_Next: // PageDown 1447 case Qt::Key_Next: // PageDown
1440 { 1448 {
1441 // QListView: "Make the item below the bottom visible and current" 1449 // QListView: "Make the item below the bottom visible and current"
1442 // find the first not fully visible column. 1450 // find the first not fully visible column.
@@ -1458,19 +1466,19 @@ void CardView::keyPressEvent( QKeyEvent *e )
1458 setCurrentItem( aItem ); 1466 setCurrentItem( aItem );
1459 } 1467 }
1460 break; 1468 break;
1461 case Key_Space: 1469 case Qt::Key_Space:
1462 setSelected( d->mCurrentItem, !d->mCurrentItem->isSelected() ); 1470 setSelected( d->mCurrentItem, !d->mCurrentItem->isSelected() );
1463 emit selectionChanged(); 1471 emit selectionChanged();
1464 break; 1472 break;
1465 case Key_Return: 1473 case Qt::Key_Return:
1466 case Key_Enter: 1474 case Qt::Key_Enter:
1467 { 1475 {
1468 emit returnPressed( d->mCurrentItem ); 1476 emit returnPressed( d->mCurrentItem );
1469 emit executed( d->mCurrentItem ); 1477 emit executed( d->mCurrentItem );
1470 } 1478 }
1471 break; 1479 break;
1472 default: 1480 default:
1473 if ( (e->state() & ControlButton) && e->key() == Key_A ) 1481 if ( (e->state() & Qt::ControlButton) && e->key() == Qt::Key_A )
1474 { 1482 {
1475 // select all 1483 // select all
1476 selectAll( true ); 1484 selectAll( true );
@@ -1488,7 +1496,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
1488 { 1496 {
1489 if ( d->mSelectionMode == CardView::Extended ) 1497 if ( d->mSelectionMode == CardView::Extended )
1490 { 1498 {
1491 if ( (e->state() & ShiftButton) ) 1499 if ( (e->state() & Qt::ShiftButton) )
1492 { 1500 {
1493 // shift button: toggle range 1501 // shift button: toggle range
1494 // if control button is pressed, leave all items 1502 // if control button is pressed, leave all items
@@ -1519,7 +1527,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
1519 } 1527 }
1520 emit selectionChanged(); 1528 emit selectionChanged();
1521 } 1529 }
1522 else if ( (e->state() & ControlButton) ) 1530 else if ( (e->state() & Qt::ControlButton) )
1523 { 1531 {
1524 // control button: do nothing 1532 // control button: do nothing
1525 } 1533 }
@@ -1638,9 +1646,9 @@ void CardView::drawRubberBands( int pos )
1638 int h = visibleHeight(); 1646 int h = visibleHeight();
1639 1647
1640 QPainter p( viewport() ); 1648 QPainter p( viewport() );
1641 p.setRasterOp( XorROP ); 1649 p.setCompositionMode( QPainter::CompositionMode_Xor );
1642 p.setPen( gray ); 1650 p.setPen( Qt::gray );
1643 p.setBrush( gray ); 1651 p.setBrush( Qt::gray );
1644 uint n = d->first; 1652 uint n = d->first;
1645 // erase 1653 // erase
1646 if ( d->mRubberBandAnchor ) 1654 if ( d->mRubberBandAnchor )
@@ -1699,7 +1707,7 @@ QFont CardView::headerFont() const
1699 1707
1700void CardView::setFont( const QFont &fnt ) 1708void CardView::setFont( const QFont &fnt )
1701{ 1709{
1702 QScrollView::setFont( fnt ); 1710 Q3ScrollView::setFont( fnt );
1703 delete d->mFm; 1711 delete d->mFm;
1704 d->mFm = new QFontMetrics( fnt ); 1712 d->mFm = new QFontMetrics( fnt );
1705} 1713}
@@ -1736,7 +1744,7 @@ void CardView::keyReleaseEvent ( QKeyEvent * e )
1736 mFlagBlockKeyPressed = false; 1744 mFlagBlockKeyPressed = false;
1737 mFlagKeyPressed = false; 1745 mFlagKeyPressed = false;
1738 } 1746 }
1739 QScrollView::keyReleaseEvent ( e ); 1747 Q3ScrollView::keyReleaseEvent ( e );
1740} 1748}
1741 1749
1742 1750
@@ -1745,6 +1753,6 @@ void CardView::keyReleaseEvent ( QKeyEvent * e )
1745 1753
1746//END Cardview 1754//END Cardview
1747 1755
1748#ifndef KAB_EMBEDDED 1756#ifndef KAB_EMBEDDED_
1749#include "cardview.moc" 1757#include "moc_cardview.cpp"
1750#endif //KAB_EMBEDDED 1758#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/cardview.h b/kaddressbook/views/cardview.h
index 2ea3771..9c245ea 100644
--- a/kaddressbook/views/cardview.h
+++ b/kaddressbook/views/cardview.h
@@ -1,12 +1,20 @@
1#ifndef CARDVIEW_H 1#ifndef CARDVIEW_H
2#define CARDVIEW_H 2#define CARDVIEW_H
3 3
4#include <qscrollview.h> 4#include <q3scrollview.h>
5#include <qptrlist.h> 5#include <q3ptrlist.h>
6#include <qstring.h> 6#include <qstring.h>
7#include <qrect.h> 7#include <qrect.h>
8#include <qpair.h> 8#include <qpair.h>
9#include <qpoint.h> 9#include <qpoint.h>
10//Added by qt3to4:
11#include <QWheelEvent>
12#include <QResizeEvent>
13#include <QFocusEvent>
14#include <QLabel>
15#include <QMouseEvent>
16#include <QKeyEvent>
17#include <QEvent>
10 18
11class QLabel; 19class QLabel;
12class QPainter; 20class QPainter;
@@ -148,7 +156,7 @@ class CardViewItem
148* can be used elsewhere. With the exception of a few simple config checks, 156* can be used elsewhere. With the exception of a few simple config checks,
149* the CardView is also 100% independant of KDE. 157* the CardView is also 100% independant of KDE.
150*/ 158*/
151class CardView : public QScrollView 159class CardView : public Q3ScrollView
152{ 160{
153 friend class CardViewItem; 161 friend class CardViewItem;
154 162
diff --git a/kaddressbook/views/colorlistbox.cpp b/kaddressbook/views/colorlistbox.cpp
index 2bddca6..46a59a1 100644
--- a/kaddressbook/views/colorlistbox.cpp
+++ b/kaddressbook/views/colorlistbox.cpp
@@ -19,6 +19,11 @@
19 */ 19 */
20 20
21#include <qpainter.h> 21#include <qpainter.h>
22//Added by qt3to4:
23#include <QDragEnterEvent>
24#include <QDropEvent>
25#include <QDragMoveEvent>
26#include <QDragLeaveEvent>
22 27
23#include <kcolordialog.h> 28#include <kcolordialog.h>
24 29
@@ -31,11 +36,11 @@
31#include <qcolordialog.h> 36#include <qcolordialog.h>
32#endif 37#endif
33 38
34ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) 39ColorListBox::ColorListBox( QWidget *parent, const char *name, Qt::WFlags f )
35 :KListBox( parent, name, f ), mCurrentOnDragEnter(-1) 40 :KListBox( parent, name, f ), mCurrentOnDragEnter(-1)
36{ 41{
37 connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); 42 connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) );
38 connect( this, SIGNAL(clicked(QListBoxItem *)), this, SLOT(slotNewColor(QListBoxItem *)) ); 43 connect( this, SIGNAL(clicked(Q3ListBoxItem *)), this, SLOT(slotNewColor(Q3ListBoxItem *)) );
39 setAcceptDrops( true); 44 setAcceptDrops( true);
40} 45}
41 46
@@ -47,7 +52,7 @@ void ColorListBox::setEnabled( bool state )
47 return; 52 return;
48 } 53 }
49 54
50 QListBox::setEnabled( state ); 55 Q3ListBox::setEnabled( state );
51 for( uint i=0; i<count(); i++ ) 56 for( uint i=0; i<count(); i++ )
52 { 57 {
53 updateItem( i ); 58 updateItem( i );
@@ -75,10 +80,10 @@ QColor ColorListBox::color( uint index ) const
75 } 80 }
76 else 81 else
77 { 82 {
78 return( black ); 83 return( Qt::black );
79 } 84 }
80} 85}
81void ColorListBox::slotNewColor(QListBoxItem * i) 86void ColorListBox::slotNewColor(Q3ListBoxItem * i)
82{ 87{
83 if ( i ) 88 if ( i )
84 newColor( index( i ) ); 89 newColor( index( i ) );
@@ -198,7 +203,7 @@ qDebug("ColorListBox::dropEvent drag&drop currently not supported");
198 203
199 204
200ColorListItem::ColorListItem( const QString &text, const QColor &color ) 205ColorListItem::ColorListItem( const QString &text, const QColor &color )
201 : QListBoxItem(), mColor( color ), mBoxWidth( 30 ) 206 : Q3ListBoxItem(), mColor( color ), mBoxWidth( 30 )
202{ 207{
203 setText( text ); 208 setText( text );
204} 209}
@@ -229,17 +234,17 @@ void ColorListItem::paint( QPainter *p )
229} 234}
230 235
231 236
232int ColorListItem::height(const QListBox *lb ) const 237int ColorListItem::height(const Q3ListBox *lb ) const
233{ 238{
234 return( lb->fontMetrics().lineSpacing()+1 ); 239 return( lb->fontMetrics().lineSpacing()+1 );
235} 240}
236 241
237 242
238int ColorListItem::width(const QListBox *lb ) const 243int ColorListItem::width(const Q3ListBox *lb ) const
239{ 244{
240 return( mBoxWidth + lb->fontMetrics().width( text() ) + 6 ); 245 return( mBoxWidth + lb->fontMetrics().width( text() ) + 6 );
241} 246}
242 247
243#ifndef KAB_EMBEDDED 248#ifndef KAB_EMBEDDED_
244#include "colorlistbox.moc" 249#include "moc_colorlistbox.cpp"
245#endif //KAB_EMBEDDED 250#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/colorlistbox.h b/kaddressbook/views/colorlistbox.h
index bb91484..31a8085 100644
--- a/kaddressbook/views/colorlistbox.h
+++ b/kaddressbook/views/colorlistbox.h
@@ -22,6 +22,11 @@
22#define _COLOR_LISTBOX_H_ 22#define _COLOR_LISTBOX_H_
23 23
24#include <klistbox.h> 24#include <klistbox.h>
25//Added by qt3to4:
26#include <QDragMoveEvent>
27#include <QDragLeaveEvent>
28#include <QDropEvent>
29#include <QDragEnterEvent>
25 30
26class QDragEnterEvent; 31class QDragEnterEvent;
27class QDragLeaveEvent; 32class QDragLeaveEvent;
@@ -33,7 +38,7 @@ class ColorListBox : public KListBox
33 Q_OBJECT 38 Q_OBJECT
34 39
35 public: 40 public:
36 ColorListBox( QWidget *parent=0, const char * name=0, WFlags f=0 ); 41 ColorListBox( QWidget *parent=0, const char * name=0, Qt::WFlags f=0 );
37 void setColor( uint index, const QColor &color ); 42 void setColor( uint index, const QColor &color );
38 QColor color( uint index ) const; 43 QColor color( uint index ) const;
39 44
@@ -48,7 +53,7 @@ class ColorListBox : public KListBox
48 53
49 private slots: 54 private slots:
50 void newColor( int index ); 55 void newColor( int index );
51 void slotNewColor(QListBoxItem * i); 56 void slotNewColor(Q3ListBoxItem * i);
52 57
53 private: 58 private:
54 int mCurrentOnDragEnter; 59 int mCurrentOnDragEnter;
@@ -56,7 +61,7 @@ class ColorListBox : public KListBox
56}; 61};
57 62
58 63
59class ColorListItem : public QListBoxItem 64class ColorListItem : public Q3ListBoxItem
60{ 65{
61 public: 66 public:
62 ColorListItem( const QString &text, const QColor &color=Qt::black ); 67 ColorListItem( const QString &text, const QColor &color=Qt::black );
@@ -65,8 +70,8 @@ class ColorListItem : public QListBoxItem
65 70
66 protected: 71 protected:
67 virtual void paint( QPainter * ); 72 virtual void paint( QPainter * );
68 virtual int height( const QListBox * ) const; 73 virtual int height( const Q3ListBox * ) const;
69 virtual int width( const QListBox * ) const; 74 virtual int width( const Q3ListBox * ) const;
70 75
71 private: 76 private:
72 QColor mColor; 77 QColor mColor;
diff --git a/kaddressbook/views/configurecardviewdialog.cpp b/kaddressbook/views/configurecardviewdialog.cpp
index e0fbd21..b6327fe 100644
--- a/kaddressbook/views/configurecardviewdialog.cpp
+++ b/kaddressbook/views/configurecardviewdialog.cpp
@@ -25,11 +25,14 @@
25#include <qlayout.h> 25#include <qlayout.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qcheckbox.h> 27#include <qcheckbox.h>
28#include <qvbox.h> 28#include <q3vbox.h>
29#include <qgroupbox.h> 29#include <q3groupbox.h>
30#include <qspinbox.h> 30#include <qspinbox.h>
31#include <qtabwidget.h> 31#include <qtabwidget.h>
32#include <qwhatsthis.h> 32#include <q3whatsthis.h>
33//Added by qt3to4:
34#include <Q3GridLayout>
35#include <Q3Frame>
33 36
34#include <kdebug.h> 37#include <kdebug.h>
35#include <kglobal.h> 38#include <kglobal.h>
@@ -89,7 +92,7 @@ void ConfigureCardViewWidget::saveSettings( KConfig *config )
89//////////////////////// 92////////////////////////
90// CardViewLookNFeelPage 93// CardViewLookNFeelPage
91CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name ) 94CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name )
92 : QVBox( parent, name ) 95 : Q3VBox( parent, name )
93{ 96{
94 initGUI(); 97 initGUI();
95} 98}
@@ -234,28 +237,28 @@ void CardViewLookNFeelPage::initGUI()
234 QTabWidget *tabs = new QTabWidget( this ); 237 QTabWidget *tabs = new QTabWidget( this );
235 238
236 // Layout 239 // Layout
237 QVBox *loTab = new QVBox( this, "layouttab" ); 240 Q3VBox *loTab = new Q3VBox( this, "layouttab" );
238 241
239 loTab->setSpacing( spacing ); 242 loTab->setSpacing( spacing );
240 loTab->setMargin( margin ); 243 loTab->setMargin( margin );
241 244
242 QGroupBox *gbGeneral = new QGroupBox( 1, Qt::Horizontal, i18n("General"), loTab ); 245 Q3GroupBox *gbGeneral = new Q3GroupBox( 1, Qt::Horizontal, i18n("General"), loTab );
243 246
244 cbDrawSeps = new QCheckBox( i18n("Draw &separators"), gbGeneral ); 247 cbDrawSeps = new QCheckBox( i18n("Draw &separators"), gbGeneral );
245 248
246 QHBox *hbSW = new QHBox( gbGeneral ); 249 Q3HBox *hbSW = new Q3HBox( gbGeneral );
247 QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW ); 250 QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW );
248 sbSepWidth = new QSpinBox( 1, 50, 1, hbSW ); 251 sbSepWidth = new QSpinBox( 1, 50, 1, hbSW );
249 lSW->setBuddy( sbSepWidth); 252 lSW->setBuddy( sbSepWidth);
250 253
251 QHBox *hbPadding = new QHBox( gbGeneral ); 254 Q3HBox *hbPadding = new Q3HBox( gbGeneral );
252 QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding ); 255 QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding );
253 sbSpacing = new QSpinBox( 0, 100, 1, hbPadding ); 256 sbSpacing = new QSpinBox( 0, 100, 1, hbPadding );
254 lSpacing->setBuddy( sbSpacing ); 257 lSpacing->setBuddy( sbSpacing );
255 258
256 QGroupBox *gbCards = new QGroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab ); 259 Q3GroupBox *gbCards = new Q3GroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab );
257 260
258 QHBox *hbMargin = new QHBox( gbCards ); 261 Q3HBox *hbMargin = new Q3HBox( gbCards );
259 QLabel *lMargin = new QLabel( i18n("&Margin:"), hbMargin ); 262 QLabel *lMargin = new QLabel( i18n("&Margin:"), hbMargin );
260 sbMargin = new QSpinBox( 0, 100, 1, hbMargin ); 263 sbMargin = new QSpinBox( 0, 100, 1, hbMargin );
261 lMargin->setBuddy( sbMargin ); 264 lMargin->setBuddy( sbMargin );
@@ -264,23 +267,23 @@ void CardViewLookNFeelPage::initGUI()
264 267
265 loTab->setStretchFactor( new QWidget( loTab ), 1 ); 268 loTab->setStretchFactor( new QWidget( loTab ), 1 );
266 269
267 QWhatsThis::add( sbMargin, i18n( 270 Q3WhatsThis::add( sbMargin, i18n(
268 "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, " 271 "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, "
269 "incrementing the item margin will add space between the focus rectangle and the item data." 272 "incrementing the item margin will add space between the focus rectangle and the item data."
270 ) ); 273 ) );
271 QWhatsThis::add( lMargin, QWhatsThis::textFor( sbMargin ) ); 274 /* TODO:hacker: Q3WhatsThis::add( lMargin, Q3WhatsThis::textFor( sbMargin ) ); */
272 QWhatsThis::add( sbSpacing, i18n( 275 Q3WhatsThis::add( sbSpacing, i18n(
273 "The Item Spacing decides the distance (in pixels) between the items and anything else: the view " 276 "The Item Spacing decides the distance (in pixels) between the items and anything else: the view "
274 "borders, other items or column separators." 277 "borders, other items or column separators."
275 ) ); 278 ) );
276 QWhatsThis::add( lSpacing, QWhatsThis::textFor( sbSpacing ) ); 279 /* TODO:hacker: Q3WhatsThis::add( lSpacing, Q3WhatsThis::textFor( sbSpacing ) ); */
277 QWhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") ); 280 Q3WhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") );
278 QWhatsThis::add( lSW, QWhatsThis::textFor( sbSepWidth ) ); 281 /* TODO:hacker: Q3WhatsThis::add( lSW, Q3WhatsThis::textFor( sbSepWidth ) ); */
279 282
280 tabs->addTab( loTab, i18n("&Layout") ); 283 tabs->addTab( loTab, i18n("&Layout") );
281 284
282 // Colors 285 // Colors
283 QVBox *colorTab = new QVBox( this, "colortab" ); 286 Q3VBox *colorTab = new Q3VBox( this, "colortab" );
284 colorTab->setSpacing( spacing ); 287 colorTab->setSpacing( spacing );
285 colorTab->setMargin( spacing ); 288 colorTab->setMargin( spacing );
286 cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab ); 289 cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab );
@@ -288,16 +291,16 @@ void CardViewLookNFeelPage::initGUI()
288 lbColors = new ColorListBox( colorTab ); 291 lbColors = new ColorListBox( colorTab );
289 tabs->addTab( colorTab, i18n("&Colors") ); 292 tabs->addTab( colorTab, i18n("&Colors") );
290 293
291 QWhatsThis::add( cbEnableCustomColors, i18n( 294 Q3WhatsThis::add( cbEnableCustomColors, i18n(
292 "If custom colors are enabled, you may choose the colors for the view below. " 295 "If custom colors are enabled, you may choose the colors for the view below. "
293 "Otherwise colors from your current KDE color scheme are used." 296 "Otherwise colors from your current KDE color scheme are used."
294 ) ); 297 ) );
295 QWhatsThis::add( lbColors, i18n( 298 Q3WhatsThis::add( lbColors, i18n(
296 "Double click or press RETURN on a item to select a color for the related strings in the view." 299 "Double click or press RETURN on a item to select a color for the related strings in the view."
297 ) ); 300 ) );
298 301
299 // Fonts 302 // Fonts
300 QVBox *fntTab = new QVBox( this, "fonttab" ); 303 Q3VBox *fntTab = new Q3VBox( this, "fonttab" );
301 304
302 fntTab->setSpacing( spacing ); 305 fntTab->setSpacing( spacing );
303 fntTab->setMargin( spacing ); 306 fntTab->setMargin( spacing );
@@ -306,13 +309,13 @@ void CardViewLookNFeelPage::initGUI()
306 connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) ); 309 connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) );
307 310
308 vbFonts = new QWidget( fntTab ); 311 vbFonts = new QWidget( fntTab );
309 QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 ); 312 Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 );
310 gFnts->setSpacing( spacing ); 313 gFnts->setSpacing( spacing );
311 gFnts->setAutoAdd( true ); 314 gFnts->setAutoAdd( true );
312 gFnts->setColStretch( 1, 1 ); 315 gFnts->setColStretch( 1, 1 );
313 QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts ); 316 QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts );
314 lTextFont = new QLabel( vbFonts ); 317 lTextFont = new QLabel( vbFonts );
315 lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); 318 lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
316#ifndef KAB_EMBEDDED 319#ifndef KAB_EMBEDDED
317 btnFont = new KPushButton( i18n("Choose..."), vbFonts ); 320 btnFont = new KPushButton( i18n("Choose..."), vbFonts );
318#else //KAB_EMBEDDED 321#else //KAB_EMBEDDED
@@ -325,7 +328,7 @@ void CardViewLookNFeelPage::initGUI()
325 328
326 QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts ); 329 QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts );
327 lHeaderFont = new QLabel( vbFonts ); 330 lHeaderFont = new QLabel( vbFonts );
328 lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); 331 lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
329#ifndef KAB_EMBEDDED 332#ifndef KAB_EMBEDDED
330 btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts ); 333 btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts );
331#else //KAB_EMBEDDED 334#else //KAB_EMBEDDED
@@ -336,7 +339,7 @@ void CardViewLookNFeelPage::initGUI()
336 339
337 fntTab->setStretchFactor( new QWidget( fntTab ), 1 ); 340 fntTab->setStretchFactor( new QWidget( fntTab ), 1 );
338 341
339 QWhatsThis::add( cbEnableCustomFonts, i18n( 342 Q3WhatsThis::add( cbEnableCustomFonts, i18n(
340 "If custom fonts are enabled, you may choose which fonts to use for this view below. " 343 "If custom fonts are enabled, you may choose which fonts to use for this view below. "
341 "Otherwise the default KDE font will be used, in bold style for the header and " 344 "Otherwise the default KDE font will be used, in bold style for the header and "
342 "normal style for the data." 345 "normal style for the data."
@@ -345,7 +348,7 @@ void CardViewLookNFeelPage::initGUI()
345 tabs->addTab( fntTab, i18n("&Fonts") ); 348 tabs->addTab( fntTab, i18n("&Fonts") );
346 349
347 // Behaviour 350 // Behaviour
348 QVBox *behaviourTab = new QVBox( this ); 351 Q3VBox *behaviourTab = new Q3VBox( this );
349 behaviourTab->setMargin( margin ); 352 behaviourTab->setMargin( margin );
350 behaviourTab->setSpacing( spacing ); 353 behaviourTab->setSpacing( spacing );
351 354
@@ -364,6 +367,6 @@ void CardViewLookNFeelPage::updateFontLabel( QFont fnt, QLabel *l )
364 l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) ); 367 l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) );
365} 368}
366 369
367#ifndef KAB_EMBEDDED 370#ifndef KAB_EMBEDDED_
368#include "configurecardviewdialog.moc" 371#include "moc_configurecardviewdialog.cpp"
369#endif //KAB_EMBEDDED 372#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/configurecardviewdialog.h b/kaddressbook/views/configurecardviewdialog.h
index 7a62226..4af475d 100644
--- a/kaddressbook/views/configurecardviewdialog.h
+++ b/kaddressbook/views/configurecardviewdialog.h
@@ -26,9 +26,11 @@
26 26
27#include "viewconfigurewidget.h" 27#include "viewconfigurewidget.h"
28 28
29#include <qvbox.h> 29#include <q3vbox.h>
30#include <qwidget.h> 30#include <qwidget.h>
31#include <qfont.h> 31#include <qfont.h>
32//Added by qt3to4:
33#include <QLabel>
32 34
33class QString; 35class QString;
34class QWidget; 36class QWidget;
@@ -77,7 +79,7 @@ class ConfigureCardViewWidget : public ViewConfigureWidget
77 * item spacing 79 * item spacing
78*/ 80*/
79 81
80class CardViewLookNFeelPage : public QVBox { 82class CardViewLookNFeelPage : public Q3VBox {
81 83
82 Q_OBJECT 84 Q_OBJECT
83 85
diff --git a/kaddressbook/views/configuretableviewdialog.cpp b/kaddressbook/views/configuretableviewdialog.cpp
index c329cd9..7ed897a 100644
--- a/kaddressbook/views/configuretableviewdialog.cpp
+++ b/kaddressbook/views/configuretableviewdialog.cpp
@@ -27,11 +27,14 @@
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qradiobutton.h> 28#include <qradiobutton.h>
29#include <qcheckbox.h> 29#include <qcheckbox.h>
30#include <qvbox.h> 30#include <q3vbox.h>
31#include <qbuttongroup.h> 31#include <q3buttongroup.h>
32#include <qtabwidget.h> 32#include <qtabwidget.h>
33#include <qwhatsthis.h> 33#include <q3whatsthis.h>
34#include <qpushbutton.h> 34#include <qpushbutton.h>
35//Added by qt3to4:
36#include <Q3GridLayout>
37#include <Q3Frame>
35 38
36#include <kglobal.h> 39#include <kglobal.h>
37#include <klocale.h> 40#include <klocale.h>
@@ -84,7 +87,7 @@ void ConfigureTableViewWidget::saveSettings( KConfig *config )
84 87
85 88
86LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name) 89LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name)
87 : QVBox(parent, name) 90 : Q3VBox(parent, name)
88{ 91{
89 initGUI(); 92 initGUI();
90 93
@@ -229,12 +232,12 @@ void LookAndFeelPage::initGUI()
229 QTabWidget *tabs = new QTabWidget( this ); 232 QTabWidget *tabs = new QTabWidget( this );
230 233
231 // General 234 // General
232 QVBox *generalTab = new QVBox( this, "generaltab" ); 235 Q3VBox *generalTab = new Q3VBox( this, "generaltab" );
233 236
234 generalTab->setSpacing( spacing ); 237 generalTab->setSpacing( spacing );
235 generalTab->setMargin( margin ); 238 generalTab->setMargin( margin );
236 239
237 QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal, 240 Q3ButtonGroup *group = new Q3ButtonGroup(1, Qt::Horizontal,
238 i18n("Row Separator"), generalTab); 241 i18n("Row Separator"), generalTab);
239 242
240 mAlternateButton = new QRadioButton(i18n("Alternating backgrounds"), 243 mAlternateButton = new QRadioButton(i18n("Alternating backgrounds"),
@@ -262,7 +265,7 @@ void LookAndFeelPage::initGUI()
262 tabs->addTab( generalTab, i18n("&General") ); 265 tabs->addTab( generalTab, i18n("&General") );
263 266
264 // Colors 267 // Colors
265 QVBox *colorTab = new QVBox( this, "colortab" ); 268 Q3VBox *colorTab = new Q3VBox( this, "colortab" );
266 colorTab->setSpacing( spacing ); 269 colorTab->setSpacing( spacing );
267 colorTab->setMargin( spacing ); 270 colorTab->setMargin( spacing );
268 cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab ); 271 cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab );
@@ -270,16 +273,16 @@ void LookAndFeelPage::initGUI()
270 lbColors = new ColorListBox( colorTab ); 273 lbColors = new ColorListBox( colorTab );
271 tabs->addTab( colorTab, i18n("&Colors") ); 274 tabs->addTab( colorTab, i18n("&Colors") );
272 275
273 QWhatsThis::add( cbEnableCustomColors, i18n( 276 Q3WhatsThis::add( cbEnableCustomColors, i18n(
274 "If custom colors are enabled, you may choose the colors for the view below. " 277 "If custom colors are enabled, you may choose the colors for the view below. "
275 "Otherwise colors from your current KDE color scheme are used." 278 "Otherwise colors from your current KDE color scheme are used."
276 ) ); 279 ) );
277 QWhatsThis::add( lbColors, i18n( 280 Q3WhatsThis::add( lbColors, i18n(
278 "Double click or press RETURN on a item to select a color for the related strings in the view." 281 "Double click or press RETURN on a item to select a color for the related strings in the view."
279 ) ); 282 ) );
280 283
281 // Fonts 284 // Fonts
282 QVBox *fntTab = new QVBox( this, "fonttab" ); 285 Q3VBox *fntTab = new Q3VBox( this, "fonttab" );
283 286
284 fntTab->setSpacing( spacing ); 287 fntTab->setSpacing( spacing );
285 fntTab->setMargin( spacing ); 288 fntTab->setMargin( spacing );
@@ -288,13 +291,13 @@ void LookAndFeelPage::initGUI()
288 connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) ); 291 connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) );
289 292
290 vbFonts = new QWidget( fntTab ); 293 vbFonts = new QWidget( fntTab );
291 QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 ); 294 Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 );
292 gFnts->setSpacing( spacing ); 295 gFnts->setSpacing( spacing );
293 gFnts->setAutoAdd( true ); 296 gFnts->setAutoAdd( true );
294 gFnts->setColStretch( 1, 1 ); 297 gFnts->setColStretch( 1, 1 );
295 QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts ); 298 QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts );
296 lTextFont = new QLabel( vbFonts ); 299 lTextFont = new QLabel( vbFonts );
297 lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); 300 lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
298#ifndef KAB_EMBEDDED 301#ifndef KAB_EMBEDDED
299 btnFont = new KPushButton( i18n("Choose..."), vbFonts ); 302 btnFont = new KPushButton( i18n("Choose..."), vbFonts );
300#else //KAB_EMBEDDED 303#else //KAB_EMBEDDED
@@ -307,7 +310,7 @@ void LookAndFeelPage::initGUI()
307 310
308 QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts ); 311 QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts );
309 lHeaderFont = new QLabel( vbFonts ); 312 lHeaderFont = new QLabel( vbFonts );
310 lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); 313 lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
311#ifndef KAB_EMBEDDED 314#ifndef KAB_EMBEDDED
312 btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts ); 315 btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts );
313#else //KAB_EMBEDDED 316#else //KAB_EMBEDDED
@@ -318,7 +321,7 @@ void LookAndFeelPage::initGUI()
318 321
319 fntTab->setStretchFactor( new QWidget( fntTab ), 1 ); 322 fntTab->setStretchFactor( new QWidget( fntTab ), 1 );
320 323
321 QWhatsThis::add( cbEnableCustomFonts, i18n( 324 Q3WhatsThis::add( cbEnableCustomFonts, i18n(
322 "If custom fonts are enabled, you may choose which fonts to use for this view below. " 325 "If custom fonts are enabled, you may choose which fonts to use for this view below. "
323 "Otherwise the default KDE font will be used, in bold style for the header and " 326 "Otherwise the default KDE font will be used, in bold style for the header and "
324 "normal style for the data." 327 "normal style for the data."
@@ -340,6 +343,6 @@ void LookAndFeelPage::updateFontLabel( QFont fnt, QLabel *l )
340 l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) ); 343 l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) );
341} 344}
342 345
343#ifndef KAB_EMBEDDED 346#ifndef KAB_EMBEDDED_
344#include "configuretableviewdialog.moc" 347#include "moc_configuretableviewdialog.cpp"
345#endif //KAB_EMBEDDED 348#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/configuretableviewdialog.h b/kaddressbook/views/configuretableviewdialog.h
index 003ccf8..8125fc9 100644
--- a/kaddressbook/views/configuretableviewdialog.h
+++ b/kaddressbook/views/configuretableviewdialog.h
@@ -26,7 +26,9 @@
26 26
27#include "viewconfigurewidget.h" 27#include "viewconfigurewidget.h"
28 28
29#include <qvbox.h> 29#include <q3vbox.h>
30//Added by qt3to4:
31#include <QLabel>
30 32
31class QString; 33class QString;
32class QWidget; 34class QWidget;
@@ -63,7 +65,7 @@ class ConfigureTableViewWidget : public ViewConfigureWidget
63/** 65/**
64 Internal class. It is only defined here for moc 66 Internal class. It is only defined here for moc
65*/ 67*/
66class LookAndFeelPage : public QVBox 68class LookAndFeelPage : public Q3VBox
67{ 69{
68 Q_OBJECT 70 Q_OBJECT
69 71
diff --git a/kaddressbook/views/contactlistview.cpp b/kaddressbook/views/contactlistview.cpp
index 9accf78..227645d 100644
--- a/kaddressbook/views/contactlistview.cpp
+++ b/kaddressbook/views/contactlistview.cpp
@@ -21,15 +21,20 @@
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qheader.h> 24#include <q3header.h>
25#include <qiconset.h> 25#include <qicon.h>
26#include <qimage.h> 26#include <qimage.h>
27#include <qdragobject.h> 27#include <q3dragobject.h>
28#include <qcombobox.h> 28#include <qcombobox.h>
29#include <qpainter.h> 29#include <qpainter.h>
30#include <qbrush.h> 30#include <qbrush.h>
31#include <qevent.h> 31#include <qevent.h>
32#include <qapplication.h> 32#include <qapplication.h>
33//Added by qt3to4:
34#include <QDropEvent>
35#include <QPixmap>
36#include <QMouseEvent>
37#include <QKeyEvent>
33 38
34#include <klocale.h> 39#include <klocale.h>
35#include <kglobalsettings.h> 40#include <kglobalsettings.h>
@@ -47,12 +52,13 @@
47// DynamicTip Methods 52// DynamicTip Methods
48 53
49DynamicTip::DynamicTip( ContactListView *parent) 54DynamicTip::DynamicTip( ContactListView *parent)
50 : QToolTip( parent ) 55 /* TODO:hacker:: QToolTip( parent ) */
51{ 56{
52} 57}
53 58
54void DynamicTip::maybeTip( const QPoint &pos ) 59void DynamicTip::maybeTip( const QPoint &pos )
55{ 60{
61 /* TODO:hacker:
56 static bool ishidden = true; 62 static bool ishidden = true;
57 if (!parentWidget()->inherits( "ContactListView" )) 63 if (!parentWidget()->inherits( "ContactListView" ))
58 return; 64 return;
@@ -63,7 +69,7 @@ void DynamicTip::maybeTip( const QPoint &pos )
63 69
64 QPoint posVp = plv->viewport()->pos(); 70 QPoint posVp = plv->viewport()->pos();
65 71
66 QListViewItem *lvi = plv->itemAt( pos - posVp ); 72 Q3ListViewItem *lvi = plv->itemAt( pos - posVp );
67 if (!lvi) 73 if (!lvi)
68 return; 74 return;
69 75
@@ -151,7 +157,7 @@ void DynamicTip::maybeTip( const QPoint &pos )
151 else 157 else
152 hide(); 158 hide();
153 ishidden = !ishidden; 159 ishidden = !ishidden;
154 160 */
155} 161}
156 162
157/////////////////////////// 163///////////////////////////
@@ -173,7 +179,7 @@ QString ContactListViewItem::key(int column, bool ascending) const
173 int lan = KGlobal::locale()->language(); 179 int lan = KGlobal::locale()->language();
174 //qDebug("language %d ", lan); 180 //qDebug("language %d ", lan);
175 if ( lan == 1 ) { //GERMAN 181 if ( lan == 1 ) { //GERMAN
176 QString ret = QListViewItem::key(column, ascending).lower().utf8(); 182 QString ret = Q3ListViewItem::key(column, ascending).lower().utf8();
177 int start = -1; 183 int start = -1;
178 while ( (start = ret.find( 'ä', start+1)) > 0 ) { 184 while ( (start = ret.find( 'ä', start+1)) > 0 ) {
179 ret.at(start-1) = 'a'; 185 ret.at(start-1) = 'a';
@@ -197,7 +203,7 @@ QString ContactListViewItem::key(int column, bool ascending) const
197 } 203 }
198 else 204 else
199#endif 205#endif
200 return QListViewItem::key(column, ascending).lower(); 206 return Q3ListViewItem::key(column, ascending).lower();
201} 207}
202 208
203void ContactListViewItem::paintCell(QPainter * p, 209void ContactListViewItem::paintCell(QPainter * p,
@@ -288,7 +294,7 @@ void ContactListView::printMe()
288 return; 294 return;
289 QPainter p; 295 QPainter p;
290 p.begin ( &printer ); 296 p.begin ( &printer );
291 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 297 Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
292 float dx, dy; 298 float dx, dy;
293 int wid = (m.width() * 9)/10; 299 int wid = (m.width() * 9)/10;
294 dx = (float) wid/(float)contentsWidth (); 300 dx = (float) wid/(float)contentsWidth ();
@@ -343,7 +349,7 @@ void ContactListView::contentsMousePressEvent(QMouseEvent* e)
343// To initiate a drag operation 349// To initiate a drag operation
344void ContactListView::contentsMouseMoveEvent( QMouseEvent *e ) 350void ContactListView::contentsMouseMoveEvent( QMouseEvent *e )
345{ 351{
346 if ((e->state() & LeftButton) && (e->pos() - presspos).manhattanLength() > 4 ) { 352 if ((e->state() & Qt::LeftButton) && (e->pos() - presspos).manhattanLength() > 4 ) {
347 emit startAddresseeDrag(); 353 emit startAddresseeDrag();
348 } 354 }
349 else 355 else
@@ -353,7 +359,7 @@ void ContactListView::contentsMouseMoveEvent( QMouseEvent *e )
353bool ContactListView::acceptDrag(QDropEvent *e) const 359bool ContactListView::acceptDrag(QDropEvent *e) const
354{ 360{
355#ifndef KAB_EMBEDDED 361#ifndef KAB_EMBEDDED
356 return QTextDrag::canDecode(e); 362 return Q3TextDrag::canDecode(e);
357#else //KAB_EMBEDDED 363#else //KAB_EMBEDDED
358qDebug("ContactListView::acceptDrag has to be fixed"); 364qDebug("ContactListView::acceptDrag has to be fixed");
359 return false; 365 return false;
@@ -424,6 +430,6 @@ void ContactListView::keyReleaseEvent ( QKeyEvent * e )
424 } 430 }
425 KListView::keyReleaseEvent ( e ); 431 KListView::keyReleaseEvent ( e );
426} 432}
427#ifndef KAB_EMBEDDED 433#ifndef KAB_EMBEDDED_
428#include "contactlistview.moc" 434#include "moc_contactlistview.cpp"
429#endif //KAB_EMBEDDED 435#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/contactlistview.h b/kaddressbook/views/contactlistview.h
index 46477e1..c92b002 100644
--- a/kaddressbook/views/contactlistview.h
+++ b/kaddressbook/views/contactlistview.h
@@ -5,6 +5,10 @@
5#include <qpixmap.h> 5#include <qpixmap.h>
6#include <qtooltip.h> 6#include <qtooltip.h>
7#include <qstring.h> 7#include <qstring.h>
8//Added by qt3to4:
9#include <QDropEvent>
10#include <QMouseEvent>
11#include <QKeyEvent>
8 12
9#include <klistview.h> 13#include <klistview.h>
10 14
@@ -20,7 +24,7 @@ class ContactListView;
20/** The whole tooltip design needs a lot of work. Currently it is 24/** The whole tooltip design needs a lot of work. Currently it is
21* hacked together to function. 25* hacked together to function.
22*/ 26*/
23class DynamicTip : public QToolTip 27class DynamicTip /* TODO:hacker: : public QToolTip */
24{ 28{
25 public: 29 public:
26 DynamicTip( ContactListView * parent ); 30 DynamicTip( ContactListView * parent );
diff --git a/kaddressbook/views/kaddressbookcardview.cpp b/kaddressbook/views/kaddressbookcardview.cpp
index b503652..1e5a556 100644
--- a/kaddressbook/views/kaddressbookcardview.cpp
+++ b/kaddressbook/views/kaddressbookcardview.cpp
@@ -21,13 +21,18 @@
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qdragobject.h> 24#include <q3dragobject.h>
25#include <qevent.h> 25#include <qevent.h>
26#include <qiconview.h> 26#include <q3iconview.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qstringlist.h> 28#include <qstringlist.h>
29#include <qregexp.h> 29#include <qregexp.h>
30#include <qapplication.h> 30#include <qapplication.h>
31//Added by qt3to4:
32#include <QDropEvent>
33#include <QKeyEvent>
34#include <Q3VBoxLayout>
35#include <QDragEnterEvent>
31 36
32#include <kabc/addressbook.h> 37#include <kabc/addressbook.h>
33#include <kabc/addressee.h> 38#include <kabc/addressee.h>
@@ -125,7 +130,7 @@ void AddresseeCardView::printMe()
125 return; 130 return;
126 QPainter p; 131 QPainter p;
127 p.begin ( &printer ); 132 p.begin ( &printer );
128 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 133 Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
129 float dx, dy; 134 float dx, dy;
130 int wid = (m.width() * 9)/10; 135 int wid = (m.width() * 9)/10;
131 dx = (float) wid/(float)contentsWidth (); 136 dx = (float) wid/(float)contentsWidth ();
@@ -148,7 +153,7 @@ void AddresseeCardView::printMe()
148void AddresseeCardView::dragEnterEvent(QDragEnterEvent *e) 153void AddresseeCardView::dragEnterEvent(QDragEnterEvent *e)
149{ 154{
150#ifndef KAB_EMBEDDED 155#ifndef KAB_EMBEDDED
151 if (QTextDrag::canDecode(e)) 156 if (Q3TextDrag::canDecode(e))
152 e->accept(); 157 e->accept();
153#else //KAB_EMBEDDED 158#else //KAB_EMBEDDED
154qDebug("AddresseeCardView::dragEnterEvent drag&drop is not implemented"); 159qDebug("AddresseeCardView::dragEnterEvent drag&drop is not implemented");
@@ -176,7 +181,7 @@ KAddressBookCardView::KAddressBookCardView( KABC::AddressBook *ab,
176 mShowEmptyFields = false; 181 mShowEmptyFields = false;
177 182
178 // Init the GUI 183 // Init the GUI
179 QVBoxLayout *layout = new QVBoxLayout(viewWidget()); 184 Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget());
180 185
181 mCardView = new AddresseeCardView(viewWidget(), "mCardView"); 186 mCardView = new AddresseeCardView(viewWidget(), "mCardView");
182 mCardView->setSelectionMode(CardView::Extended); 187 mCardView->setSelectionMode(CardView::Extended);
@@ -520,6 +525,6 @@ void KAddressBookCardView::addresseeSelected()
520 emit selected(QString::null); 525 emit selected(QString::null);
521 526
522} 527}
523#ifndef KAB_EMBEDDED 528#ifndef KAB_EMBEDDED_
524#include "kaddressbookcardview.moc" 529#include "moc_kaddressbookcardview.cpp"
525#endif //KAB_EMBEDDED 530#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/kaddressbookcardview.h b/kaddressbook/views/kaddressbookcardview.h
index 2a71f7e..8f8e48b 100644
--- a/kaddressbook/views/kaddressbookcardview.h
+++ b/kaddressbook/views/kaddressbookcardview.h
@@ -25,6 +25,9 @@
25*/ 25*/
26 26
27#include <qstring.h> 27#include <qstring.h>
28//Added by qt3to4:
29#include <QDragEnterEvent>
30#include <QDropEvent>
28#ifndef KAB_EMBEDDED 31#ifndef KAB_EMBEDDED
29#include <kiconview.h> 32#include <kiconview.h>
30#else //KAB_EMBEDDED 33#else //KAB_EMBEDDED
diff --git a/kaddressbook/views/kaddressbookiconview.cpp b/kaddressbook/views/kaddressbookiconview.cpp
index d6ddec3..3a41a4b 100644
--- a/kaddressbook/views/kaddressbookiconview.cpp
+++ b/kaddressbook/views/kaddressbookiconview.cpp
@@ -22,7 +22,7 @@
22*/ 22*/
23 23
24#ifndef KAB_EMBEDDED 24#ifndef KAB_EMBEDDED
25#include <qiconview.h> 25#include <q3iconview.h>
26#include <qstringlist.h> 26#include <qstringlist.h>
27 27
28#include <kabc/addressee.h> 28#include <kabc/addressee.h>
@@ -35,6 +35,14 @@
35#else //KAB_EMBEDDED 35#else //KAB_EMBEDDED
36#endif //KAB_EMBEDDED 36#endif //KAB_EMBEDDED
37 37
38//Added by qt3to4:
39#include <QDropEvent>
40#include <Q3ValueList>
41#include <QPixmap>
42#include <QKeyEvent>
43#include <QEvent>
44#include <Q3VBoxLayout>
45
38#include <kabc/addressbook.h> 46#include <kabc/addressbook.h>
39#include "kabprefs.h" 47#include "kabprefs.h"
40#include "viewmanager.h" 48#include "viewmanager.h"
@@ -73,12 +81,12 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name)
73 : KIconView(parent, name) 81 : KIconView(parent, name)
74#else //KAB_EMBEDDED 82#else //KAB_EMBEDDED
75AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) 83AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name)
76 : QIconView(parent, name) 84 : Q3IconView(parent, name)
77#endif //KAB_EMBEDDED 85#endif //KAB_EMBEDDED
78 86
79{ 87{
80 setSelectionMode( QIconView::Extended ); 88 setSelectionMode( Q3IconView::Extended );
81 setResizeMode( QIconView::Adjust ); 89 setResizeMode( Q3IconView::Adjust );
82 setWordWrapIconText( true ); 90 setWordWrapIconText( true );
83 setGridX( 100 ); 91 setGridX( 100 );
84 setItemsMovable(false); 92 setItemsMovable(false);
@@ -89,8 +97,8 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name)
89 97
90#ifndef KAB_EMBEDDED 98#ifndef KAB_EMBEDDED
91 99
92 connect(this, SIGNAL(dropped(QDropEvent*, const QValueList<QIconDragItem>&)), 100 connect(this, SIGNAL(dropped(QDropEvent*, const Q3ValueList<Q3IconDragItem>&)),
93 this, SLOT(itemDropped(QDropEvent*, const QValueList<QIconDragItem>&))); 101 this, SLOT(itemDropped(QDropEvent*, const Q3ValueList<Q3IconDragItem>&)));
94#endif //KAB_EMBEDDED 102#endif //KAB_EMBEDDED
95} 103}
96 104
@@ -100,12 +108,12 @@ AddresseeIconView::~AddresseeIconView()
100 108
101 109
102void AddresseeIconView::itemDropped(QDropEvent *e, 110void AddresseeIconView::itemDropped(QDropEvent *e,
103 const QValueList<QIconDragItem> &) 111 const Q3ValueList<Q3IconDragItem> &)
104{ 112{
105 emit addresseeDropped(e); 113 emit addresseeDropped(e);
106} 114}
107 115
108QDragObject *AddresseeIconView::dragObject() 116Q3DragObject *AddresseeIconView::dragObject()
109{ 117{
110 emit startAddresseeDrag(); 118 emit startAddresseeDrag();
111 119
@@ -117,20 +125,20 @@ QDragObject *AddresseeIconView::dragObject()
117#ifndef KAB_EMBEDDED 125#ifndef KAB_EMBEDDED
118class AddresseeIconViewItem : public KIconViewItem 126class AddresseeIconViewItem : public KIconViewItem
119#else //KAB_EMBEDDED 127#else //KAB_EMBEDDED
120class AddresseeIconViewItem : public QIconViewItem 128class AddresseeIconViewItem : public Q3IconViewItem
121#endif //KAB_EMBEDDED 129#endif //KAB_EMBEDDED
122{ 130{
123 public: 131 public:
124#ifndef KAB_EMBEDDED 132#ifndef KAB_EMBEDDED
125 AddresseeIconViewItem(const KABC::Field::List &fields, 133 AddresseeIconViewItem(const KABC::Field::List &fields,
126 KABC::AddressBook *doc, const KABC::Addressee &a, 134 KABC::AddressBook *doc, const KABC::Addressee &a,
127 QIconView *parent) 135 Q3IconView *parent)
128 : KIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a) 136 : KIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a)
129#else //KAB_EMBEDDED 137#else //KAB_EMBEDDED
130 AddresseeIconViewItem(const KABC::Field::List &fields, 138 AddresseeIconViewItem(const KABC::Field::List &fields,
131 KABC::AddressBook *doc, const KABC::Addressee &a, 139 KABC::AddressBook *doc, const KABC::Addressee &a,
132 QIconView *parent) 140 Q3IconView *parent)
133 : QIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a) 141 : Q3IconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a)
134#endif //KAB_EMBEDDED 142#endif //KAB_EMBEDDED
135 { 143 {
136 if ( mFields.isEmpty() ) { 144 if ( mFields.isEmpty() ) {
@@ -200,7 +208,7 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab,
200 : KAddressBookView( ab, parent, name ) 208 : KAddressBookView( ab, parent, name )
201{ 209{
202 // Init the GUI 210 // Init the GUI
203 QVBoxLayout *layout = new QVBoxLayout(viewWidget()); 211 Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget());
204 212
205 mIconView = new AddresseeIconView(viewWidget(), "mIconView"); 213 mIconView = new AddresseeIconView(viewWidget(), "mIconView");
206 layout->addWidget(mIconView); 214 layout->addWidget(mIconView);
@@ -210,8 +218,8 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab,
210//US method executed is part of KIconView 218//US method executed is part of KIconView
211//US connect(mIconView, SIGNAL(executed(QIconViewItem *)), 219//US connect(mIconView, SIGNAL(executed(QIconViewItem *)),
212//US this, SLOT(addresseeExecuted(QIconViewItem *))); 220//US this, SLOT(addresseeExecuted(QIconViewItem *)));
213 connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), 221 connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)),
214 this, SLOT(addresseeExecuted(QIconViewItem *))); 222 this, SLOT(addresseeExecuted(Q3IconViewItem *)));
215 223
216 connect(mIconView, SIGNAL(selectionChanged()), 224 connect(mIconView, SIGNAL(selectionChanged()),
217 this, SLOT(addresseeSelected())); 225 this, SLOT(addresseeSelected()));
@@ -248,8 +256,8 @@ void KAddressBookIconView::readConfig(KConfig *config)
248//US method executed is part of KIconView 256//US method executed is part of KIconView
249//US disconnect(mIconView, SIGNAL(executed(QIconViewItem *)), 257//US disconnect(mIconView, SIGNAL(executed(QIconViewItem *)),
250//US this, SLOT(addresseeExecuted(QIconViewItem *))); 258//US this, SLOT(addresseeExecuted(QIconViewItem *)));
251 disconnect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), 259 disconnect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)),
252 this, SLOT(addresseeExecuted(QIconViewItem *))); 260 this, SLOT(addresseeExecuted(Q3IconViewItem *)));
253 261
254//US method executed is part of KIconView. Use selectionChanged instead 262//US method executed is part of KIconView. Use selectionChanged instead
255/*US 263/*US
@@ -260,8 +268,8 @@ void KAddressBookIconView::readConfig(KConfig *config)
260 connect(mIconView, SIGNAL(doubleClicked(QIconViewItem *)), 268 connect(mIconView, SIGNAL(doubleClicked(QIconViewItem *)),
261 this, SLOT(addresseeExecuted(QIconViewItem *))); 269 this, SLOT(addresseeExecuted(QIconViewItem *)));
262*/ 270*/
263 connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), 271 connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)),
264 this, SLOT(addresseeExecuted(QIconViewItem *))); 272 this, SLOT(addresseeExecuted(Q3IconViewItem *)));
265 273
266} 274}
267void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field ) 275void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field )
@@ -336,7 +344,7 @@ void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field )
336QStringList KAddressBookIconView::selectedUids() 344QStringList KAddressBookIconView::selectedUids()
337{ 345{
338 QStringList uidList; 346 QStringList uidList;
339 QIconViewItem *item; 347 Q3IconViewItem *item;
340 AddresseeIconViewItem *aItem; 348 AddresseeIconViewItem *aItem;
341 349
342 for (item = mIconView->firstItem(); item; item = item->nextItem()) 350 for (item = mIconView->firstItem(); item; item = item->nextItem())
@@ -358,7 +366,7 @@ QStringList KAddressBookIconView::selectedUids()
358 366
359void KAddressBookIconView::refresh(QString uid) 367void KAddressBookIconView::refresh(QString uid)
360{ 368{
361 QIconViewItem *item; 369 Q3IconViewItem *item;
362 AddresseeIconViewItem *aItem; 370 AddresseeIconViewItem *aItem;
363 371
364 if ( uid.isNull() ) { 372 if ( uid.isNull() ) {
@@ -406,7 +414,7 @@ void KAddressBookIconView::refresh(QString uid)
406 414
407void KAddressBookIconView::setSelected(QString uid, bool selected) 415void KAddressBookIconView::setSelected(QString uid, bool selected)
408{ 416{
409 QIconViewItem *item; 417 Q3IconViewItem *item;
410 AddresseeIconViewItem *aItem; 418 AddresseeIconViewItem *aItem;
411 419
412 if (uid.isNull()) 420 if (uid.isNull())
@@ -435,7 +443,7 @@ void KAddressBookIconView::setSelected(QString uid, bool selected)
435 } 443 }
436} 444}
437 445
438void KAddressBookIconView::addresseeExecuted(QIconViewItem *item) 446void KAddressBookIconView::addresseeExecuted(Q3IconViewItem *item)
439{ 447{
440#ifndef KAB_EMBEDDED 448#ifndef KAB_EMBEDDED
441 AddresseeIconViewItem *aItem = dynamic_cast<AddresseeIconViewItem*>(item); 449 AddresseeIconViewItem *aItem = dynamic_cast<AddresseeIconViewItem*>(item);
@@ -450,7 +458,7 @@ void KAddressBookIconView::addresseeExecuted(QIconViewItem *item)
450 458
451void KAddressBookIconView::addresseeSelected() 459void KAddressBookIconView::addresseeSelected()
452{ 460{
453 QIconViewItem *item; 461 Q3IconViewItem *item;
454 AddresseeIconViewItem *aItem; 462 AddresseeIconViewItem *aItem;
455 463
456 bool found = false; 464 bool found = false;
@@ -476,6 +484,6 @@ void KAddressBookIconView::addresseeSelected()
476 emit selected(QString::null); 484 emit selected(QString::null);
477} 485}
478 486
479#ifndef KAB_EMBEDDED 487#ifndef KAB_EMBEDDED_
480#include "kaddressbookiconview.moc" 488#include "moc_kaddressbookiconview.cpp"
481#endif //KAB_EMBEDDED 489#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/kaddressbookiconview.h b/kaddressbook/views/kaddressbookiconview.h
index b0b9fea..6fad4c6 100644
--- a/kaddressbook/views/kaddressbookiconview.h
+++ b/kaddressbook/views/kaddressbookiconview.h
@@ -25,20 +25,23 @@
25#define KADDRESSBOOKICONVIEW_H 25#define KADDRESSBOOKICONVIEW_H
26 26
27#include <qstring.h> 27#include <qstring.h>
28//Added by qt3to4:
29#include <Q3ValueList>
30#include <QDropEvent>
28#ifndef KAB_EMBEDDED 31#ifndef KAB_EMBEDDED
29#include <kiconview.h> 32#include <kiconview.h>
30#else //KAB_EMBEDDED 33#else //KAB_EMBEDDED
31#include <qiconview.h> 34#include <q3iconview.h>
32#include <qptrlist.h> 35#include <q3ptrlist.h>
33#include <klocale.h> 36#include <klocale.h>
34#endif //KAB_EMBEDDED 37#endif //KAB_EMBEDDED
35#include "kaddressbookview.h" 38#include "kaddressbookview.h"
36 39
37class QIconViewItem; 40class Q3IconViewItem;
38class KConfig; 41class KConfig;
39class AddresseeIconView; 42class AddresseeIconView;
40class AddresseeIconViewItem; 43class AddresseeIconViewItem;
41class QIconDragItem; 44class Q3IconDragItem;
42class KAddressBookIconView; 45class KAddressBookIconView;
43 46
44namespace KABC { class AddressBook; } 47namespace KABC { class AddressBook; }
@@ -68,30 +71,30 @@ class KAddressBookIconView : public KAddressBookView
68 public slots: 71 public slots:
69 void refresh(QString uid = QString::null); 72 void refresh(QString uid = QString::null);
70#ifndef KAB_EMBEDDED 73#ifndef KAB_EMBEDDED
71//MOC_SKIP_BEGIN 74#ifndef Q_MOC_RUN
72 void setSelected(QString uid = QString::null, bool selected = true); 75 void setSelected(QString uid = QString::null, bool selected = true);
73//MOC_SKIP_END 76#endif
74#else //KAB_EMBEDDED 77#else //KAB_EMBEDDED
75//US my MOC do not like default parameters ??? 78//US my MOC do not like default parameters ???
76 void setSelected(QString uid, bool selected); 79 void setSelected(QString uid, bool selected);
77#endif //KAB_EMBEDDED 80#endif //KAB_EMBEDDED
78 81
79 protected slots: 82 protected slots:
80 void addresseeExecuted(QIconViewItem *item); 83 void addresseeExecuted(Q3IconViewItem *item);
81 void addresseeSelected(); 84 void addresseeSelected();
82 85
83 private: 86 private:
84 AddresseeIconView *mIconView; 87 AddresseeIconView *mIconView;
85 QPtrList<AddresseeIconViewItem> mIconList; 88 Q3PtrList<AddresseeIconViewItem> mIconList;
86}; 89};
87 90
88 91
89#ifndef KAB_EMBEDDED 92#ifndef KAB_EMBEDDED
90//MOC_SKIP_BEGIN 93#ifndef Q_MOC_RUN
91class AddresseeIconView : public KIconView 94class AddresseeIconView : public KIconView
92//MOC_SKIP_END 95#endif
93#else //KAB_EMBEDDED 96#else //KAB_EMBEDDED
94class AddresseeIconView : public QIconView 97class AddresseeIconView : public Q3IconView
95#endif //KAB_EMBEDDED 98#endif //KAB_EMBEDDED
96{ 99{
97 Q_OBJECT 100 Q_OBJECT
@@ -105,10 +108,10 @@ class AddresseeIconView : public QIconView
105 void startAddresseeDrag(); 108 void startAddresseeDrag();
106 109
107 protected: 110 protected:
108 virtual QDragObject *dragObject(); 111 virtual Q3DragObject *dragObject();
109 112
110 protected slots: 113 protected slots:
111 void itemDropped(QDropEvent *, const QValueList<QIconDragItem> &); 114 void itemDropped(QDropEvent *, const Q3ValueList<Q3IconDragItem> &);
112}; 115};
113 116
114class IconViewFactory : public ViewFactory 117class IconViewFactory : public ViewFactory
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp
index 272f2eb..7efaaa9 100644
--- a/kaddressbook/views/kaddressbooktableview.cpp
+++ b/kaddressbook/views/kaddressbooktableview.cpp
@@ -1,16 +1,20 @@
1// $Id$ 1// $Id$
2 2
3#include <qvbox.h> 3#include <q3vbox.h>
4#include <qlistbox.h> 4#include <q3listbox.h>
5#include <qwidget.h> 5#include <qwidget.h>
6#include <qfile.h> 6#include <qfile.h>
7#include <qimage.h> 7#include <qimage.h>
8#include <qcombobox.h> 8#include <qcombobox.h>
9#include <qapplication.h> 9#include <qapplication.h>
10#include <qdragobject.h> 10#include <q3dragobject.h>
11#include <qevent.h> 11#include <qevent.h>
12#include <qurl.h> 12#include <q3url.h>
13#include <qpixmap.h> 13#include <qpixmap.h>
14//Added by qt3to4:
15#include <QDropEvent>
16#include <QKeyEvent>
17#include <Q3VBoxLayout>
14 18
15#include <kabc/addressbook.h> 19#include <kabc/addressbook.h>
16#include <kapplication.h> 20#include <kapplication.h>
@@ -32,7 +36,7 @@
32#include "viewmanager.h" 36#include "viewmanager.h"
33 37
34#include <qlayout.h> 38#include <qlayout.h>
35#include <qheader.h> 39#include <q3header.h>
36#include <qregexp.h> 40#include <qregexp.h>
37 41
38#include "kaddressbooktableview.h" 42#include "kaddressbooktableview.h"
@@ -42,7 +46,7 @@ KAddressBookTableView::KAddressBookTableView( KABC::AddressBook *ab,
42 QWidget *parent, const char *name ) 46 QWidget *parent, const char *name )
43 : KAddressBookView( ab, parent, name ) 47 : KAddressBookView( ab, parent, name )
44{ 48{
45 mainLayout = new QVBoxLayout( viewWidget(), 2 ); 49 mainLayout = new Q3VBoxLayout( viewWidget(), 2 );
46 50
47 // The list view will be created when the config is read. 51 // The list view will be created when the config is read.
48 mListView = 0; 52 mListView = 0;
@@ -77,14 +81,14 @@ void KAddressBookTableView::reconstructListView()
77 { 81 {
78 disconnect(mListView, SIGNAL(selectionChanged()), 82 disconnect(mListView, SIGNAL(selectionChanged()),
79 this, SLOT(addresseeSelected())); 83 this, SLOT(addresseeSelected()));
80 disconnect(mListView, SIGNAL(executed(QListViewItem*)), 84 disconnect(mListView, SIGNAL(executed(Q3ListViewItem*)),
81 this, SLOT(addresseeExecuted(QListViewItem*))); 85 this, SLOT(addresseeExecuted(Q3ListViewItem*)));
82 disconnect(mListView, SIGNAL(doubleClicked(QListViewItem*)), 86 disconnect(mListView, SIGNAL(doubleClicked(Q3ListViewItem*)),
83 this, SLOT(addresseeExecuted(QListViewItem*))); 87 this, SLOT(addresseeExecuted(Q3ListViewItem*)));
84 disconnect(mListView, SIGNAL(startAddresseeDrag()), this, 88 disconnect(mListView, SIGNAL(startAddresseeDrag()), this,
85 SIGNAL(startDrag())); 89 SIGNAL(startDrag()));
86 disconnect(mListView, SIGNAL(returnPressed(QListViewItem*)), 90 disconnect(mListView, SIGNAL(returnPressed(Q3ListViewItem*)),
87 this, SLOT(addresseeExecuted(QListViewItem*))); 91 this, SLOT(addresseeExecuted(Q3ListViewItem*)));
88 92
89 disconnect(mListView, SIGNAL(addresseeDropped(QDropEvent*)), this, 93 disconnect(mListView, SIGNAL(addresseeDropped(QDropEvent*)), this,
90 SIGNAL(dropped(QDropEvent*))); 94 SIGNAL(dropped(QDropEvent*)));
@@ -105,7 +109,7 @@ void KAddressBookTableView::reconstructListView()
105 int c = 0; 109 int c = 0;
106 for( it = fieldList.begin(); it != fieldList.end(); ++it ) { 110 for( it = fieldList.begin(); it != fieldList.end(); ++it ) {
107 mListView->addColumn( (*it)->label() ); 111 mListView->addColumn( (*it)->label() );
108 mListView->setColumnWidthMode(c++, QListView::Manual); 112 mListView->setColumnWidthMode(c++, Q3ListView::Manual);
109//US 113//US
110 // qDebug("KAddressBookTableView::reconstructListView: field %s", (*it)->label().latin1()); 114 // qDebug("KAddressBookTableView::reconstructListView: field %s", (*it)->label().latin1());
111 } 115 }
@@ -119,15 +123,15 @@ void KAddressBookTableView::reconstructListView()
119 123
120 if (KABPrefs::instance()->mHonorSingleClick) { 124 if (KABPrefs::instance()->mHonorSingleClick) {
121 // qDebug("KAddressBookTableView::reconstructListView single"); 125 // qDebug("KAddressBookTableView::reconstructListView single");
122 connect(mListView, SIGNAL(executed(QListViewItem*)), 126 connect(mListView, SIGNAL(executed(Q3ListViewItem*)),
123 this, SLOT(addresseeExecuted(QListViewItem*))); 127 this, SLOT(addresseeExecuted(Q3ListViewItem*)));
124 } else { 128 } else {
125 // qDebug("KAddressBookTableView::reconstructListView double"); 129 // qDebug("KAddressBookTableView::reconstructListView double");
126 connect(mListView, SIGNAL(doubleClicked(QListViewItem*)), 130 connect(mListView, SIGNAL(doubleClicked(Q3ListViewItem*)),
127 this, SLOT(addresseeExecuted(QListViewItem*))); 131 this, SLOT(addresseeExecuted(Q3ListViewItem*)));
128 } 132 }
129 connect(mListView, SIGNAL(returnPressed(QListViewItem*)), 133 connect(mListView, SIGNAL(returnPressed(Q3ListViewItem*)),
130 this, SLOT(addresseeExecuted(QListViewItem*))); 134 this, SLOT(addresseeExecuted(Q3ListViewItem*)));
131 connect(mListView, SIGNAL(signalDelete()), 135 connect(mListView, SIGNAL(signalDelete()),
132 this, SLOT(addresseeDeleted())); 136 this, SLOT(addresseeDeleted()));
133 137
@@ -344,7 +348,7 @@ void KAddressBookTableView::refresh(QString uid)
344 } else { 348 } else {
345 // Only need to update on entry. Iterate through and try to find it 349 // Only need to update on entry. Iterate through and try to find it
346 ContactListViewItem *ceItem; 350 ContactListViewItem *ceItem;
347 QListViewItemIterator it( mListView ); 351 Q3ListViewItemIterator it( mListView );
348 while ( it.current() ) { 352 while ( it.current() ) {
349#ifndef KAB_EMBEDDED 353#ifndef KAB_EMBEDDED
350 ceItem = dynamic_cast<ContactListViewItem*>( it.current() ); 354 ceItem = dynamic_cast<ContactListViewItem*>( it.current() );
@@ -366,7 +370,7 @@ void KAddressBookTableView::refresh(QString uid)
366QStringList KAddressBookTableView::selectedUids() 370QStringList KAddressBookTableView::selectedUids()
367{ 371{
368 QStringList uidList; 372 QStringList uidList;
369 QListViewItem *item; 373 Q3ListViewItem *item;
370 ContactListViewItem *ceItem; 374 ContactListViewItem *ceItem;
371 375
372 for(item = mListView->firstChild(); item; item = item->itemBelow()) 376 for(item = mListView->firstChild(); item; item = item->itemBelow())
@@ -394,7 +398,7 @@ QStringList KAddressBookTableView::selectedUids()
394 398
395void KAddressBookTableView::setSelected(QString uid, bool selected) 399void KAddressBookTableView::setSelected(QString uid, bool selected)
396{ 400{
397 QListViewItem *item; 401 Q3ListViewItem *item;
398 ContactListViewItem *ceItem; 402 ContactListViewItem *ceItem;
399 403
400 if (uid.isNull()) 404 if (uid.isNull())
@@ -429,7 +433,7 @@ void KAddressBookTableView::addresseeSelected()
429 // last selected item, but when QListView is in multiselection mode, 433 // last selected item, but when QListView is in multiselection mode,
430 // there is no way to figure out which one was 434 // there is no way to figure out which one was
431 // selected last. 435 // selected last.
432 QListViewItem *item; 436 Q3ListViewItem *item;
433 bool found =false; 437 bool found =false;
434 for (item = mListView->firstChild(); item && !found; 438 for (item = mListView->firstChild(); item && !found;
435 item = item->nextSibling()) 439 item = item->nextSibling())
@@ -453,7 +457,7 @@ void KAddressBookTableView::addresseeSelected()
453 emit selected(QString::null); 457 emit selected(QString::null);
454} 458}
455 459
456void KAddressBookTableView::addresseeExecuted(QListViewItem *item) 460void KAddressBookTableView::addresseeExecuted(Q3ListViewItem *item)
457{ 461{
458 if (item) 462 if (item)
459 { 463 {
@@ -487,6 +491,6 @@ void KAddressBookTableView::addresseeDeleted()
487 491
488 492
489 493
490#ifndef KAB_EMBEDDED 494#ifndef KAB_EMBEDDED_
491#include "kaddressbooktableview.moc" 495#include "moc_kaddressbooktableview.cpp"
492#endif //KAB_EMBEDDED 496#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/kaddressbooktableview.h b/kaddressbook/views/kaddressbooktableview.h
index 38db7b4..c3cb038 100644
--- a/kaddressbook/views/kaddressbooktableview.h
+++ b/kaddressbook/views/kaddressbooktableview.h
@@ -10,12 +10,12 @@
10#endif 10#endif
11 11
12#include <qwidget.h> 12#include <qwidget.h>
13#include <qlistview.h> 13#include <q3listview.h>
14#include <qstring.h> 14#include <qstring.h>
15#include <qdialog.h> 15#include <qdialog.h>
16#include <qtabdialog.h> 16#include <q3tabdialog.h>
17#include <qstringlist.h> 17#include <qstringlist.h>
18#include <qvaluelist.h> 18#include <q3valuelist.h>
19 19
20#include "undo.h" 20#include "undo.h"
21 21
@@ -25,10 +25,12 @@
25 25
26#include "klocale.h" 26#include "klocale.h"
27#include "kaddressbookview.h" 27#include "kaddressbookview.h"
28//Added by qt3to4:
29#include <Q3VBoxLayout>
28 30
29class QListViewItem; 31class Q3ListViewItem;
30class QListBox; 32class Q3ListBox;
31class QVBoxLayout; 33class Q3VBoxLayout;
32class KConfig; 34class KConfig;
33 35
34class ContactListViewItem; 36class ContactListViewItem;
@@ -79,10 +81,10 @@ friend class ContactListView;
79 /** Called whenever the user executes an addressee. In terms of the 81 /** Called whenever the user executes an addressee. In terms of the
80 * list view, this is probably a double click 82 * list view, this is probably a double click
81 */ 83 */
82 void addresseeExecuted(QListViewItem*); 84 void addresseeExecuted(Q3ListViewItem*);
83 85
84 private: 86 private:
85 QVBoxLayout *mainLayout; 87 Q3VBoxLayout *mainLayout;
86 ContactListView *mListView; 88 ContactListView *mListView;
87}; 89};
88 90