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/conf/dirservconfigpage.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/conf/dirservconfigpage.cpp')
-rw-r--r-- | certmanager/conf/dirservconfigpage.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/certmanager/conf/dirservconfigpage.cpp b/certmanager/conf/dirservconfigpage.cpp index 7711ca2e2..73fad674a 100644 --- a/certmanager/conf/dirservconfigpage.cpp +++ b/certmanager/conf/dirservconfigpage.cpp @@ -41,11 +41,11 @@ #include <knuminput.h> #include <kdialog.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qdatetimeedit.h> -#include <qcheckbox.h> -#include <qlayout.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqdatetimeedit.h> +#include <tqcheckbox.h> +#include <tqlayout.h> #include <kdepimmacros.h> @@ -65,25 +65,25 @@ public: // stolen from kabc/ldapclient.cpp const uint numHosts = mConfig.readUnsignedNumEntry( "NumSelectedHosts" ); for ( uint j = 0; j < numHosts; j++ ) { - const QString num = QString::number( j ); + const TQString num = TQString::number( j ); KURL url; url.setProtocol( "ldap" ); url.setPath( "/" ); // workaround KURL parsing bug - const QString host = mConfig.readEntry( QString( "SelectedHost" ) + num ).stripWhiteSpace(); + const TQString host = mConfig.readEntry( TQString( "SelectedHost" ) + num ).stripWhiteSpace(); url.setHost( host ); - const int port = mConfig.readUnsignedNumEntry( QString( "SelectedPort" ) + num ); + const int port = mConfig.readUnsignedNumEntry( TQString( "SelectedPort" ) + num ); if ( port != 0 ) url.setPort( port ); - const QString base = mConfig.readEntry( QString( "SelectedBase" ) + num ).stripWhiteSpace(); + const TQString base = mConfig.readEntry( TQString( "SelectedBase" ) + num ).stripWhiteSpace(); url.setQuery( base ); - const QString bindDN = mConfig.readEntry( QString( "SelectedBind" ) + num ).stripWhiteSpace(); + const TQString bindDN = mConfig.readEntry( TQString( "SelectedBind" ) + num ).stripWhiteSpace(); url.setUser( bindDN ); - const QString pwdBindDN = mConfig.readEntry( QString( "SelectedPwdBind" ) + num ).stripWhiteSpace(); + const TQString pwdBindDN = mConfig.readEntry( TQString( "SelectedPwdBind" ) + num ).stripWhiteSpace(); url.setPass( pwdBindDN ); lst.append( url ); } @@ -98,19 +98,19 @@ public: KURL::List::const_iterator end = lst.end(); unsigned j = 0; for( ; it != end; ++it, ++j ) { - const QString num = QString::number( j ); + const TQString num = TQString::number( j ); KURL url = *it; Q_ASSERT( url.protocol() == "ldap" ); - mConfig.writeEntry( QString( "SelectedHost" ) + num, url.host() ); - mConfig.writeEntry( QString( "SelectedPort" ) + num, url.port() ); + mConfig.writeEntry( TQString( "SelectedHost" ) + num, url.host() ); + mConfig.writeEntry( TQString( "SelectedPort" ) + num, url.port() ); // KURL automatically encoded the query (e.g. for spaces inside it), // so decode it before writing it out - const QString base = KURL::decode_string( url.query().mid(1) ); - mConfig.writeEntry( QString( "SelectedBase" ) + num, base ); - mConfig.writeEntry( QString( "SelectedBind" ) + num, url.user() ); - mConfig.writeEntry( QString( "SelectedPwdBind" ) + num, url.pass() ); + const TQString base = KURL::decode_string( url.query().mid(1) ); + mConfig.writeEntry( TQString( "SelectedBase" ) + num, base ); + mConfig.writeEntry( TQString( "SelectedBind" ) + num, url.user() ); + mConfig.writeEntry( TQString( "SelectedPwdBind" ) + num, url.pass() ); } mConfig.sync(); } @@ -137,43 +137,43 @@ static const char s_addnewservers_componentName[] = "dirmngr"; static const char s_addnewservers_groupName[] = "LDAP"; static const char s_addnewservers_entryName[] = "add-servers"; -DirectoryServicesConfigurationPage::DirectoryServicesConfigurationPage( QWidget * parent, const char * name ) +DirectoryServicesConfigurationPage::DirectoryServicesConfigurationPage( TQWidget * parent, const char * name ) : KCModule( parent, name ) { mConfig = Kleo::CryptoBackendFactory::instance()->config(); - QVBoxLayout* lay = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + TQVBoxLayout* lay = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); Kleo::CryptoConfigEntry* entry = configEntry( s_dirserv_componentName, s_dirserv_groupName, s_dirserv_entryName, Kleo::CryptoConfigEntry::ArgType_LDAPURL, true ); mWidget = new Kleo::DirectoryServicesWidget( entry, this ); lay->addWidget( mWidget ); - connect( mWidget, SIGNAL( changed() ), this, SLOT( slotChanged() ) ); + connect( mWidget, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); // LDAP timeout - QHBox* box = new QHBox( this ); + TQHBox* box = new TQHBox( this ); box->setSpacing( KDialog::spacingHint() ); lay->addWidget( box ); - QLabel* label = new QLabel( i18n( "LDAP &timeout (minutes:seconds)" ), box ); + TQLabel* label = new TQLabel( i18n( "LDAP &timeout (minutes:seconds)" ), box ); mTimeout = new QTimeEdit( box ); mTimeout->setDisplay( QTimeEdit::Minutes | QTimeEdit::Seconds ); - connect( mTimeout, SIGNAL( valueChanged( const QTime& ) ), this, SLOT( slotChanged() ) ); + connect( mTimeout, TQT_SIGNAL( valueChanged( const TQTime& ) ), this, TQT_SLOT( slotChanged() ) ); label->setBuddy( mTimeout ); - QWidget* stretch = new QWidget( box ); + TQWidget* stretch = new TQWidget( box ); box->setStretchFactor( stretch, 2 ); // Max number of items returned by queries - box = new QHBox( this ); + box = new TQHBox( this ); box->setSpacing( KDialog::spacingHint() ); lay->addWidget( box ); mMaxItems = new KIntNumInput( box ); mMaxItems->setLabel( i18n( "&Maximum number of items returned by query" ), Qt::AlignLeft | Qt::AlignVCenter ); mMaxItems->setMinValue( 0 ); - connect( mMaxItems, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) ); - stretch = new QWidget( box ); + connect( mMaxItems, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotChanged() ) ); + stretch = new TQWidget( box ); box->setStretchFactor( stretch, 2 ); #ifdef NOT_USEFUL_CURRENTLY - mAddNewServersCB = new QCheckBox( i18n( "Automatically add &new servers discovered in CRL distribution points" ), this ); - connect( mAddNewServersCB, SIGNAL( clicked() ), this, SLOT( slotChanged() ) ); + mAddNewServersCB = new TQCheckBox( i18n( "Automatically add &new servers discovered in CRL distribution points" ), this ); + connect( mAddNewServersCB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotChanged() ) ); lay->addWidget( mAddNewServersCB ); #endif @@ -188,7 +188,7 @@ void DirectoryServicesConfigurationPage::load() mTimeoutConfigEntry = configEntry( s_timeout_componentName, s_timeout_groupName, s_timeout_entryName, Kleo::CryptoConfigEntry::ArgType_UInt, false ); if ( mTimeoutConfigEntry ) { - QTime time = QTime().addSecs( mTimeoutConfigEntry->uintValue() ); + TQTime time = TQTime().addSecs( mTimeoutConfigEntry->uintValue() ); //kdDebug() << "timeout:" << mTimeoutConfigEntry->uintValue() << " -> " << time << endl; mTimeout->setTime( time ); } @@ -212,7 +212,7 @@ void DirectoryServicesConfigurationPage::save() { mWidget->save(); - QTime time( mTimeout->time() ); + TQTime time( mTimeout->time() ); unsigned int timeout = time.minute() * 60 + time.second(); if ( mTimeoutConfigEntry && mTimeoutConfigEntry->uintValue() != timeout ) mTimeoutConfigEntry->setUIntValue( timeout ); @@ -259,7 +259,7 @@ void DirectoryServicesConfigurationPage::defaults() extern "C" { - KDE_EXPORT KCModule *create_kleopatra_config_dirserv( QWidget *parent, const char * ) + KDE_EXPORT KCModule *create_kleopatra_config_dirserv( TQWidget *parent, const char * ) { DirectoryServicesConfigurationPage *page = new DirectoryServicesConfigurationPage( parent, "kleopatra_config_dirserv" ); |