summaryrefslogtreecommitdiffstats
path: root/kresources/kolab/kcal
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/kcal
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/kcal')
-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
11 files changed, 394 insertions, 394 deletions
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;
};
}