diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/plugins/alias/aliaspreferences.cpp | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip |
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/plugins/alias/aliaspreferences.cpp')
-rw-r--r-- | kopete/plugins/alias/aliaspreferences.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/kopete/plugins/alias/aliaspreferences.cpp b/kopete/plugins/alias/aliaspreferences.cpp index a331a592..330c8d5d 100644 --- a/kopete/plugins/alias/aliaspreferences.cpp +++ b/kopete/plugins/alias/aliaspreferences.cpp @@ -32,14 +32,14 @@ typedef KGenericFactory<AliasPreferences> AliasPreferencesFactory; -class AliasItem : public QListViewItem +class AliasItem : public TQListViewItem { public: - AliasItem( TQListView *parent, + AliasItem( TQListView *tqparent, uint number, const TQString &alias, const TQString &command, const ProtocolList &p ) : - TQListViewItem( parent, alias, command ) + TQListViewItem( tqparent, alias, command ) { protocolList = p; id = number; @@ -75,13 +75,13 @@ class AliasItem : public QListViewItem if ( isSelected() && ( column == 0 || listView()->allColumnsShowFocus() ) ) { - p->fillRect( QMAX( cellWidth, r - marg ), 0, + p->fillRect( TQMAX( cellWidth, r - marg ), 0, width - cellWidth - r + marg, height(), cg.brush( TQColorGroup::Highlight ) ); if ( isEnabled() || !lv ) p->setPen( cg.highlightedText() ); else if ( !isEnabled() && lv ) - p->setPen( lv->palette().disabled().highlightedText() ); + p->setPen( lv->tqpalette().disabled().highlightedText() ); } // And last, draw the online status icons @@ -98,17 +98,17 @@ class AliasItem : public QListViewItem } else { - // Use Qt's own drawing + // Use TQt's own drawing TQListViewItem::paintCell( p, cg, column, width, align ); } } }; -class ProtocolItem : public QListViewItem +class ProtocolItem : public TQListViewItem { public: - ProtocolItem( TQListView *parent, KPluginInfo *p ) : - TQListViewItem( parent, p->name() ) + ProtocolItem( TQListView *tqparent, KPluginInfo *p ) : + TQListViewItem( tqparent, p->name() ) { this->setPixmap( 0, SmallIcon( p->icon() ) ); id = p->pluginName(); @@ -119,8 +119,8 @@ class ProtocolItem : public QListViewItem K_EXPORT_COMPONENT_FACTORY( kcm_kopete_alias, AliasPreferencesFactory( "kcm_kopete_alias" ) ) -AliasPreferences::AliasPreferences( TQWidget *parent, const char *, const TQStringList &args ) - : KCModule( AliasPreferencesFactory::instance(), parent, args ) +AliasPreferences::AliasPreferences( TQWidget *tqparent, const char *, const TQStringList &args ) + : KCModule( AliasPreferencesFactory::instance(), tqparent, args ) { ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new AliasDialogBase( this ); @@ -204,14 +204,14 @@ void AliasPreferences::slotPluginLoaded( Kopete::Plugin *plugin ) { if( *it2 == protocol->pluginId() ) { - QPair<Kopete::Protocol*, TQString> pr( protocol, *it ); - if( protocolMap.find( pr ) == protocolMap.end() ) + TQPair<Kopete::Protocol*, TQString> pr( protocol, *it ); + if( protocolMap.tqfind( pr ) == protocolMap.end() ) { Kopete::CommandHandler::commandHandler()->registerAlias( protocol, *it, aliasCommand, - TQString::fromLatin1("Custom alias for %1").arg(aliasCommand), + TQString::tqfromLatin1("Custom alias for %1").tqarg(aliasCommand), Kopete::CommandHandler::UserAlias ); @@ -221,7 +221,7 @@ void AliasPreferences::slotPluginLoaded( Kopete::Plugin *plugin ) if( item ) { item->protocolList.append( protocol ); - item->repaint(); + item->tqrepaint(); } else { @@ -241,8 +241,8 @@ void AliasPreferences::slotPluginLoaded( Kopete::Plugin *plugin ) void AliasPreferences::save() { KConfig *config = KGlobal::config(); - config->deleteGroup( TQString::fromLatin1("AliasPlugin") ); - config->setGroup( TQString::fromLatin1("AliasPlugin") ); + config->deleteGroup( TQString::tqfromLatin1("AliasPlugin") ); + config->setGroup( TQString::tqfromLatin1("AliasPlugin") ); TQStringList aliases; AliasItem *item = (AliasItem*)preferencesDialog->aliasList->firstChild(); @@ -271,11 +271,11 @@ void AliasPreferences::save() void AliasPreferences::addAlias( TQString &alias, TQString &command, const ProtocolList &p, uint id ) { - TQRegExp spaces( TQString::fromLatin1("\\s+") ); + TQRegExp spaces( TQString::tqfromLatin1("\\s+") ); - if( alias.startsWith( TQString::fromLatin1("/") ) ) + if( alias.startsWith( TQString::tqfromLatin1("/") ) ) alias = alias.section( '/', 1 ); - if( command.startsWith( TQString::fromLatin1("/") ) ) + if( command.startsWith( TQString::tqfromLatin1("/") ) ) command = command.section( '/', 1 ); if( id == 0 ) @@ -309,13 +309,13 @@ void AliasPreferences::addAlias( TQString &alias, TQString &command, const Proto *it, alias, command, - TQString::fromLatin1("Custom alias for %1").arg(command), + TQString::tqfromLatin1("Custom alias for %1").tqarg(command), Kopete::CommandHandler::UserAlias, 0, argc ); - protocolMap.insert( QPair<Kopete::Protocol*,TQString>( *it, alias ), true ); + protocolMap.insert( TQPair<Kopete::Protocol*,TQString>( *it, alias ), true ); } } @@ -328,14 +328,14 @@ void AliasPreferences::slotAddAlias() if( addDialog.exec() == TQDialog::Accepted ) { TQString alias = addDialog.alias->text(); - if( alias.startsWith( TQString::fromLatin1("/") ) ) + if( alias.startsWith( TQString::tqfromLatin1("/") ) ) alias = alias.section( '/', 1 ); - if( alias.contains( TQRegExp("[_=]") ) ) + if( alias.tqcontains( TQRegExp("[_=]") ) ) { KMessageBox::error( this, i18n("<qt>Could not add alias <b>%1</b>. An" " alias name cannot contain the characters \"_\" or \"=\"." - "</qt>").arg(alias),i18n("Invalid Alias Name") ); + "</qt>").tqarg(alias),i18n("Invalid Alias Name") ); } else { @@ -353,7 +353,7 @@ void AliasPreferences::slotAddAlias() { KMessageBox::error( this, i18n("<qt>Could not add alias <b>%1</b>. This " "command is already being handled by either another alias or " - "Kopete itself.</qt>").arg(alias), i18n("Could Not Add Alias") ); + "Kopete itself.</qt>").tqarg(alias), i18n("Could Not Add Alias") ); return; } } @@ -418,13 +418,13 @@ void AliasPreferences::slotEditAlias() if( editDialog.exec() == TQDialog::Accepted ) { TQString alias = editDialog.alias->text(); - if( alias.startsWith( TQString::fromLatin1("/") ) ) + if( alias.startsWith( TQString::tqfromLatin1("/") ) ) alias = alias.section( '/', 1 ); - if( alias.contains( TQRegExp("[_=]") ) ) + if( alias.tqcontains( TQRegExp("[_=]") ) ) { KMessageBox::error( this, i18n("<qt>Could not add alias <b>%1</b>. An" " alias name cannot contain the characters \"_\" or \"=\"." - "</qt>").arg(alias),i18n("Invalid Alias Name") ); + "</qt>").tqarg(alias),i18n("Invalid Alias Name") ); } else { @@ -449,7 +449,7 @@ void AliasPreferences::slotEditAlias() { KMessageBox::error( this, i18n("<qt>Could not add alias <b>%1</b>. This " "command is already being handled by either another alias or " - "Kopete itself.</qt>").arg(alias), i18n("Could Not Add Alias") ); + "Kopete itself.</qt>").tqarg(alias), i18n("Could Not Add Alias") ); return; } } @@ -479,7 +479,7 @@ void AliasPreferences::slotDeleteAliases() i->text(0) ); - protocolMap.erase( QPair<Kopete::Protocol*,TQString>( *it, i->text(0) ) ); + protocolMap.erase( TQPair<Kopete::Protocol*,TQString>( *it, i->text(0) ) ); } aliasMap.erase( i->text(0) ); |