From 47c8a359c5276062c4bc17f0e82410f29081b502 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:48:06 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/libkopete/ui/metacontactselectorwidget.cpp | 74 +++++++++++------------ 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'kopete/libkopete/ui/metacontactselectorwidget.cpp') diff --git a/kopete/libkopete/ui/metacontactselectorwidget.cpp b/kopete/libkopete/ui/metacontactselectorwidget.cpp index d9c75308..1ab6646c 100644 --- a/kopete/libkopete/ui/metacontactselectorwidget.cpp +++ b/kopete/libkopete/ui/metacontactselectorwidget.cpp @@ -15,16 +15,16 @@ ************************************************************************* */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -68,15 +68,15 @@ public: }; -MetaContactSelectorWidgetLVI::MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, QListView *parent, QObject *owner, const char *name) : Kopete::UI::ListView::Item(parent, owner, name) , d( new Private() ) +MetaContactSelectorWidgetLVI::MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, TQListView *parent, TQObject *owner, const char *name) : Kopete::UI::ListView::Item(parent, owner, name) , d( new Private() ) { d->metaContact = mc; d->photoSize = 60; - connect( d->metaContact, SIGNAL( photoChanged() ), - SLOT( slotPhotoChanged() ) ); - connect( d->metaContact, SIGNAL( displayNameChanged(const QString&, const QString&) ), - SLOT( slotDisplayNameChanged() ) ); + connect( d->metaContact, TQT_SIGNAL( photoChanged() ), + TQT_SLOT( slotPhotoChanged() ) ); + connect( d->metaContact, TQT_SIGNAL( displayNameChanged(const TQString&, const TQString&) ), + TQT_SLOT( slotDisplayNameChanged() ) ); buildVisualComponents(); } @@ -99,24 +99,24 @@ void MetaContactSelectorWidgetLVI::slotDisplayNameChanged() } } -QString MetaContactSelectorWidgetLVI::text ( int /* column */ ) const +TQString MetaContactSelectorWidgetLVI::text ( int /* column */ ) const { return d->metaContact->displayName(); } void MetaContactSelectorWidgetLVI::slotPhotoChanged() { - QPixmap photoPixmap; - QImage photoImg = d->metaContact->photo(); + TQPixmap photoPixmap; + TQImage photoImg = d->metaContact->photo(); if ( !photoImg.isNull() && (photoImg.width() > 0) && (photoImg.height() > 0) ) { int photoSize = d->photoSize; - photoImg = photoImg.smoothScale( photoSize, photoSize, QImage::ScaleMin ) ; + photoImg = photoImg.smoothScale( photoSize, photoSize, TQImage::ScaleMin ) ; // draw a 1 pixel black border photoPixmap = photoImg; - QPainter p(&photoPixmap); + TQPainter p(&photoPixmap); p.setPen(Qt::black); p.drawLine(0, 0, photoPixmap.width()-1, 0); p.drawLine(0, photoPixmap.height()-1, photoPixmap.width()-1, photoPixmap.height()-1); @@ -166,7 +166,7 @@ void MetaContactSelectorWidgetLVI::buildVisualComponents() void MetaContactSelectorWidgetLVI::slotUpdateContactBox() { - QPtrList contacts = d->metaContact->contacts(); + TQPtrList contacts = d->metaContact->contacts(); for(Kopete::Contact *c = contacts.first(); c; c = contacts.next()) { new ContactComponent(d->contactIconBox, c, IconSize( KIcon::Small )); @@ -177,37 +177,37 @@ class MetaContactSelectorWidget::Private { public: MetaContactSelectorWidget_Base *widget; - QValueList excludedMetaContacts; + TQValueList excludedMetaContacts; }; -MetaContactSelectorWidget::MetaContactSelectorWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ), d( new Private() ) +MetaContactSelectorWidget::MetaContactSelectorWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ), d( new Private() ) { - QBoxLayout *l = new QVBoxLayout(this); + TQBoxLayout *l = new TQVBoxLayout(this); d->widget = new MetaContactSelectorWidget_Base(this); l->addWidget(d->widget); - connect( d->widget->metaContactListView, SIGNAL( clicked(QListViewItem * ) ), - SIGNAL( metaContactListClicked( QListViewItem * ) ) ); - connect( d->widget->metaContactListView, SIGNAL( selectionChanged( QListViewItem * ) ), - SIGNAL( metaContactListClicked( QListViewItem * ) ) ); - connect( d->widget->metaContactListView, SIGNAL( spacePressed( QListViewItem * ) ), - SIGNAL( metaContactListClicked( QListViewItem * ) ) ); + connect( d->widget->metaContactListView, TQT_SIGNAL( clicked(TQListViewItem * ) ), + TQT_SIGNAL( metaContactListClicked( TQListViewItem * ) ) ); + connect( d->widget->metaContactListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), + TQT_SIGNAL( metaContactListClicked( TQListViewItem * ) ) ); + connect( d->widget->metaContactListView, TQT_SIGNAL( spacePressed( TQListViewItem * ) ), + TQT_SIGNAL( metaContactListClicked( TQListViewItem * ) ) ); - connect( Kopete::ContactList::self(), SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, SLOT( slotLoadMetaContacts() ) ); + connect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, TQT_SLOT( slotLoadMetaContacts() ) ); d->widget->kListViewSearchLine->setListView(d->widget->metaContactListView); d->widget->metaContactListView->setFullWidth( true ); d->widget->metaContactListView->header()->hide(); - d->widget->metaContactListView->setColumnWidthMode(0, QListView::Maximum); + d->widget->metaContactListView->setColumnWidthMode(0, TQListView::Maximum); slotLoadMetaContacts(); } MetaContactSelectorWidget::~MetaContactSelectorWidget() { - disconnect( Kopete::ContactList::self(), SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, SLOT( slotLoadMetaContacts() ) ); + disconnect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, TQT_SLOT( slotLoadMetaContacts() ) ); } @@ -225,7 +225,7 @@ Kopete::MetaContact* MetaContactSelectorWidget::metaContact() void MetaContactSelectorWidget::selectMetaContact( Kopete::MetaContact *mc ) { // iterate trough list view - QListViewItemIterator it( d->widget->metaContactListView ); + TQListViewItemIterator it( d->widget->metaContactListView ); while( it.current() ) { MetaContactSelectorWidgetLVI *item = (MetaContactSelectorWidgetLVI *) it.current(); @@ -261,7 +261,7 @@ void MetaContactSelectorWidget::slotLoadMetaContacts() { d->widget->metaContactListView->clear(); - QPtrList metaContacts = Kopete::ContactList::self()->metaContacts(); + TQPtrList metaContacts = Kopete::ContactList::self()->metaContacts(); for( Kopete::MetaContact *mc = metaContacts.first(); mc ; mc = metaContacts.next() ) { if( !mc->isTemporary() && (d->excludedMetaContacts.findIndex(mc) == -1) ) @@ -273,7 +273,7 @@ void MetaContactSelectorWidget::slotLoadMetaContacts() d->widget->metaContactListView->sort(); } -void MetaContactSelectorWidget::setLabelMessage( const QString &msg ) +void MetaContactSelectorWidget::setLabelMessage( const TQString &msg ) { d->widget->lblHeader->setText(msg); } -- cgit v1.2.3