From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kitchensync/src/configguisyncmlobex.cpp | 94 ++++++++++++++++----------------- 1 file changed, 47 insertions(+), 47 deletions(-) (limited to 'kitchensync/src/configguisyncmlobex.cpp') diff --git a/kitchensync/src/configguisyncmlobex.cpp b/kitchensync/src/configguisyncmlobex.cpp index 488a0d944..372cf9261 100644 --- a/kitchensync/src/configguisyncmlobex.cpp +++ b/kitchensync/src/configguisyncmlobex.cpp @@ -28,23 +28,23 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include - -ConfigGuiSyncmlObex::ConfigGuiSyncmlObex( const QSync::Member &member, QWidget *parent ) +#include +#include +#include +#include +#include +#include +#include +#include + +ConfigGuiSyncmlObex::ConfigGuiSyncmlObex( const QSync::Member &member, TQWidget *parent ) : ConfigGui( member, parent ) { - QTabWidget *tabWidget = new QTabWidget( this ); + TQTabWidget *tabWidget = new TQTabWidget( this ); topLayout()->addWidget( tabWidget ); // Connection - QVBox *connectionWidget = new QVBox( this ); + TQVBox *connectionWidget = new TQVBox( this ); connectionWidget->setMargin( KDialog::marginHint() ); connectionWidget->setSpacing( 5 ); @@ -52,8 +52,8 @@ ConfigGuiSyncmlObex::ConfigGuiSyncmlObex( const QSync::Member &member, QWidget * mConnection = new KComboBox( connectionWidget ); - connect( mConnection, SIGNAL (activated( int ) ), - this, SLOT( slotConnectionChanged ( int ) ) ); + connect( mConnection, TQT_SIGNAL (activated( int ) ), + this, TQT_SLOT( slotConnectionChanged ( int ) ) ); mConnectionTypes.append( ConnectionType( 2, i18n( "Bluetooth" ) ) ); mConnectionTypes.append( ConnectionType( 5, i18n( "USB" ) ) ); @@ -72,13 +72,13 @@ ConfigGuiSyncmlObex::ConfigGuiSyncmlObex( const QSync::Member &member, QWidget * connectionWidget->setStretchFactor( mUsb, 1 ); // Databases - 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 ); @@ -92,38 +92,38 @@ ConfigGuiSyncmlObex::ConfigGuiSyncmlObex( const QSync::Member &member, QWidget * mNoteDb->insertItem( "notes" ); // Options - QWidget *optionsWidget = new QWidget( tabWidget ); - QVBoxLayout *optionsLayout = new QVBoxLayout( optionsWidget, + TQWidget *optionsWidget = new TQWidget( tabWidget ); + TQVBoxLayout *optionsLayout = new TQVBoxLayout( optionsWidget, KDialog::marginHint(), KDialog::spacingHint() ); tabWidget->addTab( optionsWidget, i18n( "Options" ) ); - mGridLayout = new QGridLayout( optionsLayout ); + mGridLayout = new TQGridLayout( optionsLayout ); - QLabel *label = new QLabel( i18n("User name:"), optionsWidget ); + TQLabel *label = new TQLabel( i18n("User name:"), optionsWidget ); mGridLayout->addWidget( label, 0, 0 ); mUsername = new KLineEdit( optionsWidget ); mGridLayout->addWidget( mUsername, 0, 1 ); - label = new QLabel( i18n("Password:"), optionsWidget ); + label = new TQLabel( i18n("Password:"), optionsWidget ); mGridLayout->addWidget( label, 1, 0 ); mPassword = new KLineEdit( optionsWidget ); - mPassword->setEchoMode( QLineEdit::Password ); + mPassword->setEchoMode( TQLineEdit::Password ); mGridLayout->addWidget( mPassword, 1, 1 ); - mUseStringTable = new QCheckBox( i18n("Use String Table"), optionsWidget ); + mUseStringTable = new TQCheckBox( i18n("Use String Table"), optionsWidget ); mGridLayout->addMultiCellWidget( mUseStringTable, 2, 2, 0, 1 ); - mOnlyReplace = new QCheckBox( i18n("Only Replace Entries"), optionsWidget ); + mOnlyReplace = new TQCheckBox( i18n("Only Replace Entries"), optionsWidget ); mGridLayout->addMultiCellWidget( mOnlyReplace, 3, 3, 0, 1 ); // SynML Version - label = new QLabel( i18n("SyncML Version:"), optionsWidget ); + label = new TQLabel( i18n("SyncML Version:"), optionsWidget ); mGridLayout->addWidget( label, 4, 0 ); - mSyncmlVersion = new QComboBox( optionsWidget ); + mSyncmlVersion = new TQComboBox( optionsWidget ); mGridLayout->addWidget( mSyncmlVersion, 4, 1 ); mSyncmlVersions.append( SyncmlVersion( 0, i18n( "1.0" ) ) ); @@ -135,11 +135,11 @@ ConfigGuiSyncmlObex::ConfigGuiSyncmlObex( const QSync::Member &member, QWidget * mSyncmlVersion->insertItem( (*itVersion).second ); // WBXML - mWbxml = new QCheckBox( i18n("WAP Binary XML"), optionsWidget ); + mWbxml = new TQCheckBox( i18n("WAP Binary XML"), optionsWidget ); mGridLayout->addMultiCellWidget( mWbxml, 12, 12, 0, 1 ); // Identifier - label = new QLabel( i18n("Software Identifier:"), optionsWidget ); + label = new TQLabel( i18n("Software Identifier:"), optionsWidget ); mGridLayout->addWidget( label, 13, 0 ); mIdentifier = new KComboBox( true, optionsWidget ); @@ -149,19 +149,19 @@ ConfigGuiSyncmlObex::ConfigGuiSyncmlObex( const QSync::Member &member, QWidget * mIdentifier->insertItem( "PC Suite" ); // recvLimit - label = new QLabel( i18n("Receive Limit:"), optionsWidget ); + label = new TQLabel( i18n("Receive Limit:"), optionsWidget ); mGridLayout->addWidget( label, 14, 0 ); - mRecvLimit = new QSpinBox( optionsWidget ); + mRecvLimit = new TQSpinBox( optionsWidget ); mRecvLimit->setMinValue( 1 ); mRecvLimit->setMaxValue( 65536 ); mGridLayout->addWidget( mRecvLimit, 14, 1 ); // maxObjSize - label = new QLabel( i18n("Maximum Object Size"), optionsWidget ); + label = new TQLabel( i18n("Maximum Object Size"), optionsWidget ); mGridLayout->addWidget( label, 15, 0 ); - mMaxObjSize = new QSpinBox( optionsWidget ); + mMaxObjSize = new TQSpinBox( optionsWidget ); mMaxObjSize->setMinValue( 1 ); mMaxObjSize->setMaxValue( 65536 ); mGridLayout->addWidget( mMaxObjSize, 15, 1 ); @@ -180,16 +180,16 @@ void ConfigGuiSyncmlObex::slotConnectionChanged( int pos ) mUsb->show(); } -void ConfigGuiSyncmlObex::load( const QString &xml ) +void ConfigGuiSyncmlObex::load( const TQString &xml ) { - QDomDocument document; + TQDomDocument document; document.setContent( xml ); - QDomElement docElement = document.documentElement(); + TQDomElement docElement = document.documentElement(); - QDomNode node; + 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" ) { @@ -237,16 +237,16 @@ void ConfigGuiSyncmlObex::load( const QString &xml ) } } -QString ConfigGuiSyncmlObex::save() const +TQString ConfigGuiSyncmlObex::save() const { - QString xml; + TQString xml; xml = "\n"; xml += "" + mUsername->text() + "\n"; xml += "" + mPassword->text() + "\n"; ConnectionTypeList::ConstIterator it; for ( it = mConnectionTypes.begin(); it != mConnectionTypes.end(); it++ ) { if ( mConnection->currentText() == (*it).second ) { - xml += "" + QString("%1").arg((*it).first) + "\n"; + xml += "" + TQString("%1").arg((*it).first) + "\n"; break; } } @@ -258,13 +258,13 @@ QString ConfigGuiSyncmlObex::save() const xml += "" + mBluetooth->channel() + "\n"; // USB Interface - xml += "" + QString::number( mUsb->interface() ) +"\n"; + xml += "" + TQString::number( mUsb->interface() ) +"\n"; // SyncML Version SyncmlVersionList::ConstIterator itVersion; for ( itVersion = mSyncmlVersions.begin(); itVersion != mSyncmlVersions.end(); itVersion++ ) { if ( mSyncmlVersion->currentText() == (*itVersion).second ) { - xml += "" + QString("%1").arg((*itVersion).first) + "\n"; + xml += "" + TQString("%1").arg((*itVersion).first) + "\n"; break; } } @@ -281,10 +281,10 @@ QString ConfigGuiSyncmlObex::save() const xml += "\n"; // Receive Limit - xml += "" + QString::number( mRecvLimit->value() ) + "\n"; + xml += "" + TQString::number( mRecvLimit->value() ) + "\n"; // Maximal Object Size - xml += "" + QString::number( mMaxObjSize->value() ) + "\n"; + xml += "" + TQString::number( mMaxObjSize->value() ) + "\n"; xml += ""; if ( mUseStringTable->isChecked() ) @@ -308,9 +308,9 @@ QString ConfigGuiSyncmlObex::save() const return xml; } -void ConfigGuiSyncmlObex::addLineEdit( QWidget *parent, const QString &text, KComboBox **edit, int row ) +void ConfigGuiSyncmlObex::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 ); -- cgit v1.2.1