summaryrefslogtreecommitdiffstats
path: root/kresources/exchange
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/exchange
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/exchange')
-rw-r--r--kresources/exchange/dateset.cpp54
-rw-r--r--kresources/exchange/dateset.h46
-rw-r--r--kresources/exchange/resourceexchange.cpp86
-rw-r--r--kresources/exchange/resourceexchange.h60
-rw-r--r--kresources/exchange/resourceexchangeconfig.cpp38
-rw-r--r--kresources/exchange/resourceexchangeconfig.h10
6 files changed, 147 insertions, 147 deletions
diff --git a/kresources/exchange/dateset.cpp b/kresources/exchange/dateset.cpp
index f79810960..a2372c874 100644
--- a/kresources/exchange/dateset.cpp
+++ b/kresources/exchange/dateset.cpp
@@ -20,9 +20,9 @@
// $Id$
-#include <qptrlist.h>
-#include <qdatetime.h>
-#include <qpair.h>
+#include <tqptrlist.h>
+#include <tqdatetime.h>
+#include <tqpair.h>
#include <kdebug.h>
@@ -42,34 +42,34 @@ DateSet::~DateSet()
delete mDates;
}
-void DateSet::add( QDate const& date )
+void DateSet::add( TQDate const& date )
{
if (mDates->isEmpty()) {
- mDates->insert( 0, new QPair<QDate,QDate>( date, date ) );
+ mDates->insert( 0, new QPair<TQDate,TQDate>( date, date ) );
return;
}
int i = find( date );
- mDates->insert( i, new QPair<QDate,QDate>( date, date ) );
+ mDates->insert( i, new QPair<TQDate,TQDate>( date, date ) );
tryMerge( i );
tryMerge( i-1 );
}
-void DateSet::add( QDate const& from, QDate const& to )
+void DateSet::add( TQDate const& from, TQDate const& to )
{
if (mDates->isEmpty()) {
- mDates->insert( 0, new QPair<QDate,QDate>( from, to ) );
+ mDates->insert( 0, new QPair<TQDate,TQDate>( from, to ) );
return;
}
uint i = find( from );
kdDebug() << "Adding range at position " << i << endl;
- mDates->insert( i, new QPair<QDate,QDate>( from, to ) );
+ mDates->insert( i, new QPair<TQDate,TQDate>( from, to ) );
do {
} while ( tryMerge( i ) );
do {
} while ( tryMerge( i-1 ) );
/*
- QPair<QDate,QDate>* item = mDates->at( i );
+ QPair<TQDate,TQDate>* item = mDates->at( i );
if (to >= item->first)
return;
@@ -77,11 +77,11 @@ void DateSet::add( QDate const& from, QDate const& to )
if (to.daysTo( item->first ) == 1 )
item->first = from;
else
- mDates->insert( i, new QPair<QDate,QDate>( from, to ) );
+ mDates->insert( i, new QPair<TQDate,TQDate>( from, to ) );
*/
}
-void DateSet::remove( QDate const& date )
+void DateSet::remove( TQDate const& date )
{
if (mDates->isEmpty()) {
return;
@@ -91,7 +91,7 @@ void DateSet::remove( QDate const& date )
if ( i == mDates->count() )
return;
- QPair<QDate,QDate>* item = mDates->at( i );
+ QPair<TQDate,TQDate>* item = mDates->at( i );
if ( date < item->first )
return;
if ( date == item->first ) {
@@ -106,12 +106,12 @@ void DateSet::remove( QDate const& date )
if ( date == item->second ) {
item->second = item->second.addDays( -1 );
} else {
- mDates->insert( i, new QPair<QDate,QDate>(item->first, date.addDays( -1 ) ) );
+ mDates->insert( i, new QPair<TQDate,TQDate>(item->first, date.addDays( -1 ) ) );
item->first = date.addDays( 1 );
}
}
-void DateSet::remove( QDate const& from, QDate const& to )
+void DateSet::remove( TQDate const& from, TQDate const& to )
{
if (mDates->isEmpty()) {
return;
@@ -122,7 +122,7 @@ void DateSet::remove( QDate const& from, QDate const& to )
return;
while( i < mDates->count() ) {
- QPair<QDate,QDate>* item = mDates->at( i );
+ QPair<TQDate,TQDate>* item = mDates->at( i );
// Check if we're done: next item is later dan removal period
if ( to < item->first )
break;
@@ -136,7 +136,7 @@ void DateSet::remove( QDate const& from, QDate const& to )
// Check if we should take a slice out of the middle of the item
if ( from > item->first && to < item->second ) {
- mDates->insert( i, new QPair<QDate,QDate>( item->first, from.addDays( -1 ) ) );
+ mDates->insert( i, new QPair<TQDate,TQDate>( item->first, from.addDays( -1 ) ) );
item->first = to.addDays( 1 );
break; // We're done
}
@@ -155,7 +155,7 @@ void DateSet::remove( QDate const& from, QDate const& to )
}
}
-bool DateSet::contains( QDate const& date )
+bool DateSet::contains( TQDate const& date )
{
if (mDates->isEmpty()) {
return false;
@@ -166,13 +166,13 @@ bool DateSet::contains( QDate const& date )
if ( i == mDates->count() )
return false;
- QPair<QDate,QDate>* item = mDates->at( i );
+ QPair<TQDate,TQDate>* item = mDates->at( i );
// kdDebug() << "contains looking at range " << item->first.toString() << " -- " << item->second.toString() << endl;
return ( item->first <= date );
}
// returns true if and only if the whole range is in the set
-bool DateSet::contains( QDate const& from, QDate const& to )
+bool DateSet::contains( TQDate const& from, TQDate const& to )
{
if (mDates->isEmpty()) {
return false;
@@ -182,7 +182,7 @@ bool DateSet::contains( QDate const& from, QDate const& to )
if ( i == mDates->count() )
return false;
- QPair<QDate,QDate>* item = mDates->at( i );
+ QPair<TQDate,TQDate>* item = mDates->at( i );
return ( from >= item->first && to <= item->second );
}
@@ -192,7 +192,7 @@ bool DateSet::contains( QDate const& from, QDate const& to )
// If mDates is empty, return 0.
// If date is later than the last item in mDates, return mDates->count()
-int DateSet::find( QDate const& date )
+int DateSet::find( TQDate const& date )
{
if ( mDates->isEmpty() )
return 0;
@@ -202,7 +202,7 @@ int DateSet::find( QDate const& date )
while ( start < end ) {
int i = start + (end-start) / 2;
// kdDebug() << start << ", " << i << ", " << end << endl;
- QPair<QDate,QDate> *item = mDates->at( i );
+ QPair<TQDate,TQDate> *item = mDates->at( i );
if ( item->first <= date && date <= item->second )
return i;
if ( date > item->second ) {
@@ -229,8 +229,8 @@ void DateSet::print()
{
for( uint i=0; i<mDates->count(); i++ )
{
- QDate start = mDates->at( i )->first;
- QDate end = mDates->at( i )->second;
+ TQDate start = mDates->at( i )->first;
+ TQDate end = mDates->at( i )->second;
if (start == end)
kdDebug() << start.toString() << endl;
else
@@ -246,8 +246,8 @@ bool DateSet::tryMerge( int i )
if ( i < 0 || i+1 >= (int)(mDates->count()) )
return false;
- QPair<QDate,QDate>* item1 = mDates->at( i );
- QPair<QDate,QDate>* item2 = mDates->at( i+1 );
+ QPair<TQDate,TQDate>* item1 = mDates->at( i );
+ QPair<TQDate,TQDate>* item2 = mDates->at( i+1 );
// First case: item1 starts before or on the same date as item2
if ( item1->first <= item2->first ) {
diff --git a/kresources/exchange/dateset.h b/kresources/exchange/dateset.h
index 5041f0d58..989d774cb 100644
--- a/kresources/exchange/dateset.h
+++ b/kresources/exchange/dateset.h
@@ -23,34 +23,34 @@
#ifndef _DATESET_H
#define _DATESET_H
-#include <qdatetime.h>
-#include <qpair.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqpair.h>
+#include <tqptrlist.h>
/*
class DateRange {
public:
DateRange() { }
- DateRange( QDate const& from, QDate const& to )
+ DateRange( TQDate const& from, TQDate const& to )
: mFrom( from ), mTo( to ) { }
bool operator< ( const DateRange& r ) { return mFrom < r.from(); }
- bool contains( QDate const& d ) { return ( mFrom <= d && d <= mTo ); }
- bool contains( QDate const& from, QDate const& to ) { return ( mFrom <= from && to <= mTo ); }
+ bool contains( TQDate const& d ) { return ( mFrom <= d && d <= mTo ); }
+ bool contains( TQDate const& from, TQDate const& to ) { return ( mFrom <= from && to <= mTo ); }
- QDate from() { return mFrom; }
- QDate to() { return mTo; }
+ TQDate from() { return mFrom; }
+ TQDate to() { return mTo; }
private:
- QDate mFrom;
- QDate mTo;
+ TQDate mFrom;
+ TQDate mTo;
}
*/
-class RangeList : public QPtrList< QPair<QDate, QDate> > {
+class RangeList : public TQPtrList< QPair<TQDate, TQDate> > {
protected:
- virtual int compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2) {
- QPair<QDate,QDate> *i1 = static_cast<QPair<QDate,QDate> *> (item1);
- QPair<QDate,QDate> *i2 = static_cast<QPair<QDate,QDate> *> (item2);
+ virtual int compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2) {
+ QPair<TQDate,TQDate> *i1 = static_cast<QPair<TQDate,TQDate> *> (item1);
+ QPair<TQDate,TQDate> *i2 = static_cast<QPair<TQDate,TQDate> *> (item2);
if ( *i1 < *i2 ) return -1;
if ( *i2 < *i1 ) return 1;
return 0;
@@ -62,17 +62,17 @@ class DateSet {
DateSet();
~DateSet();
- void add( QDate const& date );
- void add( QDate const& from, QDate const& to );
+ void add( TQDate const& date );
+ void add( TQDate const& from, TQDate const& to );
- void remove( QDate const& date );
- void remove( QDate const& from, QDate const& to );
+ void remove( TQDate const& date );
+ void remove( TQDate const& from, TQDate const& to );
- bool contains( QDate const& date );
+ bool contains( TQDate const& date );
// returns true if and only if the whole range is in the set
- bool contains( QDate const& from, QDate const& to );
+ bool contains( TQDate const& from, TQDate const& to );
- int find( QDate const &date );
+ int find( TQDate const &date );
void print();
protected:
@@ -80,8 +80,8 @@ class DateSet {
bool tryMerge( int i );
RangeList *mDates;
- QDate mOldestDate;
- QDate mNewestDate;
+ TQDate mOldestDate;
+ TQDate mNewestDate;
};
#endif
diff --git a/kresources/exchange/resourceexchange.cpp b/kresources/exchange/resourceexchange.cpp
index 355244922..8e877f9b0 100644
--- a/kresources/exchange/resourceexchange.cpp
+++ b/kresources/exchange/resourceexchange.cpp
@@ -20,11 +20,11 @@
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qwidgetlist.h>
-#include <qwidget.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqwidgetlist.h>
+#include <tqwidget.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -78,7 +78,7 @@ ResourceExchange::ResourceExchange( const KConfig *config )
{
mLock = new KABC::LockNull( true );
- mTimeZoneId = QString::fromLatin1( "UTC" );
+ mTimeZoneId = TQString::fromLatin1( "UTC" );
kdDebug() << "Creating ResourceExchange" << endl;
if (config ) {
@@ -122,31 +122,31 @@ bool ResourceExchange::doOpen()
kdDebug() << "ResourceExchange::doOpen()" << endl;
mClient = new ExchangeClient( mAccount, mTimeZoneId );
- connect( mClient, SIGNAL( downloadFinished( int, const QString & ) ),
- SLOT( slotDownloadFinished( int, const QString & ) ) );
- connect( mClient, SIGNAL( event( KCal::Event *, const KURL & ) ),
- SLOT( downloadedEvent( KCal::Event *, const KURL & ) ) );
+ connect( mClient, TQT_SIGNAL( downloadFinished( int, const TQString & ) ),
+ TQT_SLOT( slotDownloadFinished( int, const TQString & ) ) );
+ connect( mClient, TQT_SIGNAL( event( KCal::Event *, const KURL & ) ),
+ TQT_SLOT( downloadedEvent( KCal::Event *, const KURL & ) ) );
#if 0
kdDebug() << "Creating monitor" << endl;
- QHostAddress ip;
+ TQHostAddress ip;
ip.setAddress( mAccount->host() );
mMonitor = new ExchangeMonitor( mAccount, ExchangeMonitor::CallBack, ip );
- connect( mMonitor, SIGNAL(notify( const QValueList<long>& , const QValueList<KURL>& )), this, SLOT(slotMonitorNotify( const QValueList<long>& , const QValueList<KURL>& )) );
- connect( mMonitor, SIGNAL(error(int , const QString&)), this, SLOT(slotMonitorError(int , const QString&)) );
+ connect( mMonitor, TQT_SIGNAL(notify( const TQValueList<long>& , const TQValueList<KURL>& )), this, TQT_SLOT(slotMonitorNotify( const TQValueList<long>& , const TQValueList<KURL>& )) );
+ connect( mMonitor, TQT_SIGNAL(error(int , const TQString&)), this, TQT_SLOT(slotMonitorError(int , const TQString&)) );
mMonitor->addWatch( mAccount->calendarURL(), ExchangeMonitor::UpdateNewMember, 1 );
#endif
- QWidgetList* widgets = QApplication::topLevelWidgets();
+ TQWidgetList* widgets = TQApplication::topLevelWidgets();
if ( !widgets->isEmpty() )
mClient->setWindow( widgets->first() );
delete widgets;
mDates = new DateSet();
- mEventDates = new QMap<Event,QDateTime>();
- mCacheDates = new QMap<QDate, QDateTime>();
+ mEventDates = new TQMap<Event,TQDateTime>();
+ mCacheDates = new TQMap<TQDate, TQDateTime>();
mCache = new CalendarLocal( mTimeZoneId );
// mOldestDate = 0L;
@@ -207,20 +207,20 @@ KABC::Lock *ResourceExchange::lock()
return mLock;
}
-void ResourceExchange::slotMonitorNotify( const QValueList<long>& IDs, const QValueList<KURL>& urls )
+void ResourceExchange::slotMonitorNotify( const TQValueList<long>& IDs, const TQValueList<KURL>& urls )
{
kdDebug() << "ResourceExchange::slotMonitorNotify()" << endl;
- QString result;
+ TQString result;
KPIM::ExchangeMonitor::IDList::ConstIterator it;
for ( it = IDs.begin(); it != IDs.end(); ++it ) {
if ( it == IDs.begin() )
- result += QString::number( (*it) );
+ result += TQString::number( (*it) );
else
- result += "," + QString::number( (*it) );
+ result += "," + TQString::number( (*it) );
}
kdDebug() << "Got signals for " << result << endl;
- QValueList<KURL>::ConstIterator it2;
+ TQValueList<KURL>::ConstIterator it2;
for ( it2 = urls.begin(); it2 != urls.end(); ++it2 ) {
kdDebug() << "URL: " << (*it2).prettyURL() << endl;
}
@@ -242,7 +242,7 @@ void ResourceExchange::slotMonitorNotify( const QValueList<long>& IDs, const QVa
*/
}
-void ResourceExchange::slotMonitorError( int errorCode, const QString& moreInfo )
+void ResourceExchange::slotMonitorError( int errorCode, const TQString& moreInfo )
{
kdError() << "Ignoring error from Exchange monitor, code=" << errorCode << "; more info: " << moreInfo << endl;
}
@@ -295,7 +295,7 @@ void ResourceExchange::changeIncidence( Incidence *incidence )
}
}
-Event *ResourceExchange::event( const QString &uid )
+Event *ResourceExchange::event( const TQString &uid )
{
kdDebug(5800) << "ResourceExchange::event(): " << uid << endl;
@@ -306,7 +306,7 @@ Event *ResourceExchange::event( const QString &uid )
return event;
}
-void ResourceExchange::subscribeEvents( const QDate &start, const QDate &end )
+void ResourceExchange::subscribeEvents( const TQDate &start, const TQDate &end )
{
kdDebug(5800) << "ResourceExchange::subscribeEvents()" << endl;
// FIXME: possible race condition if several subscribe events are run close
@@ -325,7 +325,7 @@ void ResourceExchange::downloadedEvent( KCal::Event *event, const KURL &url )
}
void ResourceExchange::slotDownloadFinished( int result,
- const QString &moreinfo )
+ const TQString &moreinfo )
{
kdDebug() << "ResourceExchange::downloadFinished" << endl;
@@ -336,7 +336,7 @@ void ResourceExchange::slotDownloadFinished( int result,
}
}
-void ResourceExchange::unsubscribeEvents( const QDate &/*start*/, const QDate &/*end*/ )
+void ResourceExchange::unsubscribeEvents( const TQDate &/*start*/, const TQDate &/*end*/ )
{
kdDebug() << "ResourceExchange::unsubscribeEvents()" << endl;
}
@@ -376,7 +376,7 @@ Todo::List ResourceExchange::rawTodos( TodoSortField /*sortField*/, SortDirectio
return list;*/
}
-Todo *ResourceExchange::todo( const QString &/*uid*/ )
+Todo *ResourceExchange::todo( const TQString &/*uid*/ )
{
// We don't handle todos yet
return 0;
@@ -386,7 +386,7 @@ Todo *ResourceExchange::todo( const QString &/*uid*/ )
return mCache->todo( uid );*/
}
-Todo::List ResourceExchange::rawTodosForDate( const QDate &/*date*/ )
+Todo::List ResourceExchange::rawTodosForDate( const TQDate &/*date*/ )
{
Todo::List list;
// We don't handle todos yet
@@ -395,7 +395,7 @@ Todo::List ResourceExchange::rawTodosForDate( const QDate &/*date*/ )
return list;
}
-Alarm::List ResourceExchange::alarmsTo( const QDateTime &to )
+Alarm::List ResourceExchange::alarmsTo( const TQDateTime &to )
{
Alarm::List list;
if ( mCache )
@@ -404,13 +404,13 @@ Alarm::List ResourceExchange::alarmsTo( const QDateTime &to )
}
/* Invoked by korgac when checking alarms. Always updates the cache. */
-Alarm::List ResourceExchange::alarms( const QDateTime &from, const QDateTime &to )
+Alarm::List ResourceExchange::alarms( const TQDateTime &from, const TQDateTime &to )
{
kdDebug(5800) << "ResourceExchange::alarms(" << from.toString() << " - " << to.toString() << ")\n";
Alarm::List list;
- QDate start = from.date();
- QDate end = to.date();
+ TQDate start = from.date();
+ TQDate end = to.date();
if ( mCache ) {
@@ -453,22 +453,22 @@ void ResourceExchange::insertEvent(const Event *anEvent)
}
*/
-// taking a QDate, this function will look for an eventlist in the dict
+// taking a TQDate, this function will look for an eventlist in the dict
// with that date attached -
-Event::List ResourceExchange::rawEventsForDate( const QDate &qd,
+Event::List ResourceExchange::rawEventsForDate( const TQDate &qd,
EventSortField sortField,
SortDirection sortDirection )
{
if (!mCache) return Event::List();
// If the events for this date are not in the cache, or if they are old,
// get them again
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
// kdDebug() << "Now is " << now.toString() << endl;
// kdDebug() << "mDates: " << mDates << endl;
- QDate start = QDate( qd.year(), qd.month(), 1 ); // First day of month
+ TQDate start = TQDate( qd.year(), qd.month(), 1 ); // First day of month
if ( mDates && ( !mDates->contains( start ) ||
(*mCacheDates)[start].secsTo( now ) > mCachedSeconds ) ) {
- QDate end = start.addMonths( 1 ).addDays( -1 ); // Last day of month
+ TQDate end = start.addMonths( 1 ).addDays( -1 ); // Last day of month
// Get events that occur in this period from the cache
Event::List oldEvents = mCache->rawEvents( start, end, false );
// And remove them all
@@ -509,7 +509,7 @@ Event::List ResourceExchange::rawEventsForDate( const QDate &qd,
}
-Event::List ResourceExchange::rawEvents( const QDate &start, const QDate &end,
+Event::List ResourceExchange::rawEvents( const TQDate &start, const TQDate &end,
bool inclusive )
{
kdDebug() << "ResourceExchange::rawEvents(start,end,inclusive)" << endl;
@@ -517,7 +517,7 @@ Event::List ResourceExchange::rawEvents( const QDate &start, const QDate &end,
return mCache->rawEvents( start, end, inclusive );
}
-Event::List ResourceExchange::rawEventsForDate(const QDateTime &qdt)
+Event::List ResourceExchange::rawEventsForDate(const TQDateTime &qdt)
{
kdDebug() << "ResourceExchange::rawEventsForDate(qdt)" << endl;
return rawEventsForDate( qdt.date() );
@@ -556,7 +556,7 @@ bool ResourceExchange::deleteJournal(Journal */*journal*/)
// setModified( true );
}
-Journal::List ResourceExchange::journals(const QDate &/*date*/)
+Journal::List ResourceExchange::journals(const TQDate &/*date*/)
{
// We don't handle journals yet
return Journal::List();
@@ -566,7 +566,7 @@ Journal::List ResourceExchange::journals(const QDate &/*date*/)
return list;*/
}
-Journal *ResourceExchange::journal(const QString &/*uid*/)
+Journal *ResourceExchange::journal(const TQString &/*uid*/)
{
// We don't handle journals yet
return 0;
@@ -585,7 +585,7 @@ Journal::List ResourceExchange::rawJournals( JournalSortField /*sortField*/, Sor
return list;*/
}
-Journal::List ResourceExchange::rawJournalsForDate( const QDate &/*date*/ )
+Journal::List ResourceExchange::rawJournalsForDate( const TQDate &/*date*/ )
{
// We don't handle journals yet
return Journal::List();
@@ -595,7 +595,7 @@ Journal::List ResourceExchange::rawJournalsForDate( const QDate &/*date*/ )
return list;*/
}
-void ResourceExchange::setTimeZoneId( const QString &tzid )
+void ResourceExchange::setTimeZoneId( const TQString &tzid )
{
mTimeZoneId = tzid;
if ( mCache ) mCache->setTimeZoneId( tzid );
diff --git a/kresources/exchange/resourceexchange.h b/kresources/exchange/resourceexchange.h
index 721e36660..d3492cf00 100644
--- a/kresources/exchange/resourceexchange.h
+++ b/kresources/exchange/resourceexchange.h
@@ -20,9 +20,9 @@
#ifndef KPIM_EXCHANGECALENDAR_H
#define KPIM_EXCHANGECALENDAR_H
-#include <qmap.h>
-#include <qdict.h>
-#include <qintdict.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqintdict.h>
#include <libkcal/calendar.h>
#include <libkcal/calendarlocal.h>
@@ -60,7 +60,7 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
/** constructs a new calendar, with variables initialized to sane values. */
// ExchangeCalendar( KPIM::ExchangeAccount* account );
/** constructs a new calendar, with variables initialized to sane values. */
-// ExchangeCalendar( KPIM::ExchangeAccount* account, const QString &timeZoneId );
+// ExchangeCalendar( KPIM::ExchangeAccount* account, const TQString &timeZoneId );
// virtual ~ExchangeCalendar();
/**
@@ -70,14 +70,14 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
@return true, if successful, false on error.
@param fileName the name of the calendar on disk.
*/
-// bool load( const QString &fileName );
+// bool load( const TQString &fileName );
/**
Writes out the calendar to disk in the specified \a format.
ExchangeCalendar takes ownership of the CalFormat object.
@return true, if successful, false on error.
@param fileName the name of the file
*/
-// bool save( const QString &fileName, CalFormat *format = 0 );
+// bool save( const TQString &fileName, CalFormat *format = 0 );
/** clears out the current calendar, freeing all used memory etc. etc. */
// void close();
@@ -93,7 +93,7 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
/**
Retrieves an event on the basis of the unique string ID.
*/
- Event *event(const QString &UniqueStr);
+ Event *event(const TQString &UniqueStr);
/**
Return filtered list of all events in calendar.
*/
@@ -104,7 +104,7 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
*/
Event::List rawEvents();
- virtual void subscribeEvents( const QDate& start, const QDate& end );
+ virtual void subscribeEvents( const TQDate& start, const TQDate& end );
/**
Stop receiving event signals for the given period (inclusive). After this call,
@@ -113,7 +113,7 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
MAY delete the Events objects. The application MUST NOT dereference pointers
to the relevant Events after this call.
*/
- virtual void unsubscribeEvents( const QDate& start, const QDate& end );
+ virtual void unsubscribeEvents( const TQDate& start, const TQDate& end );
/**
Add a todo to the todolist.
@@ -127,7 +127,7 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
Searches todolist for an event with this unique string identifier,
returns a pointer or null.
*/
- Todo *todo( const QString &uid );
+ Todo *todo( const TQString &uid );
/**
Return list of all todos.
*/
@@ -135,26 +135,26 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
/**
Returns list of todos due on the specified date.
*/
- Todo::List rawTodosForDate( const QDate &date );
+ Todo::List rawTodosForDate( const TQDate &date );
/** Add a Journal entry to calendar */
virtual bool addJournal(Journal *);
/** deletes an event from this calendar. */
virtual bool deleteJournal(Journal *);
/** Return Journals for given date */
- virtual Journal::List journals(const QDate &);
+ virtual Journal::List journals(const TQDate &);
/** Return Journal with given UID */
- virtual Journal *journal(const QString &UID);
+ virtual Journal *journal(const TQString &UID);
/** Return list of all Journals stored in calendar */
Journal::List rawJournals( JournalSortField sortField = JournalSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
/** Return journals for the given date. */
- Journal::List rawJournalsForDate( const QDate & );
+ Journal::List rawJournalsForDate( const TQDate & );
/** Return all alarms, which ocur in the given time interval. */
- Alarm::List alarms( const QDateTime &from, const QDateTime &to );
+ Alarm::List alarms( const TQDateTime &from, const TQDateTime &to );
/** Return all alarms, which ocur before given date. */
- Alarm::List alarmsTo( const QDateTime &to );
+ Alarm::List alarmsTo( const TQDateTime &to );
friend class ResourceExchangeConfig;
@@ -178,19 +178,19 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
date specified. useful for dayView, etc. etc.
*/
Event::List rawEventsForDate(
- const QDate &date,
+ const TQDate &date,
EventSortField sortField=EventSortUnsorted,
SortDirection sortDirection=SortDirectionAscending );
/**
Get unfiltered events for date \a qdt.
*/
- Event::List rawEventsForDate( const QDateTime &qdt );
+ Event::List rawEventsForDate( const TQDateTime &qdt );
/**
Get unfiltered events in a range of dates. If inclusive is set to true,
only events are returned, which are completely included in the range.
*/
- Event::List rawEvents( const QDate &start, const QDate &end,
+ Event::List rawEvents( const TQDate &start, const TQDate &end,
bool inclusive = false );
/**
Get unfiltered events in sorted order.
@@ -206,20 +206,20 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
/** Append alarms of incidence in interval to list of alarms. */
// void appendAlarms( Alarm::List &alarms, Incidence *incidence,
-// const QDateTime &from, const QDateTime &to );
+// const TQDateTime &from, const TQDateTime &to );
/** Append alarms of recurring events in interval to list of alarms. */
// void appendRecurringAlarms( Alarm::List &alarms, Incidence *incidence,
-// const QDateTime &from, const QDateTime &to );
+// const TQDateTime &from, const TQDateTime &to );
bool uploadEvent( Event *event );
- void setTimeZoneId( const QString &tzid );
+ void setTimeZoneId( const TQString &tzid );
protected slots:
- void slotMonitorNotify( const QValueList<long>& IDs, const QValueList<KURL>& urls);
- void slotMonitorError( int errorCode, const QString& moreInfo );
- void slotDownloadFinished( int result, const QString& moreinfo );
+ void slotMonitorNotify( const TQValueList<long>& IDs, const TQValueList<KURL>& urls);
+ void slotMonitorError( int errorCode, const TQString& moreInfo );
+ void slotDownloadFinished( int result, const TQString& moreinfo );
void downloadedEvent( KCal::Event*, const KURL& );
private:
@@ -228,14 +228,14 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
KPIM::ExchangeClient* mClient;
KPIM::ExchangeMonitor* mMonitor;
CalendarLocal* mCache;
- QDict<EventInfo> mEventDict; // maps UIDS to EventInfo records
- QIntDict<EventInfo> mWatchDict; // maps Watch IDs to EventInfo records
+ TQDict<EventInfo> mEventDict; // maps UIDS to EventInfo records
+ TQIntDict<EventInfo> mWatchDict; // maps Watch IDs to EventInfo records
DateSet* mDates;
- QMap<Event, QDateTime>* mEventDates;
- QMap<QDate, QDateTime>* mCacheDates;
+ TQMap<Event, TQDateTime>* mEventDates;
+ TQMap<TQDate, TQDateTime>* mCacheDates;
int mCachedSeconds;
bool mAutoMailbox;
- QString mTimeZoneId;
+ TQString mTimeZoneId;
KABC::Lock *mLock;
diff --git a/kresources/exchange/resourceexchangeconfig.cpp b/kresources/exchange/resourceexchangeconfig.cpp
index e2277fa05..5bb9677b6 100644
--- a/kresources/exchange/resourceexchangeconfig.cpp
+++ b/kresources/exchange/resourceexchangeconfig.cpp
@@ -19,8 +19,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kdebug.h>
@@ -33,48 +33,48 @@
using namespace KCal;
-ResourceExchangeConfig::ResourceExchangeConfig( QWidget* parent, const char* name )
+ResourceExchangeConfig::ResourceExchangeConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
resize( 245, 115 );
- QGridLayout *mainLayout = new QGridLayout( this, 8, 3 );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 8, 3 );
- QLabel *label = new QLabel( i18n( "Host:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Host:" ), this );
mHostEdit = new KLineEdit( this );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mHostEdit, 1, 1 );
- label = new QLabel( i18n( "Port:" ), this );
+ label = new TQLabel( i18n( "Port:" ), this );
mPortEdit = new KLineEdit( this );
mainLayout->addWidget( label, 2, 0 );
mainLayout->addWidget( mPortEdit, 2, 1 );
- label = new QLabel( i18n( "Account:" ), this );
+ label = new TQLabel( i18n( "Account:" ), this );
mAccountEdit = new KLineEdit( this );
mainLayout->addWidget( label, 3, 0 );
mainLayout->addWidget( mAccountEdit, 3, 1 );
- label = new QLabel( i18n( "Password:" ), this );
+ label = new TQLabel( i18n( "Password:" ), this );
mPasswordEdit = new KLineEdit( this );
- mPasswordEdit->setEchoMode( QLineEdit::Password );
+ mPasswordEdit->setEchoMode( TQLineEdit::Password );
mainLayout->addWidget( label, 4, 0 );
mainLayout->addWidget( mPasswordEdit, 4, 1 );
- mAutoMailbox = new QCheckBox( i18n( "Determine mailbox &automatically" ), this );
+ mAutoMailbox = new TQCheckBox( i18n( "Determine mailbox &automatically" ), this );
mainLayout->addMultiCellWidget( mAutoMailbox, 5, 5, 0, 1 );
- connect( mAutoMailbox, SIGNAL(toggled(bool)), this, SLOT(slotToggleAuto(bool)) );
+ connect( mAutoMailbox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggleAuto(bool)) );
mMailboxEdit = new KLineEdit( this );
- mainLayout->addWidget( new QLabel( i18n( "Mailbox URL:" ), this ), 6, 0 );
+ mainLayout->addWidget( new TQLabel( i18n( "Mailbox URL:" ), this ), 6, 0 );
mainLayout->addWidget( mMailboxEdit, 6, 1 );
- mTryFindMailbox = new QPushButton( i18n( "&Find" ), this );
+ mTryFindMailbox = new TQPushButton( i18n( "&Find" ), this );
mainLayout->addWidget( mTryFindMailbox, 6, 2 );
- connect( mTryFindMailbox, SIGNAL(clicked()), this, SLOT(slotFindClicked()) );
+ connect( mTryFindMailbox, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFindClicked()) );
- label = new QLabel( i18n( "Cache timeout:" ), this );
+ label = new TQLabel( i18n( "Cache timeout:" ), this );
mCacheEdit = new KIntNumInput( this );
- connect(mCacheEdit, SIGNAL(valueChanged( int )), SLOT(slotCacheEditChanged( int )));
+ connect(mCacheEdit, TQT_SIGNAL(valueChanged( int )), TQT_SLOT(slotCacheEditChanged( int )));
mCacheEdit->setMinValue( 0 );
mainLayout->addWidget( label, 7, 0 );
mainLayout->addWidget( mCacheEdit, 7, 1 );
@@ -101,7 +101,7 @@ void ResourceExchangeConfig::saveSettings( KRES::Resource *resource )
ResourceExchange* res = dynamic_cast<ResourceExchange*>( resource );
if (res) {
if ( mAutoMailbox->isChecked() ) {
- mMailboxEdit->setText( QString::null );
+ mMailboxEdit->setText( TQString::null );
slotFindClicked();
if ( mMailboxEdit->text().isNull() ) {
kdWarning() << "Could not find Exchange mailbox URL, incomplete settings!" << endl;
@@ -125,7 +125,7 @@ void ResourceExchangeConfig::slotToggleAuto( bool on )
// mTryFindMailbox->setEnabled( ! on );
}
-void ResourceExchangeConfig::slotUserChanged( const QString& /*text*/ )
+void ResourceExchangeConfig::slotUserChanged( const TQString& /*text*/ )
{
// if ( mMailboxEqualsUser->isChecked() ) {
// mMailboxEdit->setText( "webdav://" + mHostEdit->text() + "/exchange/" + text );
@@ -134,7 +134,7 @@ void ResourceExchangeConfig::slotUserChanged( const QString& /*text*/ )
void ResourceExchangeConfig::slotFindClicked()
{
- QString mailbox = KPIM::ExchangeAccount::tryFindMailbox(
+ TQString mailbox = KPIM::ExchangeAccount::tryFindMailbox(
mHostEdit->text(), mPortEdit->text(),
mAccountEdit->text(), mPasswordEdit->text() );
diff --git a/kresources/exchange/resourceexchangeconfig.h b/kresources/exchange/resourceexchangeconfig.h
index 59adf02bc..870317afb 100644
--- a/kresources/exchange/resourceexchangeconfig.h
+++ b/kresources/exchange/resourceexchangeconfig.h
@@ -22,7 +22,7 @@
#ifndef KDEPIM_RESOURCECALENDAREXCHANGECONFIG_H
#define KDEPIM_RESOURCECALENDAREXCHANGECONFIG_H
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kcombobox.h>
#include <kurlrequester.h>
@@ -39,7 +39,7 @@ class ResourceExchangeConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceExchangeConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceExchangeConfig( TQWidget* parent = 0, const char* name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource);
@@ -47,7 +47,7 @@ public slots:
protected slots:
void slotToggleAuto( bool on );
- void slotUserChanged( const QString& text );
+ void slotUserChanged( const TQString& text );
void slotFindClicked();
void slotCacheEditChanged( int value );
@@ -56,9 +56,9 @@ private:
KLineEdit* mPortEdit;
KLineEdit* mAccountEdit;
KLineEdit* mPasswordEdit;
- QCheckBox *mAutoMailbox;
+ TQCheckBox *mAutoMailbox;
KLineEdit* mMailboxEdit;
- QPushButton* mTryFindMailbox;
+ TQPushButton* mTryFindMailbox;
KIntNumInput* mCacheEdit;
};