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/configguipalm.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/configguipalm.cpp')
-rw-r--r-- | kitchensync/src/configguipalm.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/kitchensync/src/configguipalm.cpp b/kitchensync/src/configguipalm.cpp index de18e92c2..03d87cdb4 100644 --- a/kitchensync/src/configguipalm.cpp +++ b/kitchensync/src/configguipalm.cpp @@ -24,18 +24,18 @@ #include <klineedit.h> #include <klocale.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qdom.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qspinbox.h> -#include <qtabwidget.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqdom.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> +#include <tqtabwidget.h> #include "configguipalm.h" -ConfigGuiPalm::ConfigGuiPalm( const QSync::Member &member, QWidget *parent ) +ConfigGuiPalm::ConfigGuiPalm( const QSync::Member &member, TQWidget *parent ) : ConfigGui( member, parent ) { initGUI(); @@ -53,14 +53,14 @@ ConfigGuiPalm::ConfigGuiPalm( const QSync::Member &member, QWidget *parent ) mSpeed->insertItem( "115200" ); } -void ConfigGuiPalm::load( const QString &xml ) +void ConfigGuiPalm::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() == "sockaddr" ) { mDevice->setCurrentText( element.text() ); } else if ( element.tagName() == "speed" ) { @@ -88,20 +88,20 @@ void ConfigGuiPalm::load( const QString &xml ) } } -QString ConfigGuiPalm::save() const +TQString ConfigGuiPalm::save() const { - QString config = "<config>"; + TQString config = "<config>"; config += "<sockaddr>" + mDevice->currentText() + "</sockaddr>"; config += "<username>" + mUserName->text() + "</username>"; - config += "<timeout>" + QString::number( mTimeout->value() ) + "</timeout>"; + config += "<timeout>" + TQString::number( mTimeout->value() ) + "</timeout>"; config += "<type>0</type>"; config += "<speed>" + mSpeed->currentText() + "</speed>"; config += "<id>0</id>"; config += "<codepage>cp1252</codepage>"; - config += "<popup>" + QString( mPopup->isChecked() ? "1" : "0" ) + "</popup>"; + config += "<popup>" + TQString( mPopup->isChecked() ? "1" : "0" ) + "</popup>"; - QString popup; + TQString popup; if ( mSyncAlways->isChecked() ) popup = "0"; else if ( mSyncAsk->isChecked() ) @@ -118,29 +118,29 @@ QString ConfigGuiPalm::save() const void ConfigGuiPalm::initGUI() { - QFont boldFont = font(); + TQFont boldFont = font(); boldFont.setBold( true ); - QTabWidget *tabWidget = new QTabWidget( this ); + TQTabWidget *tabWidget = new TQTabWidget( this ); - QWidget *connectionWidget = new QWidget( tabWidget ); - QVBoxLayout *connectionLayout = new QVBoxLayout( connectionWidget, + TQWidget *connectionWidget = new TQWidget( tabWidget ); + TQVBoxLayout *connectionLayout = new TQVBoxLayout( connectionWidget, KDialog::marginHint(), KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "Connection" ), connectionWidget ); + TQLabel *label = new TQLabel( i18n( "Connection" ), connectionWidget ); label->setFont( boldFont ); connectionLayout->addWidget( label ); - QGridLayout *gridLayout = new QGridLayout( connectionLayout, 3, 2, KDialog::spacingHint() ); + TQGridLayout *gridLayout = new TQGridLayout( connectionLayout, 3, 2, KDialog::spacingHint() ); gridLayout->setMargin( KDialog::marginHint() ); - gridLayout->addWidget( new QLabel( i18n( "Port:" ), connectionWidget ), 0, 0 ); - gridLayout->addWidget( new QLabel( i18n( "Speed:" ), connectionWidget ), 1, 0 ); - gridLayout->addWidget( new QLabel( i18n( "Timeout:" ), connectionWidget ), 2, 0 ); + gridLayout->addWidget( new TQLabel( i18n( "Port:" ), connectionWidget ), 0, 0 ); + gridLayout->addWidget( new TQLabel( i18n( "Speed:" ), connectionWidget ), 1, 0 ); + gridLayout->addWidget( new TQLabel( i18n( "Timeout:" ), connectionWidget ), 2, 0 ); mDevice = new KComboBox( true, connectionWidget ); mSpeed = new KComboBox( connectionWidget ); - mTimeout = new QSpinBox( 1, 60, 1, connectionWidget ); + mTimeout = new TQSpinBox( 1, 60, 1, connectionWidget ); mTimeout->setSuffix( i18n( " sec" ) ); gridLayout->addWidget( mDevice, 0, 1 ); @@ -148,49 +148,49 @@ void ConfigGuiPalm::initGUI() gridLayout->addWidget( mTimeout, 2, 1 ); gridLayout->setColStretch( 1, 1 ); - label = new QLabel( i18n( "User" ), connectionWidget ); + label = new TQLabel( i18n( "User" ), connectionWidget ); label->setFont( boldFont ); connectionLayout->addWidget( label ); - gridLayout = new QGridLayout( connectionLayout, 1, 2, KDialog::spacingHint() ); + gridLayout = new TQGridLayout( connectionLayout, 1, 2, KDialog::spacingHint() ); gridLayout->setMargin( KDialog::marginHint() ); - gridLayout->addWidget( new QLabel( i18n( "Username:" ), connectionWidget ), 0, 0 ); + gridLayout->addWidget( new TQLabel( i18n( "Username:" ), connectionWidget ), 0, 0 ); mUserName = new KLineEdit( connectionWidget ); gridLayout->addWidget( mUserName, 0, 1 ); - label = new QLabel( i18n( "What to do if Username does not match" ), connectionWidget ); + label = new TQLabel( i18n( "What to do if Username does not match" ), connectionWidget ); label->setFont( boldFont ); connectionLayout->addWidget( label ); - gridLayout = new QGridLayout( connectionLayout, 1, 2, KDialog::spacingHint() ); + gridLayout = new TQGridLayout( connectionLayout, 1, 2, KDialog::spacingHint() ); gridLayout->setMargin( KDialog::marginHint() ); - QButtonGroup *buttonGroup = new QButtonGroup( 1, Qt::Horizontal, connectionWidget ); + TQButtonGroup *buttonGroup = new TQButtonGroup( 1, Qt::Horizontal, connectionWidget ); buttonGroup->setExclusive( true ); - buttonGroup->setFrameStyle( QFrame::NoFrame ); - mSyncAlways = new QRadioButton( i18n( "Sync Anyway" ), buttonGroup ); - mSyncAsk = new QRadioButton( i18n( "Ask What To Do" ), buttonGroup ); - mSyncAbort = new QRadioButton( i18n( "Abort Sync" ), buttonGroup ); + buttonGroup->setFrameStyle( TQFrame::NoFrame ); + mSyncAlways = new TQRadioButton( i18n( "Sync Anyway" ), buttonGroup ); + mSyncAsk = new TQRadioButton( i18n( "Ask What To Do" ), buttonGroup ); + mSyncAbort = new TQRadioButton( i18n( "Abort Sync" ), buttonGroup ); gridLayout->addMultiCellWidget( buttonGroup, 0, 0, 0, 1 ); connectionLayout->addStretch( 1 ); tabWidget->addTab( connectionWidget, i18n( "Connection" ) ); - QWidget *optionWidget = new QWidget( tabWidget ); - QVBoxLayout *optionLayout = new QVBoxLayout( optionWidget, + TQWidget *optionWidget = new TQWidget( tabWidget ); + TQVBoxLayout *optionLayout = new TQVBoxLayout( optionWidget, KDialog::marginHint(), KDialog::spacingHint() ); - label = new QLabel( i18n( "Hotsync Notification" ), optionWidget ); + label = new TQLabel( i18n( "Hotsync Notification" ), optionWidget ); label->setFont( boldFont ); optionLayout->addWidget( label ); - gridLayout = new QGridLayout( optionLayout, 1, 2, KDialog::spacingHint() ); + gridLayout = new TQGridLayout( optionLayout, 1, 2, KDialog::spacingHint() ); gridLayout->setMargin( KDialog::marginHint() ); - mPopup = new QCheckBox( i18n( "Popup when interaction is required" ), optionWidget ); + mPopup = new TQCheckBox( i18n( "Popup when interaction is required" ), optionWidget ); gridLayout->addMultiCellWidget( mPopup, 0, 0, 0, 1 ); optionLayout->addStretch( 1 ); |