summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/irc/ui/irceditaccountwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/irc/ui/irceditaccountwidget.cpp')
-rw-r--r--kopete/protocols/irc/ui/irceditaccountwidget.cpp116
1 files changed, 58 insertions, 58 deletions
diff --git a/kopete/protocols/irc/ui/irceditaccountwidget.cpp b/kopete/protocols/irc/ui/irceditaccountwidget.cpp
index 4a1e6ed3..06e2f166 100644
--- a/kopete/protocols/irc/ui/irceditaccountwidget.cpp
+++ b/kopete/protocols/irc/ui/irceditaccountwidget.cpp
@@ -36,17 +36,17 @@
#include <kglobal.h>
#include <kcharsets.h>
-#include <qlabel.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qconnection.h>
-#include <qvalidator.h>
-#include <qcombobox.h>
-#include <qlistbox.h>
-#include <qlineedit.h>
-
-IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident, QWidget *parent, const char * )
+#include <tqlabel.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqconnection.h>
+#include <tqvalidator.h>
+#include <tqcombobox.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
+
+IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident, TQWidget *parent, const char * )
: IRCEditAccountBase(parent), KopeteEditAccountWidget(ident)
{
mProtocol = proto;
@@ -56,8 +56,8 @@ IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident
if( account() )
{
- QString nickName = account()->mySelf()->nickName();
- QString serverInfo = account()->accountId();
+ TQString nickName = account()->mySelf()->nickName();
+ TQString serverInfo = account()->accountId();
mNickName->setText( nickName );
mAltNickname->setText( account()->altNick() );
@@ -82,23 +82,23 @@ IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident
informationReplies->setCurrentItem( config->readNumEntry( "InformationReplies", IRCAccount::ActiveWindow ) - 1 );
errorMessages->setCurrentItem( config->readNumEntry( "ErrorMessages", IRCAccount::ActiveWindow ) - 1 );
- QStringList cmds = account()->connectCommands();
- for( QStringList::Iterator i = cmds.begin(); i != cmds.end(); ++i )
- new QListViewItem( commandList, *i );
+ TQStringList cmds = account()->connectCommands();
+ for( TQStringList::Iterator i = cmds.begin(); i != cmds.end(); ++i )
+ new TQListViewItem( commandList, *i );
- const QMap< QString, QString > replies = account()->customCtcpReplies();
- for( QMap< QString, QString >::ConstIterator it = replies.begin(); it != replies.end(); ++it )
- new QListViewItem( ctcpList, it.key(), it.data() );
+ const TQMap< TQString, TQString > replies = account()->customCtcpReplies();
+ for( TQMap< TQString, TQString >::ConstIterator it = replies.begin(); it != replies.end(); ++it )
+ new TQListViewItem( ctcpList, it.key(), it.data() );
}
- mUserName->setValidator( new QRegExpValidator( QString::fromLatin1("^[^\\s]*$"), mUserName ) );
- mNickName->setValidator( new QRegExpValidator( QString::fromLatin1("^[^#+&][^\\s]*$"), mNickName ) );
- mAltNickname->setValidator( new QRegExpValidator( QString::fromLatin1("^[^#+&][^\\s]*$"), mAltNickname ) );
+ mUserName->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[^\\s]*$"), mUserName ) );
+ mNickName->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[^#+&][^\\s]*$"), mNickName ) );
+ mAltNickname->setValidator( new TQRegExpValidator( TQString::fromLatin1("^[^#+&][^\\s]*$"), mAltNickname ) );
charset->insertStringList( KCodecAction::supportedEncodings() );
for (int i = 0; i < charset->count(); ++i) {
- QString encoding = KGlobal::charsets()->encodingForName(charset->text(i));
+ TQString encoding = KGlobal::charsets()->encodingForName(charset->text(i));
if (KGlobal::charsets()->codecForName(encoding)->mibEnum() == currentCodec) {
charset->setCurrentItem( i );
@@ -106,23 +106,23 @@ IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident
}
}
- connect( commandList, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ),
- this, SLOT( slotCommandContextMenu( KListView *, QListViewItem *, const QPoint & ) ) );
+ connect( commandList, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ),
+ this, TQT_SLOT( slotCommandContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) );
- connect( ctcpList, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ),
- this, SLOT( slotCtcpContextMenu( KListView *, QListViewItem *, const QPoint & ) ) );
+ connect( ctcpList, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ),
+ this, TQT_SLOT( slotCtcpContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) );
- connect( addButton, SIGNAL( clicked() ), this, SLOT( slotAddCommand() ) );
- connect( editButton, SIGNAL( clicked() ), this, SLOT(slotEditNetworks() ) );
- connect( addReply, SIGNAL( clicked() ), this, SLOT( slotAddCtcp() ) );
+ connect( addButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddCommand() ) );
+ connect( editButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT(slotEditNetworks() ) );
+ connect( addReply, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddCtcp() ) );
- connect( network, SIGNAL( activated( const QString & ) ),
- this, SLOT( slotUpdateNetworkDescription( const QString &) ) );
+ connect( network, TQT_SIGNAL( activated( const TQString & ) ),
+ this, TQT_SLOT( slotUpdateNetworkDescription( const TQString &) ) );
- connect( IRCProtocol::protocol(), SIGNAL( networkConfigUpdated( const QString & ) ),
- this, SLOT( slotUpdateNetworks( const QString & ) ) );
+ connect( IRCProtocol::protocol(), TQT_SIGNAL( networkConfigUpdated( const TQString & ) ),
+ this, TQT_SLOT( slotUpdateNetworks( const TQString & ) ) );
- slotUpdateNetworks( QString::null );
+ slotUpdateNetworks( TQString::null );
}
IRCEditAccountWidget::~IRCEditAccountWidget()
@@ -134,19 +134,19 @@ IRCAccount *IRCEditAccountWidget::account ()
return dynamic_cast<IRCAccount *>(KopeteEditAccountWidget::account () );
}
-void IRCEditAccountWidget::slotUpdateNetworks( const QString & selectedNetwork )
+void IRCEditAccountWidget::slotUpdateNetworks( const TQString & selectedNetwork )
{
network->clear();
uint i = 0;
- QStringList keys;
- for( QDictIterator<IRCNetwork> it( IRCProtocol::protocol()->networks() ); it.current(); ++it )
+ TQStringList keys;
+ for( TQDictIterator<IRCNetwork> it( IRCProtocol::protocol()->networks() ); it.current(); ++it )
keys.append( it.currentKey() );
keys.sort();
- QStringList::Iterator end = keys.end();
- for( QStringList::Iterator it = keys.begin(); it != end; ++it )
+ TQStringList::Iterator end = keys.end();
+ for( TQStringList::Iterator it = keys.begin(); it != end; ++it )
{
IRCNetwork * current = IRCProtocol::protocol()->networks()[*it];
network->insertItem( current->name );
@@ -164,24 +164,24 @@ void IRCEditAccountWidget::slotEditNetworks()
IRCProtocol::protocol()->editNetworks( network->currentText() );
}
-void IRCEditAccountWidget::slotUpdateNetworkDescription( const QString &network )
+void IRCEditAccountWidget::slotUpdateNetworkDescription( const TQString &network )
{
description->setText(
IRCProtocol::protocol()->networks()[ network ]->description
);
}
-void IRCEditAccountWidget::slotCommandContextMenu( KListView *, QListViewItem *item, const QPoint &p )
+void IRCEditAccountWidget::slotCommandContextMenu( KListView *, TQListViewItem *item, const TQPoint &p )
{
- QPopupMenu popup;
+ TQPopupMenu popup;
popup.insertItem( i18n("Remove Command"), 1 );
if( popup.exec( p ) == 1 )
delete item;
}
-void IRCEditAccountWidget::slotCtcpContextMenu( KListView *, QListViewItem *item, const QPoint &p )
+void IRCEditAccountWidget::slotCtcpContextMenu( KListView *, TQListViewItem *item, const TQPoint &p )
{
- QPopupMenu popup;
+ TQPopupMenu popup;
popup.insertItem( i18n("Remove CTCP Reply"), 1 );
if( popup.exec( p ) == 1 )
delete item;
@@ -191,7 +191,7 @@ void IRCEditAccountWidget::slotAddCommand()
{
if ( !commandEdit->text().isEmpty() )
{
- new QListViewItem( commandList, commandEdit->text() );
+ new TQListViewItem( commandList, commandEdit->text() );
commandEdit->clear();
}
}
@@ -200,21 +200,21 @@ void IRCEditAccountWidget::slotAddCtcp()
{
if ( !newCTCP->text().isEmpty() && !newReply->text().isEmpty() )
{
- new QListViewItem( ctcpList, newCTCP->text(), newReply->text() );
+ new TQListViewItem( ctcpList, newCTCP->text(), newReply->text() );
newCTCP->clear();
newReply->clear();
}
}
-QString IRCEditAccountWidget::generateAccountId( const QString &network )
+TQString IRCEditAccountWidget::generateAccountId( const TQString &network )
{
KConfig *config = KGlobal::config();
- QString nextId = network;
+ TQString nextId = network;
uint accountNumber = 1;
- while( config->hasGroup( QString("Account_%1_%2").arg( m_protocol->pluginId() ).arg( nextId ) ) )
+ while( config->hasGroup( TQString("Account_%1_%2").arg( m_protocol->pluginId() ).arg( nextId ) ) )
{
- nextId = QString::fromLatin1("%1_%2").arg( network ).arg( ++accountNumber );
+ nextId = TQString::fromLatin1("%1_%2").arg( network ).arg( ++accountNumber );
}
kdDebug( 14120 ) << k_funcinfo << " ID IS: " << nextId << endl;
return nextId;
@@ -222,12 +222,12 @@ QString IRCEditAccountWidget::generateAccountId( const QString &network )
Kopete::Account *IRCEditAccountWidget::apply()
{
- QString nickName = mNickName->text();
- QString networkName = network->currentText();
+ TQString nickName = mNickName->text();
+ TQString networkName = network->currentText();
if( !account() )
{
- setAccount( new IRCAccount( mProtocol, generateAccountId(networkName), QString::null, networkName, nickName ) );
+ setAccount( new IRCAccount( mProtocol, generateAccountId(networkName), TQString::null, networkName, nickName ) );
}
else
@@ -251,12 +251,12 @@ Kopete::Account *IRCEditAccountWidget::apply()
account()->configGroup()->writeEntry("PreferSSL", preferSSL->isChecked());
- QStringList cmds;
- for( QListViewItem *i = commandList->firstChild(); i; i = i->nextSibling() )
+ TQStringList cmds;
+ for( TQListViewItem *i = commandList->firstChild(); i; i = i->nextSibling() )
cmds.append( i->text(0) );
- QMap< QString, QString > replies;
- for( QListViewItem *i = ctcpList->firstChild(); i; i = i->nextSibling() )
+ TQMap< TQString, TQString > replies;
+ for( TQListViewItem *i = ctcpList->firstChild(); i; i = i->nextSibling() )
replies[ i->text(0) ] = i->text(1);
account()->setCustomCtcpReplies( replies );