summaryrefslogtreecommitdiffstats
path: root/kresources/kolab
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 /kresources/kolab
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 'kresources/kolab')
-rw-r--r--kresources/kolab/kabc/contact.cpp296
-rw-r--r--kresources/kolab/kabc/contact.h300
-rw-r--r--kresources/kolab/kabc/resourcekolab.cpp140
-rw-r--r--kresources/kolab/kabc/resourcekolab.h54
-rw-r--r--kresources/kolab/kabc/resourcekolab_plugin.cpp2
-rw-r--r--kresources/kolab/kcal/event.cpp40
-rw-r--r--kresources/kolab/kcal/event.h30
-rw-r--r--kresources/kolab/kcal/incidence.cpp162
-rw-r--r--kresources/kolab/kcal/incidence.h94
-rw-r--r--kresources/kolab/kcal/journal.cpp42
-rw-r--r--kresources/kolab/kcal/journal.h36
-rw-r--r--kresources/kolab/kcal/resourcekolab.cpp194
-rw-r--r--kresources/kolab/kcal/resourcekolab.h98
-rw-r--r--kresources/kolab/kcal/resourcekolab_plugin.cpp2
-rw-r--r--kresources/kolab/kcal/task.cpp52
-rw-r--r--kresources/kolab/kcal/task.h38
-rw-r--r--kresources/kolab/knotes/note.cpp42
-rw-r--r--kresources/kolab/knotes/note.h34
-rw-r--r--kresources/kolab/knotes/resourcekolab.cpp88
-rw-r--r--kresources/kolab/knotes/resourcekolab.h42
-rw-r--r--kresources/kolab/knotes/resourcekolab_plugin.cpp2
-rw-r--r--kresources/kolab/shared/kmailconnection.cpp134
-rw-r--r--kresources/kolab/shared/kmailconnection.h84
-rw-r--r--kresources/kolab/shared/kolabbase.cpp120
-rw-r--r--kresources/kolab/shared/kolabbase.h94
-rw-r--r--kresources/kolab/shared/resourcekolabbase.cpp100
-rw-r--r--kresources/kolab/shared/resourcekolabbase.h108
-rw-r--r--kresources/kolab/shared/subresource.cpp14
-rw-r--r--kresources/kolab/shared/subresource.h26
29 files changed, 1234 insertions, 1234 deletions
diff --git a/kresources/kolab/kabc/contact.cpp b/kresources/kolab/kabc/contact.cpp
index c5e819b3f..fc9087316 100644
--- a/kresources/kolab/kabc/contact.cpp
+++ b/kresources/kolab/kabc/contact.cpp
@@ -38,7 +38,7 @@
#include <libkdepim/distributionlist.h>
#include <kio/netaccess.h>
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <float.h>
using namespace Kolab;
@@ -56,7 +56,7 @@ Contact::Contact( const KABC::Addressee* addr )
}
// loading (xml->addressee)
-Contact::Contact( const QString& xml, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum )
+Contact::Contact( const TQString& xml, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum )
: mHasGeo( false )
{
load( xml );
@@ -72,252 +72,252 @@ Contact::~Contact()
{
}
-void Contact::setGivenName( const QString& name )
+void Contact::setGivenName( const TQString& name )
{
mGivenName = name;
}
-QString Contact::givenName() const
+TQString Contact::givenName() const
{
return mGivenName;
}
-void Contact::setMiddleNames( const QString& names )
+void Contact::setMiddleNames( const TQString& names )
{
mMiddleNames = names;
}
-QString Contact::middleNames() const
+TQString Contact::middleNames() const
{
return mMiddleNames;
}
-void Contact::setLastName( const QString& name )
+void Contact::setLastName( const TQString& name )
{
mLastName = name;
}
-QString Contact::lastName() const
+TQString Contact::lastName() const
{
return mLastName;
}
-void Contact::setFullName( const QString& name )
+void Contact::setFullName( const TQString& name )
{
mFullName = name;
}
-QString Contact::fullName() const
+TQString Contact::fullName() const
{
return mFullName;
}
-void Contact::setInitials( const QString& initials )
+void Contact::setInitials( const TQString& initials )
{
mInitials = initials;
}
-QString Contact::initials() const
+TQString Contact::initials() const
{
return mInitials;
}
-void Contact::setPrefix( const QString& prefix )
+void Contact::setPrefix( const TQString& prefix )
{
mPrefix = prefix;
}
-QString Contact::prefix() const
+TQString Contact::prefix() const
{
return mPrefix;
}
-void Contact::setSuffix( const QString& suffix )
+void Contact::setSuffix( const TQString& suffix )
{
mSuffix = suffix;
}
-QString Contact::suffix() const
+TQString Contact::suffix() const
{
return mSuffix;
}
-void Contact::setRole( const QString& role )
+void Contact::setRole( const TQString& role )
{
mRole = role;
}
-QString Contact::role() const
+TQString Contact::role() const
{
return mRole;
}
-void Contact::setFreeBusyUrl( const QString& fbUrl )
+void Contact::setFreeBusyUrl( const TQString& fbUrl )
{
mFreeBusyUrl = fbUrl;
}
-QString Contact::freeBusyUrl() const
+TQString Contact::freeBusyUrl() const
{
return mFreeBusyUrl;
}
-void Contact::setOrganization( const QString& organization )
+void Contact::setOrganization( const TQString& organization )
{
mOrganization = organization;
}
-QString Contact::organization() const
+TQString Contact::organization() const
{
return mOrganization;
}
-void Contact::setWebPage( const QString& url )
+void Contact::setWebPage( const TQString& url )
{
mWebPage = url;
}
-QString Contact::webPage() const
+TQString Contact::webPage() const
{
return mWebPage;
}
-void Contact::setIMAddress( const QString& imAddress )
+void Contact::setIMAddress( const TQString& imAddress )
{
mIMAddress = imAddress;
}
-QString Contact::imAddress() const
+TQString Contact::imAddress() const
{
return mIMAddress;
}
-void Contact::setDepartment( const QString& department )
+void Contact::setDepartment( const TQString& department )
{
mDepartment = department;
}
-QString Contact::department() const
+TQString Contact::department() const
{
return mDepartment;
}
-void Contact::setOfficeLocation( const QString& location )
+void Contact::setOfficeLocation( const TQString& location )
{
mOfficeLocation = location;
}
-QString Contact::officeLocation() const
+TQString Contact::officeLocation() const
{
return mOfficeLocation;
}
-void Contact::setProfession( const QString& profession )
+void Contact::setProfession( const TQString& profession )
{
mProfession = profession;
}
-QString Contact::profession() const
+TQString Contact::profession() const
{
return mProfession;
}
-// void Contact::setJobTitle( const QString& title )
+// void Contact::setJobTitle( const TQString& title )
// {
// mJobTitle = title;
// }
-// QString Contact::jobTitle() const
+// TQString Contact::jobTitle() const
// {
// return mJobTitle;
// }
-void Contact::setManagerName( const QString& name )
+void Contact::setManagerName( const TQString& name )
{
mManagerName = name;
}
-QString Contact::managerName() const
+TQString Contact::managerName() const
{
return mManagerName;
}
-void Contact::setAssistant( const QString& name )
+void Contact::setAssistant( const TQString& name )
{
mAssistant = name;
}
-QString Contact::assistant() const
+TQString Contact::assistant() const
{
return mAssistant;
}
-void Contact::setNickName( const QString& name )
+void Contact::setNickName( const TQString& name )
{
mNickName = name;
}
-QString Contact::nickName() const
+TQString Contact::nickName() const
{
return mNickName;
}
-void Contact::setSpouseName( const QString& name )
+void Contact::setSpouseName( const TQString& name )
{
mSpouseName = name;
}
-QString Contact::spouseName() const
+TQString Contact::spouseName() const
{
return mSpouseName;
}
-void Contact::setBirthday( const QDate& date )
+void Contact::setBirthday( const TQDate& date )
{
mBirthday = date;
}
-QDate Contact::birthday() const
+TQDate Contact::birthday() const
{
return mBirthday;
}
-void Contact::setAnniversary( const QDate& date )
+void Contact::setAnniversary( const TQDate& date )
{
mAnniversary = date;
}
-QDate Contact::anniversary() const
+TQDate Contact::anniversary() const
{
return mAnniversary;
}
-void Contact::setChildren( const QString& children )
+void Contact::setChildren( const TQString& children )
{
mChildren = children;
}
-QString Contact::children() const
+TQString Contact::children() const
{
return mChildren;
}
-void Contact::setGender( const QString& gender )
+void Contact::setGender( const TQString& gender )
{
mGender = gender;
}
-QString Contact::gender() const
+TQString Contact::gender() const
{
return mGender;
}
-void Contact::setLanguage( const QString& language )
+void Contact::setLanguage( const TQString& language )
{
mLanguage = language;
}
-QString Contact::language() const
+TQString Contact::language() const
{
return mLanguage;
}
@@ -327,12 +327,12 @@ void Contact::addPhoneNumber( const PhoneNumber& number )
mPhoneNumbers.append( number );
}
-QValueList<Contact::PhoneNumber>& Contact::phoneNumbers()
+TQValueList<Contact::PhoneNumber>& Contact::phoneNumbers()
{
return mPhoneNumbers;
}
-const QValueList<Contact::PhoneNumber>& Contact::phoneNumbers() const
+const TQValueList<Contact::PhoneNumber>& Contact::phoneNumbers() const
{
return mPhoneNumbers;
}
@@ -342,12 +342,12 @@ void Contact::addEmail( const Email& email )
mEmails.append( email );
}
-QValueList<Contact::Email>& Contact::emails()
+TQValueList<Contact::Email>& Contact::emails()
{
return mEmails;
}
-const QValueList<Contact::Email>& Contact::emails() const
+const TQValueList<Contact::Email>& Contact::emails() const
{
return mEmails;
}
@@ -357,34 +357,34 @@ void Contact::addAddress( const Contact::Address& address )
mAddresses.append( address );
}
-QValueList<Contact::Address>& Contact::addresses()
+TQValueList<Contact::Address>& Contact::addresses()
{
return mAddresses;
}
-const QValueList<Contact::Address>& Contact::addresses() const
+const TQValueList<Contact::Address>& Contact::addresses() const
{
return mAddresses;
}
-void Contact::setPreferredAddress( const QString& address )
+void Contact::setPreferredAddress( const TQString& address )
{
mPreferredAddress = address;
}
-QString Contact::preferredAddress() const
+TQString Contact::preferredAddress() const
{
return mPreferredAddress;
}
-bool Contact::loadNameAttribute( QDomElement& element )
+bool Contact::loadNameAttribute( TQDomElement& element )
{
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
if ( tagName == "given-name" )
setGivenName( e.text() );
@@ -410,9 +410,9 @@ bool Contact::loadNameAttribute( QDomElement& element )
return true;
}
-void Contact::saveNameAttribute( QDomElement& element ) const
+void Contact::saveNameAttribute( TQDomElement& element ) const
{
- QDomElement e = element.ownerDocument().createElement( "name" );
+ TQDomElement e = element.ownerDocument().createElement( "name" );
element.appendChild( e );
writeString( e, "given-name", givenName() );
@@ -424,15 +424,15 @@ void Contact::saveNameAttribute( QDomElement& element ) const
writeString( e, "suffix", suffix() );
}
-bool Contact::loadPhoneAttribute( QDomElement& element )
+bool Contact::loadPhoneAttribute( TQDomElement& element )
{
PhoneNumber number;
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
if ( tagName == "type" )
number.type = e.text();
@@ -449,11 +449,11 @@ bool Contact::loadPhoneAttribute( QDomElement& element )
return true;
}
-void Contact::savePhoneAttributes( QDomElement& element ) const
+void Contact::savePhoneAttributes( TQDomElement& element ) const
{
- QValueList<PhoneNumber>::ConstIterator it = mPhoneNumbers.begin();
+ TQValueList<PhoneNumber>::ConstIterator it = mPhoneNumbers.begin();
for ( ; it != mPhoneNumbers.end(); ++it ) {
- QDomElement e = element.ownerDocument().createElement( "phone" );
+ TQDomElement e = element.ownerDocument().createElement( "phone" );
element.appendChild( e );
const PhoneNumber& p = *it;
writeString( e, "type", p.type );
@@ -461,14 +461,14 @@ void Contact::savePhoneAttributes( QDomElement& element ) const
}
}
-void Contact::saveEmailAttributes( QDomElement& element ) const
+void Contact::saveEmailAttributes( TQDomElement& element ) const
{
- QValueList<Email>::ConstIterator it = mEmails.begin();
+ TQValueList<Email>::ConstIterator it = mEmails.begin();
for ( ; it != mEmails.end(); ++it )
saveEmailAttribute( element, *it );
}
-void Contact::loadCustomAttributes( QDomElement& element )
+void Contact::loadCustomAttributes( TQDomElement& element )
{
Custom custom;
custom.app = element.attribute( "app" );
@@ -477,16 +477,16 @@ void Contact::loadCustomAttributes( QDomElement& element )
mCustomList.append( custom );
}
-void Contact::saveCustomAttributes( QDomElement& element ) const
+void Contact::saveCustomAttributes( TQDomElement& element ) const
{
- QValueList<Custom>::ConstIterator it = mCustomList.begin();
+ TQValueList<Custom>::ConstIterator it = mCustomList.begin();
for ( ; it != mCustomList.end(); ++it ) {
Q_ASSERT( !(*it).name.isEmpty() );
if ( (*it).app == s_unhandledTagAppName ) {
writeString( element, (*it).name, (*it).value );
} else {
// Let's use attributes so that other tag-preserving-code doesn't need sub-elements
- QDomElement e = element.ownerDocument().createElement( "x-custom" );
+ TQDomElement e = element.ownerDocument().createElement( "x-custom" );
element.appendChild( e );
e.setAttribute( "app", (*it).app );
e.setAttribute( "name", (*it).name );
@@ -495,16 +495,16 @@ void Contact::saveCustomAttributes( QDomElement& element ) const
}
}
-bool Contact::loadAddressAttribute( QDomElement& element )
+bool Contact::loadAddressAttribute( TQDomElement& element )
{
Address address;
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
if ( tagName == "type" )
address.type = e.text();
@@ -533,15 +533,15 @@ bool Contact::loadAddressAttribute( QDomElement& element )
return true;
}
-void Contact::saveAddressAttributes( QDomElement& element ) const
+void Contact::saveAddressAttributes( TQDomElement& element ) const
{
- QValueList<Address>::ConstIterator it = mAddresses.begin();
+ TQValueList<Address>::ConstIterator it = mAddresses.begin();
for ( ; it != mAddresses.end(); ++it ) {
- QDomElement e = element.ownerDocument().createElement( "address" );
+ TQDomElement e = element.ownerDocument().createElement( "address" );
element.appendChild( e );
const Address& a = *it;
writeString( e, "type", a.type );
- writeString( e, "x-kde-type", QString::number( a.kdeAddressType ) );
+ writeString( e, "x-kde-type", TQString::number( a.kdeAddressType ) );
if ( !a.street.isEmpty() )
writeString( e, "street", a.street );
if ( !a.pobox.isEmpty() )
@@ -558,15 +558,15 @@ void Contact::saveAddressAttributes( QDomElement& element ) const
}
-void Kolab::Contact::loadDistrListMember( const QDomElement& element )
+void Kolab::Contact::loadDistrListMember( const TQDomElement& element )
{
Member member;
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
if ( tagName == "display-name" )
member.displayName = e.text();
else if ( tagName == "smtp-address" )
@@ -576,11 +576,11 @@ void Kolab::Contact::loadDistrListMember( const QDomElement& element )
mDistrListMembers.append( member );
}
-void Contact::saveDistrListMembers( QDomElement& element ) const
+void Contact::saveDistrListMembers( TQDomElement& element ) const
{
- QValueList<Member>::ConstIterator it = mDistrListMembers.begin();
+ TQValueList<Member>::ConstIterator it = mDistrListMembers.begin();
for( ; it != mDistrListMembers.end(); ++it ) {
- QDomElement e = element.ownerDocument().createElement( "member" );
+ TQDomElement e = element.ownerDocument().createElement( "member" );
element.appendChild( e );
const Member& m = *it;
writeString( e, "display-name", m.displayName );
@@ -588,9 +588,9 @@ void Contact::saveDistrListMembers( QDomElement& element ) const
}
}
-bool Contact::loadAttribute( QDomElement& element )
+bool Contact::loadAttribute( TQDomElement& element )
{
- const QString tagName = element.tagName();
+ const TQString tagName = element.tagName();
switch ( tagName[0].latin1() ) {
case 'a':
if ( tagName == "address" )
@@ -762,7 +762,7 @@ bool Contact::loadAttribute( QDomElement& element )
return KolabBase::loadAttribute( element );
}
-bool Contact::saveAttributes( QDomElement& element ) const
+bool Contact::saveAttributes( TQDomElement& element ) const
{
// Save the base class elements
KolabBase::saveAttributes( element );
@@ -804,8 +804,8 @@ bool Contact::saveAttributes( QDomElement& element ) const
saveAddressAttributes( element );
writeString( element, "preferred-address", preferredAddress() );
if ( mHasGeo ) {
- writeString( element, "latitude", QString::number( latitude(), 'g', DBL_DIG ) );
- writeString( element, "longitude", QString::number( longitude(), 'g', DBL_DIG ) );
+ writeString( element, "latitude", TQString::number( latitude(), 'g', DBL_DIG ) );
+ writeString( element, "longitude", TQString::number( longitude(), 'g', DBL_DIG ) );
}
}
saveCustomAttributes( element );
@@ -813,9 +813,9 @@ bool Contact::saveAttributes( QDomElement& element ) const
return true;
}
-bool Contact::loadXML( const QDomDocument& document )
+bool Contact::loadXML( const TQDomDocument& document )
{
- QDomElement top = document.documentElement();
+ TQDomElement top = document.documentElement();
mIsDistributionList = top.tagName() == "distribution-list";
if ( top.tagName() != "contact" && !mIsDistributionList ) {
@@ -825,11 +825,11 @@ bool Contact::loadXML( const QDomDocument& document )
}
- for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( !loadAttribute( e ) ) {
// Unhandled tag - save for later storage
//kdDebug() << "Saving unhandled tag " << e.tagName() << endl;
@@ -846,10 +846,10 @@ bool Contact::loadXML( const QDomDocument& document )
return true;
}
-QString Contact::saveXML() const
+TQString Contact::saveXML() const
{
- QDomDocument document = domTree();
- QDomElement element = document.createElement(
+ TQDomDocument document = domTree();
+ TQDomElement element = document.createElement(
mIsDistributionList ? "distribution-list" : "contact" );
element.setAttribute( "version", "1.0" );
saveAttributes( element );
@@ -857,7 +857,7 @@ QString Contact::saveXML() const
return document.toString();
}
-static QString addressTypeToString( int /*KABC::Address::Type*/ type )
+static TQString addressTypeToString( int /*KABC::Address::Type*/ type )
{
if ( type & KABC::Address::Home )
return "home";
@@ -866,7 +866,7 @@ static QString addressTypeToString( int /*KABC::Address::Type*/ type )
return "other";
}
-static int addressTypeFromString( const QString& type )
+static int addressTypeFromString( const TQString& type )
{
if ( type == "home" )
return KABC::Address::Home;
@@ -876,12 +876,12 @@ static int addressTypeFromString( const QString& type )
return KABC::Address::Dom | KABC::Address::Intl | KABC::Address::Postal | KABC::Address::Parcel;
}
-static QStringList phoneTypeToString( int /*KABC::PhoneNumber::Types*/ type )
+static TQStringList phoneTypeToString( int /*KABC::PhoneNumber::Types*/ type )
{
// KABC has a bitfield, i.e. the same phone number can be used for work and home
// and fax and cellphone etc. etc.
// So when saving we need to create as many tags as bits that were set.
- QStringList types;
+ TQStringList types;
if ( type & KABC::PhoneNumber::Fax ) {
if ( type & KABC::PhoneNumber::Home )
types << "homefax";
@@ -936,7 +936,7 @@ static QStringList phoneTypeToString( int /*KABC::PhoneNumber::Types*/ type )
return types;
}
-static int /*KABC::PhoneNumber::Types*/ phoneTypeFromString( const QString& type )
+static int /*KABC::PhoneNumber::Types*/ phoneTypeFromString( const TQString& type )
{
if ( type == "homefax" )
return KABC::PhoneNumber::Home | KABC::PhoneNumber::Fax;
@@ -1030,15 +1030,15 @@ void Contact::setFields( const KABC::Addressee* addressee )
setSpouseName( addressee->custom( "KADDRESSBOOK", "X-SpousesName" ) );
if ( !addressee->birthday().isNull() )
setBirthday( addressee->birthday().date() );
- const QString& anniversary = addressee->custom( "KADDRESSBOOK", "X-Anniversary" );
+ const TQString& anniversary = addressee->custom( "KADDRESSBOOK", "X-Anniversary" );
if ( !anniversary.isEmpty() )
setAnniversary( stringToDate( anniversary ) );
- const QStringList emails = addressee->emails();
+ const TQStringList emails = addressee->emails();
// Conversion problem here:
// KABC::Addressee has only one full name and N addresses, but the XML format
// has N times (fullname+address). So we just copy the fullname over and ignore it on loading.
- for ( QStringList::ConstIterator it = emails.begin(); it != emails.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = emails.begin(); it != emails.end(); ++it ) {
Email email;
email.displayName = fullName();
email.smtpAddress = *it;
@@ -1046,7 +1046,7 @@ void Contact::setFields( const KABC::Addressee* addressee )
}
// Now the real-world addresses
- QString preferredAddress = "home";
+ TQString preferredAddress = "home";
const KABC::Address::List addresses = addressee->addresses();
for ( KABC::Address::List::ConstIterator it = addresses.begin() ; it != addresses.end(); ++it ) {
Address address;
@@ -1070,8 +1070,8 @@ void Contact::setFields( const KABC::Addressee* addressee )
const KABC::PhoneNumber::List phones = addressee->phoneNumbers();
for ( KABC::PhoneNumber::List::ConstIterator it = phones.begin(); it != phones.end(); ++it ) {
// Create a tag per phone type set in the bitfield
- QStringList types = phoneTypeToString( (*it).type() );
- for( QStringList::Iterator typit = types.begin(); typit != types.end(); ++typit ) {
+ TQStringList types = phoneTypeToString( (*it).type() );
+ for( TQStringList::Iterator typit = types.begin(); typit != types.end(); ++typit ) {
PhoneNumber phoneNumber;
phoneNumber.type = *typit;
phoneNumber.number = (*it).number();
@@ -1102,21 +1102,21 @@ void Contact::setFields( const KABC::Addressee* addressee )
// Other KADDRESSBOOK custom fields than those already handled
// (includes e.g. crypto settings, and extra im addresses)
- QStringList knownCustoms;
+ TQStringList knownCustoms;
for ( const char** p = s_knownCustomFields; *p; ++p )
- knownCustoms << QString::fromLatin1( *p );
- QStringList customs = addressee->customs();
- for( QStringList::Iterator it = customs.begin(); it != customs.end(); ++it ) {
+ knownCustoms << TQString::fromLatin1( *p );
+ TQStringList customs = addressee->customs();
+ for( TQStringList::Iterator it = customs.begin(); it != customs.end(); ++it ) {
// KABC::Addressee doesn't offer a real way to iterate over customs, other than splitting strings ourselves
// The format is "app-name:value".
int pos = (*it).find( '-' );
if ( pos == -1 ) continue;
- QString app = (*it).left( pos );
+ TQString app = (*it).left( pos );
if ( app == "KOLAB" ) continue;
- QString name = (*it).mid( pos + 1 );
+ TQString name = (*it).mid( pos + 1 );
pos = name.find( ':' );
if ( pos == -1 ) continue;
- QString value = name.mid( pos + 1 );
+ TQString value = name.mid( pos + 1 );
name = name.left( pos );
if ( !knownCustoms.contains( name ) ) {
//kdDebug() << k_funcinfo << "app=" << app << " name=" << name << " value=" << value << endl;
@@ -1150,9 +1150,9 @@ void Contact::saveTo( KABC::Addressee* addressee )
if ( mIsDistributionList ) {
KPIM::DistributionList distrList( *addressee );
distrList.setName( fullName() );
- QValueList<Member>::ConstIterator mit = mDistrListMembers.begin();
+ TQValueList<Member>::ConstIterator mit = mDistrListMembers.begin();
for ( ; mit != mDistrListMembers.end(); ++mit ) {
- QString displayName = (*mit).displayName;
+ TQString displayName = (*mit).displayName;
// fixup the display name DistributionList::assumes neither ',' nor ';' is present
displayName.replace( ',', ' ' );
displayName.replace( ';', ' ' );
@@ -1183,7 +1183,7 @@ void Contact::saveTo( KABC::Addressee* addressee )
addressee->setNickName( nickName() );
addressee->insertCustom( "KADDRESSBOOK", "X-SpousesName", spouseName() );
if ( birthday().isValid() )
- addressee->setBirthday( QDateTime( birthday() ) );
+ addressee->setBirthday( TQDateTime( birthday() ) );
if ( anniversary().isValid() )
addressee->insertCustom( "KADDRESSBOOK", "X-Anniversary",
@@ -1208,14 +1208,14 @@ void Contact::saveTo( KABC::Addressee* addressee )
if ( mHasGeo )
addressee->setGeo( KABC::Geo( mLatitude, mLongitude ) );
- QStringList emailAddresses;
- for ( QValueList<Email>::ConstIterator it = mEmails.begin(); it != mEmails.end(); ++it ) {
+ TQStringList emailAddresses;
+ for ( TQValueList<Email>::ConstIterator it = mEmails.begin(); it != mEmails.end(); ++it ) {
// we can't do anything with (*it).displayName
emailAddresses.append( (*it).smtpAddress );
}
addressee->setEmails( emailAddresses );
- for ( QValueList<Address>::ConstIterator it = mAddresses.begin(); it != mAddresses.end(); ++it ) {
+ for ( TQValueList<Address>::ConstIterator it = mAddresses.begin(); it != mAddresses.end(); ++it ) {
KABC::Address address;
int type = (*it).kdeAddressType;
if ( type == -1 ) { // no kde-specific type available
@@ -1233,37 +1233,37 @@ void Contact::saveTo( KABC::Addressee* addressee )
addressee->insertAddress( address );
}
- for ( QValueList<PhoneNumber>::ConstIterator it = mPhoneNumbers.begin(); it != mPhoneNumbers.end(); ++it ) {
+ for ( TQValueList<PhoneNumber>::ConstIterator it = mPhoneNumbers.begin(); it != mPhoneNumbers.end(); ++it ) {
KABC::PhoneNumber number;
number.setType( phoneTypeFromString( (*it).type ) );
number.setNumber( (*it).number );
addressee->insertPhoneNumber( number );
}
- for( QValueList<Custom>::ConstIterator it = mCustomList.begin(); it != mCustomList.end(); ++it ) {
- QString app = (*it).app.isEmpty() ? QString::fromLatin1( "KADDRESSBOOK" ) : (*it).app;
+ for( TQValueList<Custom>::ConstIterator it = mCustomList.begin(); it != mCustomList.end(); ++it ) {
+ TQString app = (*it).app.isEmpty() ? TQString::fromLatin1( "KADDRESSBOOK" ) : (*it).app;
addressee->insertCustom( app, (*it).name, (*it).value );
}
//kdDebug(5006) << addressee->customs() << endl;
}
-QImage Contact::loadPictureFromKMail( const QString& attachmentName, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum )
+TQImage Contact::loadPictureFromKMail( const TQString& attachmentName, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum )
{
- QImage img;
+ TQImage img;
KURL url;
if ( resource->kmailGetAttachment( url, subResource, sernum, attachmentName ) && !url.isEmpty() ) {
- const QString path = url.path();
+ const TQString path = url.path();
img.load( path );
- QFile::remove(path);
+ TQFile::remove(path);
}
return img;
}
-QImage Contact::loadPictureFromAddressee( const KABC::Picture& picture )
+TQImage Contact::loadPictureFromAddressee( const KABC::Picture& picture )
{
- QImage img;
+ TQImage img;
if ( !picture.isIntern() && !picture.url().isEmpty() ) {
- QString tmpFile;
+ TQString tmpFile;
if ( KIO::NetAccess::download( picture.url(), tmpFile, 0 /*no widget known*/ ) ) {
img.load( tmpFile );
KIO::NetAccess::removeTempFile( tmpFile );
@@ -1273,12 +1273,12 @@ QImage Contact::loadPictureFromAddressee( const KABC::Picture& picture )
return img;
}
-QByteArray Kolab::Contact::loadDataFromKMail( const QString& attachmentName, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum )
+TQByteArray Kolab::Contact::loadDataFromKMail( const TQString& attachmentName, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum )
{
- QByteArray data;
+ TQByteArray data;
KURL url;
if ( resource->kmailGetAttachment( url, subResource, sernum, attachmentName ) && !url.isEmpty() ) {
- QFile f( url.path() );
+ TQFile f( url.path() );
if ( f.open( IO_ReadOnly ) ) {
data = f.readAll();
f.close();
@@ -1288,13 +1288,13 @@ QByteArray Kolab::Contact::loadDataFromKMail( const QString& attachmentName, KAB
return data;
}
-QByteArray Kolab::Contact::loadSoundFromAddressee( const KABC::Sound& sound )
+TQByteArray Kolab::Contact::loadSoundFromAddressee( const KABC::Sound& sound )
{
- QByteArray data;
+ TQByteArray data;
if ( !sound.isIntern() && !sound.url().isEmpty() ) {
- QString tmpFile;
+ TQString tmpFile;
if ( KIO::NetAccess::download( sound.url(), tmpFile, 0 /*no widget known*/ ) ) {
- QFile f( tmpFile );
+ TQFile f( tmpFile );
if ( f.open( IO_ReadOnly ) ) {
data = f.readAll();
f.close();
@@ -1306,7 +1306,7 @@ QByteArray Kolab::Contact::loadSoundFromAddressee( const KABC::Sound& sound )
return data;
}
-QString Kolab::Contact::productID() const
+TQString Kolab::Contact::productID() const
{
// TODO: When KAB has the version number in a header file, don't hardcode (Bo)
// Or we could use Addressee::productID? (David)
diff --git a/kresources/kolab/kabc/contact.h b/kresources/kolab/kabc/contact.h
index 0c06dfb8a..39a235cc2 100644
--- a/kresources/kolab/kabc/contact.h
+++ b/kresources/kolab/kabc/contact.h
@@ -34,7 +34,7 @@
#define KOLABCONTACT_H
#include <kolabbase.h>
-#include <qimage.h>
+#include <tqimage.h>
namespace KABC {
class Addressee;
@@ -49,8 +49,8 @@ class Contact : public KolabBase {
public:
struct PhoneNumber {
public:
- QString type;
- QString number;
+ TQString type;
+ TQString number;
};
struct Address {
@@ -59,126 +59,126 @@ public:
{
}
int kdeAddressType; // KABC::Address::Type
- QString type; // kolab-compliant address type: home, work or other
- QString street;
- QString pobox;
- QString locality;
- QString region;
- QString postalCode;
- QString country;
+ TQString type; // kolab-compliant address type: home, work or other
+ TQString street;
+ TQString pobox;
+ TQString locality;
+ TQString region;
+ TQString postalCode;
+ TQString country;
};
explicit Contact( const KABC::Addressee* address );
- Contact( const QString& xml, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum );
+ Contact( const TQString& xml, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum );
~Contact();
void saveTo( KABC::Addressee* address );
- QString type() const { return "Contact"; }
+ TQString type() const { return "Contact"; }
- void setGivenName( const QString& name );
- QString givenName() const;
+ void setGivenName( const TQString& name );
+ TQString givenName() const;
- void setMiddleNames( const QString& names );
- QString middleNames() const;
+ void setMiddleNames( const TQString& names );
+ TQString middleNames() const;
- void setLastName( const QString& name );
- QString lastName() const;
+ void setLastName( const TQString& name );
+ TQString lastName() const;
- void setFullName( const QString& name );
- QString fullName() const;
+ void setFullName( const TQString& name );
+ TQString fullName() const;
- void setInitials( const QString& initials );
- QString initials() const;
+ void setInitials( const TQString& initials );
+ TQString initials() const;
- void setPrefix( const QString& prefix );
- QString prefix() const;
+ void setPrefix( const TQString& prefix );
+ TQString prefix() const;
- void setSuffix( const QString& suffix );
- QString suffix() const;
+ void setSuffix( const TQString& suffix );
+ TQString suffix() const;
- void setRole( const QString& role );
- QString role() const;
+ void setRole( const TQString& role );
+ TQString role() const;
- void setFreeBusyUrl( const QString& fbUrl );
- QString freeBusyUrl() const;
+ void setFreeBusyUrl( const TQString& fbUrl );
+ TQString freeBusyUrl() const;
- void setOrganization( const QString& organization );
- QString organization() const;
+ void setOrganization( const TQString& organization );
+ TQString organization() const;
- void setWebPage( const QString& url );
- QString webPage() const;
+ void setWebPage( const TQString& url );
+ TQString webPage() const;
- void setIMAddress( const QString& imAddress );
- QString imAddress() const;
+ void setIMAddress( const TQString& imAddress );
+ TQString imAddress() const;
- void setDepartment( const QString& department );
- QString department() const;
+ void setDepartment( const TQString& department );
+ TQString department() const;
- void setOfficeLocation( const QString& location );
- QString officeLocation() const;
+ void setOfficeLocation( const TQString& location );
+ TQString officeLocation() const;
- void setProfession( const QString& profession );
- QString profession() const;
+ void setProfession( const TQString& profession );
+ TQString profession() const;
// not shown in the kaddressbook GUI
- //void setJobTitle( const QString& title );
- //QString jobTitle() const;
+ //void setJobTitle( const TQString& title );
+ //TQString jobTitle() const;
- void setManagerName( const QString& name );
- QString managerName() const;
+ void setManagerName( const TQString& name );
+ TQString managerName() const;
- void setAssistant( const QString& name );
- QString assistant() const;
+ void setAssistant( const TQString& name );
+ TQString assistant() const;
- void setNickName( const QString& name );
- QString nickName() const;
+ void setNickName( const TQString& name );
+ TQString nickName() const;
- void setSpouseName( const QString& name );
- QString spouseName() const;
+ void setSpouseName( const TQString& name );
+ TQString spouseName() const;
- void setBirthday( const QDate& date );
- QDate birthday() const;
+ void setBirthday( const TQDate& date );
+ TQDate birthday() const;
- void setAnniversary( const QDate& date );
- QDate anniversary() const;
+ void setAnniversary( const TQDate& date );
+ TQDate anniversary() const;
- void setPicture( const QImage& image) { mPicture = image; }
- QString pictureAttachmentName() const { return mPictureAttachmentName; }
- QImage picture() const { return mPicture; }
+ void setPicture( const TQImage& image) { mPicture = image; }
+ TQString pictureAttachmentName() const { return mPictureAttachmentName; }
+ TQImage picture() const { return mPicture; }
- void setLogo( const QImage& image ) { mLogo = image; }
- QString logoAttachmentName() const { return mLogoAttachmentName; }
- QImage logo() const { return mLogo; }
+ void setLogo( const TQImage& image ) { mLogo = image; }
+ TQString logoAttachmentName() const { return mLogoAttachmentName; }
+ TQImage logo() const { return mLogo; }
- void setSound( const QByteArray& sound ) { mSound = sound; }
- QString soundAttachmentName() const { return mSoundAttachmentName; }
- QByteArray sound() const { return mSound; }
+ void setSound( const TQByteArray& sound ) { mSound = sound; }
+ TQString soundAttachmentName() const { return mSoundAttachmentName; }
+ TQByteArray sound() const { return mSound; }
- void setChildren( const QString& children );
- QString children() const;
+ void setChildren( const TQString& children );
+ TQString children() const;
- void setGender( const QString& gender );
- QString gender() const;
+ void setGender( const TQString& gender );
+ TQString gender() const;
- void setLanguage( const QString& language );
- QString language() const;
+ void setLanguage( const TQString& language );
+ TQString language() const;
void addPhoneNumber( const PhoneNumber& number );
- QValueList<PhoneNumber>& phoneNumbers();
- const QValueList<PhoneNumber>& phoneNumbers() const;
+ TQValueList<PhoneNumber>& phoneNumbers();
+ const TQValueList<PhoneNumber>& phoneNumbers() const;
void addEmail( const Email& email );
- QValueList<Email>& emails();
- const QValueList<Email>& emails() const;
+ TQValueList<Email>& emails();
+ const TQValueList<Email>& emails() const;
void addAddress( const Address& address );
- QValueList<Address>& addresses();
- const QValueList<Address>& addresses() const;
+ TQValueList<Address>& addresses();
+ const TQValueList<Address>& addresses() const;
// which address is preferred: home or business or other
- void setPreferredAddress( const QString& address );
- QString preferredAddress() const;
+ void setPreferredAddress( const TQString& address );
+ TQString preferredAddress() const;
float latitude() const { return mLatitude; }
void setLatitude( float latitude ) { mLatitude = latitude; }
@@ -187,16 +187,16 @@ public:
void setLongitude( float longitude ) { mLongitude = longitude; }
// Load the attributes of this class
- bool loadAttribute( QDomElement& );
+ bool loadAttribute( TQDomElement& );
// Save the attributes of this class
- bool saveAttributes( QDomElement& ) const;
+ bool saveAttributes( TQDomElement& ) const;
// Load this note by reading the XML file
- bool loadXML( const QDomDocument& xml );
+ bool loadXML( const TQDomDocument& xml );
// Serialize this note to an XML string
- QString saveXML() const;
+ TQString saveXML() const;
// Return true if this contact is a distr list
bool isDistributionList() const { return mIsDistributionList; }
@@ -205,81 +205,81 @@ protected:
void setFields( const KABC::Addressee* );
private:
- bool loadNameAttribute( QDomElement& element );
- void saveNameAttribute( QDomElement& element ) const;
-
- bool loadPhoneAttribute( QDomElement& element );
- void savePhoneAttributes( QDomElement& element ) const;
-
- void saveEmailAttributes( QDomElement& element ) const;
-
- bool loadAddressAttribute( QDomElement& element );
- void saveAddressAttributes( QDomElement& element ) const;
-
- void loadCustomAttributes( QDomElement& element );
- void saveCustomAttributes( QDomElement& element ) const;
-
- void loadDistrListMember( const QDomElement& element );
- void saveDistrListMembers( QDomElement& element ) const;
-
- QImage loadPictureFromKMail( const QString& attachmentName, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum );
- QImage loadPictureFromAddressee( const KABC::Picture& picture );
-
- QByteArray loadDataFromKMail( const QString& attachmentName, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum );
- QByteArray loadSoundFromAddressee( const KABC::Sound& sound );
-
- QString productID() const;
-
- QString mGivenName;
- QString mMiddleNames;
- QString mLastName;
- QString mFullName;
- QString mInitials;
- QString mPrefix;
- QString mSuffix;
- QString mRole;
- QString mFreeBusyUrl;
- QString mOrganization;
- QString mWebPage;
- QString mIMAddress;
- QString mDepartment;
- QString mOfficeLocation;
- QString mProfession;
- //QString mJobTitle;
- QString mManagerName;
- QString mAssistant;
- QString mNickName;
- QString mSpouseName;
- QDate mBirthday;
- QDate mAnniversary;
- QImage mPicture;
- QImage mLogo;
- QByteArray mSound;
- QString mPictureAttachmentName;
- QString mLogoAttachmentName;
- QString mSoundAttachmentName;
- QString mChildren;
- QString mGender;
- QString mLanguage;
- QValueList<PhoneNumber> mPhoneNumbers;
- QValueList<Email> mEmails;
- QValueList<Address> mAddresses;
- QString mPreferredAddress;
+ bool loadNameAttribute( TQDomElement& element );
+ void saveNameAttribute( TQDomElement& element ) const;
+
+ bool loadPhoneAttribute( TQDomElement& element );
+ void savePhoneAttributes( TQDomElement& element ) const;
+
+ void saveEmailAttributes( TQDomElement& element ) const;
+
+ bool loadAddressAttribute( TQDomElement& element );
+ void saveAddressAttributes( TQDomElement& element ) const;
+
+ void loadCustomAttributes( TQDomElement& element );
+ void saveCustomAttributes( TQDomElement& element ) const;
+
+ void loadDistrListMember( const TQDomElement& element );
+ void saveDistrListMembers( TQDomElement& element ) const;
+
+ TQImage loadPictureFromKMail( const TQString& attachmentName, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum );
+ TQImage loadPictureFromAddressee( const KABC::Picture& picture );
+
+ TQByteArray loadDataFromKMail( const TQString& attachmentName, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum );
+ TQByteArray loadSoundFromAddressee( const KABC::Sound& sound );
+
+ TQString productID() const;
+
+ TQString mGivenName;
+ TQString mMiddleNames;
+ TQString mLastName;
+ TQString mFullName;
+ TQString mInitials;
+ TQString mPrefix;
+ TQString mSuffix;
+ TQString mRole;
+ TQString mFreeBusyUrl;
+ TQString mOrganization;
+ TQString mWebPage;
+ TQString mIMAddress;
+ TQString mDepartment;
+ TQString mOfficeLocation;
+ TQString mProfession;
+ //TQString mJobTitle;
+ TQString mManagerName;
+ TQString mAssistant;
+ TQString mNickName;
+ TQString mSpouseName;
+ TQDate mBirthday;
+ TQDate mAnniversary;
+ TQImage mPicture;
+ TQImage mLogo;
+ TQByteArray mSound;
+ TQString mPictureAttachmentName;
+ TQString mLogoAttachmentName;
+ TQString mSoundAttachmentName;
+ TQString mChildren;
+ TQString mGender;
+ TQString mLanguage;
+ TQValueList<PhoneNumber> mPhoneNumbers;
+ TQValueList<Email> mEmails;
+ TQValueList<Address> mAddresses;
+ TQString mPreferredAddress;
float mLatitude;
float mLongitude;
bool mHasGeo;
bool mIsDistributionList;
struct Custom {
- QString app;
- QString name;
- QString value;
+ TQString app;
+ TQString name;
+ TQString value;
};
- QValueList<Custom> mCustomList;
+ TQValueList<Custom> mCustomList;
struct Member {
- QString displayName;
- QString email;
+ TQString displayName;
+ TQString email;
};
- QValueList<Member> mDistrListMembers;
+ TQValueList<Member> mDistrListMembers;
};
}
diff --git a/kresources/kolab/kabc/resourcekolab.cpp b/kresources/kolab/kabc/resourcekolab.cpp
index 464c9c610..034c32d78 100644
--- a/kresources/kolab/kabc/resourcekolab.cpp
+++ b/kresources/kolab/kabc/resourcekolab.cpp
@@ -45,11 +45,11 @@
#include <kapplication.h>
#include <dcopclient.h>
-#include <qobject.h>
-#include <qtimer.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qapplication.h>
+#include <tqobject.h>
+#include <tqtimer.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqapplication.h>
#include <assert.h>
@@ -63,7 +63,7 @@ class KolabFactory : public KRES::PluginFactoryBase
return new KABC::ResourceKolab( config );
}
- KRES::ConfigWidget *configWidget( QWidget* )
+ KRES::ConfigWidget *configWidget( TQWidget* )
{
return 0;
}
@@ -79,7 +79,7 @@ static const char* s_inlineMimeType = "text/x-vcard";
KABC::ResourceKolab::ResourceKolab( const KConfig *config )
: KPIM::ResourceABC( config ),
Kolab::ResourceKolabBase( "ResourceKolab-KABC" ),
- mCachedSubresource( QString::null ), mLocked( false )
+ mCachedSubresource( TQString::null ), mLocked( false )
{
setType( "imap" );
}
@@ -94,8 +94,8 @@ KABC::ResourceKolab::~ResourceKolab()
}
void KABC::ResourceKolab::loadSubResourceConfig( KConfig& config,
- const QString& name,
- const QString& label,
+ const TQString& name,
+ const TQString& label,
bool writable )
{
KConfigGroup group( &config, name );
@@ -110,11 +110,11 @@ bool KABC::ResourceKolab::doOpen()
KConfig config( configFile() );
// Read the calendar entries
- QValueList<KMailICalIface::SubResource> subResources;
+ TQValueList<KMailICalIface::SubResource> subResources;
if ( !kmailSubresources( subResources, s_kmailContentsType ) )
return false;
mSubResources.clear();
- QValueList<KMailICalIface::SubResource>::ConstIterator it;
+ TQValueList<KMailICalIface::SubResource>::ConstIterator it;
for ( it = subResources.begin(); it != subResources.end(); ++it ) {
loadSubResourceConfig( config, (*it).location, (*it).label, (*it).writable );
}
@@ -148,12 +148,12 @@ KABC::Ticket * KABC::ResourceKolab::requestSaveTicket()
void KABC::ResourceKolab::releaseSaveTicket( Ticket* ticket )
{
mLocked = false;
- mCachedSubresource = QString::null;
+ mCachedSubresource = TQString::null;
delete ticket;
}
-QString KABC::ResourceKolab::loadContact( const QString& contactData,
- const QString& subResource,
+TQString KABC::ResourceKolab::loadContact( const TQString& contactData,
+ const TQString& subResource,
Q_UINT32 sernum,
KMailICalIface::StorageFormat format )
{
@@ -181,10 +181,10 @@ static const struct { const char* mimetype; KMailICalIface::StorageFormat format
{ s_inlineMimeType, KMailICalIface::StorageIcalVcard }
};
-bool KABC::ResourceKolab::loadSubResource( const QString& subResource )
+bool KABC::ResourceKolab::loadSubResource( const TQString& subResource )
{
int count = 0;
- if ( !kmailIncidencesCount( count, QString::null, subResource ) ) {
+ if ( !kmailIncidencesCount( count, TQString::null, subResource ) ) {
kdError() << "Communication problem in KABC::ResourceKolab::loadSubResource()\n";
return false;
}
@@ -210,11 +210,11 @@ bool KABC::ResourceKolab::loadSubResource( const QString& subResource )
// TODO it would be faster to pass the s_formats array to kmail and let it load
// all events - to avoid loading each mail 3 times. But then we need to extend the returned
- // QMap to also tell us the StorageFormat of each found contact...
+ // TQMap to also tell us the StorageFormat of each found contact...
for ( int indexFormat = 0; indexFormat < 3; ++indexFormat ) {
const char* mimetype = s_formats[indexFormat].mimetype;
KMailICalIface::StorageFormat format = s_formats[indexFormat].format;
- QMap<Q_UINT32, QString> lst;
+ TQMap<Q_UINT32, TQString> lst;
if ( !kmailIncidences( lst, mimetype, subResource, startIndex, nbMessages ) ) {
kdError() << "Communication problem in KABC::ResourceKolab::loadSubResource()\n";
if ( progressId )
@@ -222,7 +222,7 @@ bool KABC::ResourceKolab::loadSubResource( const QString& subResource )
return false;
}
- for( QMap<Q_UINT32, QString>::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
loadContact( it.data(), subResource, it.key(), format );
}
@@ -280,24 +280,24 @@ bool KABC::ResourceKolab::save( Ticket* )
namespace Kolab {
struct AttachmentList {
- QStringList attachmentURLs;
- QStringList attachmentNames;
- QStringList attachmentMimeTypes;
- QStringList deletedAttachments;
- QValueList<KTempFile *> tempFiles;
+ TQStringList attachmentURLs;
+ TQStringList attachmentNames;
+ TQStringList attachmentMimeTypes;
+ TQStringList deletedAttachments;
+ TQValueList<KTempFile *> tempFiles;
- void addAttachment( const QString& url, const QString& name, const QString& mimetype ) {
+ void addAttachment( const TQString& url, const TQString& name, const TQString& mimetype ) {
attachmentURLs.append( url );
attachmentNames.append( name );
attachmentMimeTypes.append( mimetype );
}
- void updatePictureAttachment( const QImage& image, const QString& name );
- void updateAttachment( const QByteArray& data, const QString& name, const char* mimetype );
+ void updatePictureAttachment( const TQImage& image, const TQString& name );
+ void updateAttachment( const TQByteArray& data, const TQString& name, const char* mimetype );
};
} // namespace
-void AttachmentList::updatePictureAttachment( const QImage& image, const QString& name )
+void AttachmentList::updatePictureAttachment( const TQImage& image, const TQString& name )
{
assert( !name.isEmpty() );
if ( !image.isNull() ) {
@@ -313,7 +313,7 @@ void AttachmentList::updatePictureAttachment( const QImage& image, const QString
}
}
-void AttachmentList::updateAttachment( const QByteArray& data, const QString& name, const char* mimetype )
+void AttachmentList::updateAttachment( const TQByteArray& data, const TQString& name, const char* mimetype )
{
assert( !name.isEmpty() );
if ( !data.isNull() ) {
@@ -331,8 +331,8 @@ void AttachmentList::updateAttachment( const QByteArray& data, const QString& na
bool KABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr )
{
- const QString uid = addr.uid();
- QString subResource;
+ const TQString uid = addr.uid();
+ TQString subResource;
Q_UINT32 sernum;
if ( mUidMap.find( uid ) != mUidMap.end() ) {
subResource = mUidMap[ uid ].resource();
@@ -355,11 +355,11 @@ bool KABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr )
return false;
sernum = 0;
}
- QString data;
- QString mimetype;
+ TQString data;
+ TQString mimetype;
AttachmentList att;
bool isXMLStorageFormat = kmailStorageFormat( subResource ) == KMailICalIface::StorageXML;
- QString subject = uid; // as per kolab2 spec
+ TQString subject = uid; // as per kolab2 spec
if ( isXMLStorageFormat ) {
Contact contact( &addr );
// The addressee is converted to: 1) the xml 2) the optional picture 3) the optional logo 4) the optional sound
@@ -393,7 +393,7 @@ bool KABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr )
const_cast<Addressee&>(addr).setChanged( false );
}
- for( QValueList<KTempFile *>::Iterator it = att.tempFiles.begin(); it != att.tempFiles.end(); ++it ) {
+ for( TQValueList<KTempFile *>::Iterator it = att.tempFiles.begin(); it != att.tempFiles.end(); ++it ) {
(*it)->setAutoDelete( true );
delete (*it);
}
@@ -402,7 +402,7 @@ bool KABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr )
void KABC::ResourceKolab::insertAddressee( const Addressee& addr )
{
- const QString uid = addr.uid();
+ const TQString uid = addr.uid();
//kdDebug(5650) << k_funcinfo << uid << endl;
bool ok = false;
if ( mUidMap.contains( uid ) ) {
@@ -419,10 +419,10 @@ void KABC::ResourceKolab::insertAddressee( const Addressee& addr )
void KABC::ResourceKolab::removeAddressee( const Addressee& addr )
{
- const QString uid = addr.uid();
+ const TQString uid = addr.uid();
if ( mUidMap.find( uid ) == mUidMap.end() ) return;
//kdDebug(5650) << k_funcinfo << uid << endl;
- const QString resource = mUidMap[ uid ].resource();
+ const TQString resource = mUidMap[ uid ].resource();
if ( !subresourceWritable( resource ) ) {
kdWarning() << "Wow! Something tried to delete a non-writable addressee! Fix this caller: " << kdBacktrace() << endl;
return;
@@ -440,18 +440,18 @@ void KABC::ResourceKolab::removeAddressee( const Addressee& addr )
* These are the DCOP slots that KMail call to notify when something
* changed.
*/
-bool KABC::ResourceKolab::fromKMailAddIncidence( const QString& type,
- const QString& subResource,
+bool KABC::ResourceKolab::fromKMailAddIncidence( const TQString& type,
+ const TQString& subResource,
Q_UINT32 sernum,
int format,
- const QString& contactXML )
+ const TQString& contactXML )
{
// Check if this is a contact
if( type != s_kmailContentsType || !subresourceActive( subResource ) )
return false;
// Load contact to find the UID
- const QString uid = loadContact( contactXML, subResource, sernum,
+ const TQString uid = loadContact( contactXML, subResource, sernum,
( KMailICalIface::StorageFormat )format );
//kdDebug(5650) << k_funcinfo << uid << endl;
@@ -468,9 +468,9 @@ bool KABC::ResourceKolab::fromKMailAddIncidence( const QString& type,
return true;
}
-void KABC::ResourceKolab::fromKMailDelIncidence( const QString& type,
- const QString& subResource,
- const QString& uid )
+void KABC::ResourceKolab::fromKMailDelIncidence( const TQString& type,
+ const TQString& subResource,
+ const TQString& uid )
{
// Check if this is a contact
if( type != s_kmailContentsType || !subresourceActive( subResource ) )
@@ -492,8 +492,8 @@ void KABC::ResourceKolab::fromKMailDelIncidence( const QString& type,
}
}
-void KABC::ResourceKolab::fromKMailRefresh( const QString& type,
- const QString& /*subResource*/ )
+void KABC::ResourceKolab::fromKMailRefresh( const TQString& type,
+ const TQString& /*subResource*/ )
{
// Check if this is a contact
if( type != s_kmailContentsType ) return;
@@ -504,9 +504,9 @@ void KABC::ResourceKolab::fromKMailRefresh( const QString& type,
addressBook()->emitAddressBookChanged();
}
-void KABC::ResourceKolab::fromKMailAddSubresource( const QString& type,
- const QString& subResource,
- const QString& label,
+void KABC::ResourceKolab::fromKMailAddSubresource( const TQString& type,
+ const TQString& subResource,
+ const TQString& label,
bool writable,
bool )
{
@@ -524,8 +524,8 @@ void KABC::ResourceKolab::fromKMailAddSubresource( const QString& type,
emit signalSubresourceAdded( this, type, subResource );
}
-void KABC::ResourceKolab::fromKMailDelSubresource( const QString& type,
- const QString& subResource )
+void KABC::ResourceKolab::fromKMailDelSubresource( const TQString& type,
+ const TQString& subResource )
{
if( type != s_kmailContentsType ) return;
@@ -542,7 +542,7 @@ void KABC::ResourceKolab::fromKMailDelSubresource( const QString& type,
// Make a list of all uids to remove
Kolab::UidMap::ConstIterator mapIt;
- QStringList uids;
+ TQStringList uids;
for ( mapIt = mUidMap.begin(); mapIt != mUidMap.end(); ++mapIt )
if ( mapIt.data().resource() == subResource )
// We have a match
@@ -550,7 +550,7 @@ void KABC::ResourceKolab::fromKMailDelSubresource( const QString& type,
// Finally delete all the incidences
if ( !uids.isEmpty() ) {
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = uids.begin(); it != uids.end(); ++it ) {
mAddrMap.remove( *it );
mUidMap.remove( *it );
@@ -564,13 +564,13 @@ void KABC::ResourceKolab::fromKMailDelSubresource( const QString& type,
-void KABC::ResourceKolab::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& /* type */,
- const QString& folder )
+void KABC::ResourceKolab::fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& /* type */,
+ const TQString& folder )
{
// FIXME
KMailICalIface::StorageFormat format = KMailICalIface::StorageXML;
- for( QMap<Q_UINT32, QString>::ConstIterator it = map.begin(); it != map.end(); ++it ) {
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = map.begin(); it != map.end(); ++it ) {
loadContact( it.data(), folder, it.key(), format );
}
if ( !addressBook() ){
@@ -579,12 +579,12 @@ void KABC::ResourceKolab::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString
addressBook()->emitAddressBookChanged();
}
-QStringList KABC::ResourceKolab::subresources() const
+TQStringList KABC::ResourceKolab::subresources() const
{
return mSubResources.keys();
}
-bool KABC::ResourceKolab::subresourceActive( const QString& subresource ) const
+bool KABC::ResourceKolab::subresourceActive( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].active();
@@ -596,7 +596,7 @@ bool KABC::ResourceKolab::subresourceActive( const QString& subresource ) const
return true;
}
-bool KABC::ResourceKolab::subresourceWritable( const QString& subresource ) const
+bool KABC::ResourceKolab::subresourceWritable( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].writable();
@@ -604,7 +604,7 @@ bool KABC::ResourceKolab::subresourceWritable( const QString& subresource ) cons
return false; //better a safe default
}
-int KABC::ResourceKolab::subresourceCompletionWeight( const QString& subresource ) const
+int KABC::ResourceKolab::subresourceCompletionWeight( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].completionWeight();
@@ -615,17 +615,17 @@ int KABC::ResourceKolab::subresourceCompletionWeight( const QString& subresource
return 80;
}
-QString KABC::ResourceKolab::subresourceLabel( const QString& subresource ) const
+TQString KABC::ResourceKolab::subresourceLabel( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].label();
}
kdDebug(5650) << "subresourceLabel( " << subresource << " ): not found!\n";
- return QString::null;
+ return TQString::null;
}
-void KABC::ResourceKolab::setSubresourceCompletionWeight( const QString& subresource, int completionWeight )
+void KABC::ResourceKolab::setSubresourceCompletionWeight( const TQString& subresource, int completionWeight )
{
if ( mSubResources.contains( subresource ) ) {
mSubResources[ subresource ].setCompletionWeight( completionWeight );
@@ -634,17 +634,17 @@ void KABC::ResourceKolab::setSubresourceCompletionWeight( const QString& subreso
}
}
-QMap<QString, QString> KABC::ResourceKolab::uidToResourceMap() const
+TQMap<TQString, TQString> KABC::ResourceKolab::uidToResourceMap() const
{
// TODO: Couldn't this be made simpler?
- QMap<QString, QString> map;
+ TQMap<TQString, TQString> map;
Kolab::UidMap::ConstIterator mapIt;
for ( mapIt = mUidMap.begin(); mapIt != mUidMap.end(); ++mapIt )
map[ mapIt.key() ] = mapIt.data().resource();
return map;
}
-void KABC::ResourceKolab::setSubresourceActive( const QString &subresource, bool active )
+void KABC::ResourceKolab::setSubresourceActive( const TQString &subresource, bool active )
{
if ( mSubResources.contains( subresource ) ) {
mSubResources[ subresource ].setActive( active );
@@ -656,13 +656,13 @@ void KABC::ResourceKolab::setSubresourceActive( const QString &subresource, bool
/*virtual*/
-bool KABC::ResourceKolab::addSubresource( const QString& label, const QString& parent )
+bool KABC::ResourceKolab::addSubresource( const TQString& label, const TQString& parent )
{
return kmailAddSubresource( label, parent, s_kmailContentsType );
}
/*virtual*/
-bool KABC::ResourceKolab::removeSubresource( const QString& id )
+bool KABC::ResourceKolab::removeSubresource( const TQString& id )
{
return kmailRemoveSubresource( id );
}
diff --git a/kresources/kolab/kabc/resourcekolab.h b/kresources/kolab/kabc/resourcekolab.h
index e01922681..1da472015 100644
--- a/kresources/kolab/kabc/resourcekolab.h
+++ b/kresources/kolab/kabc/resourcekolab.h
@@ -106,67 +106,67 @@ public:
virtual void removeAddressee( const Addressee& addr );
// Listen to KMail changes in the amount of sub resources
- void fromKMailAddSubresource( const QString& type, const QString& id,
- const QString& label, bool writable,
+ void fromKMailAddSubresource( const TQString& type, const TQString& id,
+ const TQString& label, bool writable,
bool alarmRelevant );
- void fromKMailDelSubresource( const QString& type, const QString& id );
+ void fromKMailDelSubresource( const TQString& type, const TQString& id );
- bool fromKMailAddIncidence( const QString& type, const QString& resource,
- Q_UINT32 sernum, int format, const QString& contact );
- void fromKMailDelIncidence( const QString& type, const QString& resource,
- const QString& contact );
- void fromKMailRefresh( const QString& type, const QString& resource );
+ bool fromKMailAddIncidence( const TQString& type, const TQString& resource,
+ Q_UINT32 sernum, int format, const TQString& contact );
+ void fromKMailDelIncidence( const TQString& type, const TQString& resource,
+ const TQString& contact );
+ void fromKMailRefresh( const TQString& type, const TQString& resource );
- void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder );
+ void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder );
/// Return the list of subresources.
- QStringList subresources() const;
+ TQStringList subresources() const;
/// Is this subresource active?
- bool subresourceActive( const QString& ) const;
+ bool subresourceActive( const TQString& ) const;
/// Is this subresource writable?
- virtual bool subresourceWritable( const QString& ) const;
+ virtual bool subresourceWritable( const TQString& ) const;
- virtual void setSubresourceActive( const QString &, bool );
+ virtual void setSubresourceActive( const TQString &, bool );
- virtual bool addSubresource( const QString&, const QString& );
+ virtual bool addSubresource( const TQString&, const TQString& );
- virtual bool removeSubresource( const QString& );
+ virtual bool removeSubresource( const TQString& );
virtual bool canHaveSubresources() const { return true; }
/// Completion weight for a given subresource
- virtual int subresourceCompletionWeight( const QString& ) const;
+ virtual int subresourceCompletionWeight( const TQString& ) const;
/// Label for a given subresource
- virtual QString subresourceLabel( const QString& ) const;
+ virtual TQString subresourceLabel( const TQString& ) const;
/// Set completion weight for a given subresource
- virtual void setSubresourceCompletionWeight( const QString&, int );
+ virtual void setSubresourceCompletionWeight( const TQString&, int );
/// Give the uidmap. Used for ordered searching
- QMap<QString, QString> uidToResourceMap() const;
+ TQMap<TQString, TQString> uidToResourceMap() const;
protected:
bool kmailUpdateAddressee( const Addressee& );
void doClose();
- void loadSubResourceConfig( KConfig& config, const QString& name,
- const QString& label, bool writable );
- bool loadSubResource( const QString& subResource );
- QString loadContact( const QString& contactData, const QString& subResource,
+ void loadSubResourceConfig( KConfig& config, const TQString& name,
+ const TQString& label, bool writable );
+ bool loadSubResource( const TQString& subResource );
+ TQString loadContact( const TQString& contactData, const TQString& subResource,
Q_UINT32 sernum, const KMailICalIface::StorageFormat format );
- QString configFile() const {
+ TQString configFile() const {
return Kolab::ResourceKolabBase::configFile( "kabc" );
}
// The list of subresources
Kolab::ResourceMap mSubResources;
- QString mCachedSubresource;
+ TQString mCachedSubresource;
bool mLocked;
};
diff --git a/kresources/kolab/kabc/resourcekolab_plugin.cpp b/kresources/kolab/kabc/resourcekolab_plugin.cpp
index be87772b3..c4f1b3333 100644
--- a/kresources/kolab/kabc/resourcekolab_plugin.cpp
+++ b/kresources/kolab/kabc/resourcekolab_plugin.cpp
@@ -42,7 +42,7 @@ class KolabFactory : public KRES::PluginFactoryBase
return new KABC::ResourceKolab( config );
}
- KRES::ConfigWidget *configWidget( QWidget* )
+ KRES::ConfigWidget *configWidget( TQWidget* )
{
return 0;
}
diff --git a/kresources/kolab/kcal/event.cpp b/kresources/kolab/kcal/event.cpp
index a53ca4162..0f25eb73d 100644
--- a/kresources/kolab/kcal/event.cpp
+++ b/kresources/kolab/kcal/event.cpp
@@ -39,8 +39,8 @@
using namespace Kolab;
-KCal::Event* Event::xmlToEvent( const QString& xml, const QString& tz, KCal::ResourceKolab* res,
- const QString& subResource, Q_UINT32 sernum )
+KCal::Event* Event::xmlToEvent( const TQString& xml, const TQString& tz, KCal::ResourceKolab* res,
+ const TQString& subResource, Q_UINT32 sernum )
{
Event event( res, subResource, sernum, tz );
event.load( xml );
@@ -49,14 +49,14 @@ KCal::Event* Event::xmlToEvent( const QString& xml, const QString& tz, KCal::Res
return kcalEvent;
}
-QString Event::eventToXML( KCal::Event* kcalEvent, const QString& tz )
+TQString Event::eventToXML( KCal::Event* kcalEvent, const TQString& tz )
{
- Event event( 0, QString::null, 0, tz, kcalEvent );
+ Event event( 0, TQString::null, 0, tz, kcalEvent );
return event.saveXML();
}
-Event::Event( KCal::ResourceKolab *res, const QString &subResource, Q_UINT32 sernum,
- const QString& tz, KCal::Event* event )
+Event::Event( KCal::ResourceKolab *res, const TQString &subResource, Q_UINT32 sernum,
+ const TQString& tz, KCal::Event* event )
: Incidence( res, subResource, sernum, tz ),
mShowTimeAs( KCal::Event::Opaque ), mHasEndDate( false )
{
@@ -78,7 +78,7 @@ KCal::Event::Transparency Event::transparency() const
return mShowTimeAs;
}
-void Event::setEndDate( const QDateTime& date )
+void Event::setEndDate( const TQDateTime& date )
{
mEndDate = date;
mHasEndDate = true;
@@ -87,7 +87,7 @@ void Event::setEndDate( const QDateTime& date )
mFloatingStatus = HasTime;
}
-void Event::setEndDate( const QDate& date )
+void Event::setEndDate( const TQDate& date )
{
mEndDate = date;
mHasEndDate = true;
@@ -96,7 +96,7 @@ void Event::setEndDate( const QDate& date )
mFloatingStatus = AllDay;
}
-void Event::setEndDate( const QString& endDate )
+void Event::setEndDate( const TQString& endDate )
{
if ( endDate.length() > 10 )
// This is a date + time
@@ -106,15 +106,15 @@ void Event::setEndDate( const QString& endDate )
setEndDate( stringToDate( endDate ) );
}
-QDateTime Event::endDate() const
+TQDateTime Event::endDate() const
{
return mEndDate;
}
-bool Event::loadAttribute( QDomElement& element )
+bool Event::loadAttribute( TQDomElement& element )
{
// This method doesn't handle the color-label tag yet
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if ( tagName == "show-time-as" ) {
// TODO: Support tentative and outofoffice
@@ -131,7 +131,7 @@ bool Event::loadAttribute( QDomElement& element )
return true;
}
-bool Event::saveAttributes( QDomElement& element ) const
+bool Event::saveAttributes( TQDomElement& element ) const
{
// Save the base class elements
Incidence::saveAttributes( element );
@@ -152,9 +152,9 @@ bool Event::saveAttributes( QDomElement& element ) const
}
-bool Event::loadXML( const QDomDocument& document )
+bool Event::loadXML( const TQDomDocument& document )
{
- QDomElement top = document.documentElement();
+ TQDomElement top = document.documentElement();
if ( top.tagName() != "event" ) {
qWarning( "XML error: Top tag was %s instead of the expected event",
@@ -162,11 +162,11 @@ bool Event::loadXML( const QDomDocument& document )
return false;
}
- for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
loadAttribute( e );
} else
kdDebug() << "Node is not a comment or an element???" << endl;
@@ -176,10 +176,10 @@ bool Event::loadXML( const QDomDocument& document )
return true;
}
-QString Event::saveXML() const
+TQString Event::saveXML() const
{
- QDomDocument document = domTree();
- QDomElement element = document.createElement( "event" );
+ TQDomDocument document = domTree();
+ TQDomElement element = document.createElement( "event" );
element.setAttribute( "version", "1.0" );
saveAttributes( element );
document.appendChild( element );
diff --git a/kresources/kolab/kcal/event.h b/kresources/kolab/kcal/event.h
index ad33db520..879bda2da 100644
--- a/kresources/kolab/kcal/event.h
+++ b/kresources/kolab/kcal/event.h
@@ -53,47 +53,47 @@ class Event : public Incidence {
public:
/// Use this to parse an xml string to a event entry
/// The caller is responsible for deleting the returned event
- static KCal::Event* xmlToEvent( const QString& xml, const QString& tz, KCal::ResourceKolab* res = 0,
- const QString& subResource = QString::null, Q_UINT32 sernum = 0 );
+ static KCal::Event* xmlToEvent( const TQString& xml, const TQString& tz, KCal::ResourceKolab* res = 0,
+ const TQString& subResource = TQString::null, Q_UINT32 sernum = 0 );
/// Use this to get an xml string describing this event entry
- static QString eventToXML( KCal::Event*, const QString& tz );
+ static TQString eventToXML( KCal::Event*, const TQString& tz );
/// Create a event object and
- explicit Event( KCal::ResourceKolab *res, const QString &subResource, Q_UINT32 sernum,
- const QString& tz, KCal::Event* event = 0 );
+ explicit Event( KCal::ResourceKolab *res, const TQString &subResource, Q_UINT32 sernum,
+ const TQString& tz, KCal::Event* event = 0 );
virtual ~Event();
void saveTo( KCal::Event* event );
- virtual QString type() const { return "Event"; }
+ virtual TQString type() const { return "Event"; }
virtual void setTransparency( KCal::Event::Transparency transparency );
virtual KCal::Event::Transparency transparency() const;
- virtual void setEndDate( const QDateTime& date );
- virtual void setEndDate( const QDate& date );
- virtual void setEndDate( const QString& date );
- virtual QDateTime endDate() const;
+ virtual void setEndDate( const TQDateTime& date );
+ virtual void setEndDate( const TQDate& date );
+ virtual void setEndDate( const TQString& date );
+ virtual TQDateTime endDate() const;
// Load the attributes of this class
- virtual bool loadAttribute( QDomElement& );
+ virtual bool loadAttribute( TQDomElement& );
// Save the attributes of this class
- virtual bool saveAttributes( QDomElement& ) const;
+ virtual bool saveAttributes( TQDomElement& ) const;
// Load this event by reading the XML file
- virtual bool loadXML( const QDomDocument& xml );
+ virtual bool loadXML( const TQDomDocument& xml );
// Serialize this event to an XML string
- virtual QString saveXML() const;
+ virtual TQString saveXML() const;
protected:
// Read all known fields from this ical incidence
void setFields( const KCal::Event* );
KCal::Event::Transparency mShowTimeAs;
- QDateTime mEndDate;
+ TQDateTime mEndDate;
bool mHasEndDate;
};
diff --git a/kresources/kolab/kcal/incidence.cpp b/kresources/kolab/kcal/incidence.cpp
index 8c74e3bdf..74f41fd8d 100644
--- a/kresources/kolab/kcal/incidence.cpp
+++ b/kresources/kolab/kcal/incidence.cpp
@@ -34,8 +34,8 @@
#include "incidence.h"
#include "resourcekolab.h"
-#include <qfile.h>
-#include <qvaluelist.h>
+#include <tqfile.h>
+#include <tqvaluelist.h>
#include <libkcal/journal.h>
#include <korganizer/version.h>
@@ -47,8 +47,8 @@
using namespace Kolab;
-Incidence::Incidence( KCal::ResourceKolab *res, const QString &subResource, Q_UINT32 sernum,
- const QString& tz )
+Incidence::Incidence( KCal::ResourceKolab *res, const TQString &subResource, Q_UINT32 sernum,
+ const TQString& tz )
: KolabBase( tz ), mFloatingStatus( Unset ), mHasAlarm( false ),
mRevision( 0 ),
mResource( res ),
@@ -61,22 +61,22 @@ Incidence::~Incidence()
{
}
-void Incidence::setSummary( const QString& summary )
+void Incidence::setSummary( const TQString& summary )
{
mSummary = summary;
}
-QString Incidence::summary() const
+TQString Incidence::summary() const
{
return mSummary;
}
-void Incidence::setLocation( const QString& location )
+void Incidence::setLocation( const TQString& location )
{
mLocation = location;
}
-QString Incidence::location() const
+TQString Incidence::location() const
{
return mLocation;
}
@@ -91,7 +91,7 @@ KolabBase::Email Incidence::organizer() const
return mOrganizer;
}
-void Incidence::setStartDate( const QDateTime& startDate )
+void Incidence::setStartDate( const TQDateTime& startDate )
{
mStartDate = startDate;
if ( mFloatingStatus == AllDay )
@@ -99,7 +99,7 @@ void Incidence::setStartDate( const QDateTime& startDate )
mFloatingStatus = HasTime;
}
-void Incidence::setStartDate( const QDate& startDate )
+void Incidence::setStartDate( const TQDate& startDate )
{
mStartDate = startDate;
if ( mFloatingStatus == HasTime )
@@ -107,7 +107,7 @@ void Incidence::setStartDate( const QDate& startDate )
mFloatingStatus = AllDay;
}
-void Incidence::setStartDate( const QString& startDate )
+void Incidence::setStartDate( const TQString& startDate )
{
if ( startDate.length() > 10 )
// This is a date + time
@@ -117,7 +117,7 @@ void Incidence::setStartDate( const QString& startDate )
setStartDate( stringToDate( startDate ) );
}
-QDateTime Incidence::startDate() const
+TQDateTime Incidence::startDate() const
{
return mStartDate;
}
@@ -143,22 +143,22 @@ void Incidence::addAttendee( const Attendee& attendee )
mAttendees.append( attendee );
}
-QValueList<Incidence::Attendee>& Incidence::attendees()
+TQValueList<Incidence::Attendee>& Incidence::attendees()
{
return mAttendees;
}
-const QValueList<Incidence::Attendee>& Incidence::attendees() const
+const TQValueList<Incidence::Attendee>& Incidence::attendees() const
{
return mAttendees;
}
-void Incidence::setInternalUID( const QString& iuid )
+void Incidence::setInternalUID( const TQString& iuid )
{
mInternalUID = iuid;
}
-QString Incidence::internalUID() const
+TQString Incidence::internalUID() const
{
return mInternalUID;
}
@@ -173,15 +173,15 @@ int Incidence::revision() const
return mRevision;
}
-bool Incidence::loadAttendeeAttribute( QDomElement& element,
+bool Incidence::loadAttendeeAttribute( TQDomElement& element,
Attendee& attendee )
{
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
if ( tagName == "display-name" )
attendee.displayName = e.text();
@@ -212,10 +212,10 @@ bool Incidence::loadAttendeeAttribute( QDomElement& element,
return true;
}
-void Incidence::saveAttendeeAttribute( QDomElement& element,
+void Incidence::saveAttendeeAttribute( TQDomElement& element,
const Attendee& attendee ) const
{
- QDomElement e = element.ownerDocument().createElement( "attendee" );
+ TQDomElement e = element.ownerDocument().createElement( "attendee" );
element.appendChild( e );
writeString( e, "display-name", attendee.displayName );
writeString( e, "smtp-address", attendee.smtpAddress );
@@ -229,14 +229,14 @@ void Incidence::saveAttendeeAttribute( QDomElement& element,
writeString( e, "delegated-from", attendee.delegator );
}
-void Incidence::saveAttendees( QDomElement& element ) const
+void Incidence::saveAttendees( TQDomElement& element ) const
{
- QValueList<Attendee>::ConstIterator it = mAttendees.begin();
+ TQValueList<Attendee>::ConstIterator it = mAttendees.begin();
for ( ; it != mAttendees.end(); ++it )
saveAttendeeAttribute( element, *it );
}
-void Incidence::saveAttachments( QDomElement& element ) const
+void Incidence::saveAttachments( TQDomElement& element ) const
{
KCal::Attachment::List::ConstIterator it = mAttachments.begin();
for ( ; it != mAttachments.end(); ++it ) {
@@ -249,15 +249,15 @@ void Incidence::saveAttachments( QDomElement& element ) const
}
}
-void Incidence::saveRecurrence( QDomElement& element ) const
+void Incidence::saveRecurrence( TQDomElement& element ) const
{
- QDomElement e = element.ownerDocument().createElement( "recurrence" );
+ TQDomElement e = element.ownerDocument().createElement( "recurrence" );
element.appendChild( e );
e.setAttribute( "cycle", mRecurrence.cycle );
if ( !mRecurrence.type.isEmpty() )
e.setAttribute( "type", mRecurrence.type );
- writeString( e, "interval", QString::number( mRecurrence.interval ) );
- for( QStringList::ConstIterator it = mRecurrence.days.begin(); it != mRecurrence.days.end(); ++it ) {
+ writeString( e, "interval", TQString::number( mRecurrence.interval ) );
+ for( TQStringList::ConstIterator it = mRecurrence.days.begin(); it != mRecurrence.days.end(); ++it ) {
writeString( e, "day", *it );
}
if ( !mRecurrence.dayNumber.isEmpty() )
@@ -265,29 +265,29 @@ void Incidence::saveRecurrence( QDomElement& element ) const
if ( !mRecurrence.month.isEmpty() )
writeString( e, "month", mRecurrence.month );
if ( !mRecurrence.rangeType.isEmpty() ) {
- QDomElement range = element.ownerDocument().createElement( "range" );
+ TQDomElement range = element.ownerDocument().createElement( "range" );
e.appendChild( range );
range.setAttribute( "type", mRecurrence.rangeType );
- QDomText t = element.ownerDocument().createTextNode( mRecurrence.range );
+ TQDomText t = element.ownerDocument().createTextNode( mRecurrence.range );
range.appendChild( t );
}
- for( QValueList<QDate>::ConstIterator it = mRecurrence.exclusions.begin();
+ for( TQValueList<TQDate>::ConstIterator it = mRecurrence.exclusions.begin();
it != mRecurrence.exclusions.end(); ++it ) {
writeString( e, "exclusion", dateToString( *it ) );
}
}
-void Incidence::loadRecurrence( const QDomElement& element )
+void Incidence::loadRecurrence( const TQDomElement& element )
{
mRecurrence.interval = 0;
mRecurrence.cycle = element.attribute( "cycle" );
mRecurrence.type = element.attribute( "type" );
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
if ( tagName == "interval" )
mRecurrence.interval = e.text().toInt();
@@ -309,9 +309,9 @@ void Incidence::loadRecurrence( const QDomElement& element )
}
}
-bool Incidence::loadAttribute( QDomElement& element )
+bool Incidence::loadAttribute( TQDomElement& element )
{
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if ( tagName == "summary" )
setSummary( element.text() );
@@ -355,7 +355,7 @@ bool Incidence::loadAttribute( QDomElement& element )
// Unhandled tag - save for later storage
kdDebug() << "Saving unhandled tag " << element.tagName() << endl;
Custom c;
- c.key = QCString( "X-KDE-KolabUnhandled-" ) + element.tagName().latin1();
+ c.key = TQCString( "X-KDE-KolabUnhandled-" ) + element.tagName().latin1();
c.value = element.text();
mCustomList.append( c );
}
@@ -364,7 +364,7 @@ bool Incidence::loadAttribute( QDomElement& element )
return true;
}
-bool Incidence::saveAttributes( QDomElement& element ) const
+bool Incidence::saveAttributes( TQDomElement& element ) const
{
// Save the base class elements
KolabBase::saveAttributes( element );
@@ -383,26 +383,26 @@ bool Incidence::saveAttributes( QDomElement& element ) const
if ( mHasAlarm ) {
// Alarms should be minutes before. Libkcal uses event time + alarm time
int alarmTime = qRound( -alarm() );
- writeString( element, "alarm", QString::number( alarmTime ) );
+ writeString( element, "alarm", TQString::number( alarmTime ) );
}
writeString( element, "x-kde-internaluid", internalUID() );
- writeString( element, "revision", QString::number( revision() ) );
+ writeString( element, "revision", TQString::number( revision() ) );
saveCustomAttributes( element );
return true;
}
-void Incidence::saveCustomAttributes( QDomElement& element ) const
+void Incidence::saveCustomAttributes( TQDomElement& element ) const
{
- QValueList<Custom>::ConstIterator it = mCustomList.begin();
+ TQValueList<Custom>::ConstIterator it = mCustomList.begin();
for ( ; it != mCustomList.end(); ++it ) {
- QString key = (*it).key;
+ TQString key = (*it).key;
Q_ASSERT( !key.isEmpty() );
if ( key.startsWith( "X-KDE-KolabUnhandled-" ) ) {
key = key.mid( strlen( "X-KDE-KolabUnhandled-" ) );
writeString( element, key, (*it).value );
} else {
// Let's use attributes so that other tag-preserving-code doesn't need sub-elements
- QDomElement e = element.ownerDocument().createElement( "x-custom" );
+ TQDomElement e = element.ownerDocument().createElement( "x-custom" );
element.appendChild( e );
e.setAttribute( "key", key );
e.setAttribute( "value", (*it).value );
@@ -410,7 +410,7 @@ void Incidence::saveCustomAttributes( QDomElement& element ) const
}
}
-void Incidence::loadCustomAttributes( QDomElement& element )
+void Incidence::loadCustomAttributes( TQDomElement& element )
{
Custom custom;
custom.key = element.attribute( "key" ).latin1();
@@ -418,7 +418,7 @@ void Incidence::loadCustomAttributes( QDomElement& element )
mCustomList.append( custom );
}
-static KCal::Attendee::PartStat attendeeStringToStatus( const QString& s )
+static KCal::Attendee::PartStat attendeeStringToStatus( const TQString& s )
{
if ( s == "none" )
return KCal::Attendee::NeedsAction;
@@ -433,7 +433,7 @@ static KCal::Attendee::PartStat attendeeStringToStatus( const QString& s )
return KCal::Attendee::Accepted;
}
-static QString attendeeStatusToString( KCal::Attendee::PartStat status )
+static TQString attendeeStatusToString( KCal::Attendee::PartStat status )
{
switch( status ) {
case KCal::Attendee::NeedsAction:
@@ -456,7 +456,7 @@ static QString attendeeStatusToString( KCal::Attendee::PartStat status )
return "accepted";
}
-static KCal::Attendee::Role attendeeStringToRole( const QString& s )
+static KCal::Attendee::Role attendeeStringToRole( const TQString& s )
{
if ( s == "optional" )
return KCal::Attendee::OptParticipant;
@@ -465,7 +465,7 @@ static KCal::Attendee::Role attendeeStringToRole( const QString& s )
return KCal::Attendee::ReqParticipant;
}
-static QString attendeeRoleToString( KCal::Attendee::Role role )
+static TQString attendeeRoleToString( KCal::Attendee::Role role )
{
switch( role ) {
case KCal::Attendee::ReqParticipant:
@@ -511,7 +511,7 @@ void Incidence::setRecurrence( KCal::Recurrence* recur )
case KCal::Recurrence::rWeekly: // every X weeks
mRecurrence.cycle = "weekly";
{
- QBitArray arr = recur->days();
+ TQBitArray arr = recur->days();
for ( uint idx = 0 ; idx < 7 ; ++idx )
if ( arr.testBit( idx ) )
mRecurrence.days.append( s_weekDayName[idx] );
@@ -520,11 +520,11 @@ void Incidence::setRecurrence( KCal::Recurrence* recur )
case KCal::Recurrence::rMonthlyPos: {
mRecurrence.cycle = "monthly";
mRecurrence.type = "weekday";
- QValueList<KCal::RecurrenceRule::WDayPos> monthPositions = recur->monthPositions();
+ TQValueList<KCal::RecurrenceRule::WDayPos> monthPositions = recur->monthPositions();
if ( !monthPositions.isEmpty() ) {
KCal::RecurrenceRule::WDayPos monthPos = monthPositions.first();
// TODO: Handle multiple days in the same week
- mRecurrence.dayNumber = QString::number( monthPos.pos() );
+ mRecurrence.dayNumber = TQString::number( monthPos.pos() );
mRecurrence.days.append( s_weekDayName[ monthPos.day()-1 ] );
// Not (properly) handled(?): monthPos.negative (nth days before end of month)
}
@@ -533,20 +533,20 @@ void Incidence::setRecurrence( KCal::Recurrence* recur )
case KCal::Recurrence::rMonthlyDay: {
mRecurrence.cycle = "monthly";
mRecurrence.type = "daynumber";
- QValueList<int> monthDays = recur->monthDays();
+ TQValueList<int> monthDays = recur->monthDays();
// ####### Kolab XML limitation: only the first month day is used
if ( !monthDays.isEmpty() )
- mRecurrence.dayNumber = QString::number( monthDays.first() );
+ mRecurrence.dayNumber = TQString::number( monthDays.first() );
break;
}
case KCal::Recurrence::rYearlyMonth: // (day n of Month Y)
{
mRecurrence.cycle = "yearly";
mRecurrence.type = "monthday";
- QValueList<int> rmd = recur->yearDates();
+ TQValueList<int> rmd = recur->yearDates();
int day = !rmd.isEmpty() ? rmd.first() : recur->startDate().day();
- mRecurrence.dayNumber = QString::number( day );
- QValueList<int> months = recur->yearMonths();
+ mRecurrence.dayNumber = TQString::number( day );
+ TQValueList<int> months = recur->yearMonths();
if ( !months.isEmpty() )
mRecurrence.month = s_monthName[ months.first() - 1 ]; // #### Kolab XML limitation: only one month specified
break;
@@ -554,22 +554,22 @@ void Incidence::setRecurrence( KCal::Recurrence* recur )
case KCal::Recurrence::rYearlyDay: // YearlyDay (day N of the year). Not supported by Outlook
mRecurrence.cycle = "yearly";
mRecurrence.type = "yearday";
- mRecurrence.dayNumber = QString::number( recur->yearDays().first() );
+ mRecurrence.dayNumber = TQString::number( recur->yearDays().first() );
break;
case KCal::Recurrence::rYearlyPos: // (weekday X of week N of month Y)
mRecurrence.cycle = "yearly";
mRecurrence.type = "weekday";
- QValueList<int> months = recur->yearMonths();
+ TQValueList<int> months = recur->yearMonths();
if ( !months.isEmpty() )
mRecurrence.month = s_monthName[ months.first() - 1 ]; // #### Kolab XML limitation: only one month specified
- QValueList<KCal::RecurrenceRule::WDayPos> monthPositions = recur->yearPositions();
+ TQValueList<KCal::RecurrenceRule::WDayPos> monthPositions = recur->yearPositions();
if ( !monthPositions.isEmpty() ) {
KCal::RecurrenceRule::WDayPos monthPos = monthPositions.first();
// TODO: Handle multiple days in the same week
- mRecurrence.dayNumber = QString::number( monthPos.pos() );
+ mRecurrence.dayNumber = TQString::number( monthPos.pos() );
mRecurrence.days.append( s_weekDayName[ monthPos.day()-1 ] );
- //mRecurrence.dayNumber = QString::number( *recur->yearNums().getFirst() );
+ //mRecurrence.dayNumber = TQString::number( *recur->yearNums().getFirst() );
// Not handled: monthPos.negative (nth days before end of month)
}
break;
@@ -577,7 +577,7 @@ void Incidence::setRecurrence( KCal::Recurrence* recur )
int howMany = recur->duration();
if ( howMany > 0 ) {
mRecurrence.rangeType = "number";
- mRecurrence.range = QString::number( howMany );
+ mRecurrence.range = TQString::number( howMany );
} else if ( howMany == 0 ) {
mRecurrence.rangeType = "date";
mRecurrence.range = dateToString( recur->endDate() );
@@ -657,7 +657,7 @@ void Incidence::setFields( const KCal::Incidence* incidence )
// Handle the scheduling ID
if ( incidence->schedulingID() == incidence->uid() ) {
// There is no scheduling ID
- setInternalUID( QString::null );
+ setInternalUID( TQString::null );
} else {
// We've internally been using a different uid, so save that as the
// temporary (internal) uid and restore the original uid, the one that
@@ -672,8 +672,8 @@ void Incidence::setFields( const KCal::Incidence* incidence )
setPilotSyncStatus( incidence->syncStatus() );
// Unhandled tags and other custom properties (see libkcal/customproperties.h)
- const QMap<QCString, QString> map = incidence->customProperties();
- QMap<QCString, QString>::ConstIterator cit = map.begin();
+ const TQMap<TQCString, TQString> map = incidence->customProperties();
+ TQMap<TQCString, TQString>::ConstIterator cit = map.begin();
for ( ; cit != map.end() ; ++cit ) {
Custom c;
c.key = cit.key();
@@ -682,11 +682,11 @@ void Incidence::setFields( const KCal::Incidence* incidence )
}
}
-static QBitArray daysListToBitArray( const QStringList& days )
+static TQBitArray daysListToBitArray( const TQStringList& days )
{
- QBitArray arr( 7 );
+ TQBitArray arr( 7 );
arr.fill( false );
- for( QStringList::ConstIterator it = days.begin(); it != days.end(); ++it ) {
+ for( TQStringList::ConstIterator it = days.begin(); it != days.end(); ++it ) {
for ( uint i = 0; i < 7 ; ++i )
if ( *it == s_weekDayName[i] )
arr.setBit( i, true );
@@ -724,7 +724,7 @@ void Incidence::saveTo( KCal::Incidence* incidence )
+ organizer().smtpAddress + ">" );
incidence->clearAttendees();
- QValueList<Attendee>::ConstIterator it;
+ TQValueList<Attendee>::ConstIterator it;
for ( it = mAttendees.begin(); it != mAttendees.end(); ++it ) {
KCal::Attendee::PartStat status = attendeeStringToStatus( (*it).status );
KCal::Attendee::Role role = attendeeStringToRole( (*it).role );
@@ -755,7 +755,7 @@ void Incidence::saveTo( KCal::Incidence* incidence )
} else if ( mRecurrence.cycle == "daily" ) {
recur->setDaily( mRecurrence.interval );
} else if ( mRecurrence.cycle == "weekly" ) {
- QBitArray rDays = daysListToBitArray( mRecurrence.days );
+ TQBitArray rDays = daysListToBitArray( mRecurrence.days );
recur->setWeekly( mRecurrence.interval, rDays );
} else if ( mRecurrence.cycle == "monthly" ) {
recur->setMonthly( mRecurrence.interval );
@@ -803,7 +803,7 @@ void Incidence::saveTo( KCal::Incidence* incidence )
if ( hasPilotSyncStatus() )
incidence->setSyncStatus( pilotSyncStatus() );
- for( QValueList<Custom>::ConstIterator it = mCustomList.begin(); it != mCustomList.end(); ++it ) {
+ for( TQValueList<Custom>::ConstIterator it = mCustomList.begin(); it != mCustomList.end(); ++it ) {
incidence->setNonKDECustomProperty( (*it).key, (*it).value );
}
@@ -811,16 +811,16 @@ void Incidence::saveTo( KCal::Incidence* incidence )
void Incidence::loadAttachments()
{
- QStringList attachments;
+ TQStringList attachments;
if ( mResource->kmailListAttachments( attachments, mSubResource, mSernum ) ) {
- for ( QStringList::ConstIterator it = attachments.constBegin(); it != attachments.constEnd(); ++it ) {
- QByteArray data;
+ for ( TQStringList::ConstIterator it = attachments.constBegin(); it != attachments.constEnd(); ++it ) {
+ TQByteArray data;
KURL url;
if ( mResource->kmailGetAttachment( url, mSubResource, mSernum, *it ) && !url.isEmpty() ) {
- QFile f( url.path() );
+ TQFile f( url.path() );
if ( f.open( IO_ReadOnly ) ) {
data = f.readAll();
- QString mimeType;
+ TQString mimeType;
if ( !mResource->kmailAttachmentMimetype( mimeType, mSubResource, mSernum, *it ) )
mimeType = "application/octet-stream";
KCal::Attachment *a = new KCal::Attachment( KCodecs::base64Encode( data ).data(), mimeType );
@@ -834,9 +834,9 @@ void Incidence::loadAttachments()
}
}
-QString Incidence::productID() const
+TQString Incidence::productID() const
{
- return QString( "KOrganizer " ) + korgVersion + ", Kolab resource";
+ return TQString( "KOrganizer " ) + korgVersion + ", Kolab resource";
}
// Unhandled KCal::Incidence fields:
diff --git a/kresources/kolab/kcal/incidence.h b/kresources/kolab/kcal/incidence.h
index de549328e..e8f8b9fa8 100644
--- a/kresources/kolab/kcal/incidence.h
+++ b/kresources/kolab/kcal/incidence.h
@@ -55,46 +55,46 @@ namespace Kolab {
class Incidence : public KolabBase {
public:
struct Recurrence {
- QString cycle;
- QString type;
+ TQString cycle;
+ TQString type;
int interval;
- QStringList days; // list of days-of-the-week
- QString dayNumber;
- QString month;
- QString rangeType;
- QString range; // date or number or nothing
- QValueList<QDate> exclusions;
+ TQStringList days; // list of days-of-the-week
+ TQString dayNumber;
+ TQString month;
+ TQString rangeType;
+ TQString range; // date or number or nothing
+ TQValueList<TQDate> exclusions;
};
struct Attendee : Email {
Attendee() : requestResponse( true ), invitationSent( false ) {}
- QString status;
+ TQString status;
bool requestResponse;
bool invitationSent;
- QString role;
- QString delegate;
- QString delegator;
+ TQString role;
+ TQString delegate;
+ TQString delegator;
};
- explicit Incidence( KCal::ResourceKolab *res, const QString &subResource, Q_UINT32 sernum,
- const QString& tz );
+ explicit Incidence( KCal::ResourceKolab *res, const TQString &subResource, Q_UINT32 sernum,
+ const TQString& tz );
virtual ~Incidence();
void saveTo( KCal::Incidence* incidence );
- virtual void setSummary( const QString& summary );
- virtual QString summary() const;
+ virtual void setSummary( const TQString& summary );
+ virtual TQString summary() const;
- virtual void setLocation( const QString& location );
- virtual QString location() const;
+ virtual void setLocation( const TQString& location );
+ virtual TQString location() const;
virtual void setOrganizer( const Email& organizer );
virtual Email organizer() const;
- virtual void setStartDate( const QDateTime& startDate );
- virtual void setStartDate( const QDate& startDate );
- virtual void setStartDate( const QString& startDate );
- virtual QDateTime startDate() const;
+ virtual void setStartDate( const TQDateTime& startDate );
+ virtual void setStartDate( const TQDate& startDate );
+ virtual void setStartDate( const TQString& startDate );
+ virtual TQDateTime startDate() const;
virtual void setAlarm( float alarm );
virtual float alarm() const;
@@ -103,8 +103,8 @@ public:
virtual Recurrence recurrence() const;
virtual void addAttendee( const Attendee& attendee );
- QValueList<Attendee>& attendees();
- const QValueList<Attendee>& attendees() const;
+ TQValueList<Attendee>& attendees();
+ const TQValueList<Attendee>& attendees() const;
/**
* The internal uid is used as the uid inside KOrganizer whenever
@@ -112,17 +112,17 @@ public:
* can't handle. To avoid keep that interal uid from changing all the
* time, it is persisted in the XML between a save and the next load.
*/
- void setInternalUID( const QString& iuid );
- QString internalUID() const;
+ void setInternalUID( const TQString& iuid );
+ TQString internalUID() const;
virtual void setRevision( int );
virtual int revision() const;
// Load the attributes of this class
- virtual bool loadAttribute( QDomElement& );
+ virtual bool loadAttribute( TQDomElement& );
// Save the attributes of this class
- virtual bool saveAttributes( QDomElement& ) const;
+ virtual bool saveAttributes( TQDomElement& ) const;
protected:
enum FloatingStatus { Unset, AllDay, HasTime };
@@ -130,42 +130,42 @@ protected:
// Read all known fields from this ical incidence
void setFields( const KCal::Incidence* );
- bool loadAttendeeAttribute( QDomElement&, Attendee& );
- void saveAttendeeAttribute( QDomElement& element,
+ bool loadAttendeeAttribute( TQDomElement&, Attendee& );
+ void saveAttendeeAttribute( TQDomElement& element,
const Attendee& attendee ) const;
- void saveAttendees( QDomElement& element ) const;
- void saveAttachments( QDomElement& element ) const;
+ void saveAttendees( TQDomElement& element ) const;
+ void saveAttachments( TQDomElement& element ) const;
- void loadRecurrence( const QDomElement& element );
- void saveRecurrence( QDomElement& element ) const;
- void saveCustomAttributes( QDomElement& element ) const;
- void loadCustomAttributes( QDomElement& element );
+ void loadRecurrence( const TQDomElement& element );
+ void saveRecurrence( TQDomElement& element ) const;
+ void saveCustomAttributes( TQDomElement& element ) const;
+ void loadCustomAttributes( TQDomElement& element );
void loadAttachments();
- QString productID() const;
+ TQString productID() const;
- QString mSummary;
- QString mLocation;
+ TQString mSummary;
+ TQString mLocation;
Email mOrganizer;
- QDateTime mStartDate;
+ TQDateTime mStartDate;
FloatingStatus mFloatingStatus;
float mAlarm;
bool mHasAlarm;
Recurrence mRecurrence;
- QValueList<Attendee> mAttendees;
- QValueList<KCal::Attachment*> mAttachments;
- QString mInternalUID;
+ TQValueList<Attendee> mAttendees;
+ TQValueList<KCal::Attachment*> mAttachments;
+ TQString mInternalUID;
int mRevision;
struct Custom {
- QCString key;
- QString value;
+ TQCString key;
+ TQString value;
};
- QValueList<Custom> mCustomList;
+ TQValueList<Custom> mCustomList;
KCal::ResourceKolab *mResource;
- QString mSubResource;
+ TQString mSubResource;
Q_UINT32 mSernum;
};
diff --git a/kresources/kolab/kcal/journal.cpp b/kresources/kolab/kcal/journal.cpp
index 45b91587d..462cfe3ca 100644
--- a/kresources/kolab/kcal/journal.cpp
+++ b/kresources/kolab/kcal/journal.cpp
@@ -40,7 +40,7 @@
using namespace Kolab;
-KCal::Journal* Journal::xmlToJournal( const QString& xml, const QString& tz )
+KCal::Journal* Journal::xmlToJournal( const TQString& xml, const TQString& tz )
{
Journal journal( tz );
journal.load( xml );
@@ -49,13 +49,13 @@ KCal::Journal* Journal::xmlToJournal( const QString& xml, const QString& tz )
return kcalJournal;
}
-QString Journal::journalToXML( KCal::Journal* kcalJournal, const QString& tz )
+TQString Journal::journalToXML( KCal::Journal* kcalJournal, const TQString& tz )
{
Journal journal( tz, kcalJournal );
return journal.saveXML();
}
-Journal::Journal( const QString& tz, KCal::Journal* journal )
+Journal::Journal( const TQString& tz, KCal::Journal* journal )
: KolabBase( tz )
{
if ( journal )
@@ -66,39 +66,39 @@ Journal::~Journal()
{
}
-void Journal::setSummary( const QString& summary )
+void Journal::setSummary( const TQString& summary )
{
mSummary = summary;
}
-QString Journal::summary() const
+TQString Journal::summary() const
{
return mSummary;
}
-void Journal::setStartDate( const QDateTime& startDate )
+void Journal::setStartDate( const TQDateTime& startDate )
{
mStartDate = startDate;
}
-QDateTime Journal::startDate() const
+TQDateTime Journal::startDate() const
{
return mStartDate;
}
-void Journal::setEndDate( const QDateTime& endDate )
+void Journal::setEndDate( const TQDateTime& endDate )
{
mEndDate = endDate;
}
-QDateTime Journal::endDate() const
+TQDateTime Journal::endDate() const
{
return mEndDate;
}
-bool Journal::loadAttribute( QDomElement& element )
+bool Journal::loadAttribute( TQDomElement& element )
{
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if ( tagName == "summary" )
setSummary( element.text() );
@@ -112,7 +112,7 @@ bool Journal::loadAttribute( QDomElement& element )
return true;
}
-bool Journal::saveAttributes( QDomElement& element ) const
+bool Journal::saveAttributes( TQDomElement& element ) const
{
// Save the base class elements
KolabBase::saveAttributes( element );
@@ -124,9 +124,9 @@ bool Journal::saveAttributes( QDomElement& element ) const
}
-bool Journal::loadXML( const QDomDocument& document )
+bool Journal::loadXML( const TQDomDocument& document )
{
- QDomElement top = document.documentElement();
+ TQDomElement top = document.documentElement();
if ( top.tagName() != "journal" ) {
qWarning( "XML error: Top tag was %s instead of the expected Journal",
@@ -134,11 +134,11 @@ bool Journal::loadXML( const QDomDocument& document )
return false;
}
- for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( !loadAttribute( e ) ) {
// Unhandled tag - save for later storage
//qDebug( "Unhandled tag: %s", e.toCString().data() );
@@ -150,10 +150,10 @@ bool Journal::loadXML( const QDomDocument& document )
return true;
}
-QString Journal::saveXML() const
+TQString Journal::saveXML() const
{
- QDomDocument document = domTree();
- QDomElement element = document.createElement( "journal" );
+ TQDomDocument document = domTree();
+ TQDomElement element = document.createElement( "journal" );
element.setAttribute( "version", "1.0" );
saveAttributes( element );
document.appendChild( element );
@@ -178,7 +178,7 @@ void Journal::setFields( const KCal::Journal* journal )
setStartDate( localToUTC( journal->dtStart() ) );
}
-QString Journal::productID() const
+TQString Journal::productID() const
{
- return QString( "KOrganizer " ) + korgVersion + ", Kolab resource";
+ return TQString( "KOrganizer " ) + korgVersion + ", Kolab resource";
}
diff --git a/kresources/kolab/kcal/journal.h b/kresources/kolab/kcal/journal.h
index d8b09bb96..7505e0703 100644
--- a/kresources/kolab/kcal/journal.h
+++ b/kresources/kolab/kcal/journal.h
@@ -54,48 +54,48 @@ class Journal : public KolabBase {
public:
/// Use this to parse an xml string to a journal entry
/// The caller is responsible for deleting the returned journal
- static KCal::Journal* xmlToJournal( const QString& xml, const QString& tz );
+ static KCal::Journal* xmlToJournal( const TQString& xml, const TQString& tz );
/// Use this to get an xml string describing this journal entry
- static QString journalToXML( KCal::Journal*, const QString& tz );
+ static TQString journalToXML( KCal::Journal*, const TQString& tz );
- explicit Journal( const QString& tz, KCal::Journal* journal = 0 );
+ explicit Journal( const TQString& tz, KCal::Journal* journal = 0 );
virtual ~Journal();
- virtual QString type() const { return "Journal"; }
+ virtual TQString type() const { return "Journal"; }
void saveTo( KCal::Journal* journal );
- virtual void setSummary( const QString& summary );
- virtual QString summary() const;
+ virtual void setSummary( const TQString& summary );
+ virtual TQString summary() const;
- virtual void setStartDate( const QDateTime& startDate );
- virtual QDateTime startDate() const;
+ virtual void setStartDate( const TQDateTime& startDate );
+ virtual TQDateTime startDate() const;
- virtual void setEndDate( const QDateTime& endDate );
- virtual QDateTime endDate() const;
+ virtual void setEndDate( const TQDateTime& endDate );
+ virtual TQDateTime endDate() const;
// Load the attributes of this class
- virtual bool loadAttribute( QDomElement& );
+ virtual bool loadAttribute( TQDomElement& );
// Save the attributes of this class
- virtual bool saveAttributes( QDomElement& ) const;
+ virtual bool saveAttributes( TQDomElement& ) const;
// Load this journal by reading the XML file
- virtual bool loadXML( const QDomDocument& xml );
+ virtual bool loadXML( const TQDomDocument& xml );
// Serialize this journal to an XML string
- virtual QString saveXML() const;
+ virtual TQString saveXML() const;
protected:
// Read all known fields from this ical journal
void setFields( const KCal::Journal* );
- QString productID() const;
+ TQString productID() const;
- QString mSummary;
- QDateTime mStartDate;
- QDateTime mEndDate;
+ TQString mSummary;
+ TQDateTime mStartDate;
+ TQDateTime mEndDate;
};
}
diff --git a/kresources/kolab/kcal/resourcekolab.cpp b/kresources/kolab/kcal/resourcekolab.cpp
index 3c1c80e10..b61b12110 100644
--- a/kresources/kolab/kcal/resourcekolab.cpp
+++ b/kresources/kolab/kcal/resourcekolab.cpp
@@ -50,10 +50,10 @@
#include <ktempfile.h>
#include <kmdcodec.h>
-#include <qfile.h>
-#include <qobject.h>
-#include <qtimer.h>
-#include <qapplication.h>
+#include <tqfile.h>
+#include <tqobject.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
#include <assert.h>
@@ -71,12 +71,12 @@ static const char* incidenceInlineMimeType = "text/calendar";
ResourceKolab::ResourceKolab( const KConfig *config )
: ResourceCalendar( config ), ResourceKolabBase( "ResourceKolab-libkcal" ),
- mCalendar( QString::fromLatin1("UTC") ), mOpen( false ),mResourceChangedTimer( 0,
+ mCalendar( TQString::fromLatin1("UTC") ), mOpen( false ),mResourceChangedTimer( 0,
"mResourceChangedTimer" )
{
setType( "imap" );
- connect( &mResourceChangedTimer, SIGNAL( timeout() ),
- this, SLOT( slotEmitResourceChanged() ) );
+ connect( &mResourceChangedTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotEmitResourceChanged() ) );
}
ResourceKolab::~ResourceKolab()
@@ -89,8 +89,8 @@ ResourceKolab::~ResourceKolab()
}
void ResourceKolab::loadSubResourceConfig( KConfig& config,
- const QString& name,
- const QString& label,
+ const TQString& name,
+ const TQString& label,
bool writable,
bool alarmRelevant,
ResourceMap& subResource )
@@ -105,11 +105,11 @@ bool ResourceKolab::openResource( KConfig& config, const char* contentType,
ResourceMap& map )
{
// Read the subresource entries from KMail
- QValueList<KMailICalIface::SubResource> subResources;
+ TQValueList<KMailICalIface::SubResource> subResources;
if ( !kmailSubresources( subResources, contentType ) )
return false;
map.clear();
- QValueList<KMailICalIface::SubResource>::ConstIterator it;
+ TQValueList<KMailICalIface::SubResource>::ConstIterator it;
for ( it = subResources.begin(); it != subResources.end(); ++it )
loadSubResourceConfig( config, (*it).location, (*it).label, (*it).writable,
(*it).alarmRelevant, map );
@@ -154,7 +154,7 @@ void ResourceKolab::doClose()
closeResource( config, mJournalSubResources );
}
-bool ResourceKolab::loadSubResource( const QString& subResource,
+bool ResourceKolab::loadSubResource( const TQString& subResource,
const char* mimetype )
{
int count = 0;
@@ -168,10 +168,10 @@ bool ResourceKolab::loadSubResource( const QString& subResource,
const int nbMessages = 200; // read 200 mails at a time (see kabc resource)
- const QString labelTxt = !strcmp(mimetype, "application/x-vnd.kolab.task") ? i18n( "Loading tasks..." )
+ const TQString labelTxt = !strcmp(mimetype, "application/x-vnd.kolab.task") ? i18n( "Loading tasks..." )
: !strcmp(mimetype, "application/x-vnd.kolab.journal") ? i18n( "Loading journals..." )
: i18n( "Loading events..." );
- const bool useProgress = qApp && qApp->type() != QApplication::Tty && count > mProgressDialogIncidenceLimit;
+ const bool useProgress = qApp && qApp->type() != TQApplication::Tty && count > mProgressDialogIncidenceLimit;
if ( useProgress )
(void)::Observer::self(); // ensure kio_uiserver is running
UIServer_stub uiserver( "kio_uiserver", "UIServer" );
@@ -184,7 +184,7 @@ bool ResourceKolab::loadSubResource( const QString& subResource,
}
for ( int startIndex = 0; startIndex < count; startIndex += nbMessages ) {
- QMap<Q_UINT32, QString> lst;
+ TQMap<Q_UINT32, TQString> lst;
if ( !kmailIncidences( lst, mimetype, subResource, startIndex, nbMessages ) ) {
kdError(5650) << "Communication problem in ResourceKolab::load()\n";
if ( progressId )
@@ -194,7 +194,7 @@ bool ResourceKolab::loadSubResource( const QString& subResource,
{ // for RAII scoping below
TemporarySilencer t( this );
- for( QMap<Q_UINT32, QString>::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
addIncidence( mimetype, it.data(), subResource, it.key() );
}
}
@@ -266,7 +266,7 @@ bool ResourceKolab::loadAllJournals()
return kolabStyle && icalStyle;
}
-void ResourceKolab::removeIncidences( const QCString& incidenceType )
+void ResourceKolab::removeIncidences( const TQCString& incidenceType )
{
Kolab::UidMap::Iterator mapIt = mUidMap.begin();
while ( mapIt != mUidMap.end() )
@@ -278,7 +278,7 @@ void ResourceKolab::removeIncidences( const QCString& incidenceType )
// A faster but hackish way would probably be to check the type of the resource,
// like mEventSubResources.find( it.data().resource() ) != mEventSubResources.end() ?
- const QString& uid = it.key();
+ const TQString& uid = it.key();
if ( incidenceType == "Event" && mCalendar.event( uid ) )
mUidMap.remove( it );
else if ( incidenceType == "Todo" && mCalendar.todo( uid ) )
@@ -299,7 +299,7 @@ bool ResourceKolab::doSave()
}
void ResourceKolab::incidenceUpdatedSilent( KCal::IncidenceBase* incidencebase)
{
- const QString uid = incidencebase->uid();
+ const TQString uid = incidencebase->uid();
//kdDebug() << k_funcinfo << uid << endl;
if ( mUidsPendingUpdate.contains( uid ) || mUidsPendingAdding.contains( uid ) ) {
@@ -310,7 +310,7 @@ void ResourceKolab::incidenceUpdatedSilent( KCal::IncidenceBase* incidencebase)
return;
}
- QString subResource;
+ TQString subResource;
Q_UINT32 sernum = 0;
if ( mUidMap.contains( uid ) ) {
subResource = mUidMap[ uid ].resource();
@@ -324,7 +324,7 @@ void ResourceKolab::incidenceUpdated( KCal::IncidenceBase* incidencebase )
{
if ( incidencebase->isReadOnly() ) return;
incidencebase->setSyncStatusSilent( KCal::Event::SYNCMOD );
- incidencebase->setLastModified( QDateTime::currentDateTime() );
+ incidencebase->setLastModified( TQDateTime::currentDateTime() );
// we should probably update the revision number here,
// or internally in the Event itself when certain things change.
// need to verify with ical documentation.
@@ -332,7 +332,7 @@ void ResourceKolab::incidenceUpdated( KCal::IncidenceBase* incidencebase )
}
-void ResourceKolab::resolveConflict( KCal::Incidence* inc, const QString& subresource, Q_UINT32 sernum )
+void ResourceKolab::resolveConflict( KCal::Incidence* inc, const TQString& subresource, Q_UINT32 sernum )
{
if ( ! inc )
return;
@@ -341,7 +341,7 @@ void ResourceKolab::resolveConflict( KCal::Incidence* inc, const QString& subres
delete inc;
return;
}
- const QString origUid = inc->uid();
+ const TQString origUid = inc->uid();
Incidence* local = mCalendar.incidence( origUid );
Incidence* localIncidence = 0;
Incidence* addedIncidence = 0;
@@ -354,7 +354,7 @@ void ResourceKolab::resolveConflict( KCal::Incidence* inc, const QString& subres
KIncidenceChooser* ch = new KIncidenceChooser();
ch->setIncidence( local ,inc );
if ( KIncidenceChooser::chooseMode == KIncidenceChooser::ask ) {
- connect ( this, SIGNAL( useGlobalMode() ), ch, SLOT ( useGlobalMode() ) );
+ connect ( this, TQT_SIGNAL( useGlobalMode() ), ch, TQT_SLOT ( useGlobalMode() ) );
if ( ch->exec() )
if ( KIncidenceChooser::chooseMode != KIncidenceChooser::ask )
emit useGlobalMode() ;
@@ -390,8 +390,8 @@ void ResourceKolab::resolveConflict( KCal::Incidence* inc, const QString& subres
}
mSilent = silent;
}
-void ResourceKolab::addIncidence( const char* mimetype, const QString& data,
- const QString& subResource, Q_UINT32 sernum )
+void ResourceKolab::addIncidence( const char* mimetype, const TQString& data,
+ const TQString& subResource, Q_UINT32 sernum )
{
// This uses pointer comparison, so it only works if we use the static
// objects defined in the top of the file
@@ -408,12 +408,12 @@ void ResourceKolab::addIncidence( const char* mimetype, const QString& data,
}
-bool ResourceKolab::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const QString& subresource,
+bool ResourceKolab::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const TQString& subresource,
Q_UINT32 sernum )
{
- const QString& type = incidencebase->type();
+ const TQString& type = incidencebase->type();
const char* mimetype = 0;
- QString data;
+ TQString data;
bool isXMLStorageFormat = kmailStorageFormat( subresource ) == KMailICalIface::StorageXML;
if ( type == "Event" ) {
if( isXMLStorageFormat ) {
@@ -454,11 +454,11 @@ bool ResourceKolab::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const Q
KCal::Incidence* incidence = static_cast<KCal::Incidence *>( incidencebase );
KCal::Attachment::List atts = incidence->attachments();
- QStringList attURLs, attMimeTypes, attNames;
- QValueList<KTempFile*> tmpFiles;
+ TQStringList attURLs, attMimeTypes, attNames;
+ TQValueList<KTempFile*> tmpFiles;
for ( KCal::Attachment::List::ConstIterator it = atts.constBegin(); it != atts.constEnd(); ++it ) {
KTempFile* tempFile = new KTempFile;
- QCString decoded = KCodecs::base64Decode( QCString( (*it)->data() ) );
+ TQCString decoded = KCodecs::base64Decode( TQCString( (*it)->data() ) );
tempFile->file()->writeBlock( decoded.data(), decoded.length() );
tempFile->close();
KURL url;
@@ -467,9 +467,9 @@ bool ResourceKolab::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const Q
attMimeTypes.append( (*it)->mimeType() );
attNames.append( (*it)->label() );
}
- QStringList deletedAtts;
+ TQStringList deletedAtts;
if ( kmailListAttachments( deletedAtts, subresource, sernum ) ) {
- for ( QStringList::ConstIterator it = attNames.constBegin(); it != attNames.constEnd(); ++it ) {
+ for ( TQStringList::ConstIterator it = attNames.constBegin(); it != attNames.constEnd(); ++it ) {
deletedAtts.remove( *it );
}
}
@@ -477,7 +477,7 @@ bool ResourceKolab::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const Q
if ( incidence->schedulingID() != incidence->uid() )
customHeaders.insert( "X-Kolab-SchedulingID", incidence->schedulingID() );
- QString subject = incidencebase->uid();
+ TQString subject = incidencebase->uid();
if ( !isXMLStorageFormat ) subject.prepend( "iCal " ); // conform to the old style
// behold, sernum is an in-parameter
@@ -487,7 +487,7 @@ bool ResourceKolab::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const Q
mUidMap[ incidencebase->uid() ].setSerialNumber( sernum );
}
- for( QValueList<KTempFile *>::Iterator it = tmpFiles.begin(); it != tmpFiles.end(); ++it ) {
+ for( TQValueList<KTempFile *>::Iterator it = tmpFiles.begin(); it != tmpFiles.end(); ++it ) {
(*it)->setAutoDelete( true );
delete (*it);
}
@@ -495,17 +495,17 @@ bool ResourceKolab::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const Q
return rc;
}
-bool ResourceKolab::addIncidence( KCal::Incidence* incidence, const QString& _subresource,
+bool ResourceKolab::addIncidence( KCal::Incidence* incidence, const TQString& _subresource,
Q_UINT32 sernum )
{
Q_ASSERT( incidence );
if ( !incidence ) return false;
- QString uid = incidence->uid();
- QString subResource = _subresource;
+ TQString uid = incidence->uid();
+ TQString subResource = _subresource;
Kolab::ResourceMap *map = &mEventSubResources; // don't use a ref here!
- const QString& type = incidence->type();
+ const TQString& type = incidence->type();
if ( type == "Event" )
map = &mEventSubResources;
else if ( type == "Todo" )
@@ -520,7 +520,7 @@ bool ResourceKolab::addIncidence( KCal::Incidence* incidence, const QString& _su
bool newIncidence = _subresource.isEmpty();
if ( newIncidence ) {
// Add a description of the incidence
- QString text = "<b><font size=\"+1\">";
+ TQString text = "<b><font size=\"+1\">";
if ( incidence->type() == "Event" )
text += i18n( "Choose the folder where you want to store this event" );
else if ( incidence->type() == "Todo" )
@@ -642,10 +642,10 @@ bool ResourceKolab::addEvent( KCal::Event* event )
if ( mUidMap.contains( event->uid() ) )
return true; //noop
else
- return addIncidence( event, QString::null, 0 );
+ return addIncidence( event, TQString::null, 0 );
}
-void ResourceKolab::addEvent( const QString& xml, const QString& subresource,
+void ResourceKolab::addEvent( const TQString& xml, const TQString& subresource,
Q_UINT32 sernum )
{
KCal::Event* event = Kolab::Event::xmlToEvent( xml, mCalendar.timeZoneId(), this, subresource, sernum );
@@ -659,7 +659,7 @@ bool ResourceKolab::deleteIncidence( KCal::Incidence* incidence )
{
if ( incidence->isReadOnly() ) return false;
- const QString uid = incidence->uid();
+ const TQString uid = incidence->uid();
if( !mUidMap.contains( uid ) ) return false; // Odd
/* The user told us to delete, tell KMail */
if ( !mSilent ) {
@@ -680,7 +680,7 @@ bool ResourceKolab::deleteEvent( KCal::Event* event )
return deleteIncidence( event );
}
-KCal::Event* ResourceKolab::event( const QString& uid )
+KCal::Event* ResourceKolab::event( const TQString& uid )
{
return mCalendar.event(uid);
}
@@ -690,20 +690,20 @@ KCal::Event::List ResourceKolab::rawEvents( EventSortField sortField, SortDirect
return mCalendar.rawEvents( sortField, sortDirection );
}
-KCal::Event::List ResourceKolab::rawEventsForDate( const QDate& date,
+KCal::Event::List ResourceKolab::rawEventsForDate( const TQDate& date,
EventSortField sortField,
SortDirection sortDirection )
{
return mCalendar.rawEventsForDate( date, sortField, sortDirection );
}
-KCal::Event::List ResourceKolab::rawEventsForDate( const QDateTime& qdt )
+KCal::Event::List ResourceKolab::rawEventsForDate( const TQDateTime& qdt )
{
return mCalendar.rawEventsForDate( qdt );
}
-KCal::Event::List ResourceKolab::rawEvents( const QDate& start,
- const QDate& end,
+KCal::Event::List ResourceKolab::rawEvents( const TQDate& start,
+ const TQDate& end,
bool inclusive )
{
return mCalendar.rawEvents( start, end, inclusive );
@@ -714,10 +714,10 @@ bool ResourceKolab::addTodo( KCal::Todo* todo )
if ( mUidMap.contains( todo->uid() ) )
return true; //noop
else
- return addIncidence( todo, QString::null, 0 );
+ return addIncidence( todo, TQString::null, 0 );
}
-void ResourceKolab::addTodo( const QString& xml, const QString& subresource,
+void ResourceKolab::addTodo( const TQString& xml, const TQString& subresource,
Q_UINT32 sernum )
{
KCal::Todo* todo = Kolab::Task::xmlToTask( xml, mCalendar.timeZoneId(), this, subresource, sernum );
@@ -731,7 +731,7 @@ bool ResourceKolab::deleteTodo( KCal::Todo* todo )
return deleteIncidence( todo );
}
-KCal::Todo* ResourceKolab::todo( const QString& uid )
+KCal::Todo* ResourceKolab::todo( const TQString& uid )
{
return mCalendar.todo( uid );
}
@@ -741,7 +741,7 @@ KCal::Todo::List ResourceKolab::rawTodos( TodoSortField sortField, SortDirection
return mCalendar.rawTodos( sortField, sortDirection );
}
-KCal::Todo::List ResourceKolab::rawTodosForDate( const QDate& date )
+KCal::Todo::List ResourceKolab::rawTodosForDate( const TQDate& date )
{
return mCalendar.rawTodosForDate( date );
}
@@ -751,10 +751,10 @@ bool ResourceKolab::addJournal( KCal::Journal* journal )
if ( mUidMap.contains( journal->uid() ) )
return true; //noop
else
- return addIncidence( journal, QString::null, 0 );
+ return addIncidence( journal, TQString::null, 0 );
}
-void ResourceKolab::addJournal( const QString& xml, const QString& subresource,
+void ResourceKolab::addJournal( const TQString& xml, const TQString& subresource,
Q_UINT32 sernum )
{
KCal::Journal* journal =
@@ -770,7 +770,7 @@ bool ResourceKolab::deleteJournal( KCal::Journal* journal )
return deleteIncidence( journal );
}
-KCal::Journal* ResourceKolab::journal( const QString& uid )
+KCal::Journal* ResourceKolab::journal( const TQString& uid )
{
return mCalendar.journal(uid);
}
@@ -780,7 +780,7 @@ KCal::Journal::List ResourceKolab::rawJournals( JournalSortField sortField, Sort
return mCalendar.rawJournals( sortField, sortDirection );
}
-KCal::Journal::List ResourceKolab::rawJournalsForDate( const QDate &date )
+KCal::Journal::List ResourceKolab::rawJournalsForDate( const TQDate &date )
{
return mCalendar.rawJournalsForDate( date );
}
@@ -792,9 +792,9 @@ KCal::Alarm::List ResourceKolab::relevantAlarms( const KCal::Alarm::List &alarms
while ( it != alarms.end() ) {
KCal::Alarm *a = (*it);
++it;
- const QString &uid = a->parent()->uid();
+ const TQString &uid = a->parent()->uid();
if ( mUidMap.contains( uid ) ) {
- const QString &sr = mUidMap[ uid ].resource();
+ const TQString &sr = mUidMap[ uid ].resource();
Kolab::SubResource *subResource = 0;
if ( mEventSubResources.contains( sr ) )
subResource = &( mEventSubResources[ sr ] );
@@ -813,28 +813,28 @@ KCal::Alarm::List ResourceKolab::relevantAlarms( const KCal::Alarm::List &alarms
-KCal::Alarm::List ResourceKolab::alarms( const QDateTime& from,
- const QDateTime& to )
+KCal::Alarm::List ResourceKolab::alarms( const TQDateTime& from,
+ const TQDateTime& to )
{
return relevantAlarms( mCalendar.alarms( from, to ) );
}
-KCal::Alarm::List ResourceKolab::alarmsTo( const QDateTime& to )
+KCal::Alarm::List ResourceKolab::alarmsTo( const TQDateTime& to )
{
return relevantAlarms( mCalendar.alarmsTo(to) );
}
-void ResourceKolab::setTimeZoneId( const QString& tzid )
+void ResourceKolab::setTimeZoneId( const TQString& tzid )
{
mCalendar.setTimeZoneId( tzid );
mFormat.setTimeZone( mCalendar.timeZoneId(), !mCalendar.isLocalTime() );
}
-bool ResourceKolab::fromKMailAddIncidence( const QString& type,
- const QString& subResource,
+bool ResourceKolab::fromKMailAddIncidence( const TQString& type,
+ const TQString& subResource,
Q_UINT32 sernum,
int format,
- const QString& data )
+ const TQString& data )
{
bool rc = true;
TemporarySilencer t( this ); // RAII
@@ -864,9 +864,9 @@ bool ResourceKolab::fromKMailAddIncidence( const QString& type,
return rc;
}
-void ResourceKolab::fromKMailDelIncidence( const QString& type,
- const QString& subResource,
- const QString& uid )
+void ResourceKolab::fromKMailDelIncidence( const TQString& type,
+ const TQString& subResource,
+ const TQString& uid )
{
if ( type != kmailCalendarContentsType && type != kmailTodoContentsType
&& type != kmailJournalContentsType )
@@ -892,8 +892,8 @@ void ResourceKolab::fromKMailDelIncidence( const QString& type,
}
}
-void ResourceKolab::fromKMailRefresh( const QString& type,
- const QString& /*subResource*/ )
+void ResourceKolab::fromKMailRefresh( const TQString& type,
+ const TQString& /*subResource*/ )
{
// TODO: Only load the specified subResource
if ( type == "Calendar" )
@@ -907,9 +907,9 @@ void ResourceKolab::fromKMailRefresh( const QString& type,
mResourceChangedTimer.changeInterval( 100 );
}
-void ResourceKolab::fromKMailAddSubresource( const QString& type,
- const QString& subResource,
- const QString& label,
+void ResourceKolab::fromKMailAddSubresource( const TQString& type,
+ const TQString& subResource,
+ const TQString& label,
bool writable, bool alarmRelevant )
{
ResourceMap* map = 0;
@@ -941,8 +941,8 @@ void ResourceKolab::fromKMailAddSubresource( const QString& type,
emit signalSubresourceAdded( this, type, subResource, label );
}
-void ResourceKolab::fromKMailDelSubresource( const QString& type,
- const QString& subResource )
+void ResourceKolab::fromKMailDelSubresource( const TQString& type,
+ const TQString& subResource )
{
ResourceMap* map = subResourceMap( type );
if ( !map ) // not ours
@@ -963,7 +963,7 @@ void ResourceKolab::fromKMailDelSubresource( const QString& type,
emit signalSubresourceRemoved( this, type, subResource );
}
-QStringList ResourceKolab::subresources() const
+TQStringList ResourceKolab::subresources() const
{
// Workaround: The ResourceView in KOrganizer wants to know this
// before it opens the resource :-( Make sure we are open
@@ -974,7 +974,7 @@ QStringList ResourceKolab::subresources() const
}
const QString
-ResourceKolab::labelForSubresource( const QString& subresource ) const
+ResourceKolab::labelForSubresource( const TQString& subresource ) const
{
if ( mEventSubResources.contains( subresource ) )
return mEventSubResources[ subresource ].label();
@@ -985,16 +985,16 @@ ResourceKolab::labelForSubresource( const QString& subresource ) const
return subresource;
}
-void ResourceKolab::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder )
+void ResourceKolab::fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder )
{
TemporarySilencer t( this );
- for( QMap<Q_UINT32, QString>::ConstIterator it = map.begin(); it != map.end(); ++it )
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = map.begin(); it != map.end(); ++it )
addIncidence( type.latin1(), it.data(), folder, it.key() );
}
-bool ResourceKolab::subresourceActive( const QString& subresource ) const
+bool ResourceKolab::subresourceActive( const TQString& subresource ) const
{
// Workaround: The ResourceView in KOrganizer wants to know this
// before it opens the resource :-( Make sure we are open
@@ -1013,7 +1013,7 @@ bool ResourceKolab::subresourceActive( const QString& subresource ) const
return true;
}
-void ResourceKolab::setSubresourceActive( const QString &subresource, bool v )
+void ResourceKolab::setSubresourceActive( const TQString &subresource, bool v )
{
ResourceMap *map = 0;
const char* mimeType = 0;
@@ -1054,7 +1054,7 @@ KABC::Lock* ResourceKolab::lock()
}
-Kolab::ResourceMap* ResourceKolab::subResourceMap( const QString& contentsType )
+Kolab::ResourceMap* ResourceKolab::subResourceMap( const TQString& contentsType )
{
if ( contentsType == kmailCalendarContentsType ) {
return &mEventSubResources;
@@ -1069,10 +1069,10 @@ Kolab::ResourceMap* ResourceKolab::subResourceMap( const QString& contentsType )
/*virtual*/
-bool ResourceKolab::addSubresource( const QString& resource, const QString& parent )
+bool ResourceKolab::addSubresource( const TQString& resource, const TQString& parent )
{
kdDebug(5650) << "KCal Kolab resource - adding subresource: " << resource << endl;
- QString contentsType = kmailCalendarContentsType;
+ TQString contentsType = kmailCalendarContentsType;
if ( !parent.isEmpty() ) {
if ( mEventSubResources.contains( parent ) )
contentsType = kmailCalendarContentsType;
@@ -1081,10 +1081,10 @@ bool ResourceKolab::addSubresource( const QString& resource, const QString& pare
else if ( mJournalSubResources.contains( parent ) )
contentsType = kmailJournalContentsType;
} else {
- QStringList contentTypeChoices;
+ TQStringList contentTypeChoices;
contentTypeChoices << i18n("Calendar") << i18n("Tasks") << i18n("Journals");
- const QString caption = i18n("Which kind of subresource should this be?");
- const QString choice = KInputDialog::getItem( caption, QString::null, contentTypeChoices );
+ const TQString caption = i18n("Which kind of subresource should this be?");
+ const TQString choice = KInputDialog::getItem( caption, TQString::null, contentTypeChoices );
if ( choice == contentTypeChoices[0] )
contentsType = kmailCalendarContentsType;
else if ( choice == contentTypeChoices[1] )
@@ -1097,27 +1097,27 @@ bool ResourceKolab::addSubresource( const QString& resource, const QString& pare
}
/*virtual*/
-bool ResourceKolab::removeSubresource( const QString& resource )
+bool ResourceKolab::removeSubresource( const TQString& resource )
{
kdDebug(5650) << "KCal Kolab resource - removing subresource: " << resource << endl;
return kmailRemoveSubresource( resource );
}
/*virtual*/
-QString ResourceKolab::subresourceIdentifier( Incidence *incidence )
+TQString ResourceKolab::subresourceIdentifier( Incidence *incidence )
{
- QString uid = incidence->uid();
+ TQString uid = incidence->uid();
if ( mUidMap.contains( uid ) )
return mUidMap[ uid ].resource();
else
if ( mNewIncidencesMap.contains( uid ) )
return mNewIncidencesMap[ uid ];
else
- return QString();
+ return TQString();
}
-bool ResourceKolab::unloadSubResource( const QString& subResource )
+bool ResourceKolab::unloadSubResource( const TQString& subResource )
{
const bool silent = mSilent;
mSilent = true;
@@ -1139,7 +1139,7 @@ bool ResourceKolab::unloadSubResource( const QString& subResource )
return true;
}
-QString ResourceKolab::subresourceType( const QString &resource )
+TQString ResourceKolab::subresourceType( const TQString &resource )
{
if ( mEventSubResources.contains( resource ) )
return "event";
@@ -1147,7 +1147,7 @@ QString ResourceKolab::subresourceType( const QString &resource )
return "todo";
if ( mJournalSubResources.contains( resource ) )
return "journal";
- return QString();
+ return TQString();
}
#include "resourcekolab.moc"
diff --git a/kresources/kolab/kcal/resourcekolab.h b/kresources/kolab/kcal/resourcekolab.h
index 0974e4ada..e68c2c6bf 100644
--- a/kresources/kolab/kcal/resourcekolab.h
+++ b/kresources/kolab/kcal/resourcekolab.h
@@ -35,7 +35,7 @@
#ifndef KCAL_RESOURCEKOLAB_H
#define KCAL_RESOURCEKOLAB_H
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdepimmacros.h>
#include <libkcal/calendarlocal.h>
@@ -72,71 +72,71 @@ public:
// The libkcal functions. See the resource for descriptions
bool addEvent( KCal::Event* anEvent );
bool deleteEvent( KCal::Event* );
- KCal::Event* event( const QString &UniqueStr );
+ KCal::Event* event( const TQString &UniqueStr );
KCal::Event::List rawEvents( EventSortField sortField = EventSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
KCal::Event::List rawEventsForDate(
- const QDate& date,
+ const TQDate& date,
EventSortField sortField=EventSortUnsorted,
SortDirection sortDirection=SortDirectionAscending );
- KCal::Event::List rawEventsForDate( const QDateTime& qdt );
- KCal::Event::List rawEvents( const QDate& start, const QDate& end,
+ KCal::Event::List rawEventsForDate( const TQDateTime& qdt );
+ KCal::Event::List rawEvents( const TQDate& start, const TQDate& end,
bool inclusive = false );
bool addTodo( KCal::Todo* todo );
bool deleteTodo( KCal::Todo* );
- KCal::Todo* todo( const QString& uid );
+ KCal::Todo* todo( const TQString& uid );
KCal::Todo::List rawTodos( TodoSortField sortField = TodoSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
- KCal::Todo::List rawTodosForDate( const QDate& date );
+ KCal::Todo::List rawTodosForDate( const TQDate& date );
bool addJournal( KCal::Journal* );
bool deleteJournal( KCal::Journal* );
- KCal::Journal* journal( const QString& uid );
+ KCal::Journal* journal( const TQString& uid );
KCal::Journal::List rawJournals( JournalSortField sortField = JournalSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
- KCal::Journal::List rawJournalsForDate( const QDate &date );
+ KCal::Journal::List rawJournalsForDate( const TQDate &date );
- KCal::Alarm::List alarms( const QDateTime& from, const QDateTime& to );
- KCal::Alarm::List alarmsTo( const QDateTime& to );
+ KCal::Alarm::List alarms( const TQDateTime& from, const TQDateTime& to );
+ KCal::Alarm::List alarmsTo( const TQDateTime& to );
- void setTimeZoneId( const QString& tzid );
+ void setTimeZoneId( const TQString& tzid );
bool deleteIncidence( KCal::Incidence* i );
/// The ResourceKolabBase methods called by KMail
- bool fromKMailAddIncidence( const QString& type, const QString& subResource,
- Q_UINT32 sernum, int format, const QString& data );
- void fromKMailDelIncidence( const QString& type, const QString& subResource,
- const QString& uid );
- void fromKMailRefresh( const QString& type, const QString& subResource );
+ bool fromKMailAddIncidence( const TQString& type, const TQString& subResource,
+ Q_UINT32 sernum, int format, const TQString& data );
+ void fromKMailDelIncidence( const TQString& type, const TQString& subResource,
+ const TQString& uid );
+ void fromKMailRefresh( const TQString& type, const TQString& subResource );
/// Listen to KMail changes in the amount of sub resources
- void fromKMailAddSubresource( const QString& type, const QString& subResource,
- const QString& label, bool writable,
+ void fromKMailAddSubresource( const TQString& type, const TQString& subResource,
+ const TQString& label, bool writable,
bool alarmRelevant );
- void fromKMailDelSubresource( const QString& type, const QString& subResource );
+ void fromKMailDelSubresource( const TQString& type, const TQString& subResource );
- void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder );
+ void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder );
/** Return the list of subresources. */
- QStringList subresources() const;
+ TQStringList subresources() const;
bool canHaveSubresources() const { return true; }
/** Is this subresource active? */
- bool subresourceActive( const QString& ) const;
+ bool subresourceActive( const TQString& ) const;
/** (De)activate the subresource */
- virtual void setSubresourceActive( const QString &, bool );
+ virtual void setSubresourceActive( const TQString &, bool );
/** What is the label for this subresource? */
- virtual const QString labelForSubresource( const QString& resource ) const;
+ virtual const TQString labelForSubresource( const TQString& resource ) const;
- virtual QString subresourceIdentifier( Incidence *incidence );
+ virtual TQString subresourceIdentifier( Incidence *incidence );
- virtual bool addSubresource( const QString& resource, const QString& parent );
- virtual bool removeSubresource( const QString& resource );
+ virtual bool addSubresource( const TQString& resource, const TQString& parent );
+ virtual bool removeSubresource( const TQString& resource );
- virtual QString subresourceType( const QString &resource );
+ virtual TQString subresourceType( const TQString &resource );
KABC::Lock* lock();
@@ -152,19 +152,19 @@ protected:
KCal::Alarm::List relevantAlarms( const KCal::Alarm::List &alarms );
private:
- void removeIncidences( const QCString& incidenceType );
- void resolveConflict( KCal::Incidence*, const QString& subresource, Q_UINT32 sernum );
- void addIncidence( const char* mimetype, const QString& xml,
- const QString& subResource, Q_UINT32 sernum );
+ void removeIncidences( const TQCString& incidenceType );
+ void resolveConflict( KCal::Incidence*, const TQString& subresource, Q_UINT32 sernum );
+ void addIncidence( const char* mimetype, const TQString& xml,
+ const TQString& subResource, Q_UINT32 sernum );
- bool addIncidence( KCal::Incidence* i, const QString& subresource,
+ bool addIncidence( KCal::Incidence* i, const TQString& subresource,
Q_UINT32 sernum );
- void addEvent( const QString& xml, const QString& subresource,
+ void addEvent( const TQString& xml, const TQString& subresource,
Q_UINT32 sernum );
- void addTodo( const QString& xml, const QString& subresource,
+ void addTodo( const TQString& xml, const TQString& subresource,
Q_UINT32 sernum );
- void addJournal( const QString& xml, const QString& subresource,
+ void addJournal( const TQString& xml, const TQString& subresource,
Q_UINT32 sernum );
@@ -180,19 +180,19 @@ private:
bool openResource( KConfig& config, const char* contentType,
Kolab::ResourceMap& map );
- void loadSubResourceConfig( KConfig& config, const QString& name,
- const QString& label, bool writable,
+ void loadSubResourceConfig( KConfig& config, const TQString& name,
+ const TQString& label, bool writable,
bool alarmRelevant, Kolab::ResourceMap& subResource );
- bool loadSubResource( const QString& subResource, const char* mimetype );
- bool unloadSubResource( const QString& subResource );
+ bool loadSubResource( const TQString& subResource, const char* mimetype );
+ bool unloadSubResource( const TQString& subResource );
- QString configFile() const {
+ TQString configFile() const {
return ResourceKolabBase::configFile( "kcal" );
}
- Kolab::ResourceMap* subResourceMap( const QString& contentsType );
+ Kolab::ResourceMap* subResourceMap( const TQString& contentsType );
- bool sendKMailUpdate( KCal::IncidenceBase* incidence, const QString& _subresource,
+ bool sendKMailUpdate( KCal::IncidenceBase* incidence, const TQString& _subresource,
Q_UINT32 sernum );
@@ -202,8 +202,8 @@ private:
Kolab::ResourceMap mEventSubResources, mTodoSubResources, mJournalSubResources;
bool mOpen; // If the resource is open, this is true
- QDict<KCal::IncidenceBase> mPendingUpdates;
- QTimer mResourceChangedTimer;
+ TQDict<KCal::IncidenceBase> mPendingUpdates;
+ TQTimer mResourceChangedTimer;
ICalFormat mFormat;
/**
@@ -213,7 +213,7 @@ private:
We can't trust on mUidMap here, because it contains only non-pending uids.
*/
- QMap<QString, QString> mNewIncidencesMap;
+ TQMap<TQString, TQString> mNewIncidencesMap;
int mProgressDialogIncidenceLimit;
};
diff --git a/kresources/kolab/kcal/resourcekolab_plugin.cpp b/kresources/kolab/kcal/resourcekolab_plugin.cpp
index afc83e1d6..14d09465a 100644
--- a/kresources/kolab/kcal/resourcekolab_plugin.cpp
+++ b/kresources/kolab/kcal/resourcekolab_plugin.cpp
@@ -40,7 +40,7 @@ public:
return new KCal::ResourceKolab( config );
}
- KRES::ConfigWidget *configWidget( QWidget* )
+ KRES::ConfigWidget *configWidget( TQWidget* )
{
return 0;
}
diff --git a/kresources/kolab/kcal/task.cpp b/kresources/kolab/kcal/task.cpp
index b66c9827b..7bbdba978 100644
--- a/kresources/kolab/kcal/task.cpp
+++ b/kresources/kolab/kcal/task.cpp
@@ -39,8 +39,8 @@
using namespace Kolab;
-KCal::Todo* Task::xmlToTask( const QString& xml, const QString& tz, KCal::ResourceKolab *res,
- const QString& subResource, Q_UINT32 sernum )
+KCal::Todo* Task::xmlToTask( const TQString& xml, const TQString& tz, KCal::ResourceKolab *res,
+ const TQString& subResource, Q_UINT32 sernum )
{
Task task( res, subResource, sernum, tz );
task.load( xml );
@@ -49,14 +49,14 @@ KCal::Todo* Task::xmlToTask( const QString& xml, const QString& tz, KCal::Resour
return todo;
}
-QString Task::taskToXML( KCal::Todo* todo, const QString& tz )
+TQString Task::taskToXML( KCal::Todo* todo, const TQString& tz )
{
- Task task( 0, QString::null, 0, tz, todo );
+ Task task( 0, TQString::null, 0, tz, todo );
return task.saveXML();
}
-Task::Task( KCal::ResourceKolab *res, const QString &subResource, Q_UINT32 sernum,
- const QString& tz, KCal::Todo* task )
+Task::Task( KCal::ResourceKolab *res, const TQString &subResource, Q_UINT32 sernum,
+ const TQString& tz, KCal::Todo* task )
: Incidence( res, subResource, sernum, tz ),
mPriority( 5 ), mPercentCompleted( 0 ),
mStatus( KCal::Incidence::StatusNone ),
@@ -101,23 +101,23 @@ KCal::Incidence::Status Task::status() const
return mStatus;
}
-void Task::setParent( const QString& parentUid )
+void Task::setParent( const TQString& parentUid )
{
mParent = parentUid;
}
-QString Task::parent() const
+TQString Task::parent() const
{
return mParent;
}
-void Task::setDueDate( const QDateTime& date )
+void Task::setDueDate( const TQDateTime& date )
{
mDueDate = date;
mHasDueDate = true;
}
-QDateTime Task::dueDate() const
+TQDateTime Task::dueDate() const
{
return mDueDate;
}
@@ -137,13 +137,13 @@ bool Task::hasDueDate() const
return mHasDueDate;
}
-void Task::setCompletedDate( const QDateTime& date )
+void Task::setCompletedDate( const TQDateTime& date )
{
mCompletedDate = date;
mHasCompletedDate = true;
}
-QDateTime Task::completedDate() const
+TQDateTime Task::completedDate() const
{
return mCompletedDate;
}
@@ -153,9 +153,9 @@ bool Task::hasCompletedDate() const
return mHasCompletedDate;
}
-bool Task::loadAttribute( QDomElement& element )
+bool Task::loadAttribute( TQDomElement& element )
{
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if ( tagName == "priority" ) {
bool ok;
@@ -198,13 +198,13 @@ bool Task::loadAttribute( QDomElement& element )
return true;
}
-bool Task::saveAttributes( QDomElement& element ) const
+bool Task::saveAttributes( TQDomElement& element ) const
{
// Save the base class elements
Incidence::saveAttributes( element );
- writeString( element, "priority", QString::number( priority() ) );
- writeString( element, "completed", QString::number( percentCompleted() ) );
+ writeString( element, "priority", TQString::number( priority() ) );
+ writeString( element, "completed", TQString::number( percentCompleted() ) );
switch( status() ) {
case KCal::Incidence::StatusInProcess:
@@ -245,9 +245,9 @@ bool Task::saveAttributes( QDomElement& element ) const
}
-bool Task::loadXML( const QDomDocument& document )
+bool Task::loadXML( const TQDomDocument& document )
{
- QDomElement top = document.documentElement();
+ TQDomElement top = document.documentElement();
if ( top.tagName() != "task" ) {
qWarning( "XML error: Top tag was %s instead of the expected task",
@@ -256,11 +256,11 @@ bool Task::loadXML( const QDomDocument& document )
}
setHasStartDate( false ); // todo's don't necessarily have one
- for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( !loadAttribute( e ) )
// TODO: Unhandled tag - save for later storage
kdDebug() << "Warning: Unhandled tag " << e.tagName() << endl;
@@ -272,17 +272,17 @@ bool Task::loadXML( const QDomDocument& document )
return true;
}
-QString Task::saveXML() const
+TQString Task::saveXML() const
{
- QDomDocument document = domTree();
- QDomElement element = document.createElement( "task" );
+ TQDomDocument document = domTree();
+ TQDomElement element = document.createElement( "task" );
element.setAttribute( "version", "1.0" );
saveAttributes( element );
if ( !hasStartDate() ) {
// events and journals always have a start date, but tasks don't.
// Remove the entry done by the inherited save above, because we
// don't have one.
- QDomNodeList l = element.elementsByTagName( "start-date" );
+ TQDomNodeList l = element.elementsByTagName( "start-date" );
Q_ASSERT( l.count() == 1 );
element.removeChild( l.item( 0 ) );
}
@@ -308,7 +308,7 @@ void Task::setFields( const KCal::Todo* task )
else if ( !task->relatedToUid().isEmpty() )
setParent( task->relatedToUid() );
else
- setParent( QString::null );
+ setParent( TQString::null );
if ( task->hasCompletedDate() && task->percentComplete() == 100 )
setCompletedDate( localToUTC( task->completed() ) );
diff --git a/kresources/kolab/kcal/task.h b/kresources/kolab/kcal/task.h
index 96bcafd96..32095bcab 100644
--- a/kresources/kolab/kcal/task.h
+++ b/kresources/kolab/kcal/task.h
@@ -57,17 +57,17 @@ class Task : public Incidence {
public:
/// Use this to parse an xml string to a task entry
/// The caller is responsible for deleting the returned task
- static KCal::Todo* xmlToTask( const QString& xml, const QString& tz, KCal::ResourceKolab *res = 0,
- const QString& subResource = QString::null, Q_UINT32 sernum = 0 );
+ static KCal::Todo* xmlToTask( const TQString& xml, const TQString& tz, KCal::ResourceKolab *res = 0,
+ const TQString& subResource = TQString::null, Q_UINT32 sernum = 0 );
/// Use this to get an xml string describing this task entry
- static QString taskToXML( KCal::Todo*, const QString& tz );
+ static TQString taskToXML( KCal::Todo*, const TQString& tz );
- explicit Task( KCal::ResourceKolab *res, const QString& subResource, Q_UINT32 sernum,
- const QString& tz, KCal::Todo* todo = 0 );
+ explicit Task( KCal::ResourceKolab *res, const TQString& subResource, Q_UINT32 sernum,
+ const TQString& tz, KCal::Todo* todo = 0 );
virtual ~Task();
- virtual QString type() const { return "Task"; }
+ virtual TQString type() const { return "Task"; }
void saveTo( KCal::Todo* todo );
@@ -80,31 +80,31 @@ public:
virtual void setStatus( KCal::Incidence::Status status );
virtual KCal::Incidence::Status status() const;
- virtual void setParent( const QString& parentUid );
- virtual QString parent() const;
+ virtual void setParent( const TQString& parentUid );
+ virtual TQString parent() const;
virtual void setHasStartDate( bool );
virtual bool hasStartDate() const;
- virtual void setDueDate( const QDateTime& date );
- virtual QDateTime dueDate() const;
+ virtual void setDueDate( const TQDateTime& date );
+ virtual TQDateTime dueDate() const;
virtual bool hasDueDate() const;
- virtual void setCompletedDate( const QDateTime& date );
- virtual QDateTime completedDate() const;
+ virtual void setCompletedDate( const TQDateTime& date );
+ virtual TQDateTime completedDate() const;
virtual bool hasCompletedDate() const;
// Load the attributes of this class
- virtual bool loadAttribute( QDomElement& );
+ virtual bool loadAttribute( TQDomElement& );
// Save the attributes of this class
- virtual bool saveAttributes( QDomElement& ) const;
+ virtual bool saveAttributes( TQDomElement& ) const;
// Load this task by reading the XML file
- virtual bool loadXML( const QDomDocument& xml );
+ virtual bool loadXML( const TQDomDocument& xml );
// Serialize this task to an XML string
- virtual QString saveXML() const;
+ virtual TQString saveXML() const;
protected:
// Read all known fields from this ical todo
@@ -113,15 +113,15 @@ protected:
int mPriority;
int mPercentCompleted;
KCal::Incidence::Status mStatus;
- QString mParent;
+ TQString mParent;
bool mHasStartDate;
bool mHasDueDate;
- QDateTime mDueDate;
+ TQDateTime mDueDate;
bool mHasCompletedDate;
- QDateTime mCompletedDate;
+ TQDateTime mCompletedDate;
};
}
diff --git a/kresources/kolab/knotes/note.cpp b/kresources/kolab/knotes/note.cpp
index 76ecdd9db..66556aaf8 100644
--- a/kresources/kolab/knotes/note.cpp
+++ b/kresources/kolab/knotes/note.cpp
@@ -40,7 +40,7 @@
using namespace Kolab;
-KCal::Journal* Note::xmlToJournal( const QString& xml )
+KCal::Journal* Note::xmlToJournal( const TQString& xml )
{
Note note;
note.load( xml );
@@ -49,7 +49,7 @@ KCal::Journal* Note::xmlToJournal( const QString& xml )
return journal;
}
-QString Note::journalToXML( KCal::Journal* journal )
+TQString Note::journalToXML( KCal::Journal* journal )
{
Note note( journal );
return note.saveXML();
@@ -65,32 +65,32 @@ Note::~Note()
{
}
-void Note::setSummary( const QString& summary )
+void Note::setSummary( const TQString& summary )
{
mSummary = summary;
}
-QString Note::summary() const
+TQString Note::summary() const
{
return mSummary;
}
-void Note::setBackgroundColor( const QColor& bgColor )
+void Note::setBackgroundColor( const TQColor& bgColor )
{
mBackgroundColor = bgColor;
}
-QColor Note::backgroundColor() const
+TQColor Note::backgroundColor() const
{
return mBackgroundColor;
}
-void Note::setForegroundColor( const QColor& fgColor )
+void Note::setForegroundColor( const TQColor& fgColor )
{
mForegroundColor = fgColor;
}
-QColor Note::foregroundColor() const
+TQColor Note::foregroundColor() const
{
return mForegroundColor;
}
@@ -105,9 +105,9 @@ bool Note::richText() const
return mRichText;
}
-bool Note::loadAttribute( QDomElement& element )
+bool Note::loadAttribute( TQDomElement& element )
{
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if ( tagName == "summary" )
setSummary( element.text() );
@@ -124,14 +124,14 @@ bool Note::loadAttribute( QDomElement& element )
return true;
}
-bool Note::saveAttributes( QDomElement& element ) const
+bool Note::saveAttributes( TQDomElement& element ) const
{
// Save the base class elements
KolabBase::saveAttributes( element );
// Save the elements
#if 0
- QDomComment c = element.ownerDocument().createComment( "Note specific attributes" );
+ TQDomComment c = element.ownerDocument().createComment( "Note specific attributes" );
element.appendChild( c );
#endif
@@ -144,9 +144,9 @@ bool Note::saveAttributes( QDomElement& element ) const
}
-bool Note::loadXML( const QDomDocument& document )
+bool Note::loadXML( const TQDomDocument& document )
{
- QDomElement top = document.documentElement();
+ TQDomElement top = document.documentElement();
if ( top.tagName() != "note" ) {
qWarning( "XML error: Top tag was %s instead of the expected note",
@@ -154,11 +154,11 @@ bool Note::loadXML( const QDomDocument& document )
return false;
}
- for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( !loadAttribute( e ) )
// TODO: Unhandled tag - save for later storage
kdDebug() << "Warning: Unhandled tag " << e.tagName() << endl;
@@ -169,10 +169,10 @@ bool Note::loadXML( const QDomDocument& document )
return true;
}
-QString Note::saveXML() const
+TQString Note::saveXML() const
{
- QDomDocument document = domTree();
- QDomElement element = document.createElement( "note" );
+ TQDomDocument document = domTree();
+ TQDomElement element = document.createElement( "note" );
element.setAttribute( "version", "1.0" );
saveAttributes( element );
document.appendChild( element );
@@ -204,7 +204,7 @@ void Note::saveTo( KCal::Journal* journal )
richText() ? "true" : "false" );
}
-QString Note::productID() const
+TQString Note::productID() const
{
- return QString( "KNotes %1, Kolab resource" ).arg( KNOTES_VERSION );
+ return TQString( "KNotes %1, Kolab resource" ).arg( KNOTES_VERSION );
}
diff --git a/kresources/kolab/knotes/note.h b/kresources/kolab/knotes/note.h
index 45769f97b..7a1c42407 100644
--- a/kresources/kolab/knotes/note.h
+++ b/kresources/kolab/knotes/note.h
@@ -54,10 +54,10 @@ class Note : public KolabBase {
public:
/// Use this to parse an xml string to a journal entry
/// The caller is responsible for deleting the returned journal
- static KCal::Journal* xmlToJournal( const QString& xml );
+ static KCal::Journal* xmlToJournal( const TQString& xml );
/// Use this to get an xml string describing this journal entry
- static QString journalToXML( KCal::Journal* );
+ static TQString journalToXML( KCal::Journal* );
/// Create a note object and
explicit Note( KCal::Journal* journal = 0 );
@@ -65,31 +65,31 @@ public:
void saveTo( KCal::Journal* journal );
- virtual QString type() const { return "Note"; }
+ virtual TQString type() const { return "Note"; }
- virtual void setSummary( const QString& summary );
- virtual QString summary() const;
+ virtual void setSummary( const TQString& summary );
+ virtual TQString summary() const;
- virtual void setBackgroundColor( const QColor& bgColor );
- virtual QColor backgroundColor() const;
+ virtual void setBackgroundColor( const TQColor& bgColor );
+ virtual TQColor backgroundColor() const;
- virtual void setForegroundColor( const QColor& fgColor );
- virtual QColor foregroundColor() const;
+ virtual void setForegroundColor( const TQColor& fgColor );
+ virtual TQColor foregroundColor() const;
virtual void setRichText( bool richText );
virtual bool richText() const;
// Load the attributes of this class
- virtual bool loadAttribute( QDomElement& );
+ virtual bool loadAttribute( TQDomElement& );
// Save the attributes of this class
- virtual bool saveAttributes( QDomElement& ) const;
+ virtual bool saveAttributes( TQDomElement& ) const;
// Load this note by reading the XML file
- virtual bool loadXML( const QDomDocument& xml );
+ virtual bool loadXML( const TQDomDocument& xml );
// Serialize this note to an XML string
- virtual QString saveXML() const;
+ virtual TQString saveXML() const;
protected:
// Read all known fields from this ical incidence
@@ -98,11 +98,11 @@ protected:
// Save all known fields into this ical incidence
void saveTo( KCal::Incidence* ) const;
- QString productID() const;
+ TQString productID() const;
- QString mSummary;
- QColor mBackgroundColor;
- QColor mForegroundColor;
+ TQString mSummary;
+ TQColor mBackgroundColor;
+ TQColor mForegroundColor;
bool mRichText;
};
diff --git a/kresources/kolab/knotes/resourcekolab.cpp b/kresources/kolab/knotes/resourcekolab.cpp
index b5cad153a..1d633b62a 100644
--- a/kresources/kolab/knotes/resourcekolab.cpp
+++ b/kresources/kolab/knotes/resourcekolab.cpp
@@ -51,7 +51,7 @@ static const char* inlineMimeType = "text/calendar";
ResourceKolab::ResourceKolab( const KConfig *config )
: ResourceNotes( config ), ResourceKolabBase( "ResourceKolab-KNotes" ),
- mCalendar( QString::fromLatin1("UTC") )
+ mCalendar( TQString::fromLatin1("UTC") )
{
setType( "imap" );
}
@@ -66,15 +66,15 @@ bool ResourceKolab::doOpen()
config.setGroup( configGroupName );
// Get the list of Notes folders from KMail
- QValueList<KMailICalIface::SubResource> subResources;
+ TQValueList<KMailICalIface::SubResource> subResources;
if ( !kmailSubresources( subResources, kmailContentsType ) )
return false;
// Make the resource map from the folder list
- QValueList<KMailICalIface::SubResource>::ConstIterator it;
+ TQValueList<KMailICalIface::SubResource>::ConstIterator it;
mSubResources.clear();
for ( it = subResources.begin(); it != subResources.end(); ++it ) {
- const QString subResource = (*it).location;
+ const TQString subResource = (*it).location;
const bool active = config.readBoolEntry( subResource, true );
mSubResources[ subResource ] = Kolab::SubResource( active, (*it).writable, (*it).label );
}
@@ -91,8 +91,8 @@ void ResourceKolab::doClose()
config.writeEntry( it.key(), it.data().active() );
}
-bool ResourceKolab::loadSubResource( const QString& subResource,
- const QString &mimetype )
+bool ResourceKolab::loadSubResource( const TQString& subResource,
+ const TQString &mimetype )
{
// Get the list of journals
int count = 0;
@@ -101,7 +101,7 @@ bool ResourceKolab::loadSubResource( const QString& subResource,
return false;
}
- QMap<Q_UINT32, QString> lst;
+ TQMap<Q_UINT32, TQString> lst;
if( !kmailIncidences( lst, mimetype, subResource, 0, count ) ) {
kdError(5500) << "Communication problem in "
<< "ResourceKolab::getIncidenceList()\n";
@@ -113,7 +113,7 @@ bool ResourceKolab::loadSubResource( const QString& subResource,
// Populate with the new entries
const bool silent = mSilent;
mSilent = true;
- QMap<Q_UINT32, QString>::Iterator it;
+ TQMap<Q_UINT32, TQString>::Iterator it;
for ( it = lst.begin(); it != lst.end(); ++it ) {
KCal::Journal* journal = addNote( it.data(), subResource, it.key(), mimetype );
if ( !journal )
@@ -139,7 +139,7 @@ bool ResourceKolab::load()
// This subResource is disabled
continue;
- QString mimetype = inlineMimeType;
+ TQString mimetype = inlineMimeType;
rc &= loadSubResource( itR.key(), mimetype );
mimetype = attachmentMimeType;
rc &= loadSubResource( itR.key(), mimetype );
@@ -156,11 +156,11 @@ bool ResourceKolab::save()
bool ResourceKolab::addNote( KCal::Journal* journal )
{
- return addNote( journal, QString::null, 0 );
+ return addNote( journal, TQString::null, 0 );
}
-KCal::Journal* ResourceKolab::addNote( const QString& data, const QString& subresource,
- Q_UINT32 sernum, const QString &mimetype )
+KCal::Journal* ResourceKolab::addNote( const TQString& data, const TQString& subresource,
+ Q_UINT32 sernum, const TQString &mimetype )
{
KCal::Journal* journal = 0;
// FIXME: This does not take into account the time zone!
@@ -180,7 +180,7 @@ KCal::Journal* ResourceKolab::addNote( const QString& data, const QString& subre
}
bool ResourceKolab::addNote( KCal::Journal* journal,
- const QString& subresource, Q_UINT32 sernum )
+ const TQString& subresource, Q_UINT32 sernum )
{
kdDebug(5500) << "ResourceKolab::addNote( KCal::Journal*, '" << subresource << "', " << sernum << " )\n";
@@ -190,13 +190,13 @@ bool ResourceKolab::addNote( KCal::Journal* journal,
bool newNote = subresource.isEmpty();
mCalendar.addJournal( journal );
- QString resource =
+ TQString resource =
newNote ? findWritableResource( mSubResources ) : subresource;
if ( resource.isEmpty() ) // canceled
return false;
if ( !mSilent ) {
- QString xml = Note::journalToXML( journal );
+ TQString xml = Note::journalToXML( journal );
kdDebug(5500) << k_funcinfo << "XML string:\n" << xml << endl;
if( !kmailUpdate( resource, sernum, xml, attachmentMimeType, journal->uid() ) ) {
@@ -215,7 +215,7 @@ bool ResourceKolab::addNote( KCal::Journal* journal,
bool ResourceKolab::deleteNote( KCal::Journal* journal )
{
- const QString uid = journal->uid();
+ const TQString uid = journal->uid();
if ( !mUidMap.contains( uid ) )
// Odd
return false;
@@ -230,20 +230,20 @@ bool ResourceKolab::deleteNote( KCal::Journal* journal )
return true;
}
-KCal::Alarm::List ResourceKolab::alarms( const QDateTime& from, const QDateTime& to )
+KCal::Alarm::List ResourceKolab::alarms( const TQDateTime& from, const TQDateTime& to )
{
KCal::Alarm::List alarms;
KCal::Journal::List notes = mCalendar.journals();
KCal::Journal::List::ConstIterator note;
for ( note = notes.begin(); note != notes.end(); ++note )
{
- QDateTime preTime = from.addSecs( -1 );
+ TQDateTime preTime = from.addSecs( -1 );
KCal::Alarm::List::ConstIterator it;
for( it = (*note)->alarms().begin(); it != (*note)->alarms().end(); ++it )
{
if ( (*it)->enabled() )
{
- QDateTime dt = (*it)->nextRepetition( preTime );
+ TQDateTime dt = (*it)->nextRepetition( preTime );
if ( dt.isValid() && dt <= to )
alarms.append( *it );
}
@@ -255,7 +255,7 @@ KCal::Alarm::List ResourceKolab::alarms( const QDateTime& from, const QDateTime&
void ResourceKolab::incidenceUpdated( KCal::IncidenceBase* i )
{
- QString subResource;
+ TQString subResource;
Q_UINT32 sernum;
if ( mUidMap.contains( i->uid() ) ) {
subResource = mUidMap[ i->uid() ].resource();
@@ -268,7 +268,7 @@ void ResourceKolab::incidenceUpdated( KCal::IncidenceBase* i )
}
KCal::Journal* journal = dynamic_cast<KCal::Journal*>( i );
- QString xml = Note::journalToXML( journal );
+ TQString xml = Note::journalToXML( journal );
if( !xml.isEmpty() && kmailUpdate( subResource, sernum, xml, attachmentMimeType, journal->uid() ) )
mUidMap[ i->uid() ] = StorageReference( subResource, sernum );
}
@@ -277,18 +277,18 @@ void ResourceKolab::incidenceUpdated( KCal::IncidenceBase* i )
* These are the DCOP slots that KMail call to notify when something
* changed.
*/
-bool ResourceKolab::fromKMailAddIncidence( const QString& type,
- const QString& subResource,
+bool ResourceKolab::fromKMailAddIncidence( const TQString& type,
+ const TQString& subResource,
Q_UINT32 sernum,
int format,
- const QString& note )
+ const TQString& note )
{
// Check if this is a note
if( type != kmailContentsType ) return false;
const bool silent = mSilent;
mSilent = true;
- QString mimetype;
+ TQString mimetype;
if ( format == KMailICalIface::StorageXML )
mimetype = attachmentMimeType;
else
@@ -300,9 +300,9 @@ bool ResourceKolab::fromKMailAddIncidence( const QString& type,
return true;
}
-void ResourceKolab::fromKMailDelIncidence( const QString& type,
- const QString& /*subResource*/,
- const QString& uid )
+void ResourceKolab::fromKMailDelIncidence( const TQString& type,
+ const TQString& /*subResource*/,
+ const TQString& uid )
{
// Check if this is a note
if( type != kmailContentsType ) return;
@@ -318,16 +318,16 @@ void ResourceKolab::fromKMailDelIncidence( const QString& type,
mSilent = silent;
}
-void ResourceKolab::fromKMailRefresh( const QString& type,
- const QString& /*subResource*/ )
+void ResourceKolab::fromKMailRefresh( const TQString& type,
+ const TQString& /*subResource*/ )
{
if ( type == kmailContentsType )
load(); // ### should call loadSubResource(subResource) probably
}
-void ResourceKolab::fromKMailAddSubresource( const QString& type,
- const QString& subResource,
- const QString& /*label*/,
+void ResourceKolab::fromKMailAddSubresource( const TQString& type,
+ const TQString& subResource,
+ const TQString& /*label*/,
bool writable,
bool /*alarmRelevant*/ )
{
@@ -348,8 +348,8 @@ void ResourceKolab::fromKMailAddSubresource( const QString& type,
emit signalSubresourceAdded( this, type, subResource );
}
-void ResourceKolab::fromKMailDelSubresource( const QString& type,
- const QString& subResource )
+void ResourceKolab::fromKMailDelSubresource( const TQString& type,
+ const TQString& subResource )
{
if ( type != configGroupName )
// Not ours
@@ -369,7 +369,7 @@ void ResourceKolab::fromKMailDelSubresource( const QString& type,
// Make a list of all uids to remove
Kolab::UidMap::ConstIterator mapIt;
- QStringList uids;
+ TQStringList uids;
for ( mapIt = mUidMap.begin(); mapIt != mUidMap.end(); ++mapIt )
if ( mapIt.data().resource() == subResource )
// We have a match
@@ -379,7 +379,7 @@ void ResourceKolab::fromKMailDelSubresource( const QString& type,
if ( !uids.isEmpty() ) {
const bool silent = mSilent;
mSilent = true;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = uids.begin(); it != uids.end(); ++it ) {
KCal::Journal* j = mCalendar.journal( *it );
if( j )
@@ -391,21 +391,21 @@ void ResourceKolab::fromKMailDelSubresource( const QString& type,
emit signalSubresourceRemoved( this, type, subResource );
}
-void ResourceKolab::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder )
+void ResourceKolab::fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder )
{
// We are only interested in notes
if ( ( type != attachmentMimeType ) && ( type != inlineMimeType ) ) return;
// Populate with the new entries
const bool silent = mSilent;
mSilent = true;
- QString mimetype;
+ TQString mimetype;
if ( kmailStorageFormat( folder ) == KMailICalIface::StorageXML )
mimetype = attachmentMimeType;
else
mimetype = inlineMimeType;
- for( QMap<Q_UINT32, QString>::ConstIterator it = map.begin(); it != map.end(); ++it ) {
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = map.begin(); it != map.end(); ++it ) {
KCal::Journal* journal = addNote( it.data(), folder, it.key(), mimetype );
if ( !journal )
kdDebug(5500) << "loading note " << it.key() << " failed" << endl;
@@ -416,12 +416,12 @@ void ResourceKolab::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map
}
-QStringList ResourceKolab::subresources() const
+TQStringList ResourceKolab::subresources() const
{
return mSubResources.keys();
}
-bool ResourceKolab::subresourceActive( const QString& res ) const
+bool ResourceKolab::subresourceActive( const TQString& res ) const
{
if ( mSubResources.contains( res ) ) {
return mSubResources[ res ].active();
diff --git a/kresources/kolab/knotes/resourcekolab.h b/kresources/kolab/knotes/resourcekolab.h
index 44ce480b7..a738a30a5 100644
--- a/kresources/kolab/knotes/resourcekolab.h
+++ b/kresources/kolab/knotes/resourcekolab.h
@@ -74,47 +74,47 @@ public:
bool deleteNote( KCal::Journal* );
- KCal::Alarm::List alarms( const QDateTime& from, const QDateTime& to );
+ KCal::Alarm::List alarms( const TQDateTime& from, const TQDateTime& to );
/// Reimplemented from IncidenceBase::Observer to know when a note was changed
void incidenceUpdated( KCal::IncidenceBase* );
/// The ResourceKolabBase methods called by KMail
- bool fromKMailAddIncidence( const QString& type, const QString& resource,
- Q_UINT32 sernum, int format, const QString& note );
- void fromKMailDelIncidence( const QString& type, const QString& resource,
- const QString& uid );
- void fromKMailRefresh( const QString& type, const QString& resource );
+ bool fromKMailAddIncidence( const TQString& type, const TQString& resource,
+ Q_UINT32 sernum, int format, const TQString& note );
+ void fromKMailDelIncidence( const TQString& type, const TQString& resource,
+ const TQString& uid );
+ void fromKMailRefresh( const TQString& type, const TQString& resource );
/// Listen to KMail changes in the amount of sub resources
- void fromKMailAddSubresource( const QString& type, const QString& resource,
- const QString& label, bool writable,
+ void fromKMailAddSubresource( const TQString& type, const TQString& resource,
+ const TQString& label, bool writable,
bool alarmRelevant );
- void fromKMailDelSubresource( const QString& type, const QString& resource );
+ void fromKMailDelSubresource( const TQString& type, const TQString& resource );
- void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder );
+ void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder );
/** Return the list of subresources. */
- QStringList subresources() const;
+ TQStringList subresources() const;
/** Is this subresource active? */
- bool subresourceActive( const QString& ) const;
+ bool subresourceActive( const TQString& ) const;
signals:
- void signalSubresourceAdded( Resource*, const QString&, const QString& );
- void signalSubresourceRemoved( Resource*, const QString&, const QString& );
+ void signalSubresourceAdded( Resource*, const TQString&, const TQString& );
+ void signalSubresourceRemoved( Resource*, const TQString&, const TQString& );
private:
- bool addNote( KCal::Journal* journal, const QString& resource,
+ bool addNote( KCal::Journal* journal, const TQString& resource,
Q_UINT32 sernum );
- KCal::Journal* addNote( const QString& data, const QString& subresource,
- Q_UINT32 sernum, const QString &mimetype );
+ KCal::Journal* addNote( const TQString& data, const TQString& subresource,
+ Q_UINT32 sernum, const TQString &mimetype );
- bool loadSubResource( const QString& resource, const QString& mimetype );
+ bool loadSubResource( const TQString& resource, const TQString& mimetype );
- QString configFile() const {
+ TQString configFile() const {
return ResourceKolabBase::configFile( "knotes" );
}
diff --git a/kresources/kolab/knotes/resourcekolab_plugin.cpp b/kresources/kolab/knotes/resourcekolab_plugin.cpp
index cd97ecf6c..772184982 100644
--- a/kresources/kolab/knotes/resourcekolab_plugin.cpp
+++ b/kresources/kolab/knotes/resourcekolab_plugin.cpp
@@ -40,7 +40,7 @@ public:
return new Kolab::ResourceKolab( config );
}
- KRES::ConfigWidget *configWidget( QWidget* )
+ KRES::ConfigWidget *configWidget( TQWidget* )
{
return 0;
}
diff --git a/kresources/kolab/shared/kmailconnection.cpp b/kresources/kolab/shared/kmailconnection.cpp
index 6db9f3dab..9135e16db 100644
--- a/kresources/kolab/shared/kmailconnection.cpp
+++ b/kresources/kolab/shared/kmailconnection.cpp
@@ -47,7 +47,7 @@ using namespace Kolab;
KMailConnection::KMailConnection( ResourceKolabBase* resource,
- const QCString& objId )
+ const TQCString& objId )
: DCOPObject( objId ), mResource( resource ), mKMailIcalIfaceStub( 0 )
{
// Make the connection to KMail ready
@@ -56,8 +56,8 @@ KMailConnection::KMailConnection( ResourceKolabBase* resource,
mDCOPClient->registerAs( objId, true );
kapp->dcopClient()->setNotifications( true );
- connect( kapp->dcopClient(), SIGNAL( applicationRemoved( const QCString& ) ),
- this, SLOT( unregisteredFromDCOP( const QCString& ) ) );
+ connect( kapp->dcopClient(), TQT_SIGNAL( applicationRemoved( const TQCString& ) ),
+ this, TQT_SLOT( unregisteredFromDCOP( const TQCString& ) ) );
}
KMailConnection::~KMailConnection()
@@ -69,15 +69,15 @@ KMailConnection::~KMailConnection()
mDCOPClient = 0;
}
-static const QCString dcopObjectId = "KMailICalIface";
+static const TQCString dcopObjectId = "KMailICalIface";
bool KMailConnection::connectToKMail()
{
if ( !mKMailIcalIfaceStub ) {
- QString error;
- QCString dcopService;
+ TQString error;
+ TQCString dcopService;
int result = KDCOPServiceStarter::self()->
- findServiceFor( "DCOP/ResourceBackend/IMAP", QString::null,
- QString::null, &error, &dcopService );
+ findServiceFor( "DCOP/ResourceBackend/IMAP", TQString::null,
+ TQString::null, &error, &dcopService );
if ( result != 0 ) {
kdError(5650) << "Couldn't connect to the IMAP resource backend\n";
// TODO: You might want to show "error" (if not empty) here,
@@ -89,34 +89,34 @@ bool KMailConnection::connectToKMail()
dcopService, dcopObjectId );
// Attach to the KMail signals
- if ( !connectKMailSignal( "incidenceAdded(QString,QString,Q_UINT32,int,QString)",
- "fromKMailAddIncidence(QString,QString,Q_UINT32,int,QString)" ) )
+ if ( !connectKMailSignal( "incidenceAdded(TQString,TQString,Q_UINT32,int,TQString)",
+ "fromKMailAddIncidence(TQString,TQString,Q_UINT32,int,TQString)" ) )
kdError(5650) << "DCOP connection to incidenceAdded failed" << endl;
- if ( !connectKMailSignal( "incidenceDeleted(QString,QString,QString)",
- "fromKMailDelIncidence(QString,QString,QString)" ) )
+ if ( !connectKMailSignal( "incidenceDeleted(TQString,TQString,TQString)",
+ "fromKMailDelIncidence(TQString,TQString,TQString)" ) )
kdError(5650) << "DCOP connection to incidenceDeleted failed" << endl;
- if ( !connectKMailSignal( "signalRefresh(QString,QString)",
- "fromKMailRefresh(QString,QString)" ) )
+ if ( !connectKMailSignal( "signalRefresh(TQString,TQString)",
+ "fromKMailRefresh(TQString,TQString)" ) )
kdError(5650) << "DCOP connection to signalRefresh failed" << endl;
- if ( !connectKMailSignal( "subresourceAdded( QString, QString, QString, bool, bool )",
- "fromKMailAddSubresource( QString, QString, QString, bool, bool )" ) )
+ if ( !connectKMailSignal( "subresourceAdded( TQString, TQString, TQString, bool, bool )",
+ "fromKMailAddSubresource( TQString, TQString, TQString, bool, bool )" ) )
kdError(5650) << "DCOP connection to subresourceAdded failed" << endl;
- if ( !connectKMailSignal( "subresourceDeleted(QString,QString)",
- "fromKMailDelSubresource(QString,QString)" ) )
+ if ( !connectKMailSignal( "subresourceDeleted(TQString,TQString)",
+ "fromKMailDelSubresource(TQString,TQString)" ) )
kdError(5650) << "DCOP connection to subresourceDeleted failed" << endl;
- if ( !connectKMailSignal( "asyncLoadResult(QMap<Q_UINT32, QString>, QString, QString)",
- "fromKMailAsyncLoadResult(QMap<Q_UINT32, QString>, QString, QString)" ) )
+ if ( !connectKMailSignal( "asyncLoadResult(TQMap<Q_UINT32, TQString>, TQString, TQString)",
+ "fromKMailAsyncLoadResult(TQMap<Q_UINT32, TQString>, TQString, TQString)" ) )
kdError(5650) << "DCOP connection to asyncLoadResult failed" << endl;
}
return ( mKMailIcalIfaceStub != 0 );
}
-bool KMailConnection::fromKMailAddIncidence( const QString& type,
- const QString& folder,
+bool KMailConnection::fromKMailAddIncidence( const TQString& type,
+ const TQString& folder,
Q_UINT32 sernum,
int format,
- const QString& data )
+ const TQString& data )
{
if ( format != KMailICalIface::StorageXML
&& format != KMailICalIface::StorageIcalVcard )
@@ -126,25 +126,25 @@ bool KMailConnection::fromKMailAddIncidence( const QString& type,
return mResource->fromKMailAddIncidence( type, folder, sernum, format, data );
}
-void KMailConnection::fromKMailDelIncidence( const QString& type,
- const QString& folder,
- const QString& xml )
+void KMailConnection::fromKMailDelIncidence( const TQString& type,
+ const TQString& folder,
+ const TQString& xml )
{
// kdDebug(5650) << "KMailConnection::fromKMailDelIncidence( " << type << ", "
// << folder << ", " << uid << " )\n";
mResource->fromKMailDelIncidence( type, folder, xml );
}
-void KMailConnection::fromKMailRefresh( const QString& type, const QString& folder )
+void KMailConnection::fromKMailRefresh( const TQString& type, const TQString& folder )
{
// kdDebug(5650) << "KMailConnection::fromKMailRefresh( " << type << ", "
// << folder << " )\n";
mResource->fromKMailRefresh( type, folder );
}
-void KMailConnection::fromKMailAddSubresource( const QString& type,
- const QString& resource,
- const QString& label,
+void KMailConnection::fromKMailAddSubresource( const TQString& type,
+ const TQString& resource,
+ const TQString& label,
bool writable,
bool alarmRelevant )
{
@@ -154,30 +154,30 @@ void KMailConnection::fromKMailAddSubresource( const QString& type,
writable, alarmRelevant );
}
-void KMailConnection::fromKMailDelSubresource( const QString& type,
- const QString& resource )
+void KMailConnection::fromKMailDelSubresource( const TQString& type,
+ const TQString& resource )
{
// kdDebug(5650) << "KMailConnection::fromKMailDelSubresource( " << type << ", "
// << resource << " )\n";
mResource->fromKMailDelSubresource( type, resource );
}
-void KMailConnection::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder )
+void KMailConnection::fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder )
{
mResource->fromKMailAsyncLoadResult( map, type, folder );
}
-bool KMailConnection::connectKMailSignal( const QCString& signal,
- const QCString& method )
+bool KMailConnection::connectKMailSignal( const TQCString& signal,
+ const TQCString& method )
{
return connectDCOPSignal( "kmail", dcopObjectId, signal, method, false )
&& connectDCOPSignal( "kontact", dcopObjectId, signal, method, false );
}
-bool KMailConnection::kmailSubresources( QValueList<KMailICalIface::SubResource>& lst,
- const QString& contentsType )
+bool KMailConnection::kmailSubresources( TQValueList<KMailICalIface::SubResource>& lst,
+ const TQString& contentsType )
{
if ( !connectToKMail() )
return false;
@@ -187,8 +187,8 @@ bool KMailConnection::kmailSubresources( QValueList<KMailICalIface::SubResource>
}
bool KMailConnection::kmailIncidencesCount( int& count,
- const QString& mimetype,
- const QString& resource )
+ const TQString& mimetype,
+ const TQString& resource )
{
if ( !connectToKMail() )
return false;
@@ -197,9 +197,9 @@ bool KMailConnection::kmailIncidencesCount( int& count,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailIncidences( QMap<Q_UINT32, QString>& lst,
- const QString& mimetype,
- const QString& resource,
+bool KMailConnection::kmailIncidences( TQMap<Q_UINT32, TQString>& lst,
+ const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages )
{
@@ -212,9 +212,9 @@ bool KMailConnection::kmailIncidences( QMap<Q_UINT32, QString>& lst,
bool KMailConnection::kmailGetAttachment( KURL& url,
- const QString& resource,
+ const TQString& resource,
Q_UINT32 sernum,
- const QString& filename )
+ const TQString& filename )
{
if ( !connectToKMail() )
return false;
@@ -223,10 +223,10 @@ bool KMailConnection::kmailGetAttachment( KURL& url,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailAttachmentMimetype( QString & mimeType,
- const QString & resource,
+bool KMailConnection::kmailAttachmentMimetype( TQString & mimeType,
+ const TQString & resource,
Q_UINT32 sernum,
- const QString & filename )
+ const TQString & filename )
{
if ( !connectToKMail() )
return false;
@@ -234,8 +234,8 @@ bool KMailConnection::kmailAttachmentMimetype( QString & mimeType,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailListAttachments(QStringList &list,
- const QString & resource, Q_UINT32 sernum)
+bool KMailConnection::kmailListAttachments(TQStringList &list,
+ const TQString & resource, Q_UINT32 sernum)
{
if ( !connectToKMail() )
return false;
@@ -244,7 +244,7 @@ bool KMailConnection::kmailListAttachments(QStringList &list,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailDeleteIncidence( const QString& resource,
+bool KMailConnection::kmailDeleteIncidence( const TQString& resource,
Q_UINT32 sernum )
{
return connectToKMail()
@@ -252,15 +252,15 @@ bool KMailConnection::kmailDeleteIncidence( const QString& resource,
&& mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailUpdate( const QString& resource,
+bool KMailConnection::kmailUpdate( const TQString& resource,
Q_UINT32& sernum,
- const QString& subject,
- const QString& plainTextBody,
- const QMap<QCString, QString>& customHeaders,
- const QStringList& attachmentURLs,
- const QStringList& attachmentMimetypes,
- const QStringList& attachmentNames,
- const QStringList& deletedAttachments )
+ const TQString& subject,
+ const TQString& plainTextBody,
+ const TQMap<TQCString, TQString>& customHeaders,
+ const TQStringList& attachmentURLs,
+ const TQStringList& attachmentMimetypes,
+ const TQStringList& attachmentNames,
+ const TQStringList& deletedAttachments )
{
//kdDebug(5006) << kdBacktrace() << endl;
if ( connectToKMail() ) {
@@ -272,16 +272,16 @@ bool KMailConnection::kmailUpdate( const QString& resource,
return false;
}
-bool KMailConnection::kmailAddSubresource( const QString& resource,
- const QString& parent,
- const QString& contentsType )
+bool KMailConnection::kmailAddSubresource( const TQString& resource,
+ const TQString& parent,
+ const TQString& contentsType )
{
return connectToKMail()
&& mKMailIcalIfaceStub->addSubresource( resource, parent, contentsType )
&& mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailRemoveSubresource( const QString& resource )
+bool KMailConnection::kmailRemoveSubresource( const TQString& resource )
{
return connectToKMail()
&& mKMailIcalIfaceStub->removeSubresource( resource )
@@ -290,7 +290,7 @@ bool KMailConnection::kmailRemoveSubresource( const QString& resource )
bool KMailConnection::kmailStorageFormat( KMailICalIface::StorageFormat& type,
- const QString& folder )
+ const TQString& folder )
{
bool ok = connectToKMail();
type = mKMailIcalIfaceStub->storageFormat( folder );
@@ -298,13 +298,13 @@ bool KMailConnection::kmailStorageFormat( KMailICalIface::StorageFormat& type,
}
-bool KMailConnection::kmailTriggerSync( const QString &contentsType )
+bool KMailConnection::kmailTriggerSync( const TQString &contentsType )
{
bool ok = connectToKMail();
return ok && mKMailIcalIfaceStub->triggerSync( contentsType );
}
-void KMailConnection::unregisteredFromDCOP( const QCString& appId )
+void KMailConnection::unregisteredFromDCOP( const TQCString& appId )
{
if ( mKMailIcalIfaceStub && mKMailIcalIfaceStub->app() == appId ) {
// Delete the stub so that the next time we need to talk to kmail,
diff --git a/kresources/kolab/shared/kmailconnection.h b/kresources/kolab/shared/kmailconnection.h
index cbb69a155..16b80bfb0 100644
--- a/kresources/kolab/shared/kmailconnection.h
+++ b/kresources/kolab/shared/kmailconnection.h
@@ -48,26 +48,26 @@ class ResourceKolabBase;
/**
This class provides the kmail connectivity for IMAP resources.
*/
-class KMailConnection : public QObject, public DCOPObject {
+class KMailConnection : public TQObject, public DCOPObject {
Q_OBJECT
K_DCOP
// These are the methods called by KMail when the resource changes
k_dcop:
- bool fromKMailAddIncidence( const QString& type, const QString& resource,
- Q_UINT32 sernum, int format, const QString& xml );
- void fromKMailDelIncidence( const QString& type, const QString& resource,
- const QString& xml );
- void fromKMailRefresh( const QString& type, const QString& resource );
- void fromKMailAddSubresource( const QString& type, const QString& resource,
- const QString& label, bool writable,
+ bool fromKMailAddIncidence( const TQString& type, const TQString& resource,
+ Q_UINT32 sernum, int format, const TQString& xml );
+ void fromKMailDelIncidence( const TQString& type, const TQString& resource,
+ const TQString& xml );
+ void fromKMailRefresh( const TQString& type, const TQString& resource );
+ void fromKMailAddSubresource( const TQString& type, const TQString& resource,
+ const TQString& label, bool writable,
bool alarmRelevant );
- void fromKMailDelSubresource( const QString& type, const QString& resource );
- void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map, const QString& type,
- const QString& folder );
+ void fromKMailDelSubresource( const TQString& type, const TQString& resource );
+ void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map, const TQString& type,
+ const TQString& folder );
public:
- KMailConnection( ResourceKolabBase* resource, const QCString& objId );
+ KMailConnection( ResourceKolabBase* resource, const TQCString& objId );
virtual ~KMailConnection();
/**
@@ -76,47 +76,47 @@ public:
bool connectToKMail();
// Call the DCOP methods
- bool kmailSubresources( QValueList<KMailICalIface::SubResource>& lst,
- const QString& contentsType );
+ bool kmailSubresources( TQValueList<KMailICalIface::SubResource>& lst,
+ const TQString& contentsType );
bool kmailIncidencesCount( int& count,
- const QString& mimetype,
- const QString& resource );
- bool kmailIncidences( QMap<Q_UINT32, QString>& lst, const QString& mimetype,
- const QString& resource,
+ const TQString& mimetype,
+ const TQString& resource );
+ bool kmailIncidences( TQMap<Q_UINT32, TQString>& lst, const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages );
- bool kmailGetAttachment( KURL& url, const QString& resource, Q_UINT32 sernum,
- const QString& filename );
- bool kmailAttachmentMimetype( QString &mimeType, const QString &resource,
- Q_UINT32 sernum, const QString &filename );
- bool kmailListAttachments( QStringList &list, const QString &resource,
+ bool kmailGetAttachment( KURL& url, const TQString& resource, Q_UINT32 sernum,
+ const TQString& filename );
+ bool kmailAttachmentMimetype( TQString &mimeType, const TQString &resource,
+ Q_UINT32 sernum, const TQString &filename );
+ bool kmailListAttachments( TQStringList &list, const TQString &resource,
Q_UINT32 sernum );
- bool kmailDeleteIncidence( const QString& resource, Q_UINT32 sernum );
- bool kmailUpdate( const QString& resource,
+ bool kmailDeleteIncidence( const TQString& resource, Q_UINT32 sernum );
+ bool kmailUpdate( const TQString& resource,
Q_UINT32& sernum,
- const QString& subject,
- const QString& plainTextBody,
- const QMap<QCString, QString>& customHeaders,
- const QStringList& attachmentURLs,
- const QStringList& attachmentMimetypes,
- const QStringList& attachmentNames,
- const QStringList& deletedAttachments );
-
- bool kmailStorageFormat( KMailICalIface::StorageFormat& type, const QString& folder);
-
- bool kmailTriggerSync( const QString& contentsType );
- bool kmailAddSubresource( const QString& resource,
- const QString& parent,
- const QString& contentsType );
- bool kmailRemoveSubresource( const QString& resource );
+ const TQString& subject,
+ const TQString& plainTextBody,
+ const TQMap<TQCString, TQString>& customHeaders,
+ const TQStringList& attachmentURLs,
+ const TQStringList& attachmentMimetypes,
+ const TQStringList& attachmentNames,
+ const TQStringList& deletedAttachments );
+
+ bool kmailStorageFormat( KMailICalIface::StorageFormat& type, const TQString& folder);
+
+ bool kmailTriggerSync( const TQString& contentsType );
+ bool kmailAddSubresource( const TQString& resource,
+ const TQString& parent,
+ const TQString& contentsType );
+ bool kmailRemoveSubresource( const TQString& resource );
private slots:
- virtual void unregisteredFromDCOP( const QCString& );
+ virtual void unregisteredFromDCOP( const TQCString& );
private:
/** Connect a signal from KMail to a local slot. */
- bool connectKMailSignal( const QCString&, const QCString& );
+ bool connectKMailSignal( const TQCString&, const TQCString& );
ResourceKolabBase* mResource;
DCOPClient* mDCOPClient;
diff --git a/kresources/kolab/shared/kolabbase.cpp b/kresources/kolab/shared/kolabbase.cpp
index 44c44ead2..9a4a17f7c 100644
--- a/kresources/kolab/shared/kolabbase.cpp
+++ b/kresources/kolab/shared/kolabbase.cpp
@@ -37,14 +37,14 @@
#include <libkcal/journal.h>
#include <libkdepim/kpimprefs.h>
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
using namespace Kolab;
-KolabBase::KolabBase( const QString& tz )
- : mCreationDate( QDateTime::currentDateTime() ),
- mLastModified( QDateTime::currentDateTime() ),
+KolabBase::KolabBase( const TQString& tz )
+ : mCreationDate( TQDateTime::currentDateTime() ),
+ mLastModified( TQDateTime::currentDateTime() ),
mSensitivity( Public ), mTimeZoneId( tz ),
mHasPilotSyncId( false ), mHasPilotSyncStatus( false )
{
@@ -89,20 +89,20 @@ void KolabBase::setFields( const KABC::Addressee* addressee )
setCategories( addressee->categories().join( "," ) );
// Set creation-time and last-modification-time
- const QString creationString = addressee->custom( "KOLAB", "CreationDate" );
+ const TQString creationString = addressee->custom( "KOLAB", "CreationDate" );
kdDebug(5006) << "Creation time string: " << creationString << endl;
- QDateTime creationDate;
+ TQDateTime creationDate;
if ( creationString.isEmpty() ) {
- creationDate = QDateTime::currentDateTime();
+ creationDate = TQDateTime::currentDateTime();
kdDebug(5006) << "Creation date set to current time\n";
}
else {
creationDate = stringToDateTime( creationString );
kdDebug(5006) << "Creation date loaded\n";
}
- QDateTime modified = addressee->revision();
+ TQDateTime modified = addressee->revision();
if ( !modified.isValid() )
- modified = QDateTime::currentDateTime();
+ modified = TQDateTime::currentDateTime();
setLastModified( modified );
if ( modified < creationDate ) {
// It's not possible that the modification date is earlier than creation
@@ -110,7 +110,7 @@ void KolabBase::setFields( const KABC::Addressee* addressee )
kdDebug(5006) << "Creation date set to modification date\n";
}
setCreationDate( creationDate );
- const QString newCreationDate = dateTimeToString( creationDate );
+ const TQString newCreationDate = dateTimeToString( creationDate );
if ( creationString != newCreationDate ) {
// We modified the creation date, so store it for future reference
const_cast<KABC::Addressee*>( addressee )
@@ -136,7 +136,7 @@ void KolabBase::saveTo( KABC::Addressee* addressee ) const
{
addressee->setUid( uid() );
addressee->setNote( body() );
- addressee->setCategories( QStringList::split( ',', categories() ) );
+ addressee->setCategories( TQStringList::split( ',', categories() ) );
addressee->setRevision( lastModified() );
addressee->insertCustom( "KOLAB", "CreationDate",
dateTimeToString( creationDate() ) );
@@ -156,52 +156,52 @@ void KolabBase::saveTo( KABC::Addressee* addressee ) const
// TODO: Attachments
}
-void KolabBase::setUid( const QString& uid )
+void KolabBase::setUid( const TQString& uid )
{
mUid = uid;
}
-QString KolabBase::uid() const
+TQString KolabBase::uid() const
{
return mUid;
}
-void KolabBase::setBody( const QString& body )
+void KolabBase::setBody( const TQString& body )
{
mBody = body;
}
-QString KolabBase::body() const
+TQString KolabBase::body() const
{
return mBody;
}
-void KolabBase::setCategories( const QString& categories )
+void KolabBase::setCategories( const TQString& categories )
{
mCategories = categories;
}
-QString KolabBase::categories() const
+TQString KolabBase::categories() const
{
return mCategories;
}
-void KolabBase::setCreationDate( const QDateTime& date )
+void KolabBase::setCreationDate( const TQDateTime& date )
{
mCreationDate = date;
}
-QDateTime KolabBase::creationDate() const
+TQDateTime KolabBase::creationDate() const
{
return mCreationDate;
}
-void KolabBase::setLastModified( const QDateTime& date )
+void KolabBase::setLastModified( const TQDateTime& date )
{
mLastModified = date;
}
-QDateTime KolabBase::lastModified() const
+TQDateTime KolabBase::lastModified() const
{
return mLastModified;
}
@@ -248,14 +248,14 @@ int KolabBase::pilotSyncStatus() const
return mPilotSyncStatus;
}
-bool KolabBase::loadEmailAttribute( QDomElement& element, Email& email )
+bool KolabBase::loadEmailAttribute( TQDomElement& element, Email& email )
{
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- const QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ const TQString tagName = e.tagName();
if ( tagName == "display-name" )
email.displayName = e.text();
@@ -271,18 +271,18 @@ bool KolabBase::loadEmailAttribute( QDomElement& element, Email& email )
return true;
}
-void KolabBase::saveEmailAttribute( QDomElement& element, const Email& email,
- const QString& tagName ) const
+void KolabBase::saveEmailAttribute( TQDomElement& element, const Email& email,
+ const TQString& tagName ) const
{
- QDomElement e = element.ownerDocument().createElement( tagName );
+ TQDomElement e = element.ownerDocument().createElement( tagName );
element.appendChild( e );
writeString( e, "display-name", email.displayName );
writeString( e, "smtp-address", email.smtpAddress );
}
-bool KolabBase::loadAttribute( QDomElement& element )
+bool KolabBase::loadAttribute( TQDomElement& element )
{
- const QString tagName = element.tagName();
+ const TQString tagName = element.tagName();
switch ( tagName[0].latin1() ) {
case 'u':
if ( tagName == "uid" ) {
@@ -336,7 +336,7 @@ bool KolabBase::loadAttribute( QDomElement& element )
return false;
}
-bool KolabBase::saveAttributes( QDomElement& element ) const
+bool KolabBase::saveAttributes( TQDomElement& element ) const
{
writeString( element, "product-id", productID() );
writeString( element, "uid", uid() );
@@ -347,17 +347,17 @@ bool KolabBase::saveAttributes( QDomElement& element ) const
dateTimeToString( lastModified() ) );
writeString( element, "sensitivity", sensitivityToString( sensitivity() ) );
if ( hasPilotSyncId() )
- writeString( element, "pilot-sync-id", QString::number( pilotSyncId() ) );
+ writeString( element, "pilot-sync-id", TQString::number( pilotSyncId() ) );
if ( hasPilotSyncStatus() )
- writeString( element, "pilot-sync-status", QString::number( pilotSyncStatus() ) );
+ writeString( element, "pilot-sync-status", TQString::number( pilotSyncStatus() ) );
return true;
}
-bool KolabBase::load( const QString& xml )
+bool KolabBase::load( const TQString& xml )
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorColumn;
- QDomDocument document;
+ TQDomDocument document;
bool ok = document.setContent( xml, &errorMsg, &errorLine, &errorColumn );
if ( !ok ) {
@@ -370,11 +370,11 @@ bool KolabBase::load( const QString& xml )
return loadXML( document );
}
-bool KolabBase::load( QFile& xml )
+bool KolabBase::load( TQFile& xml )
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorColumn;
- QDomDocument document;
+ TQDomDocument document;
bool ok = document.setContent( &xml, &errorMsg, &errorLine, &errorColumn );
if ( !ok ) {
@@ -387,41 +387,41 @@ bool KolabBase::load( QFile& xml )
return loadXML( document );
}
-QDomDocument KolabBase::domTree()
+TQDomDocument KolabBase::domTree()
{
- QDomDocument document;
+ TQDomDocument document;
- QString p = "version=\"1.0\" encoding=\"UTF-8\"";
+ TQString p = "version=\"1.0\" encoding=\"UTF-8\"";
document.appendChild(document.createProcessingInstruction( "xml", p ) );
return document;
}
-QString KolabBase::dateTimeToString( const QDateTime& time )
+TQString KolabBase::dateTimeToString( const TQDateTime& time )
{
return time.toString( Qt::ISODate ) + 'Z';
}
-QString KolabBase::dateToString( const QDate& date )
+TQString KolabBase::dateToString( const TQDate& date )
{
return date.toString( Qt::ISODate );
}
-QDateTime KolabBase::stringToDateTime( const QString& _date )
+TQDateTime KolabBase::stringToDateTime( const TQString& _date )
{
- QString date( _date );
+ TQString date( _date );
if ( date.endsWith( "Z" ) )
date.truncate( date.length() - 1 );
- return QDateTime::fromString( date, Qt::ISODate );
+ return TQDateTime::fromString( date, Qt::ISODate );
}
-QDate KolabBase::stringToDate( const QString& date )
+TQDate KolabBase::stringToDate( const TQString& date )
{
- return QDate::fromString( date, Qt::ISODate );
+ return TQDate::fromString( date, Qt::ISODate );
}
-QString KolabBase::sensitivityToString( Sensitivity s )
+TQString KolabBase::sensitivityToString( Sensitivity s )
{
switch( s ) {
case Private: return "private";
@@ -432,7 +432,7 @@ QString KolabBase::sensitivityToString( Sensitivity s )
return "What what what???";
}
-KolabBase::Sensitivity KolabBase::stringToSensitivity( const QString& s )
+KolabBase::Sensitivity KolabBase::stringToSensitivity( const TQString& s )
{
if ( s == "private" )
return Private;
@@ -441,34 +441,34 @@ KolabBase::Sensitivity KolabBase::stringToSensitivity( const QString& s )
return Public;
}
-QString KolabBase::colorToString( const QColor& color )
+TQString KolabBase::colorToString( const TQColor& color )
{
// Color is in the format "#RRGGBB"
return color.name();
}
-QColor KolabBase::stringToColor( const QString& s )
+TQColor KolabBase::stringToColor( const TQString& s )
{
- return QColor( s );
+ return TQColor( s );
}
-void KolabBase::writeString( QDomElement& element, const QString& tag,
- const QString& tagString )
+void KolabBase::writeString( TQDomElement& element, const TQString& tag,
+ const TQString& tagString )
{
if ( !tagString.isEmpty() ) {
- QDomElement e = element.ownerDocument().createElement( tag );
- QDomText t = element.ownerDocument().createTextNode( tagString );
+ TQDomElement e = element.ownerDocument().createElement( tag );
+ TQDomText t = element.ownerDocument().createTextNode( tagString );
e.appendChild( t );
element.appendChild( e );
}
}
-QDateTime KolabBase::localToUTC( const QDateTime& time ) const
+TQDateTime KolabBase::localToUTC( const TQDateTime& time ) const
{
return KPimPrefs::localTimeToUtc( time, mTimeZoneId );
}
-QDateTime KolabBase::utcToLocal( const QDateTime& time ) const
+TQDateTime KolabBase::utcToLocal( const TQDateTime& time ) const
{
return KPimPrefs::utcToLocalTime( time, mTimeZoneId );
}
diff --git a/kresources/kolab/shared/kolabbase.h b/kresources/kolab/shared/kolabbase.h
index 053683989..ac34eb884 100644
--- a/kresources/kolab/shared/kolabbase.h
+++ b/kresources/kolab/shared/kolabbase.h
@@ -34,9 +34,9 @@
#ifndef KOLABBASE_H
#define KOLABBASE_H
-#include <qdom.h>
-#include <qdatetime.h>
-#include <qcolor.h>
+#include <tqdom.h>
+#include <tqdatetime.h>
+#include <tqcolor.h>
class QFile;
@@ -54,38 +54,38 @@ class KolabBase {
public:
struct Email {
public:
- Email( const QString& name = QString::null,
- const QString& email = QString::null )
+ Email( const TQString& name = TQString::null,
+ const TQString& email = TQString::null )
: displayName( name ), smtpAddress( email )
{
}
- QString displayName;
- QString smtpAddress;
+ TQString displayName;
+ TQString smtpAddress;
};
enum Sensitivity { Public = 0, Private = 1, Confidential = 2 };
- explicit KolabBase( const QString& timezone = QString::null );
+ explicit KolabBase( const TQString& timezone = TQString::null );
virtual ~KolabBase();
// Return a string identifying this type
- virtual QString type() const = 0;
+ virtual TQString type() const = 0;
- virtual void setUid( const QString& uid );
- virtual QString uid() const;
+ virtual void setUid( const TQString& uid );
+ virtual TQString uid() const;
- virtual void setBody( const QString& body );
- virtual QString body() const;
+ virtual void setBody( const TQString& body );
+ virtual TQString body() const;
- virtual void setCategories( const QString& categories );
- virtual QString categories() const;
+ virtual void setCategories( const TQString& categories );
+ virtual TQString categories() const;
- virtual void setCreationDate( const QDateTime& date );
- virtual QDateTime creationDate() const;
+ virtual void setCreationDate( const TQDateTime& date );
+ virtual TQDateTime creationDate() const;
- virtual void setLastModified( const QDateTime& date );
- virtual QDateTime lastModified() const;
+ virtual void setLastModified( const TQDateTime& date );
+ virtual TQDateTime lastModified() const;
virtual void setSensitivity( Sensitivity sensitivity );
virtual Sensitivity sensitivity() const;
@@ -99,28 +99,28 @@ public:
virtual int pilotSyncStatus() const;
// String - Date conversion methods
- static QString dateTimeToString( const QDateTime& time );
- static QString dateToString( const QDate& date );
- static QDateTime stringToDateTime( const QString& time );
- static QDate stringToDate( const QString& date );
+ static TQString dateTimeToString( const TQDateTime& time );
+ static TQString dateToString( const TQDate& date );
+ static TQDateTime stringToDateTime( const TQString& time );
+ static TQDate stringToDate( const TQString& date );
// String - Sensitivity conversion methods
- static QString sensitivityToString( Sensitivity );
- static Sensitivity stringToSensitivity( const QString& );
+ static TQString sensitivityToString( Sensitivity );
+ static Sensitivity stringToSensitivity( const TQString& );
// String - Color conversion methods
- static QString colorToString( const QColor& );
- static QColor stringToColor( const QString& );
+ static TQString colorToString( const TQColor& );
+ static TQColor stringToColor( const TQString& );
// Load this object by reading the XML file
- bool load( const QString& xml );
- bool load( QFile& xml );
+ bool load( const TQString& xml );
+ bool load( TQFile& xml );
// Load this QDomDocument
- virtual bool loadXML( const QDomDocument& xml ) = 0;
+ virtual bool loadXML( const TQDomDocument& xml ) = 0;
// Serialize this object to an XML string
- virtual QString saveXML() const = 0;
+ virtual TQString saveXML() const = 0;
protected:
/// Read all known fields from this ical incidence
@@ -136,35 +136,35 @@ protected:
void saveTo( KABC::Addressee* ) const;
// This just makes the initial dom tree with version and doctype
- static QDomDocument domTree();
+ static TQDomDocument domTree();
- bool loadEmailAttribute( QDomElement& element, Email& email );
+ bool loadEmailAttribute( TQDomElement& element, Email& email );
- void saveEmailAttribute( QDomElement& element, const Email& email,
- const QString& tagName = "email" ) const;
+ void saveEmailAttribute( TQDomElement& element, const Email& email,
+ const TQString& tagName = "email" ) const;
// Load the attributes of this class
- virtual bool loadAttribute( QDomElement& );
+ virtual bool loadAttribute( TQDomElement& );
// Save the attributes of this class
- virtual bool saveAttributes( QDomElement& ) const;
+ virtual bool saveAttributes( TQDomElement& ) const;
// Return the product ID
- virtual QString productID() const = 0;
+ virtual TQString productID() const = 0;
// Write a string tag
- static void writeString( QDomElement&, const QString&, const QString& );
+ static void writeString( TQDomElement&, const TQString&, const TQString& );
- QDateTime localToUTC( const QDateTime& time ) const;
- QDateTime utcToLocal( const QDateTime& time ) const;
+ TQDateTime localToUTC( const TQDateTime& time ) const;
+ TQDateTime utcToLocal( const TQDateTime& time ) const;
- QString mUid;
- QString mBody;
- QString mCategories;
- QDateTime mCreationDate;
- QDateTime mLastModified;
+ TQString mUid;
+ TQString mBody;
+ TQString mCategories;
+ TQDateTime mCreationDate;
+ TQDateTime mLastModified;
Sensitivity mSensitivity;
- QString mTimeZoneId;
+ TQString mTimeZoneId;
// KPilot synchronization stuff
bool mHasPilotSyncId, mHasPilotSyncStatus;
diff --git a/kresources/kolab/shared/resourcekolabbase.cpp b/kresources/kolab/shared/resourcekolabbase.cpp
index d62a5bb54..291910fb9 100644
--- a/kresources/kolab/shared/resourcekolabbase.cpp
+++ b/kresources/kolab/shared/resourcekolabbase.cpp
@@ -42,19 +42,19 @@
#include <kurl.h>
#include <ktempfile.h>
#include <kmessagebox.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <kdebug.h>
using namespace Kolab;
static unsigned int uniquifier = 0;
-ResourceKolabBase::ResourceKolabBase( const QCString& objId )
+ResourceKolabBase::ResourceKolabBase( const TQCString& objId )
: mSilent( false )
{
KGlobal::locale()->insertCatalogue( "kres_kolab" );
KGlobal::locale()->insertCatalogue( "libkcal" );
- QString uniqueObjId = QString( objId ) + QString::number( uniquifier++ );
+ TQString uniqueObjId = TQString( objId ) + TQString::number( uniquifier++ );
mConnection = new KMailConnection( this, uniqueObjId.utf8() );
}
@@ -64,61 +64,61 @@ ResourceKolabBase::~ResourceKolabBase()
}
-bool ResourceKolabBase::kmailSubresources( QValueList<KMailICalIface::SubResource>& lst,
- const QString& contentsType ) const
+bool ResourceKolabBase::kmailSubresources( TQValueList<KMailICalIface::SubResource>& lst,
+ const TQString& contentsType ) const
{
return mConnection->kmailSubresources( lst, contentsType );
}
-bool ResourceKolabBase::kmailTriggerSync( const QString& contentsType ) const
+bool ResourceKolabBase::kmailTriggerSync( const TQString& contentsType ) const
{
return mConnection->kmailTriggerSync( contentsType );
}
bool ResourceKolabBase::kmailIncidencesCount( int &count,
- const QString& mimetype,
- const QString& resource ) const
+ const TQString& mimetype,
+ const TQString& resource ) const
{
return mConnection->kmailIncidencesCount( count, mimetype, resource );
}
-bool ResourceKolabBase::kmailIncidences( QMap<Q_UINT32, QString>& lst,
- const QString& mimetype,
- const QString& resource,
+bool ResourceKolabBase::kmailIncidences( TQMap<Q_UINT32, TQString>& lst,
+ const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages ) const
{
return mConnection->kmailIncidences( lst, mimetype, resource, startIndex, nbMessages );
}
-bool ResourceKolabBase::kmailGetAttachment( KURL& url, const QString& resource,
+bool ResourceKolabBase::kmailGetAttachment( KURL& url, const TQString& resource,
Q_UINT32 sernum,
- const QString& filename ) const
+ const TQString& filename ) const
{
return mConnection->kmailGetAttachment( url, resource, sernum, filename );
}
-bool ResourceKolabBase::kmailAttachmentMimetype( QString & mimeType, QString & resource,
- Q_UINT32 sernum, const QString & filename ) const
+bool ResourceKolabBase::kmailAttachmentMimetype( TQString & mimeType, TQString & resource,
+ Q_UINT32 sernum, const TQString & filename ) const
{
return mConnection->kmailAttachmentMimetype( mimeType, resource, sernum, filename );
}
-bool ResourceKolabBase::kmailListAttachments( QStringList &list,
- const QString & resource,
+bool ResourceKolabBase::kmailListAttachments( TQStringList &list,
+ const TQString & resource,
Q_UINT32 sernum ) const
{
return mConnection->kmailListAttachments( list, resource, sernum );
}
-bool ResourceKolabBase::kmailDeleteIncidence( const QString& resource,
+bool ResourceKolabBase::kmailDeleteIncidence( const TQString& resource,
Q_UINT32 sernum )
{
return mSilent || mConnection->kmailDeleteIncidence( resource, sernum );
}
-static QString plainTextBody()
+static TQString plainTextBody()
{
const char * firstPartTextToTranslate = I18N_NOOP(
"This is a Kolab Groupware object.\nTo view this object you"
@@ -126,8 +126,8 @@ static QString plainTextBody()
" Groupware format.\nFor a list of such email clients please"
" visit\n%1" );
const char * url = "http://www.kolab.org/kolab2-clients.html";
- QString firstPartTextUntranslated = QString::fromLatin1( firstPartTextToTranslate ).arg( url );
- QString firstPartText = i18n( firstPartTextToTranslate ).arg( url );
+ TQString firstPartTextUntranslated = TQString::fromLatin1( firstPartTextToTranslate ).arg( url );
+ TQString firstPartText = i18n( firstPartTextToTranslate ).arg( url );
if ( firstPartText != firstPartTextUntranslated ) {
firstPartText.append("\n\n-----------------------------------------------------\n\n");
firstPartText.append( firstPartTextUntranslated );
@@ -135,21 +135,21 @@ static QString plainTextBody()
return firstPartText;
}
-bool ResourceKolabBase::kmailUpdate( const QString& resource,
+bool ResourceKolabBase::kmailUpdate( const TQString& resource,
Q_UINT32& sernum,
- const QString& xml,
- const QString& mimetype,
- const QString& subject,
+ const TQString& xml,
+ const TQString& mimetype,
+ const TQString& subject,
const CustomHeaderMap& _customHeaders,
- const QStringList& _attachmentURLs,
- const QStringList& _attachmentMimetypes,
- const QStringList& _attachmentNames,
- const QStringList& deletedAttachments )
+ const TQStringList& _attachmentURLs,
+ const TQStringList& _attachmentMimetypes,
+ const TQStringList& _attachmentNames,
+ const TQStringList& deletedAttachments )
{
if ( mSilent )
return true;
- QString subj = subject;
+ TQString subj = subject;
if ( subj.isEmpty() )
subj = i18n("Internal kolab data: Do not delete this mail.");
@@ -158,15 +158,15 @@ bool ResourceKolabBase::kmailUpdate( const QString& resource,
// Save the xml file. Will be deleted at the end of this method
KTempFile file;
file.setAutoDelete( true );
- QTextStream* stream = file.textStream();
- stream->setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream* stream = file.textStream();
+ stream->setEncoding( TQTextStream::UnicodeUTF8 );
*stream << xml;
file.close();
// Add the xml file as an attachment
- QStringList attachmentURLs = _attachmentURLs;
- QStringList attachmentMimeTypes = _attachmentMimetypes;
- QStringList attachmentNames = _attachmentNames;
+ TQStringList attachmentURLs = _attachmentURLs;
+ TQStringList attachmentMimeTypes = _attachmentMimetypes;
+ TQStringList attachmentNames = _attachmentNames;
KURL url;
url.setPath( file.name() );
url.setFileEncoding( "UTF-8" );
@@ -187,10 +187,10 @@ bool ResourceKolabBase::kmailUpdate( const QString& resource,
}
}
-QString ResourceKolabBase::configFile( const QString& type ) const
+TQString ResourceKolabBase::configFile( const TQString& type ) const
{
return locateLocal( "config",
- QString( "kresources/kolab/%1rc" ).arg( type ) );
+ TQString( "kresources/kolab/%1rc" ).arg( type ) );
}
bool ResourceKolabBase::connectToKMail() const
@@ -198,25 +198,25 @@ bool ResourceKolabBase::connectToKMail() const
return mConnection->connectToKMail();
}
-bool ResourceKolabBase::kmailAddSubresource( const QString& resource,
- const QString& parent,
- const QString& contentsType )
+bool ResourceKolabBase::kmailAddSubresource( const TQString& resource,
+ const TQString& parent,
+ const TQString& contentsType )
{
return mConnection->kmailAddSubresource( resource, parent, contentsType );
}
-bool ResourceKolabBase::kmailRemoveSubresource( const QString& resource )
+bool ResourceKolabBase::kmailRemoveSubresource( const TQString& resource )
{
return mConnection->kmailRemoveSubresource( resource );
}
-QString ResourceKolabBase::findWritableResource( const ResourceMap& resources,
- const QString& text )
+TQString ResourceKolabBase::findWritableResource( const ResourceMap& resources,
+ const TQString& text )
{
// I have to use the label (shown in the dialog) as key here. But given how the
// label is made up, it should be unique. If it's not, well the dialog would suck anyway...
- QMap<QString, QString> possible;
- QStringList labels;
+ TQMap<TQString, TQString> possible;
+ TQStringList labels;
ResourceMap::ConstIterator it;
for ( it = resources.begin(); it != resources.end(); ++it ) {
if ( it.data().writable() && it.data().active() ) {
@@ -228,26 +228,26 @@ QString ResourceKolabBase::findWritableResource( const ResourceMap& resources,
if ( possible.isEmpty() ) { // None found!!
kdWarning(5650) << "No writable resource found!" << endl;
KMessageBox::error( 0, i18n( "No writable resource was found, saving will not be possible. Reconfigure KMail first." ) );
- return QString::null;
+ return TQString::null;
}
if ( possible.count() == 1 )
// Just one found
return possible.begin().data(); // yes this is the subresource key, i.e. location
- QString t = text;
+ TQString t = text;
if ( t.isEmpty() )
i18n( "You have more than one writable resource folder. "
"Please select the one you want to write to." );
// Several found, ask the user
- QString chosenLabel = KPIM::FolderSelectDialog::getItem( i18n( "Select Resource Folder" ),
+ TQString chosenLabel = KPIM::FolderSelectDialog::getItem( i18n( "Select Resource Folder" ),
t, possible.keys() );
if ( chosenLabel.isEmpty() ) // cancelled
- return QString::null;
+ return TQString::null;
return possible[chosenLabel];
}
-KMailICalIface::StorageFormat ResourceKolabBase::kmailStorageFormat( const QString &folder ) const
+KMailICalIface::StorageFormat ResourceKolabBase::kmailStorageFormat( const TQString &folder ) const
{
KMailICalIface::StorageFormat format = (KMailICalIface::StorageFormat) 3;
mConnection->kmailStorageFormat( format, folder );
diff --git a/kresources/kolab/shared/resourcekolabbase.h b/kresources/kolab/shared/resourcekolabbase.h
index 806220189..eca5cc80b 100644
--- a/kresources/kolab/shared/resourcekolabbase.h
+++ b/kresources/kolab/shared/resourcekolabbase.h
@@ -34,9 +34,9 @@
#ifndef RESOURCEKOLABBASE_H
#define RESOURCEKOLABBASE_H
-#include <qstring.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include "subresource.h"
#include <kmail/kmailicalIface.h>
@@ -73,31 +73,31 @@ class KMailConnection;
*/
class ResourceKolabBase {
public:
- ResourceKolabBase( const QCString& objId );
+ ResourceKolabBase( const TQCString& objId );
virtual ~ResourceKolabBase();
// These are the methods called by KMail when the resource changes
- virtual bool fromKMailAddIncidence( const QString& type,
- const QString& resource,
+ virtual bool fromKMailAddIncidence( const TQString& type,
+ const TQString& resource,
Q_UINT32 sernum,
int format,
- const QString& data ) = 0;
- virtual void fromKMailDelIncidence( const QString& type,
- const QString& resource,
- const QString& xml ) = 0;
- virtual void fromKMailRefresh( const QString& type,
- const QString& resource ) = 0;
- virtual void fromKMailAddSubresource( const QString& type,
- const QString& resource,
- const QString& label,
+ const TQString& data ) = 0;
+ virtual void fromKMailDelIncidence( const TQString& type,
+ const TQString& resource,
+ const TQString& xml ) = 0;
+ virtual void fromKMailRefresh( const TQString& type,
+ const TQString& resource ) = 0;
+ virtual void fromKMailAddSubresource( const TQString& type,
+ const TQString& resource,
+ const TQString& label,
bool writable,
bool alarmRelevant ) = 0;
- virtual void fromKMailDelSubresource( const QString& type,
- const QString& resource ) = 0;
+ virtual void fromKMailDelSubresource( const TQString& type,
+ const TQString& resource ) = 0;
- virtual void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder ) = 0;
+ virtual void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder ) = 0;
protected:
/// Do the connection to KMail.
bool connectToKMail() const;
@@ -105,71 +105,71 @@ protected:
// These are the KMail dcop function connections. The docs here say
// "Get", which here means that the first argument is the return arg
- /// List all folders with a certain contentsType. Returns a QMap with
+ /// List all folders with a certain contentsType. Returns a TQMap with
/// resourcename/writable pairs
- bool kmailSubresources( QValueList<KMailICalIface::SubResource>& lst,
- const QString& contentsType ) const;
+ bool kmailSubresources( TQValueList<KMailICalIface::SubResource>& lst,
+ const TQString& contentsType ) const;
/// Get the number of messages in this folder.
/// Used to iterate over kmailIncidences by chunks
- bool kmailIncidencesCount( int& count, const QString& mimetype,
- const QString& resource ) const;
+ bool kmailIncidencesCount( int& count, const TQString& mimetype,
+ const TQString& resource ) const;
/// Get the mimetype attachments from a chunk of messages from this folder.
- /// Returns a QMap with serialNumber/attachment pairs.
- bool kmailIncidences( QMap<Q_UINT32, QString>& lst, const QString& mimetype,
- const QString& resource,
+ /// Returns a TQMap with serialNumber/attachment pairs.
+ bool kmailIncidences( TQMap<Q_UINT32, TQString>& lst, const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages ) const;
- bool kmailTriggerSync( const QString& contentType ) const;
+ bool kmailTriggerSync( const TQString& contentType ) const;
public: // for Contact
/// Get an attachment from a mail. Returns a URL to it. This can
/// be called by the resource after obtaining the incidence.
/// The resource must delete the temp file.
- bool kmailGetAttachment( KURL& url, const QString& resource,
+ bool kmailGetAttachment( KURL& url, const TQString& resource,
Q_UINT32 sernum,
- const QString& filename ) const;
+ const TQString& filename ) const;
/** Get the mimetype of the specified attachment. */
- bool kmailAttachmentMimetype( QString &mimeType, QString &resource,
- Q_UINT32 sernum, const QString &filename ) const;
+ bool kmailAttachmentMimetype( TQString &mimeType, TQString &resource,
+ Q_UINT32 sernum, const TQString &filename ) const;
/// List all attachments of a mail.
- bool kmailListAttachments( QStringList &list, const QString &resource,
+ bool kmailListAttachments( TQStringList &list, const TQString &resource,
Q_UINT32 sernum ) const;
protected:
/// Delete an incidence.
- bool kmailDeleteIncidence( const QString& resource, Q_UINT32 sernum );
+ bool kmailDeleteIncidence( const TQString& resource, Q_UINT32 sernum );
- KMailICalIface::StorageFormat kmailStorageFormat( const QString& folder ) const;
+ KMailICalIface::StorageFormat kmailStorageFormat( const TQString& folder ) const;
- typedef QMap<QCString, QString> CustomHeaderMap;
+ typedef TQMap<TQCString, TQString> CustomHeaderMap;
/// Update an incidence. The list of attachments are URLs.
/// The parameter sernum is updated with the right KMail serial number
- bool kmailUpdate( const QString& resource, Q_UINT32& sernum,
- const QString& xml,
- const QString& mimetype,
- const QString& subject,
+ bool kmailUpdate( const TQString& resource, Q_UINT32& sernum,
+ const TQString& xml,
+ const TQString& mimetype,
+ const TQString& subject,
const CustomHeaderMap& customHeaders = CustomHeaderMap(),
- const QStringList& attachmentURLs = QStringList(),
- const QStringList& attachmentMimetypes = QStringList(),
- const QStringList& attachmentNames = QStringList(),
- const QStringList& deletedAttachments = QStringList() );
+ const TQStringList& attachmentURLs = TQStringList(),
+ const TQStringList& attachmentMimetypes = TQStringList(),
+ const TQStringList& attachmentNames = TQStringList(),
+ const TQStringList& deletedAttachments = TQStringList() );
- bool kmailAddSubresource( const QString& resource, const QString& parent,
- const QString& contentsType );
- bool kmailRemoveSubresource( const QString& resource );
+ bool kmailAddSubresource( const TQString& resource, const TQString& parent,
+ const TQString& contentsType );
+ bool kmailRemoveSubresource( const TQString& resource );
/// Get the full path of the config file.
- QString configFile( const QString& type ) const;
+ TQString configFile( const TQString& type ) const;
/// If only one of these is writable, return that. Otherwise return null.
- QString findWritableResource( const ResourceMap& resources,
- const QString& text = QString::null );
+ TQString findWritableResource( const ResourceMap& resources,
+ const TQString& text = TQString::null );
bool mSilent;
@@ -182,9 +182,9 @@ protected:
/// This is used to distinguish operations triggered by the user,
/// from operations triggered by KMail
- QStringList mUidsPendingAdding;
- QStringList mUidsPendingDeletion;
- QStringList mUidsPendingUpdate;
+ TQStringList mUidsPendingAdding;
+ TQStringList mUidsPendingDeletion;
+ TQStringList mUidsPendingUpdate;
private:
mutable KMailConnection* mConnection;
diff --git a/kresources/kolab/shared/subresource.cpp b/kresources/kolab/shared/subresource.cpp
index 67216913a..de4048fc7 100644
--- a/kresources/kolab/shared/subresource.cpp
+++ b/kresources/kolab/shared/subresource.cpp
@@ -35,7 +35,7 @@
using namespace Kolab;
SubResource::SubResource( bool active, bool writable,
- bool alarmRelevant, const QString& label,
+ bool alarmRelevant, const TQString& label,
int completionWeight )
: mActive( active ), mWritable( writable ), mAlarmRelevant( alarmRelevant ),
mLabel( label ), mCompletionWeight( completionWeight )
@@ -43,7 +43,7 @@ SubResource::SubResource( bool active, bool writable,
}
SubResource::SubResource( bool active, bool writable,
- const QString& label, int completionWeight )
+ const TQString& label, int completionWeight )
: mActive( active ), mWritable( writable ), mAlarmRelevant( false ),
mLabel( label ), mCompletionWeight( completionWeight )
{
@@ -83,12 +83,12 @@ bool SubResource::writable() const
return mWritable;
}
-void SubResource::setLabel( const QString& label )
+void SubResource::setLabel( const TQString& label )
{
mLabel = label;
}
-QString SubResource::label() const
+TQString SubResource::label() const
{
return mLabel;
}
@@ -103,7 +103,7 @@ int SubResource::completionWeight() const
return mCompletionWeight;
}
-StorageReference::StorageReference( const QString& resource, Q_UINT32 sernum )
+StorageReference::StorageReference( const TQString& resource, Q_UINT32 sernum )
: mResource( resource ), mSerialNumber( sernum )
{
}
@@ -112,12 +112,12 @@ StorageReference::~StorageReference()
{
}
-void StorageReference::setResource( const QString& resource )
+void StorageReference::setResource( const TQString& resource )
{
mResource = resource;
}
-QString StorageReference::resource() const
+TQString StorageReference::resource() const
{
return mResource;
}
diff --git a/kresources/kolab/shared/subresource.h b/kresources/kolab/shared/subresource.h
index 1bdd98cd5..87f98e6dd 100644
--- a/kresources/kolab/shared/subresource.h
+++ b/kresources/kolab/shared/subresource.h
@@ -33,8 +33,8 @@
#ifndef SUBRESOURCE_H
#define SUBRESOURCE_H
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
namespace Kolab {
@@ -48,11 +48,11 @@ public:
// This is just for QMap
SubResource() {}
- SubResource( bool active, bool writable, const QString& label,
+ SubResource( bool active, bool writable, const TQString& label,
int completionWeight = 100 );
SubResource( bool active, bool writable, bool alarmRelevant,
- const QString& label, int completionWeight = 100 );
+ const TQString& label, int completionWeight = 100 );
virtual ~SubResource();
virtual void setActive( bool active );
@@ -64,8 +64,8 @@ public:
virtual void setAlarmRelevant( bool active );
virtual bool alarmRelevant() const;
- virtual void setLabel( const QString& label );
- virtual QString label() const;
+ virtual void setLabel( const TQString& label );
+ virtual TQString label() const;
virtual void setCompletionWeight( int completionWeight );
virtual int completionWeight() const;
@@ -75,7 +75,7 @@ private:
bool mWritable; // Set if the KMail folder is writable
bool mAlarmRelevant; // Set if the alarms from this resource are of
// interest to the user, as per folder acls
- QString mLabel; // The GUI name of this resource
+ TQString mLabel; // The GUI name of this resource
// This is just for the abc plugin. But as long as only this is here,
// it's just as cheap to have it in here as making a d-pointer that
@@ -84,7 +84,7 @@ private:
int mCompletionWeight;
};
-typedef QMap<QString, SubResource> ResourceMap;
+typedef TQMap<TQString, SubResource> ResourceMap;
/**
* This class is used to store a mapping from the XML UID to the KMail
@@ -96,21 +96,21 @@ public:
// Just for QMap
StorageReference() {}
- StorageReference( const QString& resource, Q_UINT32 sernum );
+ StorageReference( const TQString& resource, Q_UINT32 sernum );
virtual ~StorageReference();
- virtual void setResource( const QString& resource );
- virtual QString resource() const;
+ virtual void setResource( const TQString& resource );
+ virtual TQString resource() const;
virtual void setSerialNumber( Q_UINT32 serialNumber );
virtual Q_UINT32 serialNumber() const;
private:
- QString mResource;
+ TQString mResource;
Q_UINT32 mSerialNumber;
};
-typedef QMap<QString, StorageReference> UidMap;
+typedef TQMap<TQString, StorageReference> UidMap;
}