diff options
Diffstat (limited to 'kaddressbook/views/kaddressbookiconview.cpp')
-rw-r--r-- | kaddressbook/views/kaddressbookiconview.cpp | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/kaddressbook/views/kaddressbookiconview.cpp b/kaddressbook/views/kaddressbookiconview.cpp index b5d706cad..6d02acf73 100644 --- a/kaddressbook/views/kaddressbookiconview.cpp +++ b/kaddressbook/views/kaddressbookiconview.cpp @@ -21,10 +21,10 @@ without including the source code for Qt in the source distribution. */ -#include <qapplication.h> -#include <qiconview.h> -#include <qlayout.h> -#include <qstringlist.h> +#include <tqapplication.h> +#include <tqiconview.h> +#include <tqlayout.h> +#include <tqstringlist.h> #include <kabc/addressbook.h> #include <kabc/addressee.h> @@ -42,14 +42,14 @@ class IconViewFactory : public ViewFactory { public: - KAddressBookView *view( KAB::Core *core, QWidget *parent, const char *name ) + KAddressBookView *view( KAB::Core *core, TQWidget *parent, const char *name ) { return new KAddressBookIconView( core, parent, name ); } - QString type() const { return I18N_NOOP( "Icon" ); } + TQString type() const { return I18N_NOOP( "Icon" ); } - QString description() const { return i18n( "Icons represent contacts. Very simple view." ); } + TQString description() const { return i18n( "Icons represent contacts. Very simple view." ); } }; extern "C" { @@ -59,31 +59,31 @@ extern "C" { } } -AddresseeIconView::AddresseeIconView( QWidget *parent, const char *name ) +AddresseeIconView::AddresseeIconView( TQWidget *parent, const char *name ) : KIconView( parent, name ) { - setSelectionMode( QIconView::Extended ); - setResizeMode( QIconView::Adjust ); + setSelectionMode( TQIconView::Extended ); + setResizeMode( TQIconView::Adjust ); setWordWrapIconText( true ); setGridX( 100 ); setItemsMovable( false ); setSorting( true, true ); setMode( KIconView::Select ); - connect( this, SIGNAL( dropped( QDropEvent*, const QValueList<QIconDragItem>& ) ), - this, SLOT( itemDropped( QDropEvent*, const QValueList<QIconDragItem>& ) ) ); + connect( this, TQT_SIGNAL( dropped( TQDropEvent*, const TQValueList<TQIconDragItem>& ) ), + this, TQT_SLOT( itemDropped( TQDropEvent*, const TQValueList<TQIconDragItem>& ) ) ); } AddresseeIconView::~AddresseeIconView() { } -void AddresseeIconView::itemDropped( QDropEvent *event, const QValueList<QIconDragItem>& ) +void AddresseeIconView::itemDropped( TQDropEvent *event, const TQValueList<TQIconDragItem>& ) { emit addresseeDropped( event ); } -QDragObject *AddresseeIconView::dragObject() +TQDragObject *AddresseeIconView::dragObject() { emit startAddresseeDrag(); @@ -96,7 +96,7 @@ class AddresseeIconViewItem : public KIconViewItem { public: AddresseeIconViewItem( const KABC::Field::List&, KABC::AddressBook *doc, - const KABC::Addressee &addr, QIconView *parent ) + const KABC::Addressee &addr, TQIconView *parent ) : KIconViewItem( parent ), mDocument( doc ), mAddressee( addr ) { refresh(); @@ -111,14 +111,14 @@ class AddresseeIconViewItem : public KIconViewItem if ( !mAddressee.isEmpty() ) setText( mAddressee.givenName() + " " + mAddressee.familyName() ); - QPixmap icon; - QPixmap defaultIcon( KGlobal::iconLoader()->loadIcon( "vcard", KIcon::Desktop ) ); + TQPixmap icon; + TQPixmap defaultIcon( KGlobal::iconLoader()->loadIcon( "vcard", KIcon::Desktop ) ); KABC::Picture pic = mAddressee.photo(); if ( pic.data().isNull() ) pic = mAddressee.logo(); if ( pic.isIntern() && !pic.data().isNull() ) { - QImage img = pic.data(); + TQImage img = pic.data(); if ( img.width() > img.height() ) icon = img.scaleWidth( 32 ); else @@ -136,25 +136,25 @@ class AddresseeIconViewItem : public KIconViewItem KAddressBookIconView::KAddressBookIconView( KAB::Core *core, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : KAddressBookView( core, parent, name ) { - QVBoxLayout *layout = new QVBoxLayout( viewWidget() ); + TQVBoxLayout *layout = new TQVBoxLayout( viewWidget() ); mIconView = new AddresseeIconView( viewWidget(), "mIconView" ); layout->addWidget( mIconView ); // Connect up the signals - connect( mIconView, SIGNAL( executed( QIconViewItem* ) ), - this, SLOT( addresseeExecuted( QIconViewItem* ) ) ); - connect( mIconView, SIGNAL( selectionChanged() ), - this, SLOT( addresseeSelected() ) ); - connect( mIconView, SIGNAL( addresseeDropped( QDropEvent* ) ), - this, SIGNAL( dropped( QDropEvent* ) ) ); - connect( mIconView, SIGNAL( startAddresseeDrag() ), - this, SIGNAL( startDrag() ) ); - connect( mIconView, SIGNAL( contextMenuRequested( QIconViewItem*, const QPoint& ) ), - this, SLOT( rmbClicked( QIconViewItem*, const QPoint& ) ) ); + connect( mIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ), + this, TQT_SLOT( addresseeExecuted( TQIconViewItem* ) ) ); + connect( mIconView, TQT_SIGNAL( selectionChanged() ), + this, TQT_SLOT( addresseeSelected() ) ); + connect( mIconView, TQT_SIGNAL( addresseeDropped( TQDropEvent* ) ), + this, TQT_SIGNAL( dropped( TQDropEvent* ) ) ); + connect( mIconView, TQT_SIGNAL( startAddresseeDrag() ), + this, TQT_SIGNAL( startDrag() ) ); + connect( mIconView, TQT_SIGNAL( contextMenuRequested( TQIconViewItem*, const TQPoint& ) ), + this, TQT_SLOT( rmbClicked( TQIconViewItem*, const TQPoint& ) ) ); } KAddressBookIconView::~KAddressBookIconView() @@ -171,21 +171,21 @@ void KAddressBookIconView::readConfig( KConfig *config ) { KAddressBookView::readConfig( config ); - disconnect( mIconView, SIGNAL( executed( QIconViewItem* ) ), - this, SLOT( addresseeExecuted( QIconViewItem* ) ) ); + disconnect( mIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ), + this, TQT_SLOT( addresseeExecuted( TQIconViewItem* ) ) ); if ( KABPrefs::instance()->honorSingleClick() ) - connect( mIconView, SIGNAL( executed( QIconViewItem* ) ), - this, SLOT( addresseeExecuted( QIconViewItem* ) ) ); + connect( mIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ), + this, TQT_SLOT( addresseeExecuted( TQIconViewItem* ) ) ); else - connect( mIconView, SIGNAL( doubleClicked( QIconViewItem* ) ), - this, SLOT( addresseeExecuted( QIconViewItem* ) ) ); + connect( mIconView, TQT_SIGNAL( doubleClicked( TQIconViewItem* ) ), + this, TQT_SLOT( addresseeExecuted( TQIconViewItem* ) ) ); } -QStringList KAddressBookIconView::selectedUids() +TQStringList KAddressBookIconView::selectedUids() { - QStringList uidList; - QIconViewItem *item; + TQStringList uidList; + TQIconViewItem *item; AddresseeIconViewItem *aItem; for ( item = mIconView->firstItem(); item; item = item->nextItem() ) { @@ -199,9 +199,9 @@ QStringList KAddressBookIconView::selectedUids() return uidList; } -void KAddressBookIconView::refresh( const QString &uid ) +void KAddressBookIconView::refresh( const TQString &uid ) { - QIconViewItem *item; + TQIconViewItem *item; AddresseeIconViewItem *aItem; if ( uid.isEmpty() ) { @@ -233,13 +233,13 @@ void KAddressBookIconView::refresh( const QString &uid ) } } - refresh( QString::null ); + refresh( TQString::null ); } } -void KAddressBookIconView::setSelected( const QString &uid, bool selected ) +void KAddressBookIconView::setSelected( const TQString &uid, bool selected ) { - QIconViewItem *item; + TQIconViewItem *item; AddresseeIconViewItem *aItem; if ( uid.isEmpty() ) { @@ -266,7 +266,7 @@ void KAddressBookIconView::setFirstSelected( bool selected ) } } -void KAddressBookIconView::addresseeExecuted( QIconViewItem *item ) +void KAddressBookIconView::addresseeExecuted( TQIconViewItem *item ) { AddresseeIconViewItem *aItem = dynamic_cast<AddresseeIconViewItem*>( item ); @@ -276,7 +276,7 @@ void KAddressBookIconView::addresseeExecuted( QIconViewItem *item ) void KAddressBookIconView::addresseeSelected() { - QIconViewItem *item; + TQIconViewItem *item; AddresseeIconViewItem *aItem; bool found = false; @@ -291,22 +291,22 @@ void KAddressBookIconView::addresseeSelected() } if ( !found ) - emit selected( QString::null ); + emit selected( TQString::null ); } -void KAddressBookIconView::rmbClicked( QIconViewItem*, const QPoint &point ) +void KAddressBookIconView::rmbClicked( TQIconViewItem*, const TQPoint &point ) { popup( point ); } void KAddressBookIconView::scrollUp() { - QApplication::postEvent( mIconView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Up, 0, 0 ) ); + TQApplication::postEvent( mIconView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Up, 0, 0 ) ); } void KAddressBookIconView::scrollDown() { - QApplication::postEvent( mIconView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Down, 0, 0 ) ); + TQApplication::postEvent( mIconView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Down, 0, 0 ) ); } #include "kaddressbookiconview.moc" |