summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kaddressbook/views
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
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
@@ -36,2 +36,10 @@
#include <qapplication.h>
+//Added by qt3to4:
+#include <QKeyEvent>
+#include <Q3PtrList>
+#include <QResizeEvent>
+#include <QFocusEvent>
+#include <QMouseEvent>
+#include <QEvent>
+#include <QWheelEvent>
@@ -73,7 +81,7 @@ class CardViewTip : public QLabel {
//
-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)
{
@@ -163,3 +171,3 @@ class CardViewPrivate
CardViewItemList mItemList;
- QPtrList<CardViewSeparator> mSeparatorList;
+ Q3PtrList<CardViewSeparator> mSeparatorList;
QFontMetrics *mFm;
@@ -210,3 +218,3 @@ class CardViewItemPrivate
QString mCaption;
- QPtrList< CardViewItem::Field > mFieldList;
+ Q3PtrList< CardViewItem::Field > mFieldList;
bool mSelected;
@@ -315,3 +323,3 @@ 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;
@@ -410,3 +418,3 @@ int CardViewItem::height( bool allowCache ) const
int maxLines( mView->maxFieldLines() );
- QPtrListIterator< CardViewItem::Field > iter(d->mFieldList);
+ Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
for (iter.toFirst(); iter.current(); ++iter)
@@ -415,3 +423,3 @@ int CardViewItem::height( bool allowCache ) const
continue;
- lines = QMIN( (*iter)->second.contains('\n') + 1, maxLines );
+ lines = QMIN( (*iter)->second.count('\n') + 1, maxLines );
fieldHeight += ( lines * fh ) + 2;//sp;
@@ -452,3 +460,3 @@ void CardViewItem::removeField(const QString &label)
- QPtrListIterator< CardViewItem::Field > iter(d->mFieldList);
+ Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
for (iter.toFirst(); iter.current(); ++iter)
@@ -525,3 +533,3 @@ QString CardViewItem::fieldValue(const QString &label)
{
- QPtrListIterator< CardViewItem::Field > iter(d->mFieldList);
+ Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
for (iter.toFirst(); iter.current(); ++iter)
@@ -571,3 +579,3 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
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;
// }
@@ -588,3 +596,3 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
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);
}
@@ -628,3 +636,3 @@ 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 )
@@ -639,3 +647,3 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const
CardView::CardView(QWidget *parent, const char *name)
- : QScrollView(parent, name),
+ : Q3ScrollView(parent, name),
d(new CardViewPrivate())
@@ -658,4 +666,4 @@ CardView::CardView(QWidget *parent, const char *name)
viewport()->setFocusProxy(this);
- viewport()->setFocusPolicy(WheelFocus);
- viewport()->setBackgroundMode(PaletteBase);
+ viewport()->setFocusPolicy(Qt::WheelFocus);
+ viewport()->setBackgroundMode(Qt::PaletteBase);
@@ -664,3 +672,3 @@ CardView::CardView(QWidget *parent, const char *name)
//US setBackgroundMode(PaletteBackground, PaletteBase);
- setBackgroundMode(PaletteBackground);
+ setBackgroundMode(Qt::PaletteBackground);
@@ -741,3 +749,3 @@ CardViewItem *CardView::itemAt(const QPoint &viewPos)
CardViewItem *item = 0;
- QPtrListIterator<CardViewItem> iter(d->mItemList);
+ Q3PtrListIterator<CardViewItem> iter(d->mItemList);
bool found = false;
@@ -789,3 +797,3 @@ void CardView::selectAll(bool state)
{
- QPtrListIterator<CardViewItem> iter(d->mItemList);
+ Q3PtrListIterator<CardViewItem> iter(d->mItemList);
if (!state)
@@ -880,3 +888,3 @@ 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)
@@ -957,3 +965,3 @@ 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)
@@ -977,3 +985,3 @@ 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)
@@ -995,3 +1003,3 @@ void CardView::resizeEvent(QResizeEvent *e)
{
- QScrollView::resizeEvent(e);
+ Q3ScrollView::resizeEvent(e);
@@ -1015,3 +1023,3 @@ void CardView::calcLayout()
- QPtrListIterator<CardViewItem> iter(d->mItemList);
+ Q3PtrListIterator<CardViewItem> iter(d->mItemList);
CardViewItem *item = 0;
@@ -1058,3 +1066,3 @@ void CardView::calcLayout()
// max height of a column
- QPtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList);
+ Q3PtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList);
for (sepIter.toFirst(); sepIter.current(); ++sepIter)
@@ -1103,3 +1111,3 @@ void CardView::contentsMousePressEvent(QMouseEvent *e)
{
- QScrollView::contentsMousePressEvent(e);
+ Q3ScrollView::contentsMousePressEvent(e);
@@ -1173,3 +1181,3 @@ void CardView::contentsMousePressEvent(QMouseEvent *e)
- if ( s && ! (e->state() & ControlButton) )
+ if ( s && ! (e->state() & Qt::ControlButton) )
{
@@ -1221,3 +1229,3 @@ void CardView::contentsMouseReleaseEvent(QMouseEvent *e)
{
- QScrollView::contentsMouseReleaseEvent(e);
+ Q3ScrollView::contentsMouseReleaseEvent(e);
@@ -1259,3 +1267,3 @@ void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e)
{
- QScrollView::contentsMouseDoubleClickEvent(e);
+ Q3ScrollView::contentsMouseDoubleClickEvent(e);
@@ -1304,3 +1312,3 @@ void CardView::contentsMouseMoveEvent( QMouseEvent *e )
{
- setCursor( SplitVCursor ); // Why does this fail sometimes?
+ setCursor( Qt::SplitVCursor ); // Why does this fail sometimes?
d->mOnSeparator = true;
@@ -1309,3 +1317,3 @@ void CardView::contentsMouseMoveEvent( QMouseEvent *e )
{
- setCursor( ArrowCursor );
+ setCursor( Qt::ArrowCursor );
d->mOnSeparator = false;
@@ -1326,3 +1334,3 @@ void CardView::leaveEvent( QEvent * )
d->mOnSeparator = false;
- setCursor( ArrowCursor );
+ setCursor( Qt::ArrowCursor );
}
@@ -1370,3 +1378,3 @@ void CardView::keyPressEvent( QKeyEvent *e )
{
- case Key_Up:
+ case Qt::Key_Up:
if ( pos > 0 )
@@ -1377,3 +1385,3 @@ void CardView::keyPressEvent( QKeyEvent *e )
break;
- case Key_Down:
+ case Qt::Key_Down:
if ( pos < d->mItemList.count() - 1 )
@@ -1384,3 +1392,3 @@ void CardView::keyPressEvent( QKeyEvent *e )
break;
- case Key_Left:
+ case Qt::Key_Left:
{
@@ -1402,3 +1410,3 @@ void CardView::keyPressEvent( QKeyEvent *e )
break;
- case Key_Right:
+ case Qt::Key_Right:
{
@@ -1417,3 +1425,3 @@ void CardView::keyPressEvent( QKeyEvent *e )
break;
- case Key_Home:
+ case Qt::Key_Home:
aItem = d->mItemList.first();
@@ -1421,3 +1429,3 @@ void CardView::keyPressEvent( QKeyEvent *e )
break;
- case Key_End:
+ case Qt::Key_End:
aItem = d->mItemList.last();
@@ -1425,3 +1433,3 @@ void CardView::keyPressEvent( QKeyEvent *e )
break;
- case Key_Prior: // PageUp
+ case Qt::Key_Prior: // PageUp
{
@@ -1438,3 +1446,3 @@ void CardView::keyPressEvent( QKeyEvent *e )
break;
- case Key_Next: // PageDown
+ case Qt::Key_Next: // PageDown
{
@@ -1460,3 +1468,3 @@ void CardView::keyPressEvent( QKeyEvent *e )
break;
- case Key_Space:
+ case Qt::Key_Space:
setSelected( d->mCurrentItem, !d->mCurrentItem->isSelected() );
@@ -1464,4 +1472,4 @@ void CardView::keyPressEvent( QKeyEvent *e )
break;
- case Key_Return:
- case Key_Enter:
+ case Qt::Key_Return:
+ case Qt::Key_Enter:
{
@@ -1472,3 +1480,3 @@ void CardView::keyPressEvent( QKeyEvent *e )
default:
- if ( (e->state() & ControlButton) && e->key() == Key_A )
+ if ( (e->state() & Qt::ControlButton) && e->key() == Qt::Key_A )
{
@@ -1490,3 +1498,3 @@ void CardView::keyPressEvent( QKeyEvent *e )
{
- if ( (e->state() & ShiftButton) )
+ if ( (e->state() & Qt::ShiftButton) )
{
@@ -1521,3 +1529,3 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
- else if ( (e->state() & ControlButton) )
+ else if ( (e->state() & Qt::ControlButton) )
{
@@ -1640,5 +1648,5 @@ 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;
@@ -1701,3 +1709,3 @@ void CardView::setFont( const QFont &fnt )
{
- QScrollView::setFont( fnt );
+ Q3ScrollView::setFont( fnt );
delete d->mFm;
@@ -1738,3 +1746,3 @@ void CardView::keyReleaseEvent ( QKeyEvent * e )
}
- QScrollView::keyReleaseEvent ( e );
+ Q3ScrollView::keyReleaseEvent ( e );
}
@@ -1747,4 +1755,4 @@ void CardView::keyReleaseEvent ( QKeyEvent * e )
-#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
@@ -3,4 +3,4 @@
-#include <qscrollview.h>
-#include <qptrlist.h>
+#include <q3scrollview.h>
+#include <q3ptrlist.h>
#include <qstring.h>
@@ -9,2 +9,10 @@
#include <qpoint.h>
+//Added by qt3to4:
+#include <QWheelEvent>
+#include <QResizeEvent>
+#include <QFocusEvent>
+#include <QLabel>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <QEvent>
@@ -150,3 +158,3 @@ class CardViewItem
*/
-class CardView : public QScrollView
+class CardView : public Q3ScrollView
{
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
@@ -21,2 +21,7 @@
#include <qpainter.h>
+//Added by qt3to4:
+#include <QDragEnterEvent>
+#include <QDropEvent>
+#include <QDragMoveEvent>
+#include <QDragLeaveEvent>
@@ -33,3 +38,3 @@
-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)
@@ -37,3 +42,3 @@ ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f )
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);
@@ -49,3 +54,3 @@ void ColorListBox::setEnabled( bool state )
- QListBox::setEnabled( state );
+ Q3ListBox::setEnabled( state );
for( uint i=0; i<count(); i++ )
@@ -77,6 +82,6 @@ QColor ColorListBox::color( uint index ) const
{
- return( black );
+ return( Qt::black );
}
}
-void ColorListBox::slotNewColor(QListBoxItem * i)
+void ColorListBox::slotNewColor(Q3ListBoxItem * i)
{
@@ -200,3 +205,3 @@ 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 )
{
@@ -231,3 +236,3 @@ void ColorListItem::paint( QPainter *p )
-int ColorListItem::height(const QListBox *lb ) const
+int ColorListItem::height(const Q3ListBox *lb ) const
{
@@ -237,3 +242,3 @@ int ColorListItem::height(const QListBox *lb ) const
-int ColorListItem::width(const QListBox *lb ) const
+int ColorListItem::width(const Q3ListBox *lb ) const
{
@@ -242,4 +247,4 @@ int ColorListItem::width(const QListBox *lb ) const
-#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
@@ -24,2 +24,7 @@
#include <klistbox.h>
+//Added by qt3to4:
+#include <QDragMoveEvent>
+#include <QDragLeaveEvent>
+#include <QDropEvent>
+#include <QDragEnterEvent>
@@ -35,3 +40,3 @@ 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 );
@@ -50,3 +55,3 @@ class ColorListBox : public KListBox
void newColor( int index );
- void slotNewColor(QListBoxItem * i);
+ void slotNewColor(Q3ListBoxItem * i);
@@ -58,3 +63,3 @@ class ColorListBox : public KListBox
-class ColorListItem : public QListBoxItem
+class ColorListItem : public Q3ListBoxItem
{
@@ -67,4 +72,4 @@ class ColorListItem : public QListBoxItem
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;
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
@@ -27,7 +27,10 @@
#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>
@@ -91,3 +94,3 @@ void ConfigureCardViewWidget::saveSettings( KConfig *config )
CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name )
- : QVBox( parent, name )
+ : Q3VBox( parent, name )
{
@@ -236,3 +239,3 @@ void CardViewLookNFeelPage::initGUI()
// Layout
- QVBox *loTab = new QVBox( this, "layouttab" );
+ Q3VBox *loTab = new Q3VBox( this, "layouttab" );
@@ -241,3 +244,3 @@ void CardViewLookNFeelPage::initGUI()
- QGroupBox *gbGeneral = new QGroupBox( 1, Qt::Horizontal, i18n("General"), loTab );
+ Q3GroupBox *gbGeneral = new Q3GroupBox( 1, Qt::Horizontal, i18n("General"), loTab );
@@ -245,3 +248,3 @@ void CardViewLookNFeelPage::initGUI()
- QHBox *hbSW = new QHBox( gbGeneral );
+ Q3HBox *hbSW = new Q3HBox( gbGeneral );
QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW );
@@ -250,3 +253,3 @@ void CardViewLookNFeelPage::initGUI()
- QHBox *hbPadding = new QHBox( gbGeneral );
+ Q3HBox *hbPadding = new Q3HBox( gbGeneral );
QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding );
@@ -255,5 +258,5 @@ void CardViewLookNFeelPage::initGUI()
- 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 );
@@ -266,3 +269,3 @@ void CardViewLookNFeelPage::initGUI()
- 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, "
@@ -270,4 +273,4 @@ void CardViewLookNFeelPage::initGUI()
) );
- 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 "
@@ -275,5 +278,5 @@ void CardViewLookNFeelPage::initGUI()
) );
- 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 ) ); */
@@ -282,3 +285,3 @@ void CardViewLookNFeelPage::initGUI()
// Colors
- QVBox *colorTab = new QVBox( this, "colortab" );
+ Q3VBox *colorTab = new Q3VBox( this, "colortab" );
colorTab->setSpacing( spacing );
@@ -290,3 +293,3 @@ void CardViewLookNFeelPage::initGUI()
- QWhatsThis::add( cbEnableCustomColors, i18n(
+ Q3WhatsThis::add( cbEnableCustomColors, i18n(
"If custom colors are enabled, you may choose the colors for the view below. "
@@ -294,3 +297,3 @@ void CardViewLookNFeelPage::initGUI()
) );
- 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."
@@ -299,3 +302,3 @@ void CardViewLookNFeelPage::initGUI()
// Fonts
- QVBox *fntTab = new QVBox( this, "fonttab" );
+ Q3VBox *fntTab = new Q3VBox( this, "fonttab" );
@@ -308,3 +311,3 @@ void CardViewLookNFeelPage::initGUI()
vbFonts = new QWidget( fntTab );
- QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 );
+ Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 );
gFnts->setSpacing( spacing );
@@ -314,3 +317,3 @@ void CardViewLookNFeelPage::initGUI()
lTextFont = new QLabel( vbFonts );
- lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
#ifndef KAB_EMBEDDED
@@ -327,3 +330,3 @@ void CardViewLookNFeelPage::initGUI()
lHeaderFont = new QLabel( vbFonts );
- lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
#ifndef KAB_EMBEDDED
@@ -338,3 +341,3 @@ void CardViewLookNFeelPage::initGUI()
- QWhatsThis::add( cbEnableCustomFonts, i18n(
+ Q3WhatsThis::add( cbEnableCustomFonts, i18n(
"If custom fonts are enabled, you may choose which fonts to use for this view below. "
@@ -347,3 +350,3 @@ void CardViewLookNFeelPage::initGUI()
// Behaviour
- QVBox *behaviourTab = new QVBox( this );
+ Q3VBox *behaviourTab = new Q3VBox( this );
behaviourTab->setMargin( margin );
@@ -366,4 +369,4 @@ 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
@@ -28,5 +28,7 @@
-#include <qvbox.h>
+#include <q3vbox.h>
#include <qwidget.h>
#include <qfont.h>
+//Added by qt3to4:
+#include <QLabel>
@@ -79,3 +81,3 @@ class ConfigureCardViewWidget : public ViewConfigureWidget
-class CardViewLookNFeelPage : public QVBox {
+class CardViewLookNFeelPage : public Q3VBox {
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
@@ -29,7 +29,10 @@
#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>
@@ -86,3 +89,3 @@ void ConfigureTableViewWidget::saveSettings( KConfig *config )
LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name)
- : QVBox(parent, name)
+ : Q3VBox(parent, name)
{
@@ -231,3 +234,3 @@ void LookAndFeelPage::initGUI()
// General
- QVBox *generalTab = new QVBox( this, "generaltab" );
+ Q3VBox *generalTab = new Q3VBox( this, "generaltab" );
@@ -236,3 +239,3 @@ void LookAndFeelPage::initGUI()
- QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal,
+ Q3ButtonGroup *group = new Q3ButtonGroup(1, Qt::Horizontal,
i18n("Row Separator"), generalTab);
@@ -264,3 +267,3 @@ void LookAndFeelPage::initGUI()
// Colors
- QVBox *colorTab = new QVBox( this, "colortab" );
+ Q3VBox *colorTab = new Q3VBox( this, "colortab" );
colorTab->setSpacing( spacing );
@@ -272,3 +275,3 @@ void LookAndFeelPage::initGUI()
- QWhatsThis::add( cbEnableCustomColors, i18n(
+ Q3WhatsThis::add( cbEnableCustomColors, i18n(
"If custom colors are enabled, you may choose the colors for the view below. "
@@ -276,3 +279,3 @@ void LookAndFeelPage::initGUI()
) );
- 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."
@@ -281,3 +284,3 @@ void LookAndFeelPage::initGUI()
// Fonts
- QVBox *fntTab = new QVBox( this, "fonttab" );
+ Q3VBox *fntTab = new Q3VBox( this, "fonttab" );
@@ -290,3 +293,3 @@ void LookAndFeelPage::initGUI()
vbFonts = new QWidget( fntTab );
- QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 );
+ Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 );
gFnts->setSpacing( spacing );
@@ -296,3 +299,3 @@ void LookAndFeelPage::initGUI()
lTextFont = new QLabel( vbFonts );
- lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
#ifndef KAB_EMBEDDED
@@ -309,3 +312,3 @@ void LookAndFeelPage::initGUI()
lHeaderFont = new QLabel( vbFonts );
- lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
#ifndef KAB_EMBEDDED
@@ -320,3 +323,3 @@ void LookAndFeelPage::initGUI()
- QWhatsThis::add( cbEnableCustomFonts, i18n(
+ Q3WhatsThis::add( cbEnableCustomFonts, i18n(
"If custom fonts are enabled, you may choose which fonts to use for this view below. "
@@ -342,4 +345,4 @@ 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
@@ -28,3 +28,5 @@
-#include <qvbox.h>
+#include <q3vbox.h>
+//Added by qt3to4:
+#include <QLabel>
@@ -65,3 +67,3 @@ class ConfigureTableViewWidget : public ViewConfigureWidget
*/
-class LookAndFeelPage : public QVBox
+class LookAndFeelPage : public Q3VBox
{
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
@@ -23,6 +23,6 @@
-#include <qheader.h>
-#include <qiconset.h>
+#include <q3header.h>
+#include <qicon.h>
#include <qimage.h>
-#include <qdragobject.h>
+#include <q3dragobject.h>
#include <qcombobox.h>
@@ -32,2 +32,7 @@
#include <qapplication.h>
+//Added by qt3to4:
+#include <QDropEvent>
+#include <QPixmap>
+#include <QMouseEvent>
+#include <QKeyEvent>
@@ -49,3 +54,3 @@
DynamicTip::DynamicTip( ContactListView *parent)
- : QToolTip( parent )
+ /* TODO:hacker:: QToolTip( parent ) */
{
@@ -55,2 +60,3 @@ void DynamicTip::maybeTip( const QPoint &pos )
{
+ /* TODO:hacker:
static bool ishidden = true;
@@ -65,3 +71,3 @@ void DynamicTip::maybeTip( const QPoint &pos )
- QListViewItem *lvi = plv->itemAt( pos - posVp );
+ Q3ListViewItem *lvi = plv->itemAt( pos - posVp );
if (!lvi)
@@ -153,3 +159,3 @@ void DynamicTip::maybeTip( const QPoint &pos )
ishidden = !ishidden;
-
+ */
}
@@ -175,3 +181,3 @@ QString ContactListViewItem::key(int column, bool ascending) const
if ( lan == 1 ) { //GERMAN
- QString ret = QListViewItem::key(column, ascending).lower().utf8();
+ QString ret = Q3ListViewItem::key(column, ascending).lower().utf8();
int start = -1;
@@ -199,3 +205,3 @@ QString ContactListViewItem::key(int column, bool ascending) const
#endif
- return QListViewItem::key(column, ascending).lower();
+ return Q3ListViewItem::key(column, ascending).lower();
}
@@ -290,3 +296,3 @@ void ContactListView::printMe()
p.begin ( &printer );
- QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
+ Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
float dx, dy;
@@ -345,3 +351,3 @@ 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();
@@ -355,3 +361,3 @@ bool ContactListView::acceptDrag(QDropEvent *e) const
#ifndef KAB_EMBEDDED
- return QTextDrag::canDecode(e);
+ return Q3TextDrag::canDecode(e);
#else //KAB_EMBEDDED
@@ -426,4 +432,4 @@ void ContactListView::keyReleaseEvent ( QKeyEvent * 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
@@ -7,2 +7,6 @@
#include <qstring.h>
+//Added by qt3to4:
+#include <QDropEvent>
+#include <QMouseEvent>
+#include <QKeyEvent>
@@ -22,3 +26,3 @@ class ContactListView;
*/
-class DynamicTip : public QToolTip
+class DynamicTip /* TODO:hacker: : public QToolTip */
{
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
@@ -23,5 +23,5 @@
-#include <qdragobject.h>
+#include <q3dragobject.h>
#include <qevent.h>
-#include <qiconview.h>
+#include <q3iconview.h>
#include <qlayout.h>
@@ -30,2 +30,7 @@
#include <qapplication.h>
+//Added by qt3to4:
+#include <QDropEvent>
+#include <QKeyEvent>
+#include <Q3VBoxLayout>
+#include <QDragEnterEvent>
@@ -127,3 +132,3 @@ void AddresseeCardView::printMe()
p.begin ( &printer );
- QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
+ Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
float dx, dy;
@@ -150,3 +155,3 @@ void AddresseeCardView::dragEnterEvent(QDragEnterEvent *e)
#ifndef KAB_EMBEDDED
- if (QTextDrag::canDecode(e))
+ if (Q3TextDrag::canDecode(e))
e->accept();
@@ -178,3 +183,3 @@ KAddressBookCardView::KAddressBookCardView( KABC::AddressBook *ab,
// Init the GUI
- QVBoxLayout *layout = new QVBoxLayout(viewWidget());
+ Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget());
@@ -522,4 +527,4 @@ 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
@@ -27,2 +27,5 @@
#include <qstring.h>
+//Added by qt3to4:
+#include <QDragEnterEvent>
+#include <QDropEvent>
#ifndef 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
@@ -24,3 +24,3 @@
#ifndef KAB_EMBEDDED
-#include <qiconview.h>
+#include <q3iconview.h>
#include <qstringlist.h>
@@ -37,2 +37,10 @@
+//Added by qt3to4:
+#include <QDropEvent>
+#include <Q3ValueList>
+#include <QPixmap>
+#include <QKeyEvent>
+#include <QEvent>
+#include <Q3VBoxLayout>
+
#include <kabc/addressbook.h>
@@ -75,3 +83,3 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name)
AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name)
- : QIconView(parent, name)
+ : Q3IconView(parent, name)
#endif //KAB_EMBEDDED
@@ -79,4 +87,4 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name)
{
- setSelectionMode( QIconView::Extended );
- setResizeMode( QIconView::Adjust );
+ setSelectionMode( Q3IconView::Extended );
+ setResizeMode( Q3IconView::Adjust );
setWordWrapIconText( true );
@@ -91,4 +99,4 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name)
- 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
@@ -102,3 +110,3 @@ AddresseeIconView::~AddresseeIconView()
void AddresseeIconView::itemDropped(QDropEvent *e,
- const QValueList<QIconDragItem> &)
+ const Q3ValueList<Q3IconDragItem> &)
{
@@ -107,3 +115,3 @@ void AddresseeIconView::itemDropped(QDropEvent *e,
-QDragObject *AddresseeIconView::dragObject()
+Q3DragObject *AddresseeIconView::dragObject()
{
@@ -119,3 +127,3 @@ class AddresseeIconViewItem : public KIconViewItem
#else //KAB_EMBEDDED
-class AddresseeIconViewItem : public QIconViewItem
+class AddresseeIconViewItem : public Q3IconViewItem
#endif //KAB_EMBEDDED
@@ -126,3 +134,3 @@ class AddresseeIconViewItem : public QIconViewItem
KABC::AddressBook *doc, const KABC::Addressee &a,
- QIconView *parent)
+ Q3IconView *parent)
: KIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a)
@@ -131,4 +139,4 @@ class AddresseeIconViewItem : public QIconViewItem
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
@@ -202,3 +210,3 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab,
// Init the GUI
- QVBoxLayout *layout = new QVBoxLayout(viewWidget());
+ Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget());
@@ -212,4 +220,4 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab,
//US this, SLOT(addresseeExecuted(QIconViewItem *)));
- connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)),
- this, SLOT(addresseeExecuted(QIconViewItem *)));
+ connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)),
+ this, SLOT(addresseeExecuted(Q3IconViewItem *)));
@@ -250,4 +258,4 @@ void KAddressBookIconView::readConfig(KConfig *config)
//US this, SLOT(addresseeExecuted(QIconViewItem *)));
- disconnect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)),
- this, SLOT(addresseeExecuted(QIconViewItem *)));
+ disconnect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)),
+ this, SLOT(addresseeExecuted(Q3IconViewItem *)));
@@ -262,4 +270,4 @@ void KAddressBookIconView::readConfig(KConfig *config)
*/
- connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)),
- this, SLOT(addresseeExecuted(QIconViewItem *)));
+ connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)),
+ this, SLOT(addresseeExecuted(Q3IconViewItem *)));
@@ -338,3 +346,3 @@ QStringList KAddressBookIconView::selectedUids()
QStringList uidList;
- QIconViewItem *item;
+ Q3IconViewItem *item;
AddresseeIconViewItem *aItem;
@@ -360,3 +368,3 @@ void KAddressBookIconView::refresh(QString uid)
{
- QIconViewItem *item;
+ Q3IconViewItem *item;
AddresseeIconViewItem *aItem;
@@ -408,3 +416,3 @@ void KAddressBookIconView::setSelected(QString uid, bool selected)
{
- QIconViewItem *item;
+ Q3IconViewItem *item;
AddresseeIconViewItem *aItem;
@@ -437,3 +445,3 @@ void KAddressBookIconView::setSelected(QString uid, bool selected)
-void KAddressBookIconView::addresseeExecuted(QIconViewItem *item)
+void KAddressBookIconView::addresseeExecuted(Q3IconViewItem *item)
{
@@ -452,3 +460,3 @@ void KAddressBookIconView::addresseeSelected()
{
- QIconViewItem *item;
+ Q3IconViewItem *item;
AddresseeIconViewItem *aItem;
@@ -478,4 +486,4 @@ 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
@@ -27,2 +27,5 @@
#include <qstring.h>
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <QDropEvent>
#ifndef KAB_EMBEDDED
@@ -30,4 +33,4 @@
#else //KAB_EMBEDDED
-#include <qiconview.h>
-#include <qptrlist.h>
+#include <q3iconview.h>
+#include <q3ptrlist.h>
#include <klocale.h>
@@ -36,3 +39,3 @@
-class QIconViewItem;
+class Q3IconViewItem;
class KConfig;
@@ -40,3 +43,3 @@ class AddresseeIconView;
class AddresseeIconViewItem;
-class QIconDragItem;
+class Q3IconDragItem;
class KAddressBookIconView;
@@ -70,5 +73,5 @@ class KAddressBookIconView : public KAddressBookView
#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
@@ -79,3 +82,3 @@ class KAddressBookIconView : public KAddressBookView
protected slots:
- void addresseeExecuted(QIconViewItem *item);
+ void addresseeExecuted(Q3IconViewItem *item);
void addresseeSelected();
@@ -84,3 +87,3 @@ class KAddressBookIconView : public KAddressBookView
AddresseeIconView *mIconView;
- QPtrList<AddresseeIconViewItem> mIconList;
+ Q3PtrList<AddresseeIconViewItem> mIconList;
};
@@ -89,7 +92,7 @@ class KAddressBookIconView : public KAddressBookView
#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
@@ -107,6 +110,6 @@ 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
@@ -2,4 +2,4 @@
-#include <qvbox.h>
-#include <qlistbox.h>
+#include <q3vbox.h>
+#include <q3listbox.h>
#include <qwidget.h>
@@ -9,6 +9,10 @@
#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>
@@ -34,3 +38,3 @@
#include <qlayout.h>
-#include <qheader.h>
+#include <q3header.h>
#include <qregexp.h>
@@ -44,3 +48,3 @@ KAddressBookTableView::KAddressBookTableView( KABC::AddressBook *ab,
{
- mainLayout = new QVBoxLayout( viewWidget(), 2 );
+ mainLayout = new Q3VBoxLayout( viewWidget(), 2 );
@@ -79,10 +83,10 @@ void KAddressBookTableView::reconstructListView()
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*)));
@@ -107,3 +111,3 @@ void KAddressBookTableView::reconstructListView()
mListView->addColumn( (*it)->label() );
- mListView->setColumnWidthMode(c++, QListView::Manual);
+ mListView->setColumnWidthMode(c++, Q3ListView::Manual);
//US
@@ -121,11 +125,11 @@ void KAddressBookTableView::reconstructListView()
// 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()),
@@ -346,3 +350,3 @@ void KAddressBookTableView::refresh(QString uid)
ContactListViewItem *ceItem;
- QListViewItemIterator it( mListView );
+ Q3ListViewItemIterator it( mListView );
while ( it.current() ) {
@@ -368,3 +372,3 @@ QStringList KAddressBookTableView::selectedUids()
QStringList uidList;
- QListViewItem *item;
+ Q3ListViewItem *item;
ContactListViewItem *ceItem;
@@ -396,3 +400,3 @@ void KAddressBookTableView::setSelected(QString uid, bool selected)
{
- QListViewItem *item;
+ Q3ListViewItem *item;
ContactListViewItem *ceItem;
@@ -431,3 +435,3 @@ void KAddressBookTableView::addresseeSelected()
// selected last.
- QListViewItem *item;
+ Q3ListViewItem *item;
bool found =false;
@@ -455,3 +459,3 @@ void KAddressBookTableView::addresseeSelected()
-void KAddressBookTableView::addresseeExecuted(QListViewItem *item)
+void KAddressBookTableView::addresseeExecuted(Q3ListViewItem *item)
{
@@ -489,4 +493,4 @@ 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
@@ -12,8 +12,8 @@
#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>
@@ -27,6 +27,8 @@
#include "kaddressbookview.h"
+//Added by qt3to4:
+#include <Q3VBoxLayout>
-class QListViewItem;
-class QListBox;
-class QVBoxLayout;
+class Q3ListViewItem;
+class Q3ListBox;
+class Q3VBoxLayout;
class KConfig;
@@ -81,6 +83,6 @@ friend class ContactListView;
*/
- void addresseeExecuted(QListViewItem*);
+ void addresseeExecuted(Q3ListViewItem*);
private:
- QVBoxLayout *mainLayout;
+ Q3VBoxLayout *mainLayout;
ContactListView *mListView;