summaryrefslogtreecommitdiffstats
path: root/kplato/kpteffortcostmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'kplato/kpteffortcostmap.h')
-rw-r--r--kplato/kpteffortcostmap.h28
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;