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/configguisyncmlhttp.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/configguisyncmlhttp.cpp')
-rw-r--r-- | kitchensync/src/configguisyncmlhttp.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/kitchensync/src/configguisyncmlhttp.cpp b/kitchensync/src/configguisyncmlhttp.cpp index 63a073c90..26a8c2241 100644 --- a/kitchensync/src/configguisyncmlhttp.cpp +++ b/kitchensync/src/configguisyncmlhttp.cpp @@ -27,46 +27,46 @@ #include <klocale.h> #include <kurlrequester.h> -#include <qcheckbox.h> -#include <qdom.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qspinbox.h> -#include <qtabwidget.h> -#include <qvbox.h> - -ConfigGuiSyncmlHttp::ConfigGuiSyncmlHttp( const QSync::Member &member, QWidget *parent ) +#include <tqcheckbox.h> +#include <tqdom.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqspinbox.h> +#include <tqtabwidget.h> +#include <tqvbox.h> + +ConfigGuiSyncmlHttp::ConfigGuiSyncmlHttp( const QSync::Member &member, TQWidget *parent ) : ConfigGui( member, parent ), mUrl( 0 ), mPort( 0 ) { - QTabWidget *tabWidget = new QTabWidget( this ); + TQTabWidget *tabWidget = new TQTabWidget( this ); topLayout()->addWidget( tabWidget ); // Connection - QWidget *connectionWidget = new QWidget( tabWidget ); - QVBoxLayout *connectionLayout = new QVBoxLayout( connectionWidget, + TQWidget *connectionWidget = new TQWidget( tabWidget ); + TQVBoxLayout *connectionLayout = new TQVBoxLayout( connectionWidget, KDialog::marginHint(), KDialog::spacingHint() ); tabWidget->addTab( connectionWidget, i18n( "Connection" ) ); - mGridLayout = new QGridLayout( connectionLayout ); + mGridLayout = new TQGridLayout( connectionLayout ); - QLabel *label = new QLabel( i18n("Port:"), connectionWidget ); + TQLabel *label = new TQLabel( i18n("Port:"), connectionWidget ); mGridLayout->addWidget( label, 0, 0 ); - mPort = new QSpinBox( connectionWidget ); + mPort = new TQSpinBox( connectionWidget ); mPort->setMinValue( 1 ); mPort->setMaxValue( 65536 ); mGridLayout->addWidget( mPort, 0, 1 ); // Database - QWidget *databaseWidget = new QWidget( tabWidget ); - QVBoxLayout *databaseLayout = new QVBoxLayout( databaseWidget, + TQWidget *databaseWidget = new TQWidget( tabWidget ); + TQVBoxLayout *databaseLayout = new TQVBoxLayout( databaseWidget, KDialog::marginHint(), KDialog::spacingHint() ); tabWidget->addTab( databaseWidget, i18n( "Databases" ) ); - mGridLayout = new QGridLayout( databaseLayout ); + mGridLayout = new TQGridLayout( databaseLayout ); addLineEdit( databaseWidget, i18n("Contact Database:"), &mContactDb, 0 ); addLineEdit( databaseWidget, i18n("Calendar Database:"), &mCalendarDb, 1 ); addLineEdit( databaseWidget, i18n("Note Database:"), &mNoteDb, 2 ); @@ -81,55 +81,55 @@ ConfigGuiSyncmlHttp::ConfigGuiSyncmlHttp( const QSync::Member &member, QWidget * // Options - QWidget *optionWidget = new QWidget( tabWidget ); - QVBoxLayout *optionLayout = new QVBoxLayout( optionWidget, + TQWidget *optionWidget = new TQWidget( tabWidget ); + TQVBoxLayout *optionLayout = new TQVBoxLayout( optionWidget, KDialog::marginHint(), KDialog::spacingHint() ); tabWidget->addTab( optionWidget, i18n( "Options" ) ); - mGridLayout = new QGridLayout( optionLayout ); + mGridLayout = new TQGridLayout( optionLayout ); - label = new QLabel( i18n("User name:"), optionWidget ); + label = new TQLabel( i18n("User name:"), optionWidget ); mGridLayout->addWidget( label, 0, 0 ); mUsername = new KLineEdit( optionWidget ); mGridLayout->addWidget( mUsername, 0, 1 ); - label = new QLabel( i18n("Password:"), optionWidget ); + label = new TQLabel( i18n("Password:"), optionWidget ); mGridLayout->addWidget( label, 1, 0 ); mPassword = new KLineEdit( optionWidget ); - mPassword->setEchoMode( QLineEdit::Password ); + mPassword->setEchoMode( TQLineEdit::Password ); mGridLayout->addWidget( mPassword, 1, 1 ); - mUseStringTable = new QCheckBox( i18n("Use String Table"), optionWidget ); + mUseStringTable = new TQCheckBox( i18n("Use String Table"), optionWidget ); mGridLayout->addMultiCellWidget( mUseStringTable, 2, 2, 0, 1 ); - mOnlyReplace = new QCheckBox( i18n("Only Replace Entries"), optionWidget ); + mOnlyReplace = new TQCheckBox( i18n("Only Replace Entries"), optionWidget ); mGridLayout->addMultiCellWidget( mOnlyReplace, 3, 3, 0, 1 ); // Url - label = new QLabel( i18n("URL:"), optionWidget ); + label = new TQLabel( i18n("URL:"), optionWidget ); mGridLayout->addWidget( label, 4, 0 ); mUrl = new KLineEdit( optionWidget ); mGridLayout->addWidget( mUrl, 4, 1 ); // recvLimit - label = new QLabel( i18n("Receive Limit:"), optionWidget ); + label = new TQLabel( i18n("Receive Limit:"), optionWidget ); mGridLayout->addWidget( label, 5, 0 ); - mRecvLimit = new QSpinBox( optionWidget ); + mRecvLimit = new TQSpinBox( optionWidget ); mRecvLimit->setMinValue( 1 ); mRecvLimit->setMaxValue( 65536 ); mGridLayout->addWidget( mRecvLimit, 5, 1 ); // maxObjSize - label = new QLabel( i18n("Maximum Object Size"), optionWidget ); + label = new TQLabel( i18n("Maximum Object Size"), optionWidget ); mGridLayout->addWidget( label, 6, 0 ); - mMaxObjSize = new QSpinBox( optionWidget ); + mMaxObjSize = new TQSpinBox( optionWidget ); mMaxObjSize->setMinValue( 1 ); mMaxObjSize->setMaxValue( 65536 ); mGridLayout->addWidget( mMaxObjSize, 6, 1 ); @@ -137,25 +137,25 @@ ConfigGuiSyncmlHttp::ConfigGuiSyncmlHttp( const QSync::Member &member, QWidget * topLayout()->addStretch( 1 ); } -void ConfigGuiSyncmlHttp::addLineEdit( QWidget *parent, const QString &text, KComboBox **edit, int row ) +void ConfigGuiSyncmlHttp::addLineEdit( TQWidget *parent, const TQString &text, KComboBox **edit, int row ) { - QLabel *label = new QLabel( text, parent); + TQLabel *label = new TQLabel( text, parent); mGridLayout->addWidget( label, row, 0 ); *edit = new KComboBox( true, parent ); mGridLayout->addWidget( *edit, row, 1 ); } -void ConfigGuiSyncmlHttp::load( const QString &xml ) +void ConfigGuiSyncmlHttp::load( const TQString &xml ) { - QDomDocument document; + TQDomDocument document; document.setContent( xml ); - QDomElement docElement = document.documentElement(); - QDomNode node; + TQDomElement docElement = document.documentElement(); + TQDomNode node; for ( node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if ( element.tagName() == "username" ) { mUsername->setText( element.text() ); } else if ( element.tagName() == "password" ) { @@ -186,20 +186,20 @@ void ConfigGuiSyncmlHttp::load( const QString &xml ) } } -QString ConfigGuiSyncmlHttp::save() const +TQString ConfigGuiSyncmlHttp::save() const { - QString xml; + TQString xml; xml = "<config>\n"; xml += "<username>" + mUsername->text() + "</username>\n"; xml += "<password>" + mPassword->text() + "</password>\n"; xml += "<url>" + mUrl->text() + "</url>\n"; - xml += "<port>" + QString::number( mPort->value() ) + "</port>\n"; + xml += "<port>" + TQString::number( mPort->value() ) + "</port>\n"; // Receive Limit - xml += "<recvLimit>" + QString::number( mRecvLimit->value() ) + "</recvLimit>\n"; + xml += "<recvLimit>" + TQString::number( mRecvLimit->value() ) + "</recvLimit>\n"; // Maximal Object Size - xml += "<maxObjSize>" + QString::number( mMaxObjSize->value() ) + "</maxObjSize>\n"; + xml += "<maxObjSize>" + TQString::number( mMaxObjSize->value() ) + "</maxObjSize>\n"; xml += "<usestringtable>"; if ( mUseStringTable->isChecked() ) |