Diffstat (limited to 'kaddressbook/views/kaddressbookiconview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/views/kaddressbookiconview.cpp | 60 |
1 files changed, 34 insertions, 26 deletions
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 |