Diffstat (limited to 'kaddressbook/views/kaddressbooktableview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kaddressbook/views/kaddressbooktableview.cpp | 56 |
1 files changed, 30 insertions, 26 deletions
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 @@ // $Id$ -#include <qvbox.h> -#include <qlistbox.h> +#include <q3vbox.h> +#include <q3listbox.h> #include <qwidget.h> #include <qfile.h> #include <qimage.h> #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> #include <kapplication.h> @@ -32,7 +36,7 @@ #include "viewmanager.h" #include <qlayout.h> -#include <qheader.h> +#include <q3header.h> #include <qregexp.h> #include "kaddressbooktableview.h" @@ -42,7 +46,7 @@ KAddressBookTableView::KAddressBookTableView( KABC::AddressBook *ab, QWidget *parent, const char *name ) : 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. mListView = 0; @@ -77,14 +81,14 @@ 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, SIGNAL(dropped(QDropEvent*))); @@ -105,7 +109,7 @@ void KAddressBookTableView::reconstructListView() int c = 0; 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()); } @@ -119,15 +123,15 @@ 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())); @@ -344,7 +348,7 @@ void KAddressBookTableView::refresh(QString uid) } else { // 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 ceItem = dynamic_cast<ContactListViewItem*>( it.current() ); @@ -366,7 +370,7 @@ void KAddressBookTableView::refresh(QString uid) QStringList KAddressBookTableView::selectedUids() { QStringList uidList; - QListViewItem *item; + Q3ListViewItem *item; ContactListViewItem *ceItem; for(item = mListView->firstChild(); item; item = item->itemBelow()) @@ -394,7 +398,7 @@ QStringList KAddressBookTableView::selectedUids() void KAddressBookTableView::setSelected(QString uid, bool selected) { - QListViewItem *item; + Q3ListViewItem *item; ContactListViewItem *ceItem; if (uid.isNull()) @@ -429,7 +433,7 @@ void KAddressBookTableView::addresseeSelected() // last selected item, but when QListView is in multiselection mode, // 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; item = item->nextSibling()) @@ -453,7 +457,7 @@ void KAddressBookTableView::addresseeSelected() emit selected(QString::null); } -void KAddressBookTableView::addresseeExecuted(QListViewItem *item) +void KAddressBookTableView::addresseeExecuted(Q3ListViewItem *item) { if (item) { @@ -487,6 +491,6 @@ void KAddressBookTableView::addresseeDeleted() -#ifndef KAB_EMBEDDED -#include "kaddressbooktableview.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_kaddressbooktableview.cpp" #endif //KAB_EMBEDDED |