From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: TQt4 port koffice This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kplato/kptmap.h | 64 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'kplato/kptmap.h') diff --git a/kplato/kptmap.h b/kplato/kptmap.h index 9edae25f..f21612c3 100644 --- a/kplato/kptmap.h +++ b/kplato/kptmap.h @@ -21,11 +21,11 @@ #define KPTMAP_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -36,35 +36,35 @@ namespace Map { enum State { None=0, NonWorking=1, Working=2 }; } // Map namespace -typedef QMap DateMapType; +typedef TQMap DateMapType; class DateMap : public DateMapType { public: DateMap() {} virtual ~DateMap() {} - virtual bool contains(QDate date) const { return DateMapType::contains(date.toString(Qt::ISODate)); } + virtual bool tqcontains(TQDate date) const { return DateMapType::tqcontains(date.toString(Qt::ISODate)); } - void insert(QString date, int state=Map::NonWorking) { + void insert(TQString date, int state=Map::NonWorking) { //kdDebug()< IntMapType; +typedef TQMap IntMapType; class IntMap : public IntMapType { public: @@ -105,7 +105,7 @@ public: IntMapType::insert(key, state); } virtual int state(int key) { - IntMapType::iterator it = IntMapType::find(key); + IntMapType::iterator it = IntMapType::tqfind(key); if (it == IntMapType::end()) return 0; else return it.data(); } @@ -118,9 +118,9 @@ public: } // boolean use - void toggle(int key, int state=Map::NonWorking) { IntMapType::contains(key) ? remove(key) : insert(key, state); } + void toggle(int key, int state=Map::NonWorking) { IntMapType::tqcontains(key) ? remove(key) : insert(key, state); } void toggleClear(int key, int state=Map::NonWorking) { - bool s =contains(key); + bool s =tqcontains(key); clear(); if (!s) insert(key, state); } @@ -129,29 +129,29 @@ public: class WeekMap : public IntMap { public: - bool contains(int week, int year) { return IntMap::contains(week*10000 + year); } - bool contains(QPair week) { return contains(week.first, week.second); } + bool tqcontains(int week, int year) { return IntMap::tqcontains(week*10000 + year); } + bool tqcontains(TQPair week) { return tqcontains(week.first, week.second); } void insert(int week, int year, int state=Map::NonWorking) { if (week < 1 || week > 53) { kdError()< week, int state=Map::NonWorking) { insert(week.first, week.second, state); } + void insert(TQPair week, int state=Map::NonWorking) { insert(week.first, week.second, state); } void insert(WeekMap::iterator it, int state) { insert(week(it.key()), state); } - void remove(QPair week) { IntMap::remove(week.first*10000 + week.second); } + void remove(TQPair week) { IntMap::remove(week.first*10000 + week.second); } - static QPair week(int key) { return QPair(key/10000, key%10000); } + static TQPair week(int key) { return TQPair(key/10000, key%10000); } - int state(QPair week) { return IntMap::state(week.first*10000 + week.second); } - int state(int week, int year) { return state(QPair(week, year)); } + int state(TQPair week) { return IntMap::state(week.first*10000 + week.second); } + int state(int week, int year) { return state(TQPair(week, year)); } - void toggle(QPair week, int state=Map::NonWorking) { + void toggle(TQPair week, int state=Map::NonWorking) { if (week.first < 1 || week.first > 53) { kdError()< week, int state=Map::NonWorking) { + void toggleClear(TQPair week, int state=Map::NonWorking) { if (week.first < 1 || week.first > 53) { kdError()<