summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views
Side-by-side diff
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
@@ -35,4 +35,12 @@
#include <qtooltip.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <QKeyEvent>
+#include <Q3PtrList>
+#include <QResizeEvent>
+#include <QFocusEvent>
+#include <QMouseEvent>
+#include <QEvent>
+#include <QWheelEvent>
#include "kabprefs.h"
@@ -72,9 +80,9 @@ class CardViewTip : public QLabel {
// item! Only the pointer value is unique in the list.
//
-class CardViewItemList : public QPtrList<CardViewItem>
+class CardViewItemList : public Q3PtrList<CardViewItem>
{
protected:
- virtual int compareItems(QPtrCollection::Item item1,
- QPtrCollection::Item item2)
+ virtual int compareItems(Q3PtrCollection::Item item1,
+ Q3PtrCollection::Item item2)
{
CardViewItem *cItem1 = (CardViewItem*)item1;
@@ -162,5 +170,5 @@ class CardViewPrivate
CardViewItemList mItemList;
- QPtrList<CardViewSeparator> mSeparatorList;
+ Q3PtrList<CardViewSeparator> mSeparatorList;
QFontMetrics *mFm;
QFontMetrics *mBFm; // bold font
@@ -209,5 +217,5 @@ class CardViewItemPrivate
QString mCaption;
- QPtrList< CardViewItem::Field > mFieldList;
+ Q3PtrList< CardViewItem::Field > mFieldList;
bool mSelected;
int x; // horizontal position, set by the view
@@ -314,5 +322,5 @@ void CardViewItem::paintCard(QPainter *p, QColorGroup &cg)
// Go through the fields and draw them
- QPtrListIterator< CardViewItem::Field > iter(d->mFieldList);
+ Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
QString label, value;
int yPos = mg + 4 + bFm.height()/* + 1*/ + fm.height(); // why the + 1 ??? (anders)
@@ -409,10 +417,10 @@ int CardViewItem::height( bool allowCache ) const
int lines;
int maxLines( mView->maxFieldLines() );
- QPtrListIterator< CardViewItem::Field > iter(d->mFieldList);
+ Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
for (iter.toFirst(); iter.current(); ++iter)
{
if ( !sef && (*iter)->second.isEmpty() )
continue;
- lines = QMIN( (*iter)->second.contains('\n') + 1, maxLines );
+ lines = QMIN( (*iter)->second.count('\n') + 1, maxLines );
fieldHeight += ( lines * fh ) + 2;//sp;
}
@@ -451,5 +459,5 @@ void CardViewItem::removeField(const QString &label)
CardViewItem::Field *f;
- QPtrListIterator< CardViewItem::Field > iter(d->mFieldList);
+ Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
for (iter.toFirst(); iter.current(); ++iter)
{
@@ -524,5 +532,5 @@ void CardViewItem::setCaption(const QString &caption)
QString CardViewItem::fieldValue(const QString &label)
{
- QPtrListIterator< CardViewItem::Field > iter(d->mFieldList);
+ Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
for (iter.toFirst(); iter.current(); ++iter)
if ((*iter)->first == label)
@@ -570,5 +578,5 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
for (_f = d->mFieldList.first(); _f != f; _f = d->mFieldList.next())
if ( se || ! _f->second.isEmpty() )
- y += ( QMIN(_f->second.contains('\n')+1, maxLines) * fh ) + 2;
+ y += ( QMIN(_f->second.count('\n')+1, maxLines) * fh ) + 2;
// }
if ( isLabel && itempos.y() > y + fh )
@@ -587,5 +595,5 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
} else {
QRect r( mView->d->mFm->boundingRect( 0, 0, INT_MAX, INT_MAX, Qt::AlignTop|Qt::AlignLeft, s ) );
- trimmed = r.width() > mw || r.height()/fh > QMIN(s.contains('\n') + 1, maxLines);
+ trimmed = r.width() > mw || r.height()/fh > QMIN(s.count('\n') + 1, maxLines);
}
}
@@ -627,5 +635,5 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const
{
if ( showEmpty || !f->second.isEmpty() )
- ypos += ( QMIN( f->second.contains('\n')+1, maxLines ) *fh)+2;
+ ypos += ( QMIN( f->second.count('\n')+1, maxLines ) *fh)+2;
if ( iy <= ypos )
break;
@@ -638,5 +646,5 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const
CardView::CardView(QWidget *parent, const char *name)
- : QScrollView(parent, name),
+ : Q3ScrollView(parent, name),
d(new CardViewPrivate())
{
@@ -657,11 +665,11 @@ CardView::CardView(QWidget *parent, const char *name)
viewport()->setMouseTracking( true );
viewport()->setFocusProxy(this);
- viewport()->setFocusPolicy(WheelFocus);
- viewport()->setBackgroundMode(PaletteBase);
+ viewport()->setFocusPolicy(Qt::WheelFocus);
+ viewport()->setBackgroundMode(Qt::PaletteBase);
connect( d->mTimer, SIGNAL(timeout()), this, SLOT(tryShowFullText()) );
//US setBackgroundMode(PaletteBackground, PaletteBase);
- setBackgroundMode(PaletteBackground);
+ setBackgroundMode(Qt::PaletteBackground);
// no reason for a vertical scrollbar
@@ -740,5 +748,5 @@ CardViewItem *CardView::itemAt(const QPoint &viewPos)
{
CardViewItem *item = 0;
- QPtrListIterator<CardViewItem> iter(d->mItemList);
+ Q3PtrListIterator<CardViewItem> iter(d->mItemList);
bool found = false;
for (iter.toFirst(); iter.current() && !found; ++iter)
@@ -788,5 +796,5 @@ CardView::SelectionMode CardView::selectionMode() const
void CardView::selectAll(bool state)
{
- QPtrListIterator<CardViewItem> iter(d->mItemList);
+ Q3PtrListIterator<CardViewItem> iter(d->mItemList);
if (!state)
{
@@ -879,5 +887,5 @@ CardViewItem *CardView::selectedItem() const
{
// find the first selected item
- QPtrListIterator<CardViewItem> iter(d->mItemList);
+ Q3PtrListIterator<CardViewItem> iter(d->mItemList);
for (iter.toFirst(); iter.current(); ++iter)
{
@@ -956,5 +964,5 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy,
// Now tell the cards to draw, if they are in the clip region
- QPtrListIterator<CardViewItem> iter(d->mItemList);
+ Q3PtrListIterator<CardViewItem> iter(d->mItemList);
for (iter.toFirst(); iter.current(); ++iter)
{
@@ -976,5 +984,5 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy,
// Followed by the separators if they are in the clip region
- QPtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList);
+ Q3PtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList);
for (sepIter.toFirst(); sepIter.current(); ++sepIter)
{
@@ -994,5 +1002,5 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy,
void CardView::resizeEvent(QResizeEvent *e)
{
- QScrollView::resizeEvent(e);
+ Q3ScrollView::resizeEvent(e);
setLayoutDirty(true);
@@ -1014,5 +1022,5 @@ void CardView::calcLayout()
d->mSeparatorList.clear();
- QPtrListIterator<CardViewItem> iter(d->mItemList);
+ Q3PtrListIterator<CardViewItem> iter(d->mItemList);
CardViewItem *item = 0;
CardViewSeparator *sep = 0;
@@ -1057,5 +1065,5 @@ void CardView::calcLayout()
// Update the height of all the separators now that we know the
// max height of a column
- QPtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList);
+ Q3PtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList);
for (sepIter.toFirst(); sepIter.current(); ++sepIter)
{
@@ -1102,5 +1110,5 @@ void CardView::setItemSpacing( uint spacing )
void CardView::contentsMousePressEvent(QMouseEvent *e)
{
- QScrollView::contentsMousePressEvent(e);
+ Q3ScrollView::contentsMousePressEvent(e);
QPoint pos = e->pos();
@@ -1172,5 +1180,5 @@ void CardView::contentsMousePressEvent(QMouseEvent *e)
bool s = ! item->isSelected();
- if ( s && ! (e->state() & ControlButton) )
+ if ( s && ! (e->state() & Qt::ControlButton) )
{
bool b = signalsBlocked();
@@ -1220,5 +1228,5 @@ void CardView::contentsMousePressEvent(QMouseEvent *e)
void CardView::contentsMouseReleaseEvent(QMouseEvent *e)
{
- QScrollView::contentsMouseReleaseEvent(e);
+ Q3ScrollView::contentsMouseReleaseEvent(e);
if ( d->mResizeAnchor )
@@ -1258,5 +1266,5 @@ void CardView::contentsMouseReleaseEvent(QMouseEvent *e)
void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e)
{
- QScrollView::contentsMouseDoubleClickEvent(e);
+ Q3ScrollView::contentsMouseDoubleClickEvent(e);
CardViewItem *item = itemAt(e->pos());
@@ -1303,10 +1311,10 @@ void CardView::contentsMouseMoveEvent( QMouseEvent *e )
if ( m >= colcontentw && m > 0 )
{
- setCursor( SplitVCursor ); // Why does this fail sometimes?
+ setCursor( Qt::SplitVCursor ); // Why does this fail sometimes?
d->mOnSeparator = true;
}
else
{
- setCursor( ArrowCursor );
+ setCursor( Qt::ArrowCursor );
d->mOnSeparator = false;
}
@@ -1325,5 +1333,5 @@ void CardView::leaveEvent( QEvent * )
{
d->mOnSeparator = false;
- setCursor( ArrowCursor );
+ setCursor( Qt::ArrowCursor );
}
}
@@ -1369,5 +1377,5 @@ void CardView::keyPressEvent( QKeyEvent *e )
switch ( e->key() )
{
- case Key_Up:
+ case Qt::Key_Up:
if ( pos > 0 )
{
@@ -1376,5 +1384,5 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
break;
- case Key_Down:
+ case Qt::Key_Down:
if ( pos < d->mItemList.count() - 1 )
{
@@ -1383,5 +1391,5 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
break;
- case Key_Left:
+ case Qt::Key_Left:
{
// look for an item in the previous/next column, starting from
@@ -1401,5 +1409,5 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
break;
- case Key_Right:
+ case Qt::Key_Right:
{
// FIXME use nice calculated measures!!!
@@ -1416,13 +1424,13 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
break;
- case Key_Home:
+ case Qt::Key_Home:
aItem = d->mItemList.first();
setCurrentItem( aItem );
break;
- case Key_End:
+ case Qt::Key_End:
aItem = d->mItemList.last();
setCurrentItem( aItem );
break;
- case Key_Prior: // PageUp
+ case Qt::Key_Prior: // PageUp
{
// QListView: "Make the item above the top visible and current"
@@ -1437,5 +1445,5 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
break;
- case Key_Next: // PageDown
+ case Qt::Key_Next: // PageDown
{
// QListView: "Make the item below the bottom visible and current"
@@ -1459,10 +1467,10 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
break;
- case Key_Space:
+ case Qt::Key_Space:
setSelected( d->mCurrentItem, !d->mCurrentItem->isSelected() );
emit selectionChanged();
break;
- case Key_Return:
- case Key_Enter:
+ case Qt::Key_Return:
+ case Qt::Key_Enter:
{
emit returnPressed( d->mCurrentItem );
@@ -1471,5 +1479,5 @@ void CardView::keyPressEvent( QKeyEvent *e )
break;
default:
- if ( (e->state() & ControlButton) && e->key() == Key_A )
+ if ( (e->state() & Qt::ControlButton) && e->key() == Qt::Key_A )
{
// select all
@@ -1489,5 +1497,5 @@ void CardView::keyPressEvent( QKeyEvent *e )
if ( d->mSelectionMode == CardView::Extended )
{
- if ( (e->state() & ShiftButton) )
+ if ( (e->state() & Qt::ShiftButton) )
{
// shift button: toggle range
@@ -1520,5 +1528,5 @@ void CardView::keyPressEvent( QKeyEvent *e )
emit selectionChanged();
}
- else if ( (e->state() & ControlButton) )
+ else if ( (e->state() & Qt::ControlButton) )
{
// control button: do nothing
@@ -1639,7 +1647,7 @@ void CardView::drawRubberBands( int pos )
QPainter p( viewport() );
- p.setRasterOp( XorROP );
- p.setPen( gray );
- p.setBrush( gray );
+ p.setCompositionMode( QPainter::CompositionMode_Xor );
+ p.setPen( Qt::gray );
+ p.setBrush( Qt::gray );
uint n = d->first;
// erase
@@ -1700,5 +1708,5 @@ QFont CardView::headerFont() const
void CardView::setFont( const QFont &fnt )
{
- QScrollView::setFont( fnt );
+ Q3ScrollView::setFont( fnt );
delete d->mFm;
d->mFm = new QFontMetrics( fnt );
@@ -1737,5 +1745,5 @@ void CardView::keyReleaseEvent ( QKeyEvent * e )
mFlagKeyPressed = false;
}
- QScrollView::keyReleaseEvent ( e );
+ Q3ScrollView::keyReleaseEvent ( e );
}
@@ -1746,5 +1754,5 @@ void CardView::keyReleaseEvent ( QKeyEvent * e )
//END Cardview
-#ifndef KAB_EMBEDDED
-#include "cardview.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_cardview.cpp"
#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
@@ -2,10 +2,18 @@
#define CARDVIEW_H
-#include <qscrollview.h>
-#include <qptrlist.h>
+#include <q3scrollview.h>
+#include <q3ptrlist.h>
#include <qstring.h>
#include <qrect.h>
#include <qpair.h>
#include <qpoint.h>
+//Added by qt3to4:
+#include <QWheelEvent>
+#include <QResizeEvent>
+#include <QFocusEvent>
+#include <QLabel>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <QEvent>
class QLabel;
@@ -149,5 +157,5 @@ class CardViewItem
* the CardView is also 100% independant of KDE.
*/
-class CardView : public QScrollView
+class CardView : public Q3ScrollView
{
friend class CardViewItem;
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
@@ -20,4 +20,9 @@
#include <qpainter.h>
+//Added by qt3to4:
+#include <QDragEnterEvent>
+#include <QDropEvent>
+#include <QDragMoveEvent>
+#include <QDragLeaveEvent>
#include <kcolordialog.h>
@@ -32,9 +37,9 @@
#endif
-ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f )
+ColorListBox::ColorListBox( QWidget *parent, const char *name, Qt::WFlags f )
:KListBox( parent, name, f ), mCurrentOnDragEnter(-1)
{
connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) );
- connect( this, SIGNAL(clicked(QListBoxItem *)), this, SLOT(slotNewColor(QListBoxItem *)) );
+ connect( this, SIGNAL(clicked(Q3ListBoxItem *)), this, SLOT(slotNewColor(Q3ListBoxItem *)) );
setAcceptDrops( true);
}
@@ -48,5 +53,5 @@ void ColorListBox::setEnabled( bool state )
}
- QListBox::setEnabled( state );
+ Q3ListBox::setEnabled( state );
for( uint i=0; i<count(); i++ )
{
@@ -76,8 +81,8 @@ QColor ColorListBox::color( uint index ) const
else
{
- return( black );
+ return( Qt::black );
}
}
-void ColorListBox::slotNewColor(QListBoxItem * i)
+void ColorListBox::slotNewColor(Q3ListBoxItem * i)
{
if ( i )
@@ -199,5 +204,5 @@ qDebug("ColorListBox::dropEvent drag&drop currently not supported");
ColorListItem::ColorListItem( const QString &text, const QColor &color )
- : QListBoxItem(), mColor( color ), mBoxWidth( 30 )
+ : Q3ListBoxItem(), mColor( color ), mBoxWidth( 30 )
{
setText( text );
@@ -230,5 +235,5 @@ void ColorListItem::paint( QPainter *p )
-int ColorListItem::height(const QListBox *lb ) const
+int ColorListItem::height(const Q3ListBox *lb ) const
{
return( lb->fontMetrics().lineSpacing()+1 );
@@ -236,10 +241,10 @@ int ColorListItem::height(const QListBox *lb ) const
-int ColorListItem::width(const QListBox *lb ) const
+int ColorListItem::width(const Q3ListBox *lb ) const
{
return( mBoxWidth + lb->fontMetrics().width( text() ) + 6 );
}
-#ifndef KAB_EMBEDDED
-#include "colorlistbox.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_colorlistbox.cpp"
#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
@@ -23,4 +23,9 @@
#include <klistbox.h>
+//Added by qt3to4:
+#include <QDragMoveEvent>
+#include <QDragLeaveEvent>
+#include <QDropEvent>
+#include <QDragEnterEvent>
class QDragEnterEvent;
@@ -34,5 +39,5 @@ class ColorListBox : public KListBox
public:
- ColorListBox( QWidget *parent=0, const char * name=0, WFlags f=0 );
+ ColorListBox( QWidget *parent=0, const char * name=0, Qt::WFlags f=0 );
void setColor( uint index, const QColor &color );
QColor color( uint index ) const;
@@ -49,5 +54,5 @@ class ColorListBox : public KListBox
private slots:
void newColor( int index );
- void slotNewColor(QListBoxItem * i);
+ void slotNewColor(Q3ListBoxItem * i);
private:
@@ -57,5 +62,5 @@ class ColorListBox : public KListBox
-class ColorListItem : public QListBoxItem
+class ColorListItem : public Q3ListBoxItem
{
public:
@@ -66,6 +71,6 @@ class ColorListItem : public QListBoxItem
protected:
virtual void paint( QPainter * );
- virtual int height( const QListBox * ) const;
- virtual int width( const QListBox * ) const;
+ virtual int height( const Q3ListBox * ) const;
+ virtual int width( const Q3ListBox * ) const;
private:
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
@@ -26,9 +26,12 @@
#include <qlabel.h>
#include <qcheckbox.h>
-#include <qvbox.h>
-#include <qgroupbox.h>
+#include <q3vbox.h>
+#include <q3groupbox.h>
#include <qspinbox.h>
#include <qtabwidget.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3Frame>
#include <kdebug.h>
@@ -90,5 +93,5 @@ void ConfigureCardViewWidget::saveSettings( KConfig *config )
// CardViewLookNFeelPage
CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name )
- : QVBox( parent, name )
+ : Q3VBox( parent, name )
{
initGUI();
@@ -235,26 +238,26 @@ void CardViewLookNFeelPage::initGUI()
// Layout
- QVBox *loTab = new QVBox( this, "layouttab" );
+ Q3VBox *loTab = new Q3VBox( this, "layouttab" );
loTab->setSpacing( spacing );
loTab->setMargin( margin );
- QGroupBox *gbGeneral = new QGroupBox( 1, Qt::Horizontal, i18n("General"), loTab );
+ Q3GroupBox *gbGeneral = new Q3GroupBox( 1, Qt::Horizontal, i18n("General"), loTab );
cbDrawSeps = new QCheckBox( i18n("Draw &separators"), gbGeneral );
- QHBox *hbSW = new QHBox( gbGeneral );
+ Q3HBox *hbSW = new Q3HBox( gbGeneral );
QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW );
sbSepWidth = new QSpinBox( 1, 50, 1, hbSW );
lSW->setBuddy( sbSepWidth);
- QHBox *hbPadding = new QHBox( gbGeneral );
+ Q3HBox *hbPadding = new Q3HBox( gbGeneral );
QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding );
sbSpacing = new QSpinBox( 0, 100, 1, hbPadding );
lSpacing->setBuddy( sbSpacing );
- QGroupBox *gbCards = new QGroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab );
+ Q3GroupBox *gbCards = new Q3GroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab );
- QHBox *hbMargin = new QHBox( gbCards );
+ Q3HBox *hbMargin = new Q3HBox( gbCards );
QLabel *lMargin = new QLabel( i18n("&Margin:"), hbMargin );
sbMargin = new QSpinBox( 0, 100, 1, hbMargin );
@@ -265,21 +268,21 @@ void CardViewLookNFeelPage::initGUI()
loTab->setStretchFactor( new QWidget( loTab ), 1 );
- QWhatsThis::add( sbMargin, i18n(
+ Q3WhatsThis::add( sbMargin, i18n(
"The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, "
"incrementing the item margin will add space between the focus rectangle and the item data."
) );
- QWhatsThis::add( lMargin, QWhatsThis::textFor( sbMargin ) );
- QWhatsThis::add( sbSpacing, i18n(
+ /* TODO:hacker: Q3WhatsThis::add( lMargin, Q3WhatsThis::textFor( sbMargin ) ); */
+ Q3WhatsThis::add( sbSpacing, i18n(
"The Item Spacing decides the distance (in pixels) between the items and anything else: the view "
"borders, other items or column separators."
) );
- QWhatsThis::add( lSpacing, QWhatsThis::textFor( sbSpacing ) );
- QWhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") );
- QWhatsThis::add( lSW, QWhatsThis::textFor( sbSepWidth ) );
+ /* TODO:hacker: Q3WhatsThis::add( lSpacing, Q3WhatsThis::textFor( sbSpacing ) ); */
+ Q3WhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") );
+ /* TODO:hacker: Q3WhatsThis::add( lSW, Q3WhatsThis::textFor( sbSepWidth ) ); */
tabs->addTab( loTab, i18n("&Layout") );
// Colors
- QVBox *colorTab = new QVBox( this, "colortab" );
+ Q3VBox *colorTab = new Q3VBox( this, "colortab" );
colorTab->setSpacing( spacing );
colorTab->setMargin( spacing );
@@ -289,14 +292,14 @@ void CardViewLookNFeelPage::initGUI()
tabs->addTab( colorTab, i18n("&Colors") );
- QWhatsThis::add( cbEnableCustomColors, i18n(
+ Q3WhatsThis::add( cbEnableCustomColors, i18n(
"If custom colors are enabled, you may choose the colors for the view below. "
"Otherwise colors from your current KDE color scheme are used."
) );
- QWhatsThis::add( lbColors, i18n(
+ Q3WhatsThis::add( lbColors, i18n(
"Double click or press RETURN on a item to select a color for the related strings in the view."
) );
// Fonts
- QVBox *fntTab = new QVBox( this, "fonttab" );
+ Q3VBox *fntTab = new Q3VBox( this, "fonttab" );
fntTab->setSpacing( spacing );
@@ -307,5 +310,5 @@ void CardViewLookNFeelPage::initGUI()
vbFonts = new QWidget( fntTab );
- QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 );
+ Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 );
gFnts->setSpacing( spacing );
gFnts->setAutoAdd( true );
@@ -313,5 +316,5 @@ void CardViewLookNFeelPage::initGUI()
QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts );
lTextFont = new QLabel( vbFonts );
- lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
#ifndef KAB_EMBEDDED
btnFont = new KPushButton( i18n("Choose..."), vbFonts );
@@ -326,5 +329,5 @@ void CardViewLookNFeelPage::initGUI()
QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts );
lHeaderFont = new QLabel( vbFonts );
- lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
#ifndef KAB_EMBEDDED
btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts );
@@ -337,5 +340,5 @@ void CardViewLookNFeelPage::initGUI()
fntTab->setStretchFactor( new QWidget( fntTab ), 1 );
- QWhatsThis::add( cbEnableCustomFonts, i18n(
+ Q3WhatsThis::add( cbEnableCustomFonts, i18n(
"If custom fonts are enabled, you may choose which fonts to use for this view below. "
"Otherwise the default KDE font will be used, in bold style for the header and "
@@ -346,5 +349,5 @@ void CardViewLookNFeelPage::initGUI()
// Behaviour
- QVBox *behaviourTab = new QVBox( this );
+ Q3VBox *behaviourTab = new Q3VBox( this );
behaviourTab->setMargin( margin );
behaviourTab->setSpacing( spacing );
@@ -365,5 +368,5 @@ void CardViewLookNFeelPage::updateFontLabel( QFont fnt, QLabel *l )
}
-#ifndef KAB_EMBEDDED
-#include "configurecardviewdialog.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_configurecardviewdialog.cpp"
#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
@@ -27,7 +27,9 @@
#include "viewconfigurewidget.h"
-#include <qvbox.h>
+#include <q3vbox.h>
#include <qwidget.h>
#include <qfont.h>
+//Added by qt3to4:
+#include <QLabel>
class QString;
@@ -78,5 +80,5 @@ class ConfigureCardViewWidget : public ViewConfigureWidget
*/
-class CardViewLookNFeelPage : public QVBox {
+class CardViewLookNFeelPage : public Q3VBox {
Q_OBJECT
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
@@ -28,9 +28,12 @@
#include <qradiobutton.h>
#include <qcheckbox.h>
-#include <qvbox.h>
-#include <qbuttongroup.h>
+#include <q3vbox.h>
+#include <q3buttongroup.h>
#include <qtabwidget.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
#include <qpushbutton.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3Frame>
#include <kglobal.h>
@@ -85,5 +88,5 @@ void ConfigureTableViewWidget::saveSettings( KConfig *config )
LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name)
- : QVBox(parent, name)
+ : Q3VBox(parent, name)
{
initGUI();
@@ -230,10 +233,10 @@ void LookAndFeelPage::initGUI()
// General
- QVBox *generalTab = new QVBox( this, "generaltab" );
+ Q3VBox *generalTab = new Q3VBox( this, "generaltab" );
generalTab->setSpacing( spacing );
generalTab->setMargin( margin );
- QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal,
+ Q3ButtonGroup *group = new Q3ButtonGroup(1, Qt::Horizontal,
i18n("Row Separator"), generalTab);
@@ -263,5 +266,5 @@ void LookAndFeelPage::initGUI()
// Colors
- QVBox *colorTab = new QVBox( this, "colortab" );
+ Q3VBox *colorTab = new Q3VBox( this, "colortab" );
colorTab->setSpacing( spacing );
colorTab->setMargin( spacing );
@@ -271,14 +274,14 @@ void LookAndFeelPage::initGUI()
tabs->addTab( colorTab, i18n("&Colors") );
- QWhatsThis::add( cbEnableCustomColors, i18n(
+ Q3WhatsThis::add( cbEnableCustomColors, i18n(
"If custom colors are enabled, you may choose the colors for the view below. "
"Otherwise colors from your current KDE color scheme are used."
) );
- QWhatsThis::add( lbColors, i18n(
+ Q3WhatsThis::add( lbColors, i18n(
"Double click or press RETURN on a item to select a color for the related strings in the view."
) );
// Fonts
- QVBox *fntTab = new QVBox( this, "fonttab" );
+ Q3VBox *fntTab = new Q3VBox( this, "fonttab" );
fntTab->setSpacing( spacing );
@@ -289,5 +292,5 @@ void LookAndFeelPage::initGUI()
vbFonts = new QWidget( fntTab );
- QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 );
+ Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 );
gFnts->setSpacing( spacing );
gFnts->setAutoAdd( true );
@@ -295,5 +298,5 @@ void LookAndFeelPage::initGUI()
QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts );
lTextFont = new QLabel( vbFonts );
- lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
#ifndef KAB_EMBEDDED
btnFont = new KPushButton( i18n("Choose..."), vbFonts );
@@ -308,5 +311,5 @@ void LookAndFeelPage::initGUI()
QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts );
lHeaderFont = new QLabel( vbFonts );
- lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
#ifndef KAB_EMBEDDED
btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts );
@@ -319,5 +322,5 @@ void LookAndFeelPage::initGUI()
fntTab->setStretchFactor( new QWidget( fntTab ), 1 );
- QWhatsThis::add( cbEnableCustomFonts, i18n(
+ Q3WhatsThis::add( cbEnableCustomFonts, i18n(
"If custom fonts are enabled, you may choose which fonts to use for this view below. "
"Otherwise the default KDE font will be used, in bold style for the header and "
@@ -341,5 +344,5 @@ void LookAndFeelPage::updateFontLabel( QFont fnt, QLabel *l )
}
-#ifndef KAB_EMBEDDED
-#include "configuretableviewdialog.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_configuretableviewdialog.cpp"
#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
@@ -27,5 +27,7 @@
#include "viewconfigurewidget.h"
-#include <qvbox.h>
+#include <q3vbox.h>
+//Added by qt3to4:
+#include <QLabel>
class QString;
@@ -64,5 +66,5 @@ class ConfigureTableViewWidget : public ViewConfigureWidget
Internal class. It is only defined here for moc
*/
-class LookAndFeelPage : public QVBox
+class LookAndFeelPage : public Q3VBox
{
Q_OBJECT
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
@@ -22,8 +22,8 @@
*/
-#include <qheader.h>
-#include <qiconset.h>
+#include <q3header.h>
+#include <qicon.h>
#include <qimage.h>
-#include <qdragobject.h>
+#include <q3dragobject.h>
#include <qcombobox.h>
#include <qpainter.h>
@@ -31,4 +31,9 @@
#include <qevent.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <QDropEvent>
+#include <QPixmap>
+#include <QMouseEvent>
+#include <QKeyEvent>
#include <klocale.h>
@@ -48,5 +53,5 @@
DynamicTip::DynamicTip( ContactListView *parent)
- : QToolTip( parent )
+ /* TODO:hacker:: QToolTip( parent ) */
{
}
@@ -54,4 +59,5 @@ DynamicTip::DynamicTip( ContactListView *parent)
void DynamicTip::maybeTip( const QPoint &pos )
{
+ /* TODO:hacker:
static bool ishidden = true;
if (!parentWidget()->inherits( "ContactListView" ))
@@ -64,5 +70,5 @@ void DynamicTip::maybeTip( const QPoint &pos )
QPoint posVp = plv->viewport()->pos();
- QListViewItem *lvi = plv->itemAt( pos - posVp );
+ Q3ListViewItem *lvi = plv->itemAt( pos - posVp );
if (!lvi)
return;
@@ -152,5 +158,5 @@ void DynamicTip::maybeTip( const QPoint &pos )
hide();
ishidden = !ishidden;
-
+ */
}
@@ -174,5 +180,5 @@ QString ContactListViewItem::key(int column, bool ascending) const
//qDebug("language %d ", lan);
if ( lan == 1 ) { //GERMAN
- QString ret = QListViewItem::key(column, ascending).lower().utf8();
+ QString ret = Q3ListViewItem::key(column, ascending).lower().utf8();
int start = -1;
while ( (start = ret.find( 'รค', start+1)) > 0 ) {
@@ -198,5 +204,5 @@ QString ContactListViewItem::key(int column, bool ascending) const
else
#endif
- return QListViewItem::key(column, ascending).lower();
+ return Q3ListViewItem::key(column, ascending).lower();
}
@@ -289,5 +295,5 @@ void ContactListView::printMe()
QPainter p;
p.begin ( &printer );
- QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
+ Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
float dx, dy;
int wid = (m.width() * 9)/10;
@@ -344,5 +350,5 @@ void ContactListView::contentsMousePressEvent(QMouseEvent* e)
void ContactListView::contentsMouseMoveEvent( QMouseEvent *e )
{
- if ((e->state() & LeftButton) && (e->pos() - presspos).manhattanLength() > 4 ) {
+ if ((e->state() & Qt::LeftButton) && (e->pos() - presspos).manhattanLength() > 4 ) {
emit startAddresseeDrag();
}
@@ -354,5 +360,5 @@ bool ContactListView::acceptDrag(QDropEvent *e) const
{
#ifndef KAB_EMBEDDED
- return QTextDrag::canDecode(e);
+ return Q3TextDrag::canDecode(e);
#else //KAB_EMBEDDED
qDebug("ContactListView::acceptDrag has to be fixed");
@@ -425,5 +431,5 @@ void ContactListView::keyReleaseEvent ( QKeyEvent * e )
KListView::keyReleaseEvent ( e );
}
-#ifndef KAB_EMBEDDED
-#include "contactlistview.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_contactlistview.cpp"
#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
@@ -6,4 +6,8 @@
#include <qtooltip.h>
#include <qstring.h>
+//Added by qt3to4:
+#include <QDropEvent>
+#include <QMouseEvent>
+#include <QKeyEvent>
#include <klistview.h>
@@ -21,5 +25,5 @@ class ContactListView;
* hacked together to function.
*/
-class DynamicTip : public QToolTip
+class DynamicTip /* TODO:hacker: : public QToolTip */
{
public:
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
@@ -22,11 +22,16 @@
*/
-#include <qdragobject.h>
+#include <q3dragobject.h>
#include <qevent.h>
-#include <qiconview.h>
+#include <q3iconview.h>
#include <qlayout.h>
#include <qstringlist.h>
#include <qregexp.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <QDropEvent>
+#include <QKeyEvent>
+#include <Q3VBoxLayout>
+#include <QDragEnterEvent>
#include <kabc/addressbook.h>
@@ -126,5 +131,5 @@ void AddresseeCardView::printMe()
QPainter p;
p.begin ( &printer );
- QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
+ Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
float dx, dy;
int wid = (m.width() * 9)/10;
@@ -149,5 +154,5 @@ void AddresseeCardView::dragEnterEvent(QDragEnterEvent *e)
{
#ifndef KAB_EMBEDDED
- if (QTextDrag::canDecode(e))
+ if (Q3TextDrag::canDecode(e))
e->accept();
#else //KAB_EMBEDDED
@@ -177,5 +182,5 @@ KAddressBookCardView::KAddressBookCardView( KABC::AddressBook *ab,
// Init the GUI
- QVBoxLayout *layout = new QVBoxLayout(viewWidget());
+ Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget());
mCardView = new AddresseeCardView(viewWidget(), "mCardView");
@@ -521,5 +526,5 @@ void KAddressBookCardView::addresseeSelected()
}
-#ifndef KAB_EMBEDDED
-#include "kaddressbookcardview.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_kaddressbookcardview.cpp"
#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
@@ -26,4 +26,7 @@
#include <qstring.h>
+//Added by qt3to4:
+#include <QDragEnterEvent>
+#include <QDropEvent>
#ifndef KAB_EMBEDDED
#include <kiconview.h>
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
@@ -23,5 +23,5 @@
#ifndef KAB_EMBEDDED
-#include <qiconview.h>
+#include <q3iconview.h>
#include <qstringlist.h>
@@ -36,4 +36,12 @@
#endif //KAB_EMBEDDED
+//Added by qt3to4:
+#include <QDropEvent>
+#include <Q3ValueList>
+#include <QPixmap>
+#include <QKeyEvent>
+#include <QEvent>
+#include <Q3VBoxLayout>
+
#include <kabc/addressbook.h>
#include "kabprefs.h"
@@ -74,10 +82,10 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name)
#else //KAB_EMBEDDED
AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name)
- : QIconView(parent, name)
+ : Q3IconView(parent, name)
#endif //KAB_EMBEDDED
{
- setSelectionMode( QIconView::Extended );
- setResizeMode( QIconView::Adjust );
+ setSelectionMode( Q3IconView::Extended );
+ setResizeMode( Q3IconView::Adjust );
setWordWrapIconText( true );
setGridX( 100 );
@@ -90,6 +98,6 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name)
#ifndef KAB_EMBEDDED
- connect(this, SIGNAL(dropped(QDropEvent*, const QValueList<QIconDragItem>&)),
- this, SLOT(itemDropped(QDropEvent*, const QValueList<QIconDragItem>&)));
+ connect(this, SIGNAL(dropped(QDropEvent*, const Q3ValueList<Q3IconDragItem>&)),
+ this, SLOT(itemDropped(QDropEvent*, const Q3ValueList<Q3IconDragItem>&)));
#endif //KAB_EMBEDDED
}
@@ -101,10 +109,10 @@ AddresseeIconView::~AddresseeIconView()
void AddresseeIconView::itemDropped(QDropEvent *e,
- const QValueList<QIconDragItem> &)
+ const Q3ValueList<Q3IconDragItem> &)
{
emit addresseeDropped(e);
}
-QDragObject *AddresseeIconView::dragObject()
+Q3DragObject *AddresseeIconView::dragObject()
{
emit startAddresseeDrag();
@@ -118,5 +126,5 @@ QDragObject *AddresseeIconView::dragObject()
class AddresseeIconViewItem : public KIconViewItem
#else //KAB_EMBEDDED
-class AddresseeIconViewItem : public QIconViewItem
+class AddresseeIconViewItem : public Q3IconViewItem
#endif //KAB_EMBEDDED
{
@@ -125,11 +133,11 @@ class AddresseeIconViewItem : public QIconViewItem
AddresseeIconViewItem(const KABC::Field::List &fields,
KABC::AddressBook *doc, const KABC::Addressee &a,
- QIconView *parent)
+ Q3IconView *parent)
: KIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a)
#else //KAB_EMBEDDED
AddresseeIconViewItem(const KABC::Field::List &fields,
KABC::AddressBook *doc, const KABC::Addressee &a,
- QIconView *parent)
- : QIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a)
+ Q3IconView *parent)
+ : Q3IconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a)
#endif //KAB_EMBEDDED
{
@@ -201,5 +209,5 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab,
{
// Init the GUI
- QVBoxLayout *layout = new QVBoxLayout(viewWidget());
+ Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget());
mIconView = new AddresseeIconView(viewWidget(), "mIconView");
@@ -211,6 +219,6 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab,
//US connect(mIconView, SIGNAL(executed(QIconViewItem *)),
//US this, SLOT(addresseeExecuted(QIconViewItem *)));
- connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)),
- this, SLOT(addresseeExecuted(QIconViewItem *)));
+ connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)),
+ this, SLOT(addresseeExecuted(Q3IconViewItem *)));
connect(mIconView, SIGNAL(selectionChanged()),
@@ -249,6 +257,6 @@ void KAddressBookIconView::readConfig(KConfig *config)
//US disconnect(mIconView, SIGNAL(executed(QIconViewItem *)),
//US this, SLOT(addresseeExecuted(QIconViewItem *)));
- disconnect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)),
- this, SLOT(addresseeExecuted(QIconViewItem *)));
+ disconnect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)),
+ this, SLOT(addresseeExecuted(Q3IconViewItem *)));
//US method executed is part of KIconView. Use selectionChanged instead
@@ -261,6 +269,6 @@ void KAddressBookIconView::readConfig(KConfig *config)
this, SLOT(addresseeExecuted(QIconViewItem *)));
*/
- connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)),
- this, SLOT(addresseeExecuted(QIconViewItem *)));
+ connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)),
+ this, SLOT(addresseeExecuted(Q3IconViewItem *)));
}
@@ -337,5 +345,5 @@ QStringList KAddressBookIconView::selectedUids()
{
QStringList uidList;
- QIconViewItem *item;
+ Q3IconViewItem *item;
AddresseeIconViewItem *aItem;
@@ -359,5 +367,5 @@ QStringList KAddressBookIconView::selectedUids()
void KAddressBookIconView::refresh(QString uid)
{
- QIconViewItem *item;
+ Q3IconViewItem *item;
AddresseeIconViewItem *aItem;
@@ -407,5 +415,5 @@ void KAddressBookIconView::refresh(QString uid)
void KAddressBookIconView::setSelected(QString uid, bool selected)
{
- QIconViewItem *item;
+ Q3IconViewItem *item;
AddresseeIconViewItem *aItem;
@@ -436,5 +444,5 @@ void KAddressBookIconView::setSelected(QString uid, bool selected)
}
-void KAddressBookIconView::addresseeExecuted(QIconViewItem *item)
+void KAddressBookIconView::addresseeExecuted(Q3IconViewItem *item)
{
#ifndef KAB_EMBEDDED
@@ -451,5 +459,5 @@ void KAddressBookIconView::addresseeExecuted(QIconViewItem *item)
void KAddressBookIconView::addresseeSelected()
{
- QIconViewItem *item;
+ Q3IconViewItem *item;
AddresseeIconViewItem *aItem;
@@ -477,5 +485,5 @@ void KAddressBookIconView::addresseeSelected()
}
-#ifndef KAB_EMBEDDED
-#include "kaddressbookiconview.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_kaddressbookiconview.cpp"
#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
@@ -26,18 +26,21 @@
#include <qstring.h>
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <QDropEvent>
#ifndef KAB_EMBEDDED
#include <kiconview.h>
#else //KAB_EMBEDDED
-#include <qiconview.h>
-#include <qptrlist.h>
+#include <q3iconview.h>
+#include <q3ptrlist.h>
#include <klocale.h>
#endif //KAB_EMBEDDED
#include "kaddressbookview.h"
-class QIconViewItem;
+class Q3IconViewItem;
class KConfig;
class AddresseeIconView;
class AddresseeIconViewItem;
-class QIconDragItem;
+class Q3IconDragItem;
class KAddressBookIconView;
@@ -69,7 +72,7 @@ class KAddressBookIconView : public KAddressBookView
void refresh(QString uid = QString::null);
#ifndef KAB_EMBEDDED
-//MOC_SKIP_BEGIN
+#ifndef Q_MOC_RUN
void setSelected(QString uid = QString::null, bool selected = true);
-//MOC_SKIP_END
+#endif
#else //KAB_EMBEDDED
//US my MOC do not like default parameters ???
@@ -78,19 +81,19 @@ class KAddressBookIconView : public KAddressBookView
protected slots:
- void addresseeExecuted(QIconViewItem *item);
+ void addresseeExecuted(Q3IconViewItem *item);
void addresseeSelected();
private:
AddresseeIconView *mIconView;
- QPtrList<AddresseeIconViewItem> mIconList;
+ Q3PtrList<AddresseeIconViewItem> mIconList;
};
#ifndef KAB_EMBEDDED
-//MOC_SKIP_BEGIN
+#ifndef Q_MOC_RUN
class AddresseeIconView : public KIconView
-//MOC_SKIP_END
+#endif
#else //KAB_EMBEDDED
-class AddresseeIconView : public QIconView
+class AddresseeIconView : public Q3IconView
#endif //KAB_EMBEDDED
{
@@ -106,8 +109,8 @@ class AddresseeIconView : public QIconView
protected:
- virtual QDragObject *dragObject();
+ virtual Q3DragObject *dragObject();
protected slots:
- void itemDropped(QDropEvent *, const QValueList<QIconDragItem> &);
+ void itemDropped(QDropEvent *, const Q3ValueList<Q3IconDragItem> &);
};
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,6 +1,6 @@
// $Id$
-#include <qvbox.h>
-#include <qlistbox.h>
+#include <q3vbox.h>
+#include <q3listbox.h>
#include <qwidget.h>
#include <qfile.h>
@@ -8,8 +8,12 @@
#include <qcombobox.h>
#include <qapplication.h>
-#include <qdragobject.h>
+#include <q3dragobject.h>
#include <qevent.h>
-#include <qurl.h>
+#include <q3url.h>
#include <qpixmap.h>
+//Added by qt3to4:
+#include <QDropEvent>
+#include <QKeyEvent>
+#include <Q3VBoxLayout>
#include <kabc/addressbook.h>
@@ -33,5 +37,5 @@
#include <qlayout.h>
-#include <qheader.h>
+#include <q3header.h>
#include <qregexp.h>
@@ -43,5 +47,5 @@ KAddressBookTableView::KAddressBookTableView( KABC::AddressBook *ab,
: KAddressBookView( ab, parent, name )
{
- mainLayout = new QVBoxLayout( viewWidget(), 2 );
+ mainLayout = new Q3VBoxLayout( viewWidget(), 2 );
// The list view will be created when the config is read.
@@ -78,12 +82,12 @@ void KAddressBookTableView::reconstructListView()
disconnect(mListView, SIGNAL(selectionChanged()),
this, SLOT(addresseeSelected()));
- disconnect(mListView, SIGNAL(executed(QListViewItem*)),
- this, SLOT(addresseeExecuted(QListViewItem*)));
- disconnect(mListView, SIGNAL(doubleClicked(QListViewItem*)),
- this, SLOT(addresseeExecuted(QListViewItem*)));
+ disconnect(mListView, SIGNAL(executed(Q3ListViewItem*)),
+ this, SLOT(addresseeExecuted(Q3ListViewItem*)));
+ disconnect(mListView, SIGNAL(doubleClicked(Q3ListViewItem*)),
+ this, SLOT(addresseeExecuted(Q3ListViewItem*)));
disconnect(mListView, SIGNAL(startAddresseeDrag()), this,
SIGNAL(startDrag()));
- disconnect(mListView, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(addresseeExecuted(QListViewItem*)));
+ disconnect(mListView, SIGNAL(returnPressed(Q3ListViewItem*)),
+ this, SLOT(addresseeExecuted(Q3ListViewItem*)));
disconnect(mListView, SIGNAL(addresseeDropped(QDropEvent*)), this,
@@ -106,5 +110,5 @@ void KAddressBookTableView::reconstructListView()
for( it = fieldList.begin(); it != fieldList.end(); ++it ) {
mListView->addColumn( (*it)->label() );
- mListView->setColumnWidthMode(c++, QListView::Manual);
+ mListView->setColumnWidthMode(c++, Q3ListView::Manual);
//US
// qDebug("KAddressBookTableView::reconstructListView: field %s", (*it)->label().latin1());
@@ -120,13 +124,13 @@ void KAddressBookTableView::reconstructListView()
if (KABPrefs::instance()->mHonorSingleClick) {
// qDebug("KAddressBookTableView::reconstructListView single");
- connect(mListView, SIGNAL(executed(QListViewItem*)),
- this, SLOT(addresseeExecuted(QListViewItem*)));
+ connect(mListView, SIGNAL(executed(Q3ListViewItem*)),
+ this, SLOT(addresseeExecuted(Q3ListViewItem*)));
} else {
// qDebug("KAddressBookTableView::reconstructListView double");
- connect(mListView, SIGNAL(doubleClicked(QListViewItem*)),
- this, SLOT(addresseeExecuted(QListViewItem*)));
+ connect(mListView, SIGNAL(doubleClicked(Q3ListViewItem*)),
+ this, SLOT(addresseeExecuted(Q3ListViewItem*)));
}
- connect(mListView, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(addresseeExecuted(QListViewItem*)));
+ connect(mListView, SIGNAL(returnPressed(Q3ListViewItem*)),
+ this, SLOT(addresseeExecuted(Q3ListViewItem*)));
connect(mListView, SIGNAL(signalDelete()),
this, SLOT(addresseeDeleted()));
@@ -345,5 +349,5 @@ void KAddressBookTableView::refresh(QString uid)
// Only need to update on entry. Iterate through and try to find it
ContactListViewItem *ceItem;
- QListViewItemIterator it( mListView );
+ Q3ListViewItemIterator it( mListView );
while ( it.current() ) {
#ifndef KAB_EMBEDDED
@@ -367,5 +371,5 @@ QStringList KAddressBookTableView::selectedUids()
{
QStringList uidList;
- QListViewItem *item;
+ Q3ListViewItem *item;
ContactListViewItem *ceItem;
@@ -395,5 +399,5 @@ QStringList KAddressBookTableView::selectedUids()
void KAddressBookTableView::setSelected(QString uid, bool selected)
{
- QListViewItem *item;
+ Q3ListViewItem *item;
ContactListViewItem *ceItem;
@@ -430,5 +434,5 @@ void KAddressBookTableView::addresseeSelected()
// there is no way to figure out which one was
// selected last.
- QListViewItem *item;
+ Q3ListViewItem *item;
bool found =false;
for (item = mListView->firstChild(); item && !found;
@@ -454,5 +458,5 @@ void KAddressBookTableView::addresseeSelected()
}
-void KAddressBookTableView::addresseeExecuted(QListViewItem *item)
+void KAddressBookTableView::addresseeExecuted(Q3ListViewItem *item)
{
if (item)
@@ -488,5 +492,5 @@ void KAddressBookTableView::addresseeDeleted()
-#ifndef KAB_EMBEDDED
-#include "kaddressbooktableview.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_kaddressbooktableview.cpp"
#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
@@ -11,10 +11,10 @@
#include <qwidget.h>
-#include <qlistview.h>
+#include <q3listview.h>
#include <qstring.h>
#include <qdialog.h>
-#include <qtabdialog.h>
+#include <q3tabdialog.h>
#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <q3valuelist.h>
#include "undo.h"
@@ -26,8 +26,10 @@
#include "klocale.h"
#include "kaddressbookview.h"
+//Added by qt3to4:
+#include <Q3VBoxLayout>
-class QListViewItem;
-class QListBox;
-class QVBoxLayout;
+class Q3ListViewItem;
+class Q3ListBox;
+class Q3VBoxLayout;
class KConfig;
@@ -80,8 +82,8 @@ friend class ContactListView;
* list view, this is probably a double click
*/
- void addresseeExecuted(QListViewItem*);
+ void addresseeExecuted(Q3ListViewItem*);
private:
- QVBoxLayout *mainLayout;
+ Q3VBoxLayout *mainLayout;
ContactListView *mListView;
};