summaryrefslogtreecommitdiffstats
path: root/kabc/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'kabc/scripts')
-rw-r--r--kabc/scripts/addressee.src.cpp192
-rw-r--r--kabc/scripts/addressee.src.h90
-rw-r--r--kabc/scripts/field.src.cpp70
3 files changed, 176 insertions, 176 deletions
diff --git a/kabc/scripts/addressee.src.cpp b/kabc/scripts/addressee.src.cpp
index 1735da995..36c449f19 100644
--- a/kabc/scripts/addressee.src.cpp
+++ b/kabc/scripts/addressee.src.cpp
@@ -20,7 +20,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <ksharedptr.h>
#include <kdebug.h>
@@ -39,23 +39,23 @@ using namespace KABC;
static bool matchBinaryPattern( int value, int pattern );
template <class L>
-static bool listEquals( const QValueList<L>&, const QValueList<L>& );
-static bool emailsEquals( const QStringList&, const QStringList& );
+static bool listEquals( const TQValueList<L>&, const TQValueList<L>& );
+static bool emailsEquals( const TQStringList&, const TQStringList& );
KABC::SortMode *Addressee::mSortMode = 0;
struct Addressee::AddresseeData : public KShared
{
- QString uid;
- QString uri;
+ TQString uid;
+ TQString uri;
--VARIABLES--
PhoneNumber::List phoneNumbers;
Address::List addresses;
Key::List keys;
- QStringList emails;
- QStringList categories;
- QStringList custom;
+ TQStringList emails;
+ TQStringList categories;
+ TQStringList custom;
Resource *resource;
@@ -163,7 +163,7 @@ bool Addressee::isEmpty() const
return mData->empty;
}
-void Addressee::setUid( const QString &id )
+void Addressee::setUid( const TQString &id )
{
if ( id == mData->uid ) return;
detach();
@@ -171,17 +171,17 @@ void Addressee::setUid( const QString &id )
mData->uid = id;
}
-QString Addressee::uid() const
+TQString Addressee::uid() const
{
return mData->uid;
}
-QString Addressee::uidLabel()
+TQString Addressee::uidLabel()
{
return i18n("Unique Identifier");
}
-void Addressee::setUri( const QString &id )
+void Addressee::setUri( const TQString &id )
{
if ( id == mData->uri ) return;
detach();
@@ -189,21 +189,21 @@ void Addressee::setUri( const QString &id )
mData->uri = id;
}
-QString Addressee::uri() const
+TQString Addressee::uri() const
{
return mData->uri;
}
-QString Addressee::uriLabel()
+TQString Addressee::uriLabel()
{
return i18n("Unique Resource Identifier");
}
--DEFINITIONS--
-void Addressee::setNameFromString( const QString &s )
+void Addressee::setNameFromString( const TQString &s )
{
- QString str = s;
+ TQString str = s;
//remove enclosing quotes from string
if ( str.length() > 1 && s[ 0 ] == '"' && s[ s.length() - 1 ] == '"' )
str = s.mid( 1, s.length() - 2 );
@@ -212,26 +212,26 @@ void Addressee::setNameFromString( const QString &s )
setName( str );
// clear all name parts
- setPrefix( QString::null );
- setGivenName( QString::null );
- setAdditionalName( QString::null );
- setFamilyName( QString::null );
- setSuffix( QString::null );
+ setPrefix( TQString::null );
+ setGivenName( TQString::null );
+ setAdditionalName( TQString::null );
+ setFamilyName( TQString::null );
+ setSuffix( TQString::null );
if ( str.isEmpty() )
return;
- QString spaceStr = " ";
- QString emptyStr = "";
+ TQString spaceStr = " ";
+ TQString emptyStr = "";
AddresseeHelper *helper = AddresseeHelper::self();
int i = str.find( ',' );
if( i < 0 ) {
- QStringList parts = QStringList::split( spaceStr, str );
+ TQStringList parts = TQStringList::split( spaceStr, str );
int leftOffset = 0;
int rightOffset = parts.count() - 1;
- QString suffix;
+ TQString suffix;
while ( rightOffset >= 0 ) {
if ( helper->containsSuffix( parts[ rightOffset ] ) ) {
suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? emptyStr : spaceStr));
@@ -244,7 +244,7 @@ void Addressee::setNameFromString( const QString &s )
if ( rightOffset < 0 )
return;
- QStringList inclusionList;
+ TQStringList inclusionList;
for ( int n = 1; (rightOffset - n >= 0) && (n < 4); ++n ) {
if ( helper->containsPrefix( parts[ rightOffset - n ].lower() ) ) {
inclusionList.prepend( parts[ rightOffset - n ] );
@@ -262,7 +262,7 @@ void Addressee::setNameFromString( const QString &s )
setGivenName( parts[ rightOffset ] );
}
- QString prefix;
+ TQString prefix;
while ( leftOffset < rightOffset ) {
if ( helper->containsTitle( parts[ leftOffset ] ) ) {
prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] );
@@ -277,23 +277,23 @@ void Addressee::setNameFromString( const QString &s )
leftOffset++;
}
- QString additionalName;
+ TQString additionalName;
while ( leftOffset < rightOffset ) {
additionalName.append( ( additionalName.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] );
leftOffset++;
}
setAdditionalName( additionalName );
} else {
- QString part1 = str.left( i );
- QString part2 = str.mid( i + 1 );
+ TQString part1 = str.left( i );
+ TQString part2 = str.mid( i + 1 );
- QStringList parts = QStringList::split( spaceStr, part1 );
+ TQStringList parts = TQStringList::split( spaceStr, part1 );
int leftOffset = 0;
int rightOffset = parts.count() - 1;
if ( parts.count() > 0 ) {
- QString suffix;
+ TQString suffix;
while ( rightOffset >= 0 ) {
if ( helper->containsSuffix( parts[ rightOffset ] ) ) {
suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? emptyStr : spaceStr));
@@ -309,7 +309,7 @@ void Addressee::setNameFromString( const QString &s )
} else
setFamilyName( parts[ rightOffset ] );
- QString prefix;
+ TQString prefix;
while ( leftOffset < rightOffset ) {
if ( helper->containsTitle( parts[ leftOffset ] ) ) {
prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] );
@@ -323,14 +323,14 @@ void Addressee::setNameFromString( const QString &s )
setSuffix( "" );
}
- parts = QStringList::split( spaceStr, part2 );
+ parts = TQStringList::split( spaceStr, part2 );
leftOffset = 0;
rightOffset = parts.count();
if ( parts.count() > 0 ) {
- QString prefix;
+ TQString prefix;
while ( leftOffset < rightOffset ) {
if ( helper->containsTitle( parts[ leftOffset ] ) ) {
prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] );
@@ -345,7 +345,7 @@ void Addressee::setNameFromString( const QString &s )
leftOffset++;
}
- QString additionalName;
+ TQString additionalName;
while ( leftOffset < rightOffset ) {
additionalName.append( ( additionalName.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] );
leftOffset++;
@@ -358,9 +358,9 @@ void Addressee::setNameFromString( const QString &s )
}
}
-QString Addressee::realName() const
+TQString Addressee::realName() const
{
- QString n( formattedName() );
+ TQString n( formattedName() );
if ( !n.isEmpty() )
return n;
@@ -375,31 +375,31 @@ QString Addressee::realName() const
return organization();
}
-QString Addressee::assembledName() const
+TQString Addressee::assembledName() const
{
- QString name = prefix() + " " + givenName() + " " + additionalName() + " " +
+ TQString name = prefix() + " " + givenName() + " " + additionalName() + " " +
familyName() + " " + suffix();
return name.simplifyWhiteSpace();
}
-QString Addressee::fullEmail( const QString &email ) const
+TQString Addressee::fullEmail( const TQString &email ) const
{
- QString e;
+ TQString e;
if ( email.isNull() ) {
e = preferredEmail();
} else {
e = email;
}
- if ( e.isEmpty() ) return QString::null;
+ if ( e.isEmpty() ) return TQString::null;
- QString text;
+ TQString text;
if ( realName().isEmpty() )
text = e;
else {
- QRegExp needQuotes( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" );
+ TQRegExp needQuotes( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" );
if ( realName().find( needQuotes ) != -1 ) {
- QString name = realName();
+ TQString name = realName();
name.replace( "\"", "\\\"" );
text = "\"" + name + "\" <" + e + ">";
} else
@@ -409,7 +409,7 @@ QString Addressee::fullEmail( const QString &email ) const
return text;
}
-void Addressee::insertEmail( const QString &email, bool preferred )
+void Addressee::insertEmail( const TQString &email, bool preferred )
{
if ( email.simplifyWhiteSpace().isEmpty() )
return;
@@ -417,7 +417,7 @@ void Addressee::insertEmail( const QString &email, bool preferred )
detach();
mData->empty = false;
- QStringList::Iterator it = mData->emails.find( email );
+ TQStringList::Iterator it = mData->emails.find( email );
if ( it != mData->emails.end() ) {
if ( !preferred || it == mData->emails.begin() ) return;
@@ -432,27 +432,27 @@ void Addressee::insertEmail( const QString &email, bool preferred )
}
}
-void Addressee::removeEmail( const QString &email )
+void Addressee::removeEmail( const TQString &email )
{
detach();
- QStringList::Iterator it = mData->emails.find( email );
+ TQStringList::Iterator it = mData->emails.find( email );
if ( it == mData->emails.end() ) return;
mData->emails.remove( it );
}
-QString Addressee::preferredEmail() const
+TQString Addressee::preferredEmail() const
{
- if ( mData->emails.count() == 0 ) return QString::null;
+ if ( mData->emails.count() == 0 ) return TQString::null;
else return mData->emails.first();
}
-QStringList Addressee::emails() const
+TQStringList Addressee::emails() const
{
return mData->emails;
}
-void Addressee::setEmails( const QStringList& emails ) {
+void Addressee::setEmails( const TQStringList& emails ) {
detach();
mData->emails = emails;
@@ -520,7 +520,7 @@ PhoneNumber::List Addressee::phoneNumbers( int type ) const
return list;
}
-PhoneNumber Addressee::findPhoneNumber( const QString &id ) const
+PhoneNumber Addressee::findPhoneNumber( const TQString &id ) const
{
PhoneNumber::List::ConstIterator it;
for( it = mData->phoneNumbers.constBegin(); it != mData->phoneNumbers.constEnd(); ++it ) {
@@ -559,7 +559,7 @@ void Addressee::removeKey( const Key &key )
}
}
-Key Addressee::key( int type, QString customTypeString ) const
+Key Addressee::key( int type, TQString customTypeString ) const
{
Key::List::ConstIterator it;
for( it = mData->keys.constBegin(); it != mData->keys.constEnd(); ++it ) {
@@ -576,7 +576,7 @@ Key Addressee::key( int type, QString customTypeString ) const
}
}
}
- return Key( QString(), type );
+ return Key( TQString(), type );
}
void Addressee::setKeys( const Key::List& list )
@@ -590,7 +590,7 @@ Key::List Addressee::keys() const
return mData->keys;
}
-Key::List Addressee::keys( int type, QString customTypeString ) const
+Key::List Addressee::keys( int type, TQString customTypeString ) const
{
Key::List list;
@@ -612,7 +612,7 @@ Key::List Addressee::keys( int type, QString customTypeString ) const
return list;
}
-Key Addressee::findKey( const QString &id ) const
+Key Addressee::findKey( const TQString &id ) const
{
Key::List::ConstIterator it;
for( it = mData->keys.constBegin(); it != mData->keys.constEnd(); ++it ) {
@@ -623,7 +623,7 @@ Key Addressee::findKey( const QString &id ) const
return Key();
}
-QString Addressee::asString() const
+TQString Addressee::asString() const
{
return "Smith, agent Smith...";
}
@@ -637,8 +637,8 @@ void Addressee::dump() const
--DEBUG--
kdDebug(5700) << " Emails {" << endl;
- const QStringList e = emails();
- QStringList::ConstIterator it;
+ const TQStringList e = emails();
+ TQStringList::ConstIterator it;
for( it = e.begin(); it != e.end(); ++it ) {
kdDebug(5700) << " " << (*it) << endl;
}
@@ -739,7 +739,7 @@ Address::List Addressee::addresses( int type ) const
return list;
}
-Address Addressee::findAddress( const QString &id ) const
+Address Addressee::findAddress( const TQString &id ) const
{
Address::List::ConstIterator it;
for( it = mData->addresses.constBegin(); it != mData->addresses.constEnd(); ++it ) {
@@ -750,7 +750,7 @@ Address Addressee::findAddress( const QString &id ) const
return Address();
}
-void Addressee::insertCategory( const QString &c )
+void Addressee::insertCategory( const TQString &c )
{
detach();
mData->empty = false;
@@ -760,22 +760,22 @@ void Addressee::insertCategory( const QString &c )
mData->categories.append( c );
}
-void Addressee::removeCategory( const QString &c )
+void Addressee::removeCategory( const TQString &c )
{
detach();
- QStringList::Iterator it = mData->categories.find( c );
+ TQStringList::Iterator it = mData->categories.find( c );
if ( it == mData->categories.end() ) return;
mData->categories.remove( it );
}
-bool Addressee::hasCategory( const QString &c ) const
+bool Addressee::hasCategory( const TQString &c ) const
{
return ( mData->categories.findIndex( c ) != -1 );
}
-void Addressee::setCategories( const QStringList &c )
+void Addressee::setCategories( const TQStringList &c )
{
detach();
mData->empty = false;
@@ -783,22 +783,22 @@ void Addressee::setCategories( const QStringList &c )
mData->categories = c;
}
-QStringList Addressee::categories() const
+TQStringList Addressee::categories() const
{
return mData->categories;
}
-void Addressee::insertCustom( const QString &app, const QString &name,
- const QString &value )
+void Addressee::insertCustom( const TQString &app, const TQString &name,
+ const TQString &value )
{
if ( value.isEmpty() || name.isEmpty() || app.isEmpty() ) return;
detach();
mData->empty = false;
- QString qualifiedName = app + "-" + name + ":";
+ TQString qualifiedName = app + "-" + name + ":";
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for( it = mData->custom.begin(); it != mData->custom.end(); ++it ) {
if ( (*it).startsWith( qualifiedName ) ) {
(*it) = qualifiedName + value;
@@ -809,13 +809,13 @@ void Addressee::insertCustom( const QString &app, const QString &name,
mData->custom.append( qualifiedName + value );
}
-void Addressee::removeCustom( const QString &app, const QString &name)
+void Addressee::removeCustom( const TQString &app, const TQString &name)
{
detach();
- QString qualifiedName = app + "-" + name + ":";
+ TQString qualifiedName = app + "-" + name + ":";
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for( it = mData->custom.begin(); it != mData->custom.end(); ++it ) {
if ( (*it).startsWith( qualifiedName ) ) {
mData->custom.remove( it );
@@ -824,12 +824,12 @@ void Addressee::removeCustom( const QString &app, const QString &name)
}
}
-QString Addressee::custom( const QString &app, const QString &name ) const
+TQString Addressee::custom( const TQString &app, const TQString &name ) const
{
- QString qualifiedName = app + "-" + name + ":";
- QString value;
+ TQString qualifiedName = app + "-" + name + ":";
+ TQString value;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = mData->custom.constBegin(); it != mData->custom.constEnd(); ++it ) {
if ( (*it).startsWith( qualifiedName ) ) {
value = (*it).mid( (*it).find( ":" ) + 1 );
@@ -840,7 +840,7 @@ QString Addressee::custom( const QString &app, const QString &name ) const
return value;
}
-void Addressee::setCustoms( const QStringList &l )
+void Addressee::setCustoms( const TQStringList &l )
{
detach();
mData->empty = false;
@@ -848,13 +848,13 @@ void Addressee::setCustoms( const QStringList &l )
mData->custom = l;
}
-QStringList Addressee::customs() const
+TQStringList Addressee::customs() const
{
return mData->custom;
}
-void Addressee::parseEmailAddress( const QString &rawEmail, QString &fullName,
- QString &email)
+void Addressee::parseEmailAddress( const TQString &rawEmail, TQString &fullName,
+ TQString &email)
{
// This is a simplified version of KPIM::splitAddress().
@@ -864,11 +864,11 @@ void Addressee::parseEmailAddress( const QString &rawEmail, QString &fullName,
return; // KPIM::AddressEmpty;
// The code works on 8-bit strings, so convert the input to UTF-8.
- QCString address = rawEmail.utf8();
+ TQCString address = rawEmail.utf8();
- QCString displayName;
- QCString addrSpec;
- QCString comment;
+ TQCString displayName;
+ TQCString addrSpec;
+ TQCString comment;
// The following is a primitive parser for a mailbox-list (cf. RFC 2822).
// The purpose is to extract a displayable string from the mailboxes.
@@ -980,8 +980,8 @@ ABORT_PARSING:
comment = comment.stripWhiteSpace();
addrSpec = addrSpec.stripWhiteSpace();
- fullName = QString::fromUtf8( displayName );
- email = QString::fromUtf8( addrSpec );
+ fullName = TQString::fromUtf8( displayName );
+ email = TQString::fromUtf8( addrSpec );
// check for errors
if ( inQuotedString )
@@ -999,7 +999,7 @@ ABORT_PARSING:
//displayName.truncate( 0 );
// Address of the form "foo@bar" or "foo@bar (Name)".
email = fullName;
- fullName = QString::fromUtf8( comment );
+ fullName = TQString::fromUtf8( comment );
}
}
@@ -1045,7 +1045,7 @@ bool Addressee::operator< ( const Addressee &addr )
return mSortMode->lesser( *this, addr );
}
-QDataStream &KABC::operator<<( QDataStream &s, const Addressee &a )
+TQDataStream &KABC::operator<<( TQDataStream &s, const Addressee &a )
{
if (!a.mData) return s;
@@ -1061,7 +1061,7 @@ QDataStream &KABC::operator<<( QDataStream &s, const Addressee &a )
return s;
}
-QDataStream &KABC::operator>>( QDataStream &s, Addressee &a )
+TQDataStream &KABC::operator>>( TQDataStream &s, Addressee &a )
{
if (!a.mData)
return s;
@@ -1098,7 +1098,7 @@ bool matchBinaryPattern( int value, int pattern )
}
template <class L>
-bool listEquals( const QValueList<L> &list, const QValueList<L> &pattern )
+bool listEquals( const TQValueList<L> &list, const TQValueList<L> &pattern )
{
if ( list.count() != pattern.count() )
return false;
@@ -1110,7 +1110,7 @@ bool listEquals( const QValueList<L> &list, const QValueList<L> &pattern )
return true;
}
-bool emailsEquals( const QStringList &list, const QStringList &pattern )
+bool emailsEquals( const TQStringList &list, const TQStringList &pattern )
{
if ( list.count() != pattern.count() )
return false;
@@ -1118,7 +1118,7 @@ bool emailsEquals( const QStringList &list, const QStringList &pattern )
if ( list.first() != pattern.first() )
return false;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it )
if ( pattern.find( *it ) == pattern.end() )
return false;
diff --git a/kabc/scripts/addressee.src.h b/kabc/scripts/addressee.src.h
index edb63ae60..f87edc5ec 100644
--- a/kabc/scripts/addressee.src.h
+++ b/kabc/scripts/addressee.src.h
@@ -21,10 +21,10 @@
#ifndef KABC_ADDRESSEE_H
#define KABC_ADDRESSEE_H
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <ksharedptr.h>
#include <kurl.h>
@@ -73,12 +73,12 @@ class SortMode;
*/
class KABC_EXPORT Addressee
{
- friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const Addressee & );
- friend KABC_EXPORT QDataStream &operator>>( QDataStream &, Addressee & );
+ friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Addressee & );
+ friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Addressee & );
public:
- typedef QValueList<Addressee> List;
- typedef QMap<QString, Addressee> Map;
+ typedef TQValueList<Addressee> List;
+ typedef TQMap<TQString, Addressee> Map;
/**
Construct an empty address book entry.
@@ -100,28 +100,28 @@ class KABC_EXPORT Addressee
/**
Set unique identifier.
*/
- void setUid( const QString &uid );
+ void setUid( const TQString &uid );
/**
Return unique identifier.
*/
- QString uid() const;
+ TQString uid() const;
/**
Return translated label for uid field.
*/
- static QString uidLabel();
+ static TQString uidLabel();
/**
Set unique resource identifier.
*/
- void setUri( const QString &uid );
+ void setUri( const TQString &uid );
/**
Return unique resource identifier.
*/
- QString uri() const;
+ TQString uri() const;
/**
Return translated label for uri field.
*/
- static QString uriLabel();
+ static TQString uriLabel();
--DECLARATIONS--
/**
@@ -129,26 +129,26 @@ class KABC_EXPORT Addressee
parts of the string with according fields. This function should probably
be a bit more clever.
*/
- void setNameFromString( const QString & );
+ void setNameFromString( const TQString & );
/**
Return the name of the addressee. This is calculated from all the name
fields.
*/
- QString realName() const;
+ TQString realName() const;
/**
Return the name that consists of all name parts.
*/
- QString assembledName() const;
+ TQString assembledName() const;
/**
Return email address including real name.
@param email Email address to be used to construct the full email string.
- If this is QString::null the preferred email address is used.
+ If this is TQString::null the preferred email address is used.
*/
- QString fullEmail( const QString &email=QString::null ) const;
+ TQString fullEmail( const TQString &email=TQString::null ) const;
/**
Insert an email address. If the email address already exists in this
@@ -158,30 +158,30 @@ class KABC_EXPORT Addressee
@param preferred Set to true, if this is the preferred email address of
the addressee.
*/
- void insertEmail( const QString &email, bool preferred=false );
+ void insertEmail( const TQString &email, bool preferred=false );
/**
Remove email address. If the email address doesn't exist, nothing happens.
*/
- void removeEmail( const QString &email );
+ void removeEmail( const TQString &email );
/**
Return preferred email address. This is the first email address or the
last one added with insertEmail() with a set preferred parameter.
*/
- QString preferredEmail() const;
+ TQString preferredEmail() const;
/**
Return list of all email addresses.
*/
- QStringList emails() const;
+ TQStringList emails() const;
/**
Set the emails to @p list.
The first email address gets the preferred one!
@param list The list of email addresses.
*/
- void setEmails( const QStringList& list);
+ void setEmails( const TQStringList& list);
/**
Insert a phone number. If a phone number with the same id already exists
@@ -213,7 +213,7 @@ class KABC_EXPORT Addressee
/**
Return phone number with the given id.
*/
- PhoneNumber findPhoneNumber( const QString &id ) const;
+ PhoneNumber findPhoneNumber( const TQString &id ) const;
/**
Insert a key. If a key with the same id already exists
@@ -233,7 +233,7 @@ class KABC_EXPORT Addressee
that should match. If you leave the string empty, the first
key with a custom value is returned.
*/
- Key key( int type, QString customTypeString = QString::null ) const;
+ Key key( int type, TQString customTypeString = TQString::null ) const;
/**
Return list of all keys.
@@ -252,12 +252,12 @@ class KABC_EXPORT Addressee
that should match. If you leave the string empty, all custom
keys will be returned.
*/
- Key::List keys( int type, QString customTypeString = QString::null ) const;
+ Key::List keys( int type, TQString customTypeString = TQString::null ) const;
/**
Return key with the given id.
*/
- Key findKey( const QString &id ) const;
+ Key findKey( const TQString &id ) const;
/**
Insert an address. If an address with the same id already exists
@@ -289,32 +289,32 @@ class KABC_EXPORT Addressee
/**
Return address with the given id.
*/
- Address findAddress( const QString &id ) const;
+ Address findAddress( const TQString &id ) const;
/**
Insert category. If the category already exists it is not duplicated.
*/
- void insertCategory( const QString & );
+ void insertCategory( const TQString & );
/**
Remove category.
*/
- void removeCategory( const QString & );
+ void removeCategory( const TQString & );
/**
Return, if addressee has the given category.
*/
- bool hasCategory( const QString & ) const;
+ bool hasCategory( const TQString & ) const;
/**
Set categories to given value.
*/
- void setCategories( const QStringList & );
+ void setCategories( const TQStringList & );
/**
Return list of all set categories.
*/
- QStringList categories() const;
+ TQStringList categories() const;
/**
Insert custom entry. The entry is identified by the name of the inserting
@@ -324,34 +324,34 @@ class KABC_EXPORT Addressee
An empty value isn't allowed (nothing happens if this is called with
any of the three arguments being empty)
*/
- void insertCustom( const QString &app, const QString &name,
- const QString &value );
+ void insertCustom( const TQString &app, const TQString &name,
+ const TQString &value );
/**
Remove custom entry.
*/
- void removeCustom( const QString &app, const QString &name );
+ void removeCustom( const TQString &app, const TQString &name );
/**
Return value of custom entry, identified by app and entry name.
*/
- QString custom( const QString &app, const QString &name ) const;
+ TQString custom( const TQString &app, const TQString &name ) const;
/**
Set all custom entries.
*/
- void setCustoms( const QStringList & );
+ void setCustoms( const TQStringList & );
/**
Return list of all custom entries.
*/
- QStringList customs() const;
+ TQStringList customs() const;
/**
Parse full email address. The result is given back in fullName and email.
*/
- static void parseEmailAddress( const QString &rawEmail, QString &fullName,
- QString &email );
+ static void parseEmailAddress( const TQString &rawEmail, TQString &fullName,
+ TQString &email );
/**
Debug output.
@@ -361,7 +361,7 @@ class KABC_EXPORT Addressee
/**
Returns string representation of the addressee.
*/
- QString asString() const;
+ TQString asString() const;
/**
Set resource where the addressee is from.
@@ -399,8 +399,8 @@ class KABC_EXPORT Addressee
static KABC::SortMode *mSortMode;
};
-KABC_EXPORT QDataStream &operator<<( QDataStream &, const Addressee & );
-KABC_EXPORT QDataStream &operator>>( QDataStream &, Addressee & );
+KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Addressee & );
+KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Addressee & );
}
diff --git a/kabc/scripts/field.src.cpp b/kabc/scripts/field.src.cpp
index 205ddaa06..91a27779d 100644
--- a/kabc/scripts/field.src.cpp
+++ b/kabc/scripts/field.src.cpp
@@ -31,9 +31,9 @@ class Field::FieldImpl
{
public:
FieldImpl( int fieldId, int category = 0,
- const QString &label = QString::null,
- const QString &key = QString::null,
- const QString &app = QString::null )
+ const TQString &label = TQString::null,
+ const TQString &key = TQString::null,
+ const TQString &app = TQString::null )
: mFieldId( fieldId ), mCategory( category ), mLabel( label ),
mKey( key ), mApp( app ) {}
@@ -46,17 +46,17 @@ class Field::FieldImpl
int fieldId() { return mFieldId; }
int category() { return mCategory; }
- QString label() { return mLabel; }
- QString key() { return mKey; }
- QString app() { return mApp; }
+ TQString label() { return mLabel; }
+ TQString key() { return mKey; }
+ TQString app() { return mApp; }
private:
int mFieldId;
int mCategory;
- QString mLabel;
- QString mKey;
- QString mApp;
+ TQString mLabel;
+ TQString mKey;
+ TQString mApp;
};
@@ -75,7 +75,7 @@ Field::~Field()
delete mImpl;
}
-QString Field::label()
+TQString Field::label()
{
switch ( mImpl->fieldId() ) {
--CASELABEL--
@@ -91,7 +91,7 @@ int Field::category()
return mImpl->category();
}
-QString Field::categoryLabel( int category )
+TQString Field::categoryLabel( int category )
{
switch ( category ) {
case All:
@@ -113,7 +113,7 @@ QString Field::categoryLabel( int category )
}
}
-QString Field::value( const KABC::Addressee &a )
+TQString Field::value( const KABC::Addressee &a )
{
switch ( mImpl->fieldId() ) {
--CASEVALUE--
@@ -123,7 +123,7 @@ QString Field::value( const KABC::Addressee &a )
if ( a.birthday().isValid() )
return a.birthday().date().toString( Qt::ISODate );
else
- return QString::null;
+ return TQString::null;
case FieldImpl::Url:
return a.url().prettyURL();
case FieldImpl::HomePhone:
@@ -146,7 +146,7 @@ QString Field::value( const KABC::Addressee &a )
return (*it).number();
}
- return QString::null;
+ return TQString::null;
}
case FieldImpl::BusinessPhone:
{
@@ -168,7 +168,7 @@ QString Field::value( const KABC::Addressee &a )
return (*it).number();
}
- return QString::null;
+ return TQString::null;
}
case FieldImpl::MobilePhone:
return a.phoneNumber( PhoneNumber::Cell ).number();
@@ -213,11 +213,11 @@ QString Field::value( const KABC::Addressee &a )
case FieldImpl::CustomField:
return a.custom( mImpl->app(), mImpl->key() );
default:
- return QString::null;
+ return TQString::null;
}
}
-bool Field::setValue( KABC::Addressee &a, const QString &value )
+bool Field::setValue( KABC::Addressee &a, const TQString &value )
{
switch ( mImpl->fieldId() ) {
--CASESETVALUE--
@@ -362,7 +362,7 @@ bool Field::setValue( KABC::Addressee &a, const QString &value )
return true;
}
case FieldImpl::Birthday:
- a.setBirthday( QDate::fromString( value, Qt::ISODate ) );
+ a.setBirthday( TQDate::fromString( value, Qt::ISODate ) );
return true;
case FieldImpl::CustomField:
a.insertCustom( mImpl->app(), mImpl->key(), value );
@@ -372,18 +372,18 @@ bool Field::setValue( KABC::Addressee &a, const QString &value )
}
}
-QString Field::sortKey( const KABC::Addressee &a )
+TQString Field::sortKey( const KABC::Addressee &a )
{
switch ( mImpl->fieldId() ) {
--CASEVALUE--
case FieldImpl::Birthday:
if ( a.birthday().isValid() ) {
- QDate date = a.birthday().date();
- QString key;
+ TQDate date = a.birthday().date();
+ TQString key;
key.sprintf( "%02d-%02d", date.month(), date.day() );
return key;
} else
- return QString( "00-00" );
+ return TQString( "00-00" );
default:
return value( a ).lower();
}
@@ -443,7 +443,7 @@ void Field::deleteFields()
mCustomFields.clear();
}
-void Field::saveFields( const QString &identifier,
+void Field::saveFields( const TQString &identifier,
const Field::List &fields )
{
KConfig *cfg = KGlobal::config();
@@ -452,29 +452,29 @@ void Field::saveFields( const QString &identifier,
saveFields( cfg, identifier, fields );
}
-void Field::saveFields( KConfig *cfg, const QString &identifier,
+void Field::saveFields( KConfig *cfg, const TQString &identifier,
const Field::List &fields )
{
- QValueList<int> fieldIds;
+ TQValueList<int> fieldIds;
int custom = 0;
Field::List::ConstIterator it;
for( it = fields.begin(); it != fields.end(); ++it ) {
fieldIds.append( (*it)->mImpl->fieldId() );
if( (*it)->isCustom() ) {
- QStringList customEntry;
+ TQStringList customEntry;
customEntry << (*it)->mImpl->label();
customEntry << (*it)->mImpl->key();
customEntry << (*it)->mImpl->app();
cfg->writeEntry( "KABC_CustomEntry_" + identifier + "_" +
- QString::number( custom++ ), customEntry );
+ TQString::number( custom++ ), customEntry );
}
}
cfg->writeEntry( identifier, fieldIds );
}
-Field::List Field::restoreFields( const QString &identifier )
+Field::List Field::restoreFields( const TQString &identifier )
{
KConfig *cfg = KGlobal::config();
KConfigGroupSaver( cfg, "KABCFields" );
@@ -482,20 +482,20 @@ Field::List Field::restoreFields( const QString &identifier )
return restoreFields( cfg, identifier );
}
-Field::List Field::restoreFields( KConfig *cfg, const QString &identifier )
+Field::List Field::restoreFields( KConfig *cfg, const TQString &identifier )
{
- const QValueList<int> fieldIds = cfg->readIntListEntry( identifier );
+ const TQValueList<int> fieldIds = cfg->readIntListEntry( identifier );
Field::List fields;
int custom = 0;
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for( it = fieldIds.begin(); it != fieldIds.end(); ++it ) {
FieldImpl *f = 0;
if ( (*it) == FieldImpl::CustomField ) {
- QStringList customEntry = cfg->readListEntry( "KABC_CustomEntry_" +
+ TQStringList customEntry = cfg->readListEntry( "KABC_CustomEntry_" +
identifier + "_" +
- QString::number( custom++ ) );
+ TQString::number( custom++ ) );
f = new FieldImpl( *it, CustomCategory, customEntry[ 0 ],
customEntry[ 1 ], customEntry[ 2 ] );
} else {
@@ -518,8 +518,8 @@ bool Field::equals( Field *field )
return mImpl->key() == field->mImpl->key();
}
-Field *Field::createCustomField( const QString &label, int category,
- const QString &key, const QString &app )
+Field *Field::createCustomField( const TQString &label, int category,
+ const TQString &key, const TQString &app )
{
Field *field = new Field( new FieldImpl( FieldImpl::CustomField,
category | CustomCategory,