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 --- kaddressbook/keywidget.cpp | 56 +++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'kaddressbook/keywidget.cpp') diff --git a/kaddressbook/keywidget.cpp b/kaddressbook/keywidget.cpp index ab0f8fa7f..57558cb46 100644 --- a/kaddressbook/keywidget.cpp +++ b/kaddressbook/keywidget.cpp @@ -21,10 +21,10 @@ without including the source code for Qt in the source distribution. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -38,32 +38,32 @@ #include "keywidget.h" -KeyWidget::KeyWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ) +KeyWidget::KeyWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { - QGridLayout *layout = new QGridLayout( this, 4, 2, KDialog::marginHint(), + TQGridLayout *layout = new TQGridLayout( this, 4, 2, KDialog::marginHint(), KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "Keys:" ), this ); + TQLabel *label = new TQLabel( i18n( "Keys:" ), this ); layout->addWidget( label, 0, 0 ); mKeyCombo = new KComboBox( this ); layout->addWidget( mKeyCombo, 0, 1 ); - mAddButton = new QPushButton( i18n( "Add..." ), this ); + mAddButton = new TQPushButton( i18n( "Add..." ), this ); layout->addMultiCellWidget( mAddButton, 1, 1, 0, 1 ); - mRemoveButton = new QPushButton( i18n( "Remove" ), this ); + mRemoveButton = new TQPushButton( i18n( "Remove" ), this ); mRemoveButton->setEnabled( false ); layout->addMultiCellWidget( mRemoveButton, 2, 2, 0, 1 ); - mExportButton = new QPushButton( i18n( "Export..." ), this ); + mExportButton = new TQPushButton( i18n( "Export..." ), this ); mExportButton->setEnabled( false ); layout->addMultiCellWidget( mExportButton, 3, 3, 0, 1 ); - connect( mAddButton, SIGNAL( clicked() ), SLOT( addKey() ) ); - connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removeKey() ) ); - connect( mExportButton, SIGNAL( clicked() ), SLOT( exportKey() ) ); + connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addKey() ) ); + connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeKey() ) ); + connect( mExportButton, TQT_SIGNAL( clicked() ), TQT_SLOT( exportKey() ) ); } KeyWidget::~KeyWidget() @@ -84,9 +84,9 @@ KABC::Key::List KeyWidget::keys() const void KeyWidget::addKey() { - QMap keyMap; - QStringList keyTypeNames; - QStringList existingKeyTypes; + TQMap keyMap; + TQStringList keyTypeNames; + TQStringList existingKeyTypes; KABC::Key::List::ConstIterator listIt; for ( listIt = mKeyList.begin(); listIt != mKeyList.end(); ++listIt ) { @@ -105,7 +105,7 @@ void KeyWidget::addKey() } bool ok; - QString name = KInputDialog::getItem( i18n( "Key Type" ), i18n( "Select the key type:" ), keyTypeNames, 0, true, &ok ); + TQString name = KInputDialog::getItem( i18n( "Key Type" ), i18n( "Select the key type:" ), keyTypeNames, 0, true, &ok ); if ( !ok || name.isEmpty() ) return; @@ -117,19 +117,19 @@ void KeyWidget::addKey() if ( url.isEmpty() ) return; - QString tmpFile; + TQString tmpFile; if ( KIO::NetAccess::download( url, tmpFile, this ) ) { - QFile file( tmpFile ); + TQFile file( tmpFile ); if ( !file.open( IO_ReadOnly ) ) { - QString text( i18n( "Unable to open file %1." ) ); + TQString text( i18n( "Unable to open file %1." ) ); KMessageBox::error( this, text.arg( url.url() ) ); return; } - QTextStream s( &file ); - QString data; + TQTextStream s( &file ); + TQString data; - s.setEncoding( QTextStream::UnicodeUTF8 ); + s.setEncoding( TQTextStream::UnicodeUTF8 ); s >> data; file.close(); @@ -152,8 +152,8 @@ void KeyWidget::removeKey() if ( pos == -1 ) return; - QString type = mKeyCombo->currentText(); - QString text = i18n( "Do you really want to remove the key %1?" ); + TQString type = mKeyCombo->currentText(); + TQString text = i18n( "Do you really want to remove the key %1?" ); if ( KMessageBox::warningContinueCancel( this, text.arg( type ), "", KGuiItem( i18n("&Delete"), "editdelete") ) == KMessageBox::Cancel ) return; @@ -170,8 +170,8 @@ void KeyWidget::exportKey() KURL url = KFileDialog::getSaveURL(); KTempFile tempFile; - QTextStream *s = tempFile.textStream(); - s->setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream *s = tempFile.textStream(); + s->setEncoding( TQTextStream::UnicodeUTF8 ); (*s) << key.textData(); tempFile.close(); -- cgit v1.2.1