diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kresources/exchange/dateset.h | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-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/dateset.h')
-rw-r--r-- | kresources/exchange/dateset.h | 46 |
1 files changed, 23 insertions, 23 deletions
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 |