summaryrefslogtreecommitdiffstats
path: root/kaddressbook/editors
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kaddressbook/editors
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-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 'kaddressbook/editors')
-rw-r--r--kaddressbook/editors/cryptowidget.cpp70
-rw-r--r--kaddressbook/editors/cryptowidget.h14
-rw-r--r--kaddressbook/editors/imaddresswidget.cpp34
-rw-r--r--kaddressbook/editors/imaddresswidget.h14
-rw-r--r--kaddressbook/editors/imeditorwidget.cpp126
-rw-r--r--kaddressbook/editors/imeditorwidget.h28
6 files changed, 143 insertions, 143 deletions
diff --git a/kaddressbook/editors/cryptowidget.cpp b/kaddressbook/editors/cryptowidget.cpp
index d2d5917f9..45a5efbaf 100644
--- a/kaddressbook/editors/cryptowidget.cpp
+++ b/kaddressbook/editors/cryptowidget.cpp
@@ -35,13 +35,13 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qvgroupbox.h>
-#include <qhbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqvgroupbox.h>
+#include <tqhbox.h>
#include "cryptowidget.h"
@@ -58,81 +58,81 @@ CryptoWidgetFactory::CryptoWidgetFactory()
KGlobal::iconLoader()->addAppDir( "libkleopatra" );
}
-QString CryptoWidgetFactory::pageTitle() const
+TQString CryptoWidgetFactory::pageTitle() const
{
return i18n( "Crypto Settings" );
}
-QString CryptoWidgetFactory::pageIdentifier() const
+TQString CryptoWidgetFactory::pageIdentifier() const
{
return "crypto";
}
-CryptoWidget::CryptoWidget( KABC::AddressBook *ab, QWidget *parent, const char *name )
+CryptoWidget::CryptoWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name )
: KAB::ContactEditorWidget( ab, parent, name ), mReadOnly( false )
{
- QGridLayout *topLayout = new QGridLayout( this, 2, 5, KDialog::marginHint(),
+ TQGridLayout *topLayout = new TQGridLayout( this, 2, 5, KDialog::marginHint(),
KDialog::spacingHint() );
topLayout->setColStretch( 1, 1 );
topLayout->setRowStretch( 4, 1 );
- QVGroupBox* protGB = new QVGroupBox( i18n( "Allowed Protocols" ), this );
+ TQVGroupBox* protGB = new TQVGroupBox( i18n( "Allowed Protocols" ), this );
topLayout->addMultiCellWidget( protGB, 0, 0, 0, 1 );
uint msgFormat = 1;
for ( uint i = 0 ; i < NumberOfProtocols ; ++i ) {
Kleo::CryptoMessageFormat f = static_cast<Kleo::CryptoMessageFormat>( msgFormat );
- mProtocolCB[ i ] = new QCheckBox( Kleo::cryptoMessageFormatToLabel( f ), protGB );
- connect( mProtocolCB[i], SIGNAL( clicked() ), this, SLOT( setModified() ) );
+ mProtocolCB[ i ] = new TQCheckBox( Kleo::cryptoMessageFormatToLabel( f ), protGB );
+ connect( mProtocolCB[i], TQT_SIGNAL( clicked() ), this, TQT_SLOT( setModified() ) );
// Iterating over a bitfield means *2 every time
msgFormat *= 2;
}
- QLabel* l = new QLabel( i18n( "Preferred OpenPGP encryption key:" ), this );
+ TQLabel* l = new TQLabel( i18n( "Preferred OpenPGP encryption key:" ), this );
topLayout->addWidget( l, 1, 0 );
mPgpKey = new Kleo::EncryptionKeyRequester( true, Kleo::EncryptionKeyRequester::OpenPGP, this );
topLayout->addWidget( mPgpKey, 1, 1 );
- l = new QLabel( i18n( "Preferred S/MIME encryption certificate:" ), this );
+ l = new TQLabel( i18n( "Preferred S/MIME encryption certificate:" ), this );
topLayout->addWidget( l, 2, 0 );
mSmimeCert = new Kleo::EncryptionKeyRequester( true, Kleo::EncryptionKeyRequester::SMIME, this );
topLayout->addWidget( mSmimeCert, 2, 1 );
- QGroupBox* box = new QVGroupBox( i18n( "Message Preference" ), this );
+ TQGroupBox* box = new TQVGroupBox( i18n( "Message Preference" ), this );
topLayout->addMultiCellWidget( box, 3, 3, 0, 1 );
// Send preferences/sign (see certmanager/lib/kleo/enum.h)
- QHBox* hbox = new QHBox( box );
+ TQHBox* hbox = new TQHBox( box );
- l = new QLabel( i18n( "Sign:" ), hbox );
+ l = new TQLabel( i18n( "Sign:" ), hbox );
- mSignPref = new QComboBox( false, hbox );
+ mSignPref = new TQComboBox( false, hbox );
for ( unsigned int i = Kleo::UnknownSigningPreference; i < Kleo::MaxSigningPreference ; ++i )
mSignPref->insertItem( Kleo::signingPreferenceToLabel(
static_cast<Kleo::SigningPreference>( i ) ) );
// Send preferences/encrypt (see certmanager/lib/kleo/enum.h)
- hbox = new QHBox( box );
+ hbox = new TQHBox( box );
- l = new QLabel( i18n("Encrypt:"), hbox );
+ l = new TQLabel( i18n("Encrypt:"), hbox );
- mCryptPref = new QComboBox( false, hbox );
+ mCryptPref = new TQComboBox( false, hbox );
for ( unsigned int i = Kleo::UnknownPreference; i < Kleo::MaxEncryptionPreference ; ++i )
mCryptPref->insertItem( Kleo::encryptionPreferenceToLabel(
static_cast<Kleo::EncryptionPreference>( i ) ) );
// Emit "changed()" signal
- connect( mSignPref, SIGNAL( activated(int) ), this, SLOT( setModified() ) );
- connect( mCryptPref, SIGNAL( activated(int) ), this, SLOT( setModified() ) );
+ connect( mSignPref, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( setModified() ) );
+ connect( mCryptPref, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( setModified() ) );
// Not optimal, but KeyRequester doesn't emit any signals when the key changes
- connect( mPgpKey->eraseButton(), SIGNAL( clicked() ), this, SLOT( setModified() ) );
- connect( mPgpKey->dialogButton(), SIGNAL( clicked() ), this, SLOT( setModified() ) );
- connect( mSmimeCert->eraseButton(), SIGNAL( clicked() ), this, SLOT( setModified() ) );
- connect( mSmimeCert->dialogButton(), SIGNAL( clicked() ), this, SLOT( setModified() ) );
+ connect( mPgpKey->eraseButton(), TQT_SIGNAL( clicked() ), this, TQT_SLOT( setModified() ) );
+ connect( mPgpKey->dialogButton(), TQT_SIGNAL( clicked() ), this, TQT_SLOT( setModified() ) );
+ connect( mSmimeCert->eraseButton(), TQT_SIGNAL( clicked() ), this, TQT_SLOT( setModified() ) );
+ connect( mSmimeCert->dialogButton(), TQT_SIGNAL( clicked() ), this, TQT_SLOT( setModified() ) );
}
CryptoWidget::~CryptoWidget()
@@ -144,7 +144,7 @@ void CryptoWidget::loadContact( KABC::Addressee *addr )
bool blocked = signalsBlocked();
blockSignals( true );
- QStringList lst = QStringList::split( ',', addr->custom( "KADDRESSBOOK",
+ TQStringList lst = TQStringList::split( ',', addr->custom( "KADDRESSBOOK",
"CRYPTOPROTOPREF" ) );
uint cryptoFormats = Kleo::stringListToCryptoMessageFormats( lst );
@@ -161,8 +161,8 @@ void CryptoWidget::loadContact( KABC::Addressee *addr )
// We dont use the contents of addr->key(...) because we want just a ref.
// to the key/cert. stored elsewhere.
- mPgpKey->setFingerprints( QStringList::split( ",", addr->custom( "KADDRESSBOOK", "OPENPGPFP" ) ) );
- mSmimeCert->setFingerprints( QStringList::split( ",", addr->custom( "KADDRESSBOOK", "SMIMEFP" ) ) );
+ mPgpKey->setFingerprints( TQStringList::split( ",", addr->custom( "KADDRESSBOOK", "OPENPGPFP" ) ) );
+ mSmimeCert->setFingerprints( TQStringList::split( ",", addr->custom( "KADDRESSBOOK", "SMIMEFP" ) ) );
blockSignals( blocked );
}
@@ -176,7 +176,7 @@ void CryptoWidget::storeContact( KABC::Addressee *addr )
cryptoFormats |= msgFormat;
}
- QStringList lst = Kleo::cryptoMessageFormatsToStringList( cryptoFormats );
+ TQStringList lst = Kleo::cryptoMessageFormatsToStringList( cryptoFormats );
if ( !lst.isEmpty() )
addr->insertCustom( "KADDRESSBOOK", "CRYPTOPROTOPREF", lst.join( "," ) );
else
@@ -198,8 +198,8 @@ void CryptoWidget::storeContact( KABC::Addressee *addr )
else
addr->removeCustom( "KADDRESSBOOK", "CRYPTOENCRYPTPREF" );
- QStringList pfp = mPgpKey->fingerprints();
- QStringList sfp = mSmimeCert->fingerprints();
+ TQStringList pfp = mPgpKey->fingerprints();
+ TQStringList sfp = mSmimeCert->fingerprints();
if ( !pfp.isEmpty() )
addr->insertCustom( "KADDRESSBOOK", "OPENPGPFP", pfp.join( "," ) );
diff --git a/kaddressbook/editors/cryptowidget.h b/kaddressbook/editors/cryptowidget.h
index de2c7bfcc..559279855 100644
--- a/kaddressbook/editors/cryptowidget.h
+++ b/kaddressbook/editors/cryptowidget.h
@@ -38,7 +38,7 @@ class CryptoWidget : public KAB::ContactEditorWidget
Q_OBJECT
public:
- CryptoWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ CryptoWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
~CryptoWidget();
void loadContact( KABC::Addressee *addr );
@@ -47,9 +47,9 @@ class CryptoWidget : public KAB::ContactEditorWidget
private:
enum { NumberOfProtocols = 4 };
- QCheckBox* mProtocolCB[NumberOfProtocols];
- QComboBox* mSignPref;
- QComboBox* mCryptPref;
+ TQCheckBox* mProtocolCB[NumberOfProtocols];
+ TQComboBox* mSignPref;
+ TQComboBox* mCryptPref;
Kleo::KeyRequester* mPgpKey;
Kleo::KeyRequester* mSmimeCert;
bool mReadOnly;
@@ -59,13 +59,13 @@ class CryptoWidgetFactory : public KAB::ContactEditorWidgetFactory
{
public:
CryptoWidgetFactory();
- KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, QWidget *parent, const char *name )
+ KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name )
{
return new CryptoWidget( ab, parent, name );
}
- QString pageTitle() const;
- QString pageIdentifier() const;
+ TQString pageTitle() const;
+ TQString pageIdentifier() const;
};
#endif
diff --git a/kaddressbook/editors/imaddresswidget.cpp b/kaddressbook/editors/imaddresswidget.cpp
index 3d2af677e..097b092c0 100644
--- a/kaddressbook/editors/imaddresswidget.cpp
+++ b/kaddressbook/editors/imaddresswidget.cpp
@@ -21,10 +21,10 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -33,7 +33,7 @@
#include "imaddresswidget.h"
-IMAddressWidget::IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> protocols )
+IMAddressWidget::IMAddressWidget( TQWidget *parent, TQValueList<KPluginInfo *> protocols )
: IMAddressBase( parent )
{
mProtocols = protocols;
@@ -41,8 +41,8 @@ IMAddressWidget::IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> pro
init();
}
-IMAddressWidget::IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> protocols,
- KPluginInfo *protocol, const QString& address,
+IMAddressWidget::IMAddressWidget( TQWidget *parent, TQValueList<KPluginInfo *> protocols,
+ KPluginInfo *protocol, const TQString& address,
const IMContext& context )
: IMAddressBase( parent )
{
@@ -52,23 +52,23 @@ IMAddressWidget::IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> pro
populateProtocols();
cmbProtocol->setCurrentItem( mProtocols.findIndex( protocol ) );
- edtAddress->setText( address.section( QChar( 0xE120 ), 0, 0 ) );
- edtNetwork->setText( address.section( QChar( 0xE120 ), 1 ) );
+ edtAddress->setText( address.section( TQChar( 0xE120 ), 0, 0 ) );
+ edtNetwork->setText( address.section( TQChar( 0xE120 ), 1 ) );
init();
}
void IMAddressWidget::init()
{
- connect( cmbProtocol, SIGNAL( activated( const QString& ) ),
- this, SLOT( slotProtocolChanged() ) );
- connect( edtAddress, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( slotAddressChanged( const QString& ) ) );
+ connect( cmbProtocol, TQT_SIGNAL( activated( const TQString& ) ),
+ this, TQT_SLOT( slotProtocolChanged() ) );
+ connect( edtAddress, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( slotAddressChanged( const TQString& ) ) );
slotProtocolChanged();
}
-void IMAddressWidget::slotAddressChanged( const QString &text )
+void IMAddressWidget::slotAddressChanged( const TQString &text )
{
emit inValidState( !text.stripWhiteSpace().isEmpty() );
}
@@ -105,12 +105,12 @@ IMContext IMAddressWidget::context() const
return context;
}
-QString IMAddressWidget::address() const
+TQString IMAddressWidget::address() const
{
// The protocol irc is a special case and hard coded in.
// It's not nice, but the simplest way that I can see.
if ( protocol()->name() == "IRC" && !edtNetwork->text().stripWhiteSpace().isEmpty() )
- return edtAddress->text().stripWhiteSpace() + QChar( 0xE120 ) + edtNetwork->text().stripWhiteSpace();
+ return edtAddress->text().stripWhiteSpace() + TQChar( 0xE120 ) + edtNetwork->text().stripWhiteSpace();
else
return edtAddress->text().stripWhiteSpace();
}
@@ -118,7 +118,7 @@ QString IMAddressWidget::address() const
void IMAddressWidget::populateProtocols()
{
// insert the protocols in order
- QValueList<KPluginInfo *>::ConstIterator it;
+ TQValueList<KPluginInfo *>::ConstIterator it;
for ( it = mProtocols.begin(); it != mProtocols.end(); ++it )
cmbProtocol->insertItem( SmallIcon( (*it)->icon() ), (*it)->name() );
}
diff --git a/kaddressbook/editors/imaddresswidget.h b/kaddressbook/editors/imaddresswidget.h
index 29d93b13f..11ee5f454 100644
--- a/kaddressbook/editors/imaddresswidget.h
+++ b/kaddressbook/editors/imaddresswidget.h
@@ -24,7 +24,7 @@
#ifndef IMADDRESSWIDGET_H
#define IMADDRESSWIDGET_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "imaddressbase.h"
#include "imeditorwidget.h"
@@ -44,15 +44,15 @@ class IMAddressWidget : public IMAddressBase
Q_OBJECT
public:
- IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> protocols);
- IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> protocols,
- KPluginInfo *protocol, const QString& address,
+ IMAddressWidget( TQWidget *parent, TQValueList<KPluginInfo *> protocols);
+ IMAddressWidget( TQWidget *parent, TQValueList<KPluginInfo *> protocols,
+ KPluginInfo *protocol, const TQString& address,
const IMContext& context = Any );
KPluginInfo * protocol() const;
IMContext context() const;
- QString address() const ;
- QValueList<KPluginInfo *> mProtocols;
+ TQString address() const ;
+ TQValueList<KPluginInfo *> mProtocols;
signals:
void inValidState( bool );
@@ -65,7 +65,7 @@ class IMAddressWidget : public IMAddressBase
protected slots:
void slotProtocolChanged();
- void slotAddressChanged( const QString &text );
+ void slotAddressChanged( const TQString &text );
private:
void init();
diff --git a/kaddressbook/editors/imeditorwidget.cpp b/kaddressbook/editors/imeditorwidget.cpp
index f61e06386..0da0feb03 100644
--- a/kaddressbook/editors/imeditorwidget.cpp
+++ b/kaddressbook/editors/imeditorwidget.cpp
@@ -22,12 +22,12 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlistview.h>
-#include <qstringlist.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qfont.h>
-#include <qpainter.h>
+#include <tqlistview.h>
+#include <tqstringlist.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqfont.h>
+#include <tqpainter.h>
#include <kdialogbase.h>
#include <kdebug.h>
@@ -44,7 +44,7 @@
IMAddressLVI::IMAddressLVI( KListView *parent, KPluginInfo *protocol,
- const QString &address, const IMContext &context )
+ const TQString &address, const IMContext &context )
: KListViewItem( parent )
{
setProtocol( protocol );
@@ -63,11 +63,11 @@ bool IMAddressLVI::preferred() const
return mPreferred;
}
-void IMAddressLVI::paintCell( QPainter *p, const QColorGroup &cg,
+void IMAddressLVI::paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment )
{
if ( mPreferred ) {
- QFont font = p->font();
+ TQFont font = p->font();
font.setBold( true );
p->setFont( font );
}
@@ -75,15 +75,15 @@ void IMAddressLVI::paintCell( QPainter *p, const QColorGroup &cg,
KListViewItem::paintCell( p, cg, column, width, alignment );
}
-void IMAddressLVI::setAddress( const QString &address )
+void IMAddressLVI::setAddress( const TQString &address )
{
// irc uses 0xE120 to seperate the nick and the server group.
- QString serverOrGroup = address.section( QChar( 0xE120 ), 1 );
+ TQString serverOrGroup = address.section( TQChar( 0xE120 ), 1 );
if ( serverOrGroup.isEmpty() )
setText( 1, address );
else {
- QString nickname = address.section( QChar( 0xE120 ), 0, 0 );
+ TQString nickname = address.section( TQChar( 0xE120 ), 0, 0 );
setText( 1, i18n( "<nickname> on <server>","%1 on %2" )
.arg( nickname ).arg( serverOrGroup ) );
}
@@ -128,7 +128,7 @@ IMContext IMAddressLVI::context() const
return mContext;
}
-QString IMAddressLVI::address() const
+TQString IMAddressLVI::address() const
{
return mAddress;
}
@@ -140,7 +140,7 @@ void IMAddressLVI::activate()
/*===========================================================================*/
-IMEditorWidget::IMEditorWidget( QWidget *parent, const QString &preferredIM, const char *name )
+IMEditorWidget::IMEditorWidget( TQWidget *parent, const TQString &preferredIM, const char *name )
: KDialogBase( parent, name, false, i18n( "Edit Instant Messenging Address" ),
Help | Ok | Cancel, Ok, false ),
mReadOnly( false )
@@ -148,14 +148,14 @@ IMEditorWidget::IMEditorWidget( QWidget *parent, const QString &preferredIM, con
mWidget = new IMEditorBase( this );
setMainWidget( mWidget );
- connect( mWidget->btnAdd, SIGNAL( clicked() ), SLOT( slotAdd() ) );
- connect( mWidget->btnEdit, SIGNAL( clicked() ), SLOT( slotEdit() ) );
- connect( mWidget->btnDelete, SIGNAL( clicked() ), SLOT( slotDelete() ) );
- connect( mWidget->btnSetStandard, SIGNAL( clicked()), SLOT( slotSetStandard() ) );
- connect( mWidget->lvAddresses, SIGNAL( selectionChanged() ), SLOT( slotUpdateButtons() ) );
+ connect( mWidget->btnAdd, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAdd() ) );
+ connect( mWidget->btnEdit, TQT_SIGNAL( clicked() ), TQT_SLOT( slotEdit() ) );
+ connect( mWidget->btnDelete, TQT_SIGNAL( clicked() ), TQT_SLOT( slotDelete() ) );
+ connect( mWidget->btnSetStandard, TQT_SIGNAL( clicked()), TQT_SLOT( slotSetStandard() ) );
+ connect( mWidget->lvAddresses, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotUpdateButtons() ) );
- connect( mWidget->lvAddresses, SIGNAL( doubleClicked( QListViewItem*, const QPoint&, int ) ),
- SLOT( slotEdit() ) );
+ connect( mWidget->lvAddresses, TQT_SIGNAL( doubleClicked( TQListViewItem*, const TQPoint&, int ) ),
+ TQT_SLOT( slotEdit() ) );
setHelp( "managing-contacts-im-addresses" );
@@ -166,26 +166,26 @@ IMEditorWidget::IMEditorWidget( QWidget *parent, const QString &preferredIM, con
//mWidget->btnUp->setEnabled( false );
//mWidget->btnDown->setEnabled( false );
mPreferred = preferredIM;
- mPreferred = mPreferred.replace( " on ", QString( QChar( 0xE120 ) ), true );
- mProtocols = KPluginInfo::fromServices( KTrader::self()->query( QString::fromLatin1( "KABC/IMProtocol" ) ) );
+ mPreferred = mPreferred.replace( " on ", TQString( TQChar( 0xE120 ) ), true );
+ mProtocols = KPluginInfo::fromServices( KTrader::self()->query( TQString::fromLatin1( "KABC/IMProtocol" ) ) );
// order the protocols by putting them in a qmap, then sorting the set of keys and recreating the list
- QMap<QString, KPluginInfo *> protocolMap;
- QValueList<KPluginInfo *>::ConstIterator it;
- QValueList<KPluginInfo *> sorted;
+ TQMap<TQString, KPluginInfo *> protocolMap;
+ TQValueList<KPluginInfo *>::ConstIterator it;
+ TQValueList<KPluginInfo *> sorted;
for ( it = mProtocols.begin(); it != mProtocols.end(); ++it )
protocolMap.insert( (*it)->name(), (*it) );
- QStringList keys = protocolMap.keys();
+ TQStringList keys = protocolMap.keys();
keys.sort();
- QStringList::ConstIterator keyIt = keys.begin();
- QStringList::ConstIterator end = keys.end();
+ TQStringList::ConstIterator keyIt = keys.begin();
+ TQStringList::ConstIterator end = keys.end();
for ( ; keyIt != end; ++keyIt )
sorted.append( protocolMap[*keyIt] );
mProtocols = sorted;
}
-QValueList<KPluginInfo *> IMEditorWidget::availableProtocols() const
+TQValueList<KPluginInfo *> IMEditorWidget::availableProtocols() const
{
return mProtocols;
}
@@ -196,21 +196,21 @@ void IMEditorWidget::loadContact( KABC::Addressee *addr )
mWidget->lvAddresses->clear();
// see README for details of how Evolution stores IM addresses (differently)
- const QStringList customs = addr->customs();
+ const TQStringList customs = addr->customs();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
bool isSet = false;
for ( it = customs.begin(); it != customs.end(); ++it ) {
- QString app, name, value;
+ TQString app, name, value;
splitField( *it, app, name, value );
- if ( app.startsWith( QString::fromLatin1( "messaging/" ) ) ) {
- if ( name == QString::fromLatin1( "All" ) ) {
+ if ( app.startsWith( TQString::fromLatin1( "messaging/" ) ) ) {
+ if ( name == TQString::fromLatin1( "All" ) ) {
KPluginInfo *protocol = protocolFromString( app );
if ( protocol ) {
- QStringList addresses = QStringList::split( QChar( 0xE000 ), value );
- QStringList::iterator end = addresses.end();
- for ( QStringList::ConstIterator it = addresses.begin(); it != end; ++it ) {
+ TQStringList addresses = TQStringList::split( TQChar( 0xE000 ), value );
+ TQStringList::iterator end = addresses.end();
+ for ( TQStringList::ConstIterator it = addresses.begin(); it != end; ++it ) {
IMAddressLVI *imaddresslvi = new IMAddressLVI( mWidget->lvAddresses, protocol, *it, Any/*, false*/ );
if ( !isSet && (*it).stripWhiteSpace().lower() == mPreferred.stripWhiteSpace().lower() ) {
imaddresslvi->setPreferred( true );
@@ -231,10 +231,10 @@ void IMEditorWidget::storeContact( KABC::Addressee *addr )
{
// for each changed protocol, write a new custom field containing the current set of
// addresses
- QValueList<KPluginInfo *>::ConstIterator protocolIt;
+ TQValueList<KPluginInfo *>::ConstIterator protocolIt;
for ( protocolIt = mChangedProtocols.begin(); protocolIt != mChangedProtocols.end(); ++protocolIt ) {
- QStringList lst;
- QListViewItemIterator addressIt( mWidget->lvAddresses );
+ TQStringList lst;
+ TQListViewItemIterator addressIt( mWidget->lvAddresses );
while ( addressIt.current() ) {
IMAddressLVI* currentAddress = static_cast<IMAddressLVI*>( *addressIt );
if ( currentAddress->protocol() == *protocolIt )
@@ -242,11 +242,11 @@ void IMEditorWidget::storeContact( KABC::Addressee *addr )
++addressIt;
}
- QString addrBookField = (*protocolIt)->property( "X-KDE-InstantMessagingKABCField" ).toString();
+ TQString addrBookField = (*protocolIt)->property( "X-KDE-InstantMessagingKABCField" ).toString();
if ( !lst.isEmpty() )
- addr->insertCustom( addrBookField, QString::fromLatin1( "All" ), lst.join( QChar( 0xE000 ) ) );
+ addr->insertCustom( addrBookField, TQString::fromLatin1( "All" ), lst.join( TQChar( 0xE000 ) ) );
else
- addr->removeCustom( addrBookField, QString::fromLatin1( "All" ) );
+ addr->removeCustom( addrBookField, TQString::fromLatin1( "All" ) );
}
}
@@ -258,11 +258,11 @@ void IMEditorWidget::setReadOnly( bool readOnly )
void IMEditorWidget::slotSetStandard()
{
- QListViewItemIterator it( mWidget->lvAddresses, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( mWidget->lvAddresses, TQListViewItemIterator::Selected );
// Just set the first one selected as standard
if ( IMAddressLVI *current = static_cast<IMAddressLVI*>( it.current() ) ) {
- QListViewItemIterator it2( mWidget->lvAddresses );
+ TQListViewItemIterator it2( mWidget->lvAddresses );
while ( it2.current() ) {
IMAddressLVI *item = static_cast<IMAddressLVI*>( it2.current() );
@@ -289,7 +289,7 @@ void IMEditorWidget::slotSetStandard()
void IMEditorWidget::slotUpdateButtons()
{
int num_selected = 0;
- QListViewItemIterator it( mWidget->lvAddresses, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( mWidget->lvAddresses, TQListViewItemIterator::Selected );
while ( it.current() ) {
++num_selected;
if ( num_selected > 1 )
@@ -336,11 +336,11 @@ void IMEditorWidget::slotAdd()
IMAddressWidget *addressWid = new IMAddressWidget( &addDialog, mProtocols );
addDialog.enableButtonOK( false );
- connect( addressWid, SIGNAL( inValidState( bool ) ),
- &addDialog, SLOT( enableButtonOK( bool ) ) );
+ connect( addressWid, TQT_SIGNAL( inValidState( bool ) ),
+ &addDialog, TQT_SLOT( enableButtonOK( bool ) ) );
addDialog.setMainWidget( addressWid );
- if ( addDialog.exec() == QDialog::Accepted ) {
+ if ( addDialog.exec() == TQDialog::Accepted ) {
// add the new item
IMAddressLVI *imaddresslvi = new IMAddressLVI( mWidget->lvAddresses, addressWid->protocol(),
addressWid->address() /*, addressWid->context() */ );
@@ -362,7 +362,7 @@ void IMEditorWidget::slotAdd()
void IMEditorWidget::slotEdit()
{
- QListViewItemIterator it( mWidget->lvAddresses, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( mWidget->lvAddresses, TQListViewItemIterator::Selected );
// Just edit the first one selected.
if ( IMAddressLVI *current = static_cast<IMAddressLVI*>( it.current() ) ) {
@@ -370,11 +370,11 @@ void IMEditorWidget::slotEdit()
KDialogBase::Ok | KDialogBase::Cancel );
IMAddressWidget *addressWid = new IMAddressWidget( &editDialog, mProtocols, current->protocol(),
current->address(), current->context() ) ;
- connect( addressWid, SIGNAL( inValidState( bool ) ),
- &editDialog, SLOT( enableButtonOK( bool ) ) );
+ connect( addressWid, TQT_SIGNAL( inValidState( bool ) ),
+ &editDialog, TQT_SLOT( enableButtonOK( bool ) ) );
editDialog.setMainWidget( addressWid );
- if ( editDialog.exec() == QDialog::Accepted ) {
+ if ( editDialog.exec() == TQDialog::Accepted ) {
bool modified = false;
if ( addressWid->address() != current->address() ) {
modified = true;
@@ -409,7 +409,7 @@ void IMEditorWidget::slotDelete()
int num_selected = 0;
{
- QListViewItemIterator it( mWidget->lvAddresses, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( mWidget->lvAddresses, TQListViewItemIterator::Selected );
while ( it.current() ) {
num_selected++;
++it;
@@ -424,7 +424,7 @@ void IMEditorWidget::slotDelete()
i18n( "Confirm Delete" ), KStdGuiItem::del() ) != KMessageBox::Continue )
return;
- QListViewItemIterator it( mWidget->lvAddresses );
+ TQListViewItemIterator it( mWidget->lvAddresses );
bool deletedPreferred = false;
while( it.current() ) {
if ( it.current()->isSelected() ) {
@@ -452,16 +452,16 @@ void IMEditorWidget::slotDelete()
setModified( true );
}
-QString IMEditorWidget::preferred() const
+TQString IMEditorWidget::preferred() const
{
- QString retval( mPreferred );
- return retval.replace( QChar( 0xE120 ), " on " );
+ TQString retval( mPreferred );
+ return retval.replace( TQChar( 0xE120 ), " on " );
}
-KPluginInfo * IMEditorWidget::protocolFromString( const QString &fieldValue ) const
+KPluginInfo * IMEditorWidget::protocolFromString( const TQString &fieldValue ) const
{
- QValueList<KPluginInfo *>::ConstIterator it;
+ TQValueList<KPluginInfo *>::ConstIterator it;
KPluginInfo * protocol = 0;
for ( it = mProtocols.begin(); it != mProtocols.end(); ++it ) {
if ( (*it)->property( "X-KDE-InstantMessagingKABCField" ).toString() == fieldValue ) {
@@ -473,11 +473,11 @@ KPluginInfo * IMEditorWidget::protocolFromString( const QString &fieldValue ) co
return protocol;
}
-void IMEditorWidget::splitField( const QString &str, QString &app, QString &name, QString &value )
+void IMEditorWidget::splitField( const TQString &str, TQString &app, TQString &name, TQString &value )
{
int colon = str.find( ':' );
if ( colon != -1 ) {
- QString tmp = str.left( colon );
+ TQString tmp = str.left( colon );
value = str.mid( colon + 1 );
int dash = tmp.find( '-' );
diff --git a/kaddressbook/editors/imeditorwidget.h b/kaddressbook/editors/imeditorwidget.h
index 441db257b..0184ccca4 100644
--- a/kaddressbook/editors/imeditorwidget.h
+++ b/kaddressbook/editors/imeditorwidget.h
@@ -25,7 +25,7 @@
#ifndef IMEDITORWIDGET_H
#define IMEDITORWIDGET_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <klistview.h>
#include <kdialogbase.h>
@@ -51,15 +51,15 @@ class IMEditorWidget : public KDialogBase
Q_OBJECT
public:
- IMEditorWidget( QWidget *parent, const QString &preferredIM, const char *name = 0 );
+ IMEditorWidget( TQWidget *parent, const TQString &preferredIM, const char *name = 0 );
~IMEditorWidget() {};
void loadContact( KABC::Addressee *addr );
void storeContact( KABC::Addressee *addr );
void setReadOnly( bool readOnly );
- QValueList<KPluginInfo *> availableProtocols() const;
+ TQValueList<KPluginInfo *> availableProtocols() const;
bool isModified() const;
- QString preferred() const;
+ TQString preferred() const;
protected slots:
void slotUpdateButtons();
@@ -72,23 +72,23 @@ class IMEditorWidget : public KDialogBase
/**
* Helper method to split the contents of an addressbook field up
*/
- static void splitField( const QString &str, QString &app, QString &name, QString &value );
+ static void splitField( const TQString &str, TQString &app, TQString &name, TQString &value );
/**
* Find a protocol that matches the KABC key, or 0 if none found
*/
- KPluginInfo * protocolFromString( const QString &fieldValue ) const;
+ KPluginInfo * protocolFromString( const TQString &fieldValue ) const;
private:
bool mReadOnly;
bool mModified;
- QString mPreferred;
+ TQString mPreferred;
IMEditorBase *mWidget;
void setModified( bool modified );
// Used to track changed protocols to reduce KABC writes
- QValueList<KPluginInfo *> mChangedProtocols;
- QValueList<KPluginInfo *> mProtocols;
+ TQValueList<KPluginInfo *> mChangedProtocols;
+ TQValueList<KPluginInfo *> mProtocols;
};
/**
@@ -100,28 +100,28 @@ class IMAddressLVI : public KListViewItem
{
public:
IMAddressLVI( KListView *parent, KPluginInfo * protocol,
- const QString &address, const IMContext &context = Any );
+ const TQString &address, const IMContext &context = Any );
- void setAddress( const QString &address );
+ void setAddress( const TQString &address );
void setProtocol( KPluginInfo * protocol );
void setContext( const IMContext &context );
void activate();
KPluginInfo * protocol() const;
- QString address() const;
+ TQString address() const;
IMContext context() const;
void setPreferred( bool preferred );
bool preferred() const;
protected:
- virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment );
+ virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment );
private:
KPluginInfo * mProtocol;
bool mPreferred;
IMContext mContext;
- QString mAddress;
+ TQString mAddress;
};
#endif