summaryrefslogtreecommitdiffstats
path: root/kaddressbook/keywidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kaddressbook/keywidget.cpp')
-rw-r--r--kaddressbook/keywidget.cpp56
1 files changed, 28 insertions, 28 deletions
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 <qfile.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
#include <kcombobox.h>
@@ -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<QString, int> keyMap;
- QStringList keyTypeNames;
- QStringList existingKeyTypes;
+ TQMap<TQString, int> 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( "<qt>Unable to open file <b>%1</b>.</qt>" ) );
+ TQString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) );
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( "<qt>Do you really want to remove the key <b>%1</b>?</qt>" );
+ TQString type = mKeyCombo->currentText();
+ TQString text = i18n( "<qt>Do you really want to remove the key <b>%1</b>?</qt>" );
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();