diff options
Diffstat (limited to 'kopete/protocols/jabber/ui/dlgjabbervcard.cpp')
-rw-r--r-- | kopete/protocols/jabber/ui/dlgjabbervcard.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/kopete/protocols/jabber/ui/dlgjabbervcard.cpp b/kopete/protocols/jabber/ui/dlgjabbervcard.cpp index b35e091a..19070798 100644 --- a/kopete/protocols/jabber/ui/dlgjabbervcard.cpp +++ b/kopete/protocols/jabber/ui/dlgjabbervcard.cpp @@ -23,10 +23,10 @@ #include "dlgjabbervcard.h" // Qt includes -#include <qtextedit.h> -#include <qwidgetstack.h> -#include <qregexp.h> -#include <qbuffer.h> +#include <tqtextedit.h> +#include <tqwidgetstack.h> +#include <tqregexp.h> +#include <tqbuffer.h> // KDE includes #include <kdebug.h> @@ -60,7 +60,7 @@ * name 'name' * */ -dlgJabberVCard::dlgJabberVCard (JabberAccount *account, JabberBaseContact *contact, QWidget * parent, const char *name) +dlgJabberVCard::dlgJabberVCard (JabberAccount *account, JabberBaseContact *contact, TQWidget * parent, const char *name) : KDialogBase (parent, name, false, i18n("Jabber vCard"), Close | User1 | User2, Close, false, i18n("&Save User Info"), i18n("&Fetch vCard") ) { @@ -70,14 +70,14 @@ dlgJabberVCard::dlgJabberVCard (JabberAccount *account, JabberBaseContact *conta m_mainWidget = new dlgVCard(this); setMainWidget(m_mainWidget); - connect (this, SIGNAL (user1Clicked()), this, SLOT (slotSaveVCard ())); - connect (this, SIGNAL( user2Clicked()), this, SLOT (slotGetVCard ())); + connect (this, TQT_SIGNAL (user1Clicked()), this, TQT_SLOT (slotSaveVCard ())); + connect (this, TQT_SIGNAL( user2Clicked()), this, TQT_SLOT (slotGetVCard ())); - connect (m_mainWidget->btnSelectPhoto, SIGNAL (clicked()), this, SLOT (slotSelectPhoto())); - connect (m_mainWidget->btnClearPhoto, SIGNAL (clicked()), this, SLOT (slotClearPhoto())); - connect (m_mainWidget->urlHomeEmail, SIGNAL (leftClickedURL(const QString &)), this, SLOT (slotOpenURL (const QString &))); - connect (m_mainWidget->urlWorkEmail, SIGNAL (leftClickedURL(const QString &)), this, SLOT (slotOpenURL (const QString &))); - connect (m_mainWidget->urlHomepage, SIGNAL (leftClickedURL(const QString &)), this, SLOT (slotOpenURL (const QString &))); + connect (m_mainWidget->btnSelectPhoto, TQT_SIGNAL (clicked()), this, TQT_SLOT (slotSelectPhoto())); + connect (m_mainWidget->btnClearPhoto, TQT_SIGNAL (clicked()), this, TQT_SLOT (slotClearPhoto())); + connect (m_mainWidget->urlHomeEmail, TQT_SIGNAL (leftClickedURL(const TQString &)), this, TQT_SLOT (slotOpenURL (const TQString &))); + connect (m_mainWidget->urlWorkEmail, TQT_SIGNAL (leftClickedURL(const TQString &)), this, TQT_SLOT (slotOpenURL (const TQString &))); + connect (m_mainWidget->urlHomepage, TQT_SIGNAL (leftClickedURL(const TQString &)), this, TQT_SLOT (slotOpenURL (const TQString &))); assignContactProperties(); @@ -120,7 +120,7 @@ void dlgJabberVCard::assignContactProperties () m_mainWidget->leBirthday->setText (m_contact->property(m_account->protocol()->propBirthday).value().toString()); m_mainWidget->leTimezone->setText (m_contact->property(m_account->protocol()->propTimezone).value().toString()); - QString homepage = m_contact->property(m_account->protocol()->propHomepage).value().toString(); + TQString homepage = m_contact->property(m_account->protocol()->propHomepage).value().toString(); m_mainWidget->leHomepage->setText (homepage); m_mainWidget->urlHomepage->setText (homepage); m_mainWidget->urlHomepage->setURL (homepage); @@ -130,7 +130,7 @@ void dlgJabberVCard::assignContactProperties () m_photoPath = m_contact->property(m_account->protocol()->propPhoto).value().toString(); if( !m_photoPath.isEmpty() ) { - m_mainWidget->lblPhoto->setPixmap( QPixmap(m_photoPath) ); + m_mainWidget->lblPhoto->setPixmap( TQPixmap(m_photoPath) ); } // addresses @@ -152,8 +152,8 @@ void dlgJabberVCard::assignContactProperties () m_mainWidget->urlWorkEmail->setUseCursor ( false ); m_mainWidget->urlHomeEmail->setUseCursor ( false ); - QString workEmail = m_contact->property(m_account->protocol()->propWorkEmailAddress).value().toString(); - QString homeEmail = m_contact->property(m_account->protocol()->propEmailAddress).value().toString(); + TQString workEmail = m_contact->property(m_account->protocol()->propWorkEmailAddress).value().toString(); + TQString homeEmail = m_contact->property(m_account->protocol()->propEmailAddress).value().toString(); m_mainWidget->leWorkEmail->setText (workEmail); m_mainWidget->urlWorkEmail->setText (workEmail); m_mainWidget->urlWorkEmail->setURL ("mailto:" + workEmail); @@ -358,7 +358,7 @@ void dlgJabberVCard::slotSaveVCard() // work information tab XMPP::VCard::Org org; org.name = m_mainWidget->leCompany->text(); - org.unit = QStringList::split(",", m_mainWidget->leDepartment->text()); + org.unit = TQStringList::split(",", m_mainWidget->leDepartment->text()); vCard.setOrg(org); vCard.setTitle( m_mainWidget->lePosition->text() ); vCard.setRole( m_mainWidget->leRole->text() ); @@ -393,10 +393,10 @@ void dlgJabberVCard::slotSaveVCard() // Set contact photo as a binary value (if he has set a photo) if( !m_photoPath.isEmpty() ) { - QString photoPath = m_photoPath; - QImage image( photoPath ); - QByteArray ba; - QBuffer buffer( ba ); + TQString photoPath = m_photoPath; + TQImage image( photoPath ); + TQByteArray ba; + TQBuffer buffer( ba ); buffer.open( IO_WriteOnly ); image.save( &buffer, "PNG" ); vCard.setPhoto( ba ); @@ -407,7 +407,7 @@ void dlgJabberVCard::slotSaveVCard() XMPP::JT_VCard *task = new XMPP::JT_VCard( m_account->client()->rootTask() ); // signal to ourselves when the vCard data arrived - QObject::connect(task, SIGNAL(finished()), this, SLOT(slotVCardSaved())); + TQObject::connect(task, TQT_SIGNAL(finished()), this, TQT_SLOT(slotVCardSaved())); task->set(vCard); task->go(true); } @@ -438,7 +438,7 @@ void dlgJabberVCard::slotGetVCard() XMPP::JT_VCard *task = new XMPP::JT_VCard ( m_account->client()->rootTask() ); // signal to ourselves when the vCard data arrived - QObject::connect( task, SIGNAL ( finished () ), this, SLOT ( slotGotVCard () ) ); + TQObject::connect( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotGotVCard () ) ); task->get ( m_contact->rosterItem().jid().full() ); task->go ( true ); } @@ -467,9 +467,9 @@ void dlgJabberVCard::slotGotVCard() void dlgJabberVCard::slotSelectPhoto() { - QString path; + TQString path; bool remoteFile = false; - KURL filePath = KFileDialog::getImageOpenURL( QString::null, this, i18n( "Jabber Photo" ) ); + KURL filePath = KFileDialog::getImageOpenURL( TQString::null, this, i18n( "Jabber Photo" ) ); if( filePath.isEmpty() ) return; @@ -485,15 +485,15 @@ void dlgJabberVCard::slotSelectPhoto() else path = filePath.path(); - QImage img( path ); - img = KPixmapRegionSelectorDialog::getSelectedImage( QPixmap(img), 96, 96, this ); + TQImage img( path ); + img = KPixmapRegionSelectorDialog::getSelectedImage( TQPixmap(img), 96, 96, this ); if( !img.isNull() ) { if(img.width() > 96 || img.height() > 96) { // Scale and crop the picture. - img = img.smoothScale( 96, 96, QImage::ScaleMin ); + img = img.smoothScale( 96, 96, TQImage::ScaleMin ); // crop image if not square if(img.width() < img.height()) img = img.copy((img.width()-img.height())/2, 0, 96, 96); @@ -504,7 +504,7 @@ void dlgJabberVCard::slotSelectPhoto() else if (img.width() < 32 || img.height() < 32) { // Scale and crop the picture. - img = img.smoothScale( 32, 32, QImage::ScaleMin ); + img = img.smoothScale( 32, 32, TQImage::ScaleMin ); // crop image if not square if(img.width() < img.height()) img = img.copy((img.width()-img.height())/2, 0, 32, 32); @@ -520,14 +520,14 @@ void dlgJabberVCard::slotSelectPhoto() img = img.copy(0, (img.height()-img.width())/2, img.height(), img.height()); } - m_photoPath = locateLocal("appdata", "jabberphotos/" + m_contact->rosterItem().jid().full().lower().replace(QRegExp("[./~]"),"-") +".png"); + m_photoPath = locateLocal("appdata", "jabberphotos/" + m_contact->rosterItem().jid().full().lower().replace(TQRegExp("[./~]"),"-") +".png"); if( img.save(m_photoPath, "PNG") ) { - m_mainWidget->lblPhoto->setPixmap( QPixmap(img) ); + m_mainWidget->lblPhoto->setPixmap( TQPixmap(img) ); } else { - m_photoPath = QString::null; + m_photoPath = TQString::null; } } else @@ -541,13 +541,13 @@ void dlgJabberVCard::slotSelectPhoto() void dlgJabberVCard::slotClearPhoto() { - m_mainWidget->lblPhoto->setPixmap( QPixmap() ); - m_photoPath = QString::null; + m_mainWidget->lblPhoto->setPixmap( TQPixmap() ); + m_photoPath = TQString::null; } -void dlgJabberVCard::slotOpenURL(const QString &url) +void dlgJabberVCard::slotOpenURL(const TQString &url) { - if ( !url.isEmpty () || (url == QString::fromLatin1("mailto:") ) ) + if ( !url.isEmpty () || (url == TQString::fromLatin1("mailto:") ) ) new KRun(KURL( url ) ); } |