diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kplato/kpteffortcostmap.h | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
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
Diffstat (limited to 'kplato/kpteffortcostmap.h')
-rw-r--r-- | kplato/kpteffortcostmap.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/kplato/kpteffortcostmap.h b/kplato/kpteffortcostmap.h index 7317d400..7910adb5 100644 --- a/kplato/kpteffortcostmap.h +++ b/kplato/kpteffortcostmap.h @@ -20,8 +20,8 @@ #ifndef KPTEFFORTCOST_H #define KPTEFFORTCOST_H -#include <qdatetime.h> -#include <qmap.h> +#include <tqdatetime.h> +#include <tqmap.h> #include "kptduration.h" @@ -60,7 +60,7 @@ private: Duration m_effort; double m_cost; }; -typedef QMap<QDate, EffortCost> EffortCostDayMap; +typedef TQMap<TQDate, EffortCost> EffortCostDayMap; class EffortCostMap { public: @@ -73,18 +73,18 @@ public: m_days.clear(); } - EffortCost effortCost(const QDate &date) const { + EffortCost effortCost(const TQDate &date) const { EffortCost ec; if (!date.isValid()) { kdError()<<k_funcinfo<<"Date not valid"<<endl; return ec; } - EffortCostDayMap::const_iterator it = m_days.find(date); + EffortCostDayMap::const_iterator it = m_days.tqfind(date); if (it != m_days.end()) ec = it.data(); return ec; } - void insert(const QDate &date, const Duration &effort, const double cost) { + void insert(const TQDate &date, const Duration &effort, const double cost) { if (!date.isValid()) { kdError()<<k_funcinfo<<"Date not valid"<<endl; return; @@ -95,14 +95,14 @@ public: * If data for this date allready exists add the new values to the old, * else the new values are inserted. */ - EffortCost &add(const QDate &date, const Duration &effort, const double cost) { + EffortCost &add(const TQDate &date, const Duration &effort, const double cost) { return add(date, EffortCost(effort, cost)); } /** * If data for this date allready exists add the new values to the old, * else the new value is inserted. */ - EffortCost &add(const QDate &date, const EffortCost &ec) { + EffortCost &add(const TQDate &date, const EffortCost &ec) { if (!date.isValid()) { kdError()<<k_funcinfo<<"Date not valid"<<endl; return zero(); @@ -132,33 +132,33 @@ public: } return *this; } - EffortCost &effortCostOnDate(const QDate &date) { + EffortCost &effortCostOnDate(const TQDate &date) { return m_days[date]; } /// Return total cost for the next num days starting at date - double cost(const QDate &date, int num=7) { + double cost(const TQDate &date, int num=7) { double r=0.0; for (int i=0; i < num; ++i) { r += costOnDate(date.addDays(i)); } return r; } - double costOnDate(const QDate &date) const { + double costOnDate(const TQDate &date) const { if (!date.isValid()) { kdError()<<k_funcinfo<<"Date not valid"<<endl; return 0.0; } - if (m_days.contains(date)) { + if (m_days.tqcontains(date)) { return m_days[date].cost(); } return 0.0; } - Duration effortOnDate(const QDate &date) const { + Duration effortOnDate(const TQDate &date) const { if (!date.isValid()) { kdError()<<k_funcinfo<<"Date not valid"<<endl; return Duration::zeroDuration; } - if (m_days.contains(date)) { + if (m_days.tqcontains(date)) { return m_days[date].effort(); } return Duration::zeroDuration; |