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 /kitchensync/src/configguildap.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 'kitchensync/src/configguildap.cpp')
-rw-r--r-- | kitchensync/src/configguildap.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/kitchensync/src/configguildap.cpp b/kitchensync/src/configguildap.cpp index ce4881156..3ef451c36 100644 --- a/kitchensync/src/configguildap.cpp +++ b/kitchensync/src/configguildap.cpp @@ -21,18 +21,18 @@ #include "configguildap.h" -#include <qcheckbox.h> -#include <qdom.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qspinbox.h> +#include <tqcheckbox.h> +#include <tqdom.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqspinbox.h> #include <kcombobox.h> #include <kdialog.h> #include <klineedit.h> #include <klocale.h> -ConfigGuiLdap::ConfigGuiLdap( const QSync::Member &member, QWidget *parent ) +ConfigGuiLdap::ConfigGuiLdap( const QSync::Member &member, TQWidget *parent ) : ConfigGui( member, parent ) { initGUI(); @@ -42,14 +42,14 @@ ConfigGuiLdap::ConfigGuiLdap( const QSync::Member &member, QWidget *parent ) mSearchScope->insertItem( i18n( "Sub" ) ); } -void ConfigGuiLdap::load( const QString &xml ) +void ConfigGuiLdap::load( const TQString &xml ) { - QDomDocument doc; + TQDomDocument doc; doc.setContent( xml ); - QDomElement docElement = doc.documentElement(); - QDomNode node; + TQDomElement docElement = doc.documentElement(); + TQDomNode node; for( node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if ( element.tagName() == "servername" ) { mLdapWidget->setHost( element.text() ); } else if ( element.tagName() == "serverport" ) { @@ -69,7 +69,7 @@ void ConfigGuiLdap::load( const QString &xml ) } else if ( element.tagName() == "keyattr" ) { mKeyAttribute->setText( element.text() ); } else if ( element.tagName() == "scope" ) { - QStringList list; + TQStringList list; list << "base" << "one" << "sub"; for ( uint i = 0; i < list.count(); ++i ) if ( list[ i ] == element.text() ) @@ -89,30 +89,30 @@ void ConfigGuiLdap::load( const QString &xml ) } } -QString ConfigGuiLdap::save() const +TQString ConfigGuiLdap::save() const { - QString config = "<config>\n"; - - config += QString( "<servername>%1</servername>\n" ).arg( mLdapWidget->host() ); - config += QString( "<serverport>%1</serverport>\n" ).arg( mLdapWidget->port() ); - config += QString( "<binddn>%1</binddn>\n" ).arg( mLdapWidget->bindDN() ); - config += QString( "<password>%1</password>\n" ).arg( mLdapWidget->password() ); - config += QString( "<anonymous>%1</anonymous>\n" ).arg( mLdapWidget->isAuthAnon() ? "1" : "0" ); - config += QString( "<searchbase>%1</searchbase>\n" ).arg( mLdapWidget->dn() ); - config += QString( "<searchfilter>%1</searchfilter>\n" ).arg( mLdapWidget->filter() ); - config += QString( "<storebase>%1</storebase>\n" ).arg( mLdapWidget->dn() ); - config += QString( "<keyattr>%1</keyattr>\n" ).arg( mKeyAttribute->text() ); - - QStringList scopes; + TQString config = "<config>\n"; + + config += TQString( "<servername>%1</servername>\n" ).arg( mLdapWidget->host() ); + config += TQString( "<serverport>%1</serverport>\n" ).arg( mLdapWidget->port() ); + config += TQString( "<binddn>%1</binddn>\n" ).arg( mLdapWidget->bindDN() ); + config += TQString( "<password>%1</password>\n" ).arg( mLdapWidget->password() ); + config += TQString( "<anonymous>%1</anonymous>\n" ).arg( mLdapWidget->isAuthAnon() ? "1" : "0" ); + config += TQString( "<searchbase>%1</searchbase>\n" ).arg( mLdapWidget->dn() ); + config += TQString( "<searchfilter>%1</searchfilter>\n" ).arg( mLdapWidget->filter() ); + config += TQString( "<storebase>%1</storebase>\n" ).arg( mLdapWidget->dn() ); + config += TQString( "<keyattr>%1</keyattr>\n" ).arg( mKeyAttribute->text() ); + + TQStringList scopes; scopes << "base" << "one" << "sub"; - config += QString( "<scope>%1</scope>\n" ).arg( scopes[ mSearchScope->currentItem() ] ); + config += TQString( "<scope>%1</scope>\n" ).arg( scopes[ mSearchScope->currentItem() ] ); - config += QString( "<authmech>SIMPLE</authmech>\n" ); - config += QString( "<encryption>%1</encryption>\n" ).arg( mEncryption->isChecked() ? "1" : "0" ); + config += TQString( "<authmech>SIMPLE</authmech>\n" ); + config += TQString( "<encryption>%1</encryption>\n" ).arg( mEncryption->isChecked() ? "1" : "0" ); - config += QString( "<ldap_read>%1</ldap_read>\n" ).arg( mReadLdap->isChecked() ? "1" : "0" ); - config += QString( "<ldap_write>%1</ldap_write>\n" ).arg( mWriteLdap->isChecked() ? "1" : "0" ); + config += TQString( "<ldap_read>%1</ldap_read>\n" ).arg( mReadLdap->isChecked() ? "1" : "0" ); + config += TQString( "<ldap_write>%1</ldap_write>\n" ).arg( mWriteLdap->isChecked() ? "1" : "0" ); config += "</config>"; @@ -121,7 +121,7 @@ QString ConfigGuiLdap::save() const void ConfigGuiLdap::initGUI() { - QGridLayout *layout = new QGridLayout( topLayout(), 12, 4, KDialog::spacingHint() ); + TQGridLayout *layout = new TQGridLayout( topLayout(), 12, 4, KDialog::spacingHint() ); layout->setMargin( KDialog::marginHint() ); mLdapWidget = new KABC::LdapConfigWidget( KABC::LdapConfigWidget::W_HOST | @@ -135,14 +135,14 @@ void ConfigGuiLdap::initGUI() mKeyAttribute = new KLineEdit( this ); mSearchScope = new KComboBox( this ); - mEncryption = new QCheckBox( i18n( "Use encryption" ), this ); - mReadLdap = new QCheckBox( i18n( "Load data from LDAP" ), this ); - mWriteLdap = new QCheckBox( i18n( "Save data to LDAP" ), this ); + mEncryption = new TQCheckBox( i18n( "Use encryption" ), this ); + mReadLdap = new TQCheckBox( i18n( "Load data from LDAP" ), this ); + mWriteLdap = new TQCheckBox( i18n( "Save data to LDAP" ), this ); layout->addMultiCellWidget( mLdapWidget, 0, 9, 0, 3 ); - layout->addWidget( new QLabel( i18n( "Key Attribute:" ), this ), 10, 0 ); + layout->addWidget( new TQLabel( i18n( "Key Attribute:" ), this ), 10, 0 ); layout->addMultiCellWidget( mKeyAttribute, 10, 10, 1, 2 ); - layout->addWidget( new QLabel( i18n( "Search Scope:" ), this ), 11, 0 ); + layout->addWidget( new TQLabel( i18n( "Search Scope:" ), this ), 11, 0 ); layout->addMultiCellWidget( mSearchScope, 11, 11, 1, 2 ); layout->addWidget( mEncryption, 12, 0 ); layout->addWidget( mReadLdap, 13, 0 ); |