summaryrefslogtreecommitdiffstats
path: root/kplato/kptnode.h
diff options
context:
space:
mode:
Diffstat (limited to 'kplato/kptnode.h')
-rw-r--r--kplato/kptnode.h164
1 files changed, 82 insertions, 82 deletions
diff --git a/kplato/kptnode.h b/kplato/kptnode.h
index 65623028..d6a6bbef 100644
--- a/kplato/kptnode.h
+++ b/kplato/kptnode.h
@@ -26,15 +26,15 @@
#include "kptdatetime.h"
#include "kptschedule.h"
-#include <qintdict.h>
-#include <qrect.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qcanvas.h>
+#include <tqintdict.h>
+#include <tqrect.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqcanvas.h>
#include <vector>
-class QDomElement;
+class TQDomElement;
namespace KPlato
{
@@ -59,15 +59,15 @@ class Node {
public:
enum ConstraintType { ASAP, ALAP, MustStartOn, MustFinishOn, StartNotEarlier, FinishNotLater, FixedInterval };
- Node(Node *parent = 0);
- Node(Node &node, Node *parent = 0);
+ Node(Node *tqparent = 0);
+ Node(Node &node, Node *tqparent = 0);
// Declare the class abstract
virtual ~Node() = 0;
- bool setId(QString id);
- QString id() const { return m_id; } // unique identity
+ bool setId(TQString id);
+ TQString id() const { return m_id; } // unique identity
enum NodeTypes {
Type_Node = 0,
@@ -88,11 +88,11 @@ public:
virtual Node *projectNode();
// The load and save methods
- virtual bool load(QDomElement &) { return true; }
- virtual bool load(QDomElement &, Project &) { return true; }
- virtual void save(QDomElement &element) const = 0;
- /// Save my and my childrens relations.
- virtual void saveRelations(QDomElement &element) const;
+ virtual bool load(TQDomElement &) { return true; }
+ virtual bool load(TQDomElement &, Project &) { return true; }
+ virtual void save(TQDomElement &element) const = 0;
+ /// Save my and my tqchildrens relations.
+ virtual void saveRelations(TQDomElement &element) const;
// simple child node management
// Child nodes are things like subtasks, basically a task can exists of
@@ -100,7 +100,7 @@ public:
// 2) cutting 3) building 4) painting.
Node *getParent() const { return m_parent; }
void setParent( Node* newParent ) { m_parent = newParent;}
- const QPtrList<Node> &childNodeIterator() const { return m_nodes; }
+ const TQPtrList<Node> &childNodeIterator() const { return m_nodes; }
int numChildren() const { return m_nodes.count(); }
virtual void addChildNode(Node *node, Node *after=0);
virtual void insertChildNode(unsigned int index, Node *node);
@@ -131,7 +131,7 @@ public:
Relation *getDependChildNode( int number) {
return m_dependChildNodes.at(number);
}
- QPtrList<Relation> &dependChildNodes() { return m_dependChildNodes; }
+ TQPtrList<Relation> &dependChildNodes() { return m_dependChildNodes; }
/**
* Takes the relation rel from this node only.
@@ -154,7 +154,7 @@ public:
Relation *getDependParentNode( int number) {
return m_dependParentNodes.at(number);
}
- QPtrList<Relation> &dependParentNodes() { return m_dependParentNodes; }
+ TQPtrList<Relation> &dependParentNodes() { return m_dependParentNodes; }
/**
* Takes the relation rel from this node only.
@@ -173,12 +173,12 @@ public:
/// Return the scheduled start time
virtual DateTime startTime() const
{ return m_currentSchedule ? m_currentSchedule->startTime : DateTime(); }
- const QDate &startDate() const { return m_dateOnlyStartDate; }
+ const TQDate &startDate() const { return m_dateOnlyStartDate; }
void setEndTime(DateTime endTime);
/// Return the scheduled end time
virtual DateTime endTime() const
{ return m_currentSchedule ? m_currentSchedule->endTime : DateTime(); }
- const QDate &endDate() const { return m_dateOnlyEndDate; }
+ const TQDate &endDate() const { return m_dateOnlyEndDate; }
void setEffort(Effort* e) { m_effort = e; }
Effort* effort() const { return m_effort; }
@@ -228,23 +228,23 @@ public:
void setLatestFinish(const DateTime &dt)
{ if (m_currentSchedule) m_currentSchedule->latestFinish = dt; }
- QString &name() { return m_name; }
- QString &leader() { return m_leader; }
- QString &description() { return m_description; }
- const QString &name() const { return m_name; }
- const QString &leader() const { return m_leader; }
- const QString &description() const { return m_description; }
- void setName(const QString &n) { m_name = n; }
- void setLeader(const QString &l) { m_leader = l; }
- void setDescription(const QString &d) { m_description = d; }
+ TQString &name() { return m_name; }
+ TQString &leader() { return m_leader; }
+ TQString &description() { return m_description; }
+ const TQString &name() const { return m_name; }
+ const TQString &leader() const { return m_leader; }
+ const TQString &description() const { return m_description; }
+ void setName(const TQString &n) { m_name = n; }
+ void setLeader(const TQString &l) { m_leader = l; }
+ void setDescription(const TQString &d) { m_description = d; }
virtual void setConstraint(Node::ConstraintType type) { m_constraint = type; }
- void setConstraint(QString &type);
+ void setConstraint(TQString &type);
int constraint() const { return m_constraint; }
- QString constraintToString() const;
+ TQString constraintToString() const;
- virtual void setConstraintStartTime(QDateTime time) { m_constraintStartTime = time; }
- virtual void setConstraintEndTime(QDateTime time) { m_constraintEndTime = time; }
+ virtual void setConstraintStartTime(TQDateTime time) { m_constraintStartTime = time; }
+ virtual void setConstraintEndTime(TQDateTime time) { m_constraintEndTime = time; }
virtual DateTime constraintStartTime() const { return m_constraintStartTime; }
virtual DateTime constraintEndTime() const { return m_constraintEndTime; }
@@ -263,7 +263,7 @@ public:
virtual bool resourceOverbooked() const
{ return m_currentSchedule ? m_currentSchedule->resourceOverbooked : false; }
/// Return a list of overbooked resources
- virtual QStringList overbookedResources() const;
+ virtual TQStringList overbookedResources() const;
/// Calculates if the assigned resource is overbooked
/// within the duration of this node
virtual void calcResourceOverbooked();
@@ -277,21 +277,21 @@ public:
bool notScheduled() const
{ return m_currentSchedule == 0 || m_currentSchedule->isDeleted() || m_currentSchedule->notScheduled; }
- virtual EffortCostMap plannedEffortCostPrDay(const QDate &start, const QDate &end) const=0;
+ virtual EffortCostMap plannedEffortCostPrDay(const TQDate &start, const TQDate &end) const=0;
/// Returns the total planned effort for this task (or subtasks)
virtual Duration plannedEffort() { return Duration::zeroDuration; }
/// Returns the total planned effort for this task (or subtasks) on date
- virtual Duration plannedEffort(const QDate &) { return Duration::zeroDuration; }
+ virtual Duration plannedEffort(const TQDate &) { return Duration::zeroDuration; }
/// Returns the planned effort up to and including date
- virtual Duration plannedEffortTo(const QDate &) { return Duration::zeroDuration; }
+ virtual Duration plannedEffortTo(const TQDate &) { return Duration::zeroDuration; }
/// Returns the total actual effort for this task (or subtasks)
virtual Duration actualEffort() { return Duration::zeroDuration; }
/// Returns the total actual effort for this task (or subtasks) on date
- virtual Duration actualEffort(const QDate &/*date*/) { return Duration::zeroDuration; }
+ virtual Duration actualEffort(const TQDate &/*date*/) { return Duration::zeroDuration; }
/// Returns the total actual effort for this task (or subtasks) up to and including date
- virtual Duration actualEffortTo(const QDate &/*date*/) { return Duration::zeroDuration; }
+ virtual Duration actualEffortTo(const TQDate &/*date*/) { return Duration::zeroDuration; }
/**
* Planned cost is the sum total of all resources and other costs
@@ -300,28 +300,28 @@ public:
virtual double plannedCost() { return 0; }
/// Planned cost on date
- virtual double plannedCost(const QDate &/*date*/) { return 0; }
+ virtual double plannedCost(const TQDate &/*date*/) { return 0; }
/**
* Planned cost from start of activity up to and including date
* is the sum of all resource costs and other costs planned for this node.
*/
- virtual double plannedCostTo(const QDate &/*date*/) { return 0; }
+ virtual double plannedCostTo(const TQDate &/*date*/) { return 0; }
/**
* Actual cost is the sum total of the reported costs actually used
* for this node.
*/
virtual double actualCost() { return 0; }
/// Actual cost on date
- virtual double actualCost(const QDate &/*date*/) { return 0; }
+ virtual double actualCost(const TQDate &/*date*/) { return 0; }
/// Actual cost up to and including date
- virtual double actualCostTo(const QDate &/*date*/) { return 0; }
+ virtual double actualCostTo(const TQDate &/*date*/) { return 0; }
/// Effort based performance index
- double effortPerformanceIndex(const QDate &/*date*/, bool */*error=0*/) { return 0.0; }
+ double effortPerformanceIndex(const TQDate &/*date*/, bool */*error=0*/) { return 0.0; }
/// Cost performance index
- double costPerformanceIndex(const QDate &/*date*/, bool */*error=0*/) { return 0.0; }
+ double costPerformanceIndex(const TQDate &/*date*/, bool */*error=0*/) { return 0.0; }
- virtual void initiateCalculationLists(QPtrList<Node> &startnodes, QPtrList<Node> &endnodes, QPtrList<Node> &summarytasks) = 0;
+ virtual void initiateCalculationLists(TQPtrList<Node> &startnodes, TQPtrList<Node> &endnodes, TQPtrList<Node> &summarytasks) = 0;
virtual DateTime calculateForward(int /*use*/) = 0;
virtual DateTime calculateBackward(int /*use*/) = 0;
virtual DateTime scheduleForward(const DateTime &, int /*use*/) = 0;
@@ -374,18 +374,18 @@ public:
virtual bool legalToLink(Node *, Node *) { return false; }
/// Check if this node has any dependent child nodes
virtual bool isEndNode() const;
- /// Check if this node has any dependent parent nodes
+ /// Check if this node has any dependent tqparent nodes
virtual bool isStartNode() const;
virtual void clearProxyRelations() {}
- virtual void addParentProxyRelations(QPtrList<Relation> &) {}
- virtual void addChildProxyRelations(QPtrList<Relation> &) {}
+ virtual void addParentProxyRelations(TQPtrList<Relation> &) {}
+ virtual void addChildProxyRelations(TQPtrList<Relation> &) {}
virtual void addParentProxyRelation(Node *, const Relation *) {}
virtual void addChildProxyRelation(Node *, const Relation *) {}
/// Save appointments for schedule with id
- virtual void saveAppointments(QDomElement &element, long id) const;
+ virtual void saveAppointments(TQDomElement &element, long id) const;
///Return the list of appointments for current schedule.
- QPtrList<Appointment> appointments();
+ TQPtrList<Appointment> appointments();
/// Return appointment this node have with resource
// Appointment *findAppointment(Resource *resource);
/// Adds appointment to this node only (not to resource)
@@ -398,17 +398,17 @@ public:
/// Find the node with my id
virtual Node *findNode() const { return findNode(m_id); }
/// Find the node with identity id
- virtual Node *findNode(const QString &id) const
+ virtual Node *findNode(const TQString &id) const
{ return (m_parent ? m_parent->findNode(id) : 0); }
/// Remove myself from the id register
virtual bool removeId() { return removeId(m_id); }
/// Remove the registered identity id
- virtual bool removeId(const QString &id)
+ virtual bool removeId(const TQString &id)
{ return (m_parent ? m_parent->removeId(id) : false); }
/// Insert myself into the id register
- virtual void insertId(const QString &id) { insertId(id, this); }
+ virtual void insertId(const TQString &id) { insertId(id, this); }
/// Insert node with identity id into the register
- virtual void insertId(const QString &id, const Node *node)
+ virtual void insertId(const TQString &id, const Node *node)
{ if (m_parent) m_parent->insertId(id, node); }
/**
@@ -439,8 +439,8 @@ public:
/// Returns the level this node is in the hierarchy. Top node is level 0.
virtual int level();
/// Generate WBS
- virtual void generateWBS(int count, WBSDefinition &def, QString wbs=QString());
- QString wbs() const { return m_wbs; }
+ virtual void generateWBS(int count, WBSDefinition &def, TQString wbs=TQString());
+ TQString wbs() const { return m_wbs; }
double startupCost() const { return m_startupCost; }
void setStartupCost(double cost) { m_startupCost = cost; }
@@ -458,14 +458,14 @@ public:
void setRunningAccount(Account *acc) { m_runningAccount = acc; }
Schedule *currentSchedule() const { return m_currentSchedule; }
- /// Set current schedule to schedule with identity id, for me and my children
+ /// Set current schedule to schedule with identity id, for me and my tqchildren
virtual void setCurrentSchedule(long id);
// NOTE: Cannot use setCurrentSchedule() due to overload/casting problems
void setCurrentSchedulePtr(Schedule *schedule) { m_currentSchedule = schedule; }
- QIntDict<Schedule> &schedules() { return m_schedules; }
+ TQIntDict<Schedule> &schedules() { return m_schedules; }
/// Find schedule matching name and type. Does not return deleted schedule.
- Schedule *findSchedule(const QString name, const Schedule::Type type) const;
+ Schedule *findSchedule(const TQString name, const Schedule::Type type) const;
/// Find schedule matching type. Does not return deleted schedule.
Schedule *findSchedule(const Schedule::Type type) const;
/// Find schedule matching id. Also returns deleted schedule.
@@ -475,13 +475,13 @@ public:
/// Add schedule to list, replace if schedule with same id allready exists.
void addSchedule(Schedule *schedule);
/// Create a new schedule.
- Schedule *createSchedule(QString name, Schedule::Type type, long id);
+ Schedule *createSchedule(TQString name, Schedule::Type type, long id);
/// Create a new schedule.
- Schedule *createSchedule(Schedule *parent);
+ Schedule *createSchedule(Schedule *tqparent);
/// Set deleted = onoff for schedule with id
void setScheduleDeleted(long id, bool onoff);
- /// Set parent schedule recursivly
+ /// Set tqparent schedule recursivly
virtual void setParentSchedule(Schedule *sch);
DateTime startTime()
@@ -490,15 +490,15 @@ public:
{ return m_currentSchedule ? m_currentSchedule->endTime : DateTime(); }
protected:
- QPtrList<Node> m_nodes;
- QPtrList<Relation> m_dependChildNodes;
- QPtrList<Relation> m_dependParentNodes;
+ TQPtrList<Node> m_nodes;
+ TQPtrList<Relation> m_dependChildNodes;
+ TQPtrList<Relation> m_dependParentNodes;
Node *m_parent;
- QString m_id; // unique id
- QString m_name; // Name of this node
- QString m_leader; // Person or group responsible for this node
- QString m_description; // Description of this node
+ TQString m_id; // unique id
+ TQString m_name; // Name of this node
+ TQString m_leader; // Person or group responsible for this node
+ TQString m_description; // Description of this node
Effort* m_effort;
@@ -521,14 +521,14 @@ protected:
Duration m_durationForward;
Duration m_durationBackward;
- QDate m_dateOnlyStartDate;
- QDate m_dateOnlyEndDate;
+ TQDate m_dateOnlyStartDate;
+ TQDate m_dateOnlyEndDate;
Duration m_dateOnlyDuration;
- QIntDict<Schedule> m_schedules;
+ TQIntDict<Schedule> m_schedules;
Schedule *m_currentSchedule;
- QString m_wbs;
+ TQString m_wbs;
double m_startupCost;
Account *m_startupAccount;
@@ -541,7 +541,7 @@ private:
#ifndef NDEBUG
public:
- virtual void printDebug(bool children, QCString indent);
+ virtual void printDebug(bool tqchildren, TQCString indent);
#endif
};
@@ -568,14 +568,14 @@ public:
};
Type type() const { return m_type; }
void setType(Type type) { m_type = type; }
- void setType(QString type);
- QString typeToString() const;
+ void setType(TQString type);
+ TQString typeToString() const;
enum Risktype { Risk_None, Risk_Low, Risk_High };
Risktype risktype() const { return m_risktype; }
void setRisktype(Risktype type) { m_risktype = type; }
- void setRisktype(QString type);
- QString risktypeToString() const;
+ void setRisktype(TQString type);
+ TQString risktypeToString() const;
enum Use { Use_Expected=0, Use_Optimistic=1, Use_Pessimistic=2 };
Duration effort(int use) const;
@@ -588,8 +588,8 @@ public:
void set(unsigned days, unsigned hours, unsigned minutes);
void expectedEffort(unsigned *days, unsigned *hours, unsigned *minutes);
- bool load(QDomElement &element);
- void save(QDomElement &element) const;
+ bool load(TQDomElement &element);
+ void save(TQDomElement &element) const;
/**
* Set the optimistic duration
@@ -632,7 +632,7 @@ private:
#ifndef NDEBUG
public:
- void printDebug(QCString indent);
+ void printDebug(TQCString indent);
#endif
};