summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/msn/ui/msneditaccountwidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/msn/ui/msneditaccountwidget.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/msn/ui/msneditaccountwidget.cpp')
-rw-r--r--kopete/protocols/msn/ui/msneditaccountwidget.cpp90
1 files changed, 45 insertions, 45 deletions
diff --git a/kopete/protocols/msn/ui/msneditaccountwidget.cpp b/kopete/protocols/msn/ui/msneditaccountwidget.cpp
index 1829f41d..baa4fb60 100644
--- a/kopete/protocols/msn/ui/msneditaccountwidget.cpp
+++ b/kopete/protocols/msn/ui/msneditaccountwidget.cpp
@@ -18,16 +18,16 @@
#include "msneditaccountwidget.h"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qspinbox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqspinbox.h>
#include <kcombobox.h>
#include <kautoconfig.h>
@@ -61,18 +61,18 @@ public:
KAutoConfig *autoConfig;
MSNEditAccountUI *ui;
- QString pictureUrl;
- QImage pictureData;
+ TQString pictureUrl;
+ TQImage pictureData;
};
-MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account *account, QWidget *parent, const char * /* name */ )
-: QWidget( parent ), KopeteEditAccountWidget( account )
+MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account *account, TQWidget *parent, const char * /* name */ )
+: TQWidget( parent ), KopeteEditAccountWidget( account )
{
d = new MSNEditAccountWidgetPrivate;
d->protocol=proto;
- ( new QVBoxLayout( this, 0, 0 ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this, 0, 0 ) )->setAutoAdd( true );
d->ui = new MSNEditAccountUI( this );
@@ -85,9 +85,9 @@ MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account
//Get a list of all jabber accounts
KGlobal::config()->setGroup("MSN");
- QString jab_account=KGlobal::config()->readEntry("JabberAccount");
+ TQString jab_account=KGlobal::config()->readEntry("JabberAccount");
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
for(Kopete::Account *a=accounts.first() ; a; a=accounts.next() )
{
if(a->protocol()->pluginId()=="JabberProtocol")
@@ -146,20 +146,20 @@ MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account
d->ui->m_serverName->setText( m_account->serverName() );
d->ui->m_serverPort->setValue( m_account->serverPort() );
- QStringList blockList = config->readListEntry( "blockList" );
- QStringList allowList = config->readListEntry( "allowList" );
- //QStringList reverseList = config->readListEntry("reverseList" );
+ TQStringList blockList = config->readListEntry( "blockList" );
+ TQStringList allowList = config->readListEntry( "allowList" );
+ //TQStringList reverseList = config->readListEntry("reverseList" );
- for ( QStringList::Iterator it = blockList.begin(); it != blockList.end(); ++it )
+ for ( TQStringList::Iterator it = blockList.begin(); it != blockList.end(); ++it )
d->ui->m_BL->insertItem( *it );
- for ( QStringList::Iterator it = allowList.begin(); it != allowList.end(); ++it )
+ for ( TQStringList::Iterator it = allowList.begin(); it != allowList.end(); ++it )
d->ui->m_AL->insertItem( *it );
d->ui->m_blp->setChecked( config->readEntry( "BLP" ) == "BL" );
d->pictureUrl = locateLocal( "appdata", "msnpicture-" +
- account->accountId().lower().replace( QRegExp("[./~]" ), "-" ) + ".png" );
+ account->accountId().lower().replace( TQRegExp("[./~]" ), "-" ) + ".png" );
d->ui->m_displayPicture->setPixmap( d->pictureUrl );
d->ui->m_useDisplayPicture->setChecked( config->readBoolEntry( "exportCustomPicture" ));
@@ -174,14 +174,14 @@ MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account
d->ui->m_phones->setDisabled( true );
}
- connect( d->ui->m_allowButton, SIGNAL( clicked() ), this, SLOT( slotAllow() ) );
- connect( d->ui->m_blockButton, SIGNAL( clicked() ), this, SLOT( slotBlock() ) );
- connect( d->ui->m_selectImage, SIGNAL( clicked() ), this, SLOT( slotSelectImage() ) );
- connect( d->ui->m_RLButton, SIGNAL( clicked() ), this, SLOT( slotShowReverseList() ) );
- connect( d->ui->buttonRegister, SIGNAL(clicked()), this, SLOT(slotOpenRegister()));
- QWidget::setTabOrder( d->ui->m_login, d->ui->m_password->mRemembered );
- QWidget::setTabOrder( d->ui->m_password->mRemembered, d->ui->m_password->mPassword );
- QWidget::setTabOrder( d->ui->m_password->mPassword, d->ui->m_autologin );
+ connect( d->ui->m_allowButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAllow() ) );
+ connect( d->ui->m_blockButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBlock() ) );
+ connect( d->ui->m_selectImage, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSelectImage() ) );
+ connect( d->ui->m_RLButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotShowReverseList() ) );
+ connect( d->ui->buttonRegister, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpenRegister()));
+ TQWidget::setTabOrder( d->ui->m_login, d->ui->m_password->mRemembered );
+ TQWidget::setTabOrder( d->ui->m_password->mRemembered, d->ui->m_password->mPassword );
+ TQWidget::setTabOrder( d->ui->m_password->mPassword, d->ui->m_autologin );
}
MSNEditAccountWidget::~MSNEditAccountWidget()
@@ -227,7 +227,7 @@ Kopete::Account * MSNEditAccountWidget::apply()
if( d->ui->m_useDisplayPicture->isChecked() && !d->pictureData.isNull() )
{
d->pictureUrl = locateLocal( "appdata", "msnpicture-" +
- account()->accountId().lower().replace( QRegExp("[./~]" ), "-" ) + ".png" );
+ account()->accountId().lower().replace( TQRegExp("[./~]" ), "-" ) + ".png" );
if ( d->pictureData.save( d->pictureUrl, "PNG" ) )
{
static_cast<MSNAccount *>( account() )->setPictureUrl( d->pictureUrl );
@@ -270,7 +270,7 @@ Kopete::Account * MSNEditAccountWidget::apply()
bool MSNEditAccountWidget::validateData()
{
- QString userid = d->ui->m_login->text();
+ TQString userid = d->ui->m_login->text();
if ( MSNProtocol::validContactId( userid ) )
return true;
@@ -282,16 +282,16 @@ bool MSNEditAccountWidget::validateData()
void MSNEditAccountWidget::slotAllow()
{
//TODO: play with multiple selection
- QListBoxItem *item = d->ui->m_BL->selectedItem();
+ TQListBoxItem *item = d->ui->m_BL->selectedItem();
if ( !item )
return;
- QString handle = item->text();
+ TQString handle = item->text();
MSNNotifySocket *notify = static_cast<MSNAccount *>( account() )->notifySocket();
if ( !notify )
return;
- notify->removeContact( handle, MSNProtocol::BL, QString::null, QString::null );
+ notify->removeContact( handle, MSNProtocol::BL, TQString::null, TQString::null );
d->ui->m_BL->takeItem( item );
d->ui->m_AL->insertItem( item );
@@ -300,17 +300,17 @@ void MSNEditAccountWidget::slotAllow()
void MSNEditAccountWidget::slotBlock()
{
//TODO: play with multiple selection
- QListBoxItem *item = d->ui->m_AL->selectedItem();
+ TQListBoxItem *item = d->ui->m_AL->selectedItem();
if ( !item )
return;
- QString handle = item->text();
+ TQString handle = item->text();
MSNNotifySocket *notify = static_cast<MSNAccount *>( account() )->notifySocket();
if ( !notify )
return;
- notify->removeContact( handle, MSNProtocol::AL, QString::null, QString::null );
+ notify->removeContact( handle, MSNProtocol::AL, TQString::null, TQString::null );
d->ui->m_AL->takeItem( item );
d->ui->m_BL->insertItem( item );
@@ -318,16 +318,16 @@ void MSNEditAccountWidget::slotBlock()
void MSNEditAccountWidget::slotShowReverseList()
{
- QStringList reverseList = account()->configGroup()->readListEntry( "reverseList" );
+ TQStringList reverseList = account()->configGroup()->readListEntry( "reverseList" );
KMessageBox::informationList( this, i18n( "Here you can see a list of contacts who added you to their contact list" ), reverseList,
i18n( "Reverse List - MSN Plugin" ) );
}
void MSNEditAccountWidget::slotSelectImage()
{
- QString path = 0;
+ TQString path = 0;
bool remoteFile = false;
- KURL filePath = KFileDialog::getImageOpenURL( QString::null, this, i18n( "MSN Display Picture" ) );
+ KURL filePath = KFileDialog::getImageOpenURL( TQString::null, this, i18n( "MSN Display Picture" ) );
if( filePath.isEmpty() )
return;
@@ -340,14 +340,14 @@ void MSNEditAccountWidget::slotSelectImage()
}
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())
{
img = MSNProtocol::protocol()->scalePicture(img);
- d->ui->m_displayPicture->setPixmap( QPixmap(img) );
+ d->ui->m_displayPicture->setPixmap( TQPixmap(img) );
d->pictureData = img;
}
else