summaryrefslogtreecommitdiffstats
path: root/kresources/exchange/dateset.h
diff options
context:
space:
mode:
Diffstat (limited to 'kresources/exchange/dateset.h')
-rw-r--r--kresources/exchange/dateset.h46
1 files changed, 23 insertions, 23 deletions
diff --git a/kresources/exchange/dateset.h b/kresources/exchange/dateset.h
index 5041f0d5..989d774c 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