diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /certmanager/lib/ui/directoryserviceswidget.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'certmanager/lib/ui/directoryserviceswidget.cpp')
-rw-r--r-- | certmanager/lib/ui/directoryserviceswidget.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/certmanager/lib/ui/directoryserviceswidget.cpp b/certmanager/lib/ui/directoryserviceswidget.cpp index 76c1b3dda..0b9dd91f2 100644 --- a/certmanager/lib/ui/directoryserviceswidget.cpp +++ b/certmanager/lib/ui/directoryserviceswidget.cpp @@ -41,38 +41,38 @@ #include <kiconloader.h> #include <kdebug.h> -#include <qbuttongroup.h> -#include <qtoolbutton.h> -#include <qlistview.h> -#include <qpushbutton.h> +#include <tqbuttongroup.h> +#include <tqtoolbutton.h> +#include <tqlistview.h> +#include <tqpushbutton.h> using namespace Kleo; class QX500ListViewItem : public QListViewItem { public: - QX500ListViewItem( QListView* lv, QListViewItem* prev, - const QString& serverName, - const QString& portNumber, - const QString& dn, - const QString& username, - const QString& password ) - : QListViewItem( lv, prev, serverName, portNumber, dn, username ) { + QX500ListViewItem( TQListView* lv, TQListViewItem* prev, + const TQString& serverName, + const TQString& portNumber, + const TQString& dn, + const TQString& username, + const TQString& password ) + : TQListViewItem( lv, prev, serverName, portNumber, dn, username ) { setPassword( password ); } - void setPassword( const QString& pass ) { + void setPassword( const TQString& pass ) { mPassword = pass; - setText( 4, pass.isEmpty() ? QString::null : QString::fromLatin1( "******" ) ); + setText( 4, pass.isEmpty() ? TQString::null : TQString::fromLatin1( "******" ) ); } - const QString& password() const { return mPassword; } + const TQString& password() const { return mPassword; } - void setData( const QString& serverName, - const QString& portNumber, - const QString& dn, - const QString& username, - const QString& password ) { + void setData( const TQString& serverName, + const TQString& portNumber, + const TQString& dn, + const TQString& username, + const TQString& password ) { setText( 0, serverName ); setText( 1, portNumber ); setText( 2, dn ); @@ -87,12 +87,12 @@ public: } private: - QString mPassword; + TQString mPassword; }; Kleo::DirectoryServicesWidget::DirectoryServicesWidget( Kleo::CryptoConfigEntry* configEntry, - QWidget* parent, const char* name, WFlags fl ) + TQWidget* parent, const char* name, WFlags fl ) : DirectoryServicesWidgetBase( parent, name, fl ), mConfigEntry( configEntry ) { @@ -132,7 +132,7 @@ void DirectoryServicesWidget::enableDisable( CryptPlugWrapper* cryptPlug ) // un /* * protected slot, connected to selectionChanged() */ -void DirectoryServicesWidget::slotServiceChanged( QListViewItem* item ) +void DirectoryServicesWidget::slotServiceChanged( TQListViewItem* item ) { if( item ) removeServicePB->setEnabled( true ); @@ -146,17 +146,17 @@ void DirectoryServicesWidget::slotServiceChanged( QListViewItem* item ) /* * protected slot, connected to returnPressed/doubleClicked */ -void DirectoryServicesWidget::slotServiceSelected( QListViewItem* item ) +void DirectoryServicesWidget::slotServiceSelected( TQListViewItem* item ) { AddDirectoryServiceDialogImpl* dlg = new AddDirectoryServiceDialogImpl( this ); dlg->serverNameED->setText( item->text( 0 ) ); dlg->portED->setText( item->text( 1 ) ); dlg->descriptionED->setText( item->text( 2 ) ); dlg->usernameED->setText( item->text( 3 ) ); - QString pass = static_cast<QX500ListViewItem *>( item )->password(); + TQString pass = static_cast<QX500ListViewItem *>( item )->password(); dlg->passwordED->setText( pass ); - if( dlg->exec() == QDialog::Accepted ) { + if( dlg->exec() == TQDialog::Accepted ) { item->setText( 0, dlg->serverNameED->text() ); item->setText( 1, dlg->portED->text() ); item->setText( 2, dlg->descriptionED->text() ); @@ -174,7 +174,7 @@ void DirectoryServicesWidget::slotServiceSelected( QListViewItem* item ) void DirectoryServicesWidget::slotAddService() { AddDirectoryServiceDialogImpl* dlg = new AddDirectoryServiceDialogImpl( this ); - if( dlg->exec() == QDialog::Accepted ) { + if( dlg->exec() == TQDialog::Accepted ) { QX500ListViewItem *item = new QX500ListViewItem( x500LV, x500LV->lastItem(), dlg->serverNameED->text(), dlg->portED->text(), @@ -192,7 +192,7 @@ void DirectoryServicesWidget::slotAddService() */ void DirectoryServicesWidget::slotDeleteService() { - QListViewItem* item = x500LV->selectedItem(); + TQListViewItem* item = x500LV->selectedItem(); Q_ASSERT( item ); if( !item ) return; @@ -210,10 +210,10 @@ void DirectoryServicesWidget::setInitialServices( const KURL::List& urls ) { x500LV->clear(); for( KURL::List::const_iterator it = urls.begin(); it != urls.end(); ++it ) { - QString dn = KURL::decode_string( (*it).query().mid( 1 ) ); // decode query and skip leading '?' + TQString dn = KURL::decode_string( (*it).query().mid( 1 ) ); // decode query and skip leading '?' (void)new QX500ListViewItem( x500LV, x500LV->lastItem(), (*it).host(), - QString::number( (*it).port() ), + TQString::number( (*it).port() ), dn, (*it).user(), (*it).pass()); @@ -223,9 +223,9 @@ void DirectoryServicesWidget::setInitialServices( const KURL::List& urls ) KURL::List DirectoryServicesWidget::urlList() const { KURL::List lst; - QListViewItemIterator it( x500LV ); + TQListViewItemIterator it( x500LV ); for ( ; it.current() ; ++it ) { - QListViewItem* item = it.current(); + TQListViewItem* item = it.current(); KURL url; url.setProtocol( "ldap" ); url.setHost( item->text( 0 ) ); @@ -272,11 +272,11 @@ void DirectoryServicesWidget::defaults() static void swapItems( QX500ListViewItem *item, QX500ListViewItem *other ) { - QString serverName = item->text( 0 ); - QString portNumber = item->text( 1 ); - QString dn = item->text( 2 ); - QString username = item->text( 3 ); - QString password = item->password(); + TQString serverName = item->text( 0 ); + TQString portNumber = item->text( 1 ); + TQString dn = item->text( 2 ); + TQString username = item->text( 3 ); + TQString password = item->password(); item->copyItem( other ); other->setData( serverName, portNumber, dn, username, password ); } |