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/kptcommand.cc | 340 +++++++++++++++++++++++++-------------------------- 1 file changed, 170 insertions(+), 170 deletions(-) (limited to 'kplato/kptcommand.cc') diff --git a/kplato/kptcommand.cc b/kplato/kptcommand.cc index 043dc776..96efa2f7 100644 --- a/kplato/kptcommand.cc +++ b/kplato/kptcommand.cc @@ -30,8 +30,8 @@ #include #include -#include -#include +#include +#include namespace KPlato { @@ -42,28 +42,28 @@ void NamedCommand::setCommandType(int type) { } void NamedCommand::setSchDeleted() { - QMap::Iterator it; + TQMap::Iterator it; for (it = m_schedules.begin(); it != m_schedules.end(); ++it) { kdDebug()<id()<<": "<setDeleted(it.data()); } } void NamedCommand::setSchDeleted(bool state) { - QMap::Iterator it; + TQMap::Iterator it; for (it = m_schedules.begin(); it != m_schedules.end(); ++it) { kdDebug()<id()<<": "<setDeleted(state); } } void NamedCommand::setSchScheduled() { -QMap::Iterator it; +TQMap::Iterator it; for (it = m_schedules.begin(); it != m_schedules.end(); ++it) { kdDebug()<id()<<": "<setScheduled(it.data()); } } void NamedCommand::setSchScheduled(bool state) { - QMap::Iterator it; + TQMap::Iterator it; for (it = m_schedules.begin(); it != m_schedules.end(); ++it) { kdDebug()<id()<<": "<setScheduled(state); @@ -72,7 +72,7 @@ void NamedCommand::setSchScheduled(bool state) { void NamedCommand::addSchScheduled(Schedule *sch) { kdDebug()<id()<<": "<isScheduled()<isScheduled()); - QPtrListIterator it = sch->appointments(); + TQPtrListIterator it = sch->appointments(); for (; it.current(); ++it) { if (it.current()->node() == sch) { m_schedules.insert(it.current()->resource(), it.current()->resource()->isScheduled()); @@ -84,7 +84,7 @@ void NamedCommand::addSchScheduled(Schedule *sch) { void NamedCommand::addSchDeleted(Schedule *sch) { kdDebug()<id()<<": "<isDeleted()<isDeleted()); - QPtrListIterator it = sch->appointments(); + TQPtrListIterator it = sch->appointments(); for (; it.current(); ++it) { if (it.current()->node() == sch) { m_schedules.insert(it.current()->resource(), it.current()->resource()->isDeleted()); @@ -95,7 +95,7 @@ void NamedCommand::addSchDeleted(Schedule *sch) { } //------------------------------------------------- -CalendarAddCmd::CalendarAddCmd(Part *part, Project *project,Calendar *cal, QString name) +CalendarAddCmd::CalendarAddCmd(Part *part, Project *project,Calendar *cal, TQString name) : NamedCommand(part, name), m_project(project), m_cal(cal), @@ -122,13 +122,13 @@ void CalendarAddCmd::unexecute() { //kdDebug()<name()< it = part->getProject().schedules(); + TQIntDictIterator it = part->getProject().schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -147,7 +147,7 @@ void CalendarDeleteCmd::unexecute() { setCommandType(0); } -CalendarModifyNameCmd::CalendarModifyNameCmd(Part *part, Calendar *cal, QString newvalue, QString name) +CalendarModifyNameCmd::CalendarModifyNameCmd(Part *part, Calendar *cal, TQString newvalue, TQString name) : NamedCommand(part, name), m_cal(cal) { @@ -166,16 +166,16 @@ void CalendarModifyNameCmd::unexecute() { //kdDebug()<name()<parent(); + m_oldvalue = cal->tqparent(); m_newvalue = newvalue; //kdDebug()<name()< it = part->getProject().schedules(); + TQIntDictIterator it = part->getProject().schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -192,7 +192,7 @@ void CalendarModifyParentCmd::unexecute() { setCommandType(1); } -CalendarAddDayCmd::CalendarAddDayCmd(Part *part, Calendar *cal, CalendarDay *newvalue, QString name) +CalendarAddDayCmd::CalendarAddDayCmd(Part *part, Calendar *cal, CalendarDay *newvalue, TQString name) : NamedCommand(part, name), m_cal(cal), m_mine(true) { @@ -201,7 +201,7 @@ CalendarAddDayCmd::CalendarAddDayCmd(Part *part, Calendar *cal, CalendarDay *new //kdDebug()<name()< it = part->getProject().schedules(); + TQIntDictIterator it = part->getProject().schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -227,7 +227,7 @@ void CalendarAddDayCmd::unexecute() { setCommandType(1); } -CalendarRemoveDayCmd::CalendarRemoveDayCmd(Part *part, Calendar *cal, const QDate &day, QString name) +CalendarRemoveDayCmd::CalendarRemoveDayCmd(Part *part, Calendar *cal, const TQDate &day, TQString name) : NamedCommand(part, name), m_cal(cal), m_mine(false) { @@ -236,7 +236,7 @@ CalendarRemoveDayCmd::CalendarRemoveDayCmd(Part *part, Calendar *cal, const QDat //kdDebug()<name()< it = part->getProject().schedules(); + TQIntDictIterator it = part->getProject().schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -257,7 +257,7 @@ void CalendarRemoveDayCmd::unexecute() { setCommandType(1); } -CalendarModifyDayCmd::CalendarModifyDayCmd(Part *part, Calendar *cal, CalendarDay *value, QString name) +CalendarModifyDayCmd::CalendarModifyDayCmd(Part *part, Calendar *cal, CalendarDay *value, TQString name) : NamedCommand(part, name), m_cal(cal), m_mine(true) { @@ -267,7 +267,7 @@ CalendarModifyDayCmd::CalendarModifyDayCmd(Part *part, Calendar *cal, CalendarDa //kdDebug()<name()<<" old:("< it = part->getProject().schedules(); + TQIntDictIterator it = part->getProject().schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -298,7 +298,7 @@ void CalendarModifyDayCmd::unexecute() { setCommandType(1); } -CalendarModifyWeekdayCmd::CalendarModifyWeekdayCmd(Part *part, Calendar *cal, int weekday, CalendarDay *value, QString name) +CalendarModifyWeekdayCmd::CalendarModifyWeekdayCmd(Part *part, Calendar *cal, int weekday, CalendarDay *value, TQString name) : NamedCommand(part, name), m_weekday(weekday), m_cal(cal), @@ -308,7 +308,7 @@ CalendarModifyWeekdayCmd::CalendarModifyWeekdayCmd(Part *part, Calendar *cal, in kdDebug()<name()<<" ("< it = part->getProject().schedules(); + TQIntDictIterator it = part->getProject().schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -320,17 +320,17 @@ CalendarModifyWeekdayCmd::~CalendarModifyWeekdayCmd() { } void CalendarModifyWeekdayCmd::execute() { - m_value = m_cal->weekdays()->replace(m_weekday, m_value); + m_value = m_cal->weekdays()->tqreplace(m_weekday, m_value); setSchScheduled(false); setCommandType(1); } void CalendarModifyWeekdayCmd::unexecute() { - m_value = m_cal->weekdays()->replace(m_weekday, m_value); + m_value = m_cal->weekdays()->tqreplace(m_weekday, m_value); setSchScheduled(); setCommandType(1); } -NodeDeleteCmd::NodeDeleteCmd(Part *part, Node *node, QString name) +NodeDeleteCmd::NodeDeleteCmd(Part *part, Node *node, TQString name) : NamedCommand(part, name), m_node(node), m_index(-1) { @@ -343,11 +343,11 @@ NodeDeleteCmd::NodeDeleteCmd(Part *part, Node *node, QString name) m_project = static_cast(node->projectNode()); if (m_project) { - QIntDictIterator it = m_project->schedules(); + TQIntDictIterator it = m_project->schedules(); for (; it.current(); ++it) { Schedule *s = node->findSchedule(it.current()->id()); if (s && s->isScheduled()) { - // Only invalidate schedules this node is part of + // Only tqinvalidate schedules this node is part of addSchScheduled(it.current()); } } @@ -360,7 +360,7 @@ NodeDeleteCmd::~NodeDeleteCmd() { void NodeDeleteCmd::execute() { if (m_parent && m_project) { //kdDebug()<name()<<" "< it = m_node->appointments(); + TQPtrListIterator it = m_node->appointments(); for (; it.current(); ++it) { it.current()->detach(); m_appointments.append(it.current()); @@ -385,7 +385,7 @@ void NodeDeleteCmd::unexecute() { } } -TaskAddCmd::TaskAddCmd(Part *part, Project *project, Node *node, Node *after, QString name) +TaskAddCmd::TaskAddCmd(Part *part, Project *project, Node *node, Node *after, TQString name) : NamedCommand(part, name), m_project(project), m_node(node), @@ -428,15 +428,15 @@ void TaskAddCmd::unexecute() { setCommandType(1); } -SubtaskAddCmd::SubtaskAddCmd(Part *part, Project *project, Node *node, Node *parent, QString name) +SubtaskAddCmd::SubtaskAddCmd(Part *part, Project *project, Node *node, Node *tqparent, TQString name) : NamedCommand(part, name), m_project(project), m_node(node), - m_parent(parent), + m_parent(tqparent), m_added(false) { // set some reasonable defaults for normally calculated values - node->setStartTime(parent->startTime()); + node->setStartTime(tqparent->startTime()); node->setEndTime(node->startTime() + node->duration()); node->setEarliestStart(node->startTime()); node->setLatestFinish(node->endTime()); @@ -460,7 +460,7 @@ void SubtaskAddCmd::unexecute() { setCommandType(1); } -NodeModifyNameCmd::NodeModifyNameCmd(Part *part, Node &node, QString nodename, QString name) +NodeModifyNameCmd::NodeModifyNameCmd(Part *part, Node &node, TQString nodename, TQString name) : NamedCommand(part, name), m_node(node), newName(nodename), @@ -478,7 +478,7 @@ void NodeModifyNameCmd::unexecute() { setCommandType(0); } -NodeModifyLeaderCmd::NodeModifyLeaderCmd(Part *part, Node &node, QString leader, QString name) +NodeModifyLeaderCmd::NodeModifyLeaderCmd(Part *part, Node &node, TQString leader, TQString name) : NamedCommand(part, name), m_node(node), newLeader(leader), @@ -496,7 +496,7 @@ void NodeModifyLeaderCmd::unexecute() { setCommandType(0); } -NodeModifyDescriptionCmd::NodeModifyDescriptionCmd(Part *part, Node &node, QString description, QString name) +NodeModifyDescriptionCmd::NodeModifyDescriptionCmd(Part *part, Node &node, TQString description, TQString name) : NamedCommand(part, name), m_node(node), newDescription(description), @@ -514,13 +514,13 @@ void NodeModifyDescriptionCmd::unexecute() { setCommandType(0); } -NodeModifyConstraintCmd::NodeModifyConstraintCmd(Part *part, Node &node, Node::ConstraintType c, QString name) +NodeModifyConstraintCmd::NodeModifyConstraintCmd(Part *part, Node &node, Node::ConstraintType c, TQString name) : NamedCommand(part, name), m_node(node), newConstraint(c), oldConstraint(static_cast(node.constraint())) { - QIntDictIterator it = node.schedules(); + TQIntDictIterator it = node.schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -536,13 +536,13 @@ void NodeModifyConstraintCmd::unexecute() { setCommandType(1); } -NodeModifyConstraintStartTimeCmd::NodeModifyConstraintStartTimeCmd(Part *part, Node &node, QDateTime dt, QString name) +NodeModifyConstraintStartTimeCmd::NodeModifyConstraintStartTimeCmd(Part *part, Node &node, TQDateTime dt, TQString name) : NamedCommand(part, name), m_node(node), newTime(dt), oldTime(node.constraintStartTime()) { - QIntDictIterator it = node.schedules(); + TQIntDictIterator it = node.schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -558,13 +558,13 @@ void NodeModifyConstraintStartTimeCmd::unexecute() { setCommandType(1); } -NodeModifyConstraintEndTimeCmd::NodeModifyConstraintEndTimeCmd(Part *part, Node &node, QDateTime dt, QString name) +NodeModifyConstraintEndTimeCmd::NodeModifyConstraintEndTimeCmd(Part *part, Node &node, TQDateTime dt, TQString name) : NamedCommand(part, name), m_node(node), newTime(dt), oldTime(node.constraintEndTime()) { - QIntDictIterator it = node.schedules(); + TQIntDictIterator it = node.schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -580,7 +580,7 @@ void NodeModifyConstraintEndTimeCmd::unexecute() { setCommandType(1); } -NodeModifyStartTimeCmd::NodeModifyStartTimeCmd(Part *part, Node &node, QDateTime dt, QString name) +NodeModifyStartTimeCmd::NodeModifyStartTimeCmd(Part *part, Node &node, TQDateTime dt, TQString name) : NamedCommand(part, name), m_node(node), newTime(dt), @@ -598,7 +598,7 @@ void NodeModifyStartTimeCmd::unexecute() { setCommandType(1); } -NodeModifyEndTimeCmd::NodeModifyEndTimeCmd(Part *part, Node &node, QDateTime dt, QString name) +NodeModifyEndTimeCmd::NodeModifyEndTimeCmd(Part *part, Node &node, TQDateTime dt, TQString name) : NamedCommand(part, name), m_node(node), newTime(dt), @@ -616,7 +616,7 @@ void NodeModifyEndTimeCmd::unexecute() { setCommandType(1); } -NodeModifyIdCmd::NodeModifyIdCmd(Part *part, Node &node, QString id, QString name) +NodeModifyIdCmd::NodeModifyIdCmd(Part *part, Node &node, TQString id, TQString name) : NamedCommand(part, name), m_node(node), newId(id), @@ -634,66 +634,66 @@ void NodeModifyIdCmd::unexecute() { setCommandType(0); } -NodeIndentCmd::NodeIndentCmd(Part *part, Node &node, QString name) +NodeIndentCmd::NodeIndentCmd(Part *part, Node &node, TQString name) : NamedCommand(part, name), m_node(node), - m_newparent(0), + m_newtqparent(0), m_newindex(-1) { } void NodeIndentCmd::execute() { - m_oldparent = m_node.getParent(); - m_oldindex = m_oldparent->findChildNode(&m_node); + m_oldtqparent = m_node.getParent(); + m_oldindex = m_oldtqparent->findChildNode(&m_node); Project *p = dynamic_cast(m_node.projectNode()); if (p && p->indentTask(&m_node)) { - m_newparent = m_node.getParent(); - m_newindex = m_newparent->findChildNode(&m_node); - m_node.setParent(m_newparent); + m_newtqparent = m_node.getParent(); + m_newindex = m_newtqparent->findChildNode(&m_node); + m_node.setParent(m_newtqparent); } setCommandType(1); } void NodeIndentCmd::unexecute() { if (m_newindex != -1) { - m_newparent->delChildNode(m_newindex, false); - m_oldparent->insertChildNode(m_oldindex, &m_node); - m_node.setParent(m_oldparent); + m_newtqparent->delChildNode(m_newindex, false); + m_oldtqparent->insertChildNode(m_oldindex, &m_node); + m_node.setParent(m_oldtqparent); m_newindex = -1; } setCommandType(1); } -NodeUnindentCmd::NodeUnindentCmd(Part *part, Node &node, QString name) +NodeUnindentCmd::NodeUnindentCmd(Part *part, Node &node, TQString name) : NamedCommand(part, name), m_node(node), - m_newparent(0), + m_newtqparent(0), m_newindex(-1) { } void NodeUnindentCmd::execute() { - m_oldparent = m_node.getParent(); - m_oldindex = m_oldparent->findChildNode(&m_node); + m_oldtqparent = m_node.getParent(); + m_oldindex = m_oldtqparent->findChildNode(&m_node); Project *p = dynamic_cast(m_node.projectNode()); if (p && p->unindentTask(&m_node)) { - m_newparent = m_node.getParent(); - m_newindex = m_newparent->findChildNode(&m_node); - m_node.setParent(m_newparent); + m_newtqparent = m_node.getParent(); + m_newindex = m_newtqparent->findChildNode(&m_node); + m_node.setParent(m_newtqparent); } setCommandType(1); } void NodeUnindentCmd::unexecute() { if (m_newindex != -1) { - m_newparent->delChildNode(m_newindex, false); - m_oldparent->insertChildNode(m_oldindex, &m_node); - m_node.setParent(m_oldparent); + m_newtqparent->delChildNode(m_newindex, false); + m_oldtqparent->insertChildNode(m_oldindex, &m_node); + m_node.setParent(m_oldtqparent); m_newindex = -1; } setCommandType(1); } -NodeMoveUpCmd::NodeMoveUpCmd(Part *part, Node &node, QString name) +NodeMoveUpCmd::NodeMoveUpCmd(Part *part, Node &node, TQString name) : NamedCommand(part, name), m_node(node), m_moved(false) { @@ -715,7 +715,7 @@ void NodeMoveUpCmd::unexecute() { setCommandType(0); } -NodeMoveDownCmd::NodeMoveDownCmd(Part *part, Node &node, QString name) +NodeMoveDownCmd::NodeMoveDownCmd(Part *part, Node &node, TQString name) : NamedCommand(part, name), m_node(node), m_moved(false) { @@ -736,14 +736,14 @@ void NodeMoveDownCmd::unexecute() { setCommandType(0); } -AddRelationCmd::AddRelationCmd(Part *part, Relation *rel, QString name) +AddRelationCmd::AddRelationCmd(Part *part, Relation *rel, TQString name) : NamedCommand(part, name), m_rel(rel) { m_taken = true; - Node *p = rel->parent()->projectNode(); + Node *p = rel->tqparent()->projectNode(); if (p) { - QIntDictIterator it = p->schedules(); + TQIntDictIterator it = p->schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -754,29 +754,29 @@ AddRelationCmd::~AddRelationCmd() { delete m_rel; } void AddRelationCmd::execute() { - //kdDebug()<parent()<<" to "<child()<tqparent()<<" to "<child()<parent()->addDependChildNode(m_rel); + m_rel->tqparent()->addDependChildNode(m_rel); m_rel->child()->addDependParentNode(m_rel); setSchScheduled(false); setCommandType(1); } void AddRelationCmd::unexecute() { m_taken = true; - m_rel->parent()->takeDependChildNode(m_rel); + m_rel->tqparent()->takeDependChildNode(m_rel); m_rel->child()->takeDependParentNode(m_rel); setSchScheduled(); setCommandType(1); } -DeleteRelationCmd::DeleteRelationCmd(Part *part, Relation *rel, QString name) +DeleteRelationCmd::DeleteRelationCmd(Part *part, Relation *rel, TQString name) : NamedCommand(part, name), m_rel(rel) { m_taken = false; - Node *p = rel->parent()->projectNode(); + Node *p = rel->tqparent()->projectNode(); if (p) { - QIntDictIterator it = p->schedules(); + TQIntDictIterator it = p->schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -787,30 +787,30 @@ DeleteRelationCmd::~DeleteRelationCmd() { delete m_rel; } void DeleteRelationCmd::execute() { - //kdDebug()<parent()<<" to "<child()<tqparent()<<" to "<child()<parent()->takeDependChildNode(m_rel); + m_rel->tqparent()->takeDependChildNode(m_rel); m_rel->child()->takeDependParentNode(m_rel); setSchScheduled(false); setCommandType(1); } void DeleteRelationCmd::unexecute() { m_taken = false; - m_rel->parent()->addDependChildNode(m_rel); + m_rel->tqparent()->addDependChildNode(m_rel); m_rel->child()->addDependParentNode(m_rel); setSchScheduled(); setCommandType(1); } -ModifyRelationTypeCmd::ModifyRelationTypeCmd(Part *part, Relation *rel, Relation::Type type, QString name) +ModifyRelationTypeCmd::ModifyRelationTypeCmd(Part *part, Relation *rel, Relation::Type type, TQString name) : NamedCommand(part, name), m_rel(rel), m_newtype(type) { m_oldtype = rel->type(); - Node *p = rel->parent()->projectNode(); + Node *p = rel->tqparent()->projectNode(); if (p) { - QIntDictIterator it = p->schedules(); + TQIntDictIterator it = p->schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -827,15 +827,15 @@ void ModifyRelationTypeCmd::unexecute() { setCommandType(1); } -ModifyRelationLagCmd::ModifyRelationLagCmd(Part *part, Relation *rel, Duration lag, QString name) +ModifyRelationLagCmd::ModifyRelationLagCmd(Part *part, Relation *rel, Duration lag, TQString name) : NamedCommand(part, name), m_rel(rel), m_newlag(lag) { m_oldlag = rel->lag(); - Node *p = rel->parent()->projectNode(); + Node *p = rel->tqparent()->projectNode(); if (p) { - QIntDictIterator it = p->schedules(); + TQIntDictIterator it = p->schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -852,7 +852,7 @@ void ModifyRelationLagCmd::unexecute() { setCommandType(1); } -AddResourceRequestCmd::AddResourceRequestCmd(Part *part, ResourceGroupRequest *group, ResourceRequest *request, QString name) +AddResourceRequestCmd::AddResourceRequestCmd(Part *part, ResourceGroupRequest *group, ResourceRequest *request, TQString name) : NamedCommand(part, name), m_group(group), m_request(request) { @@ -878,7 +878,7 @@ void AddResourceRequestCmd::unexecute() { setCommandType(1); } -RemoveResourceRequestCmd::RemoveResourceRequestCmd(Part *part, ResourceGroupRequest *group, ResourceRequest *request, QString name) +RemoveResourceRequestCmd::RemoveResourceRequestCmd(Part *part, ResourceGroupRequest *group, ResourceRequest *request, TQString name) : NamedCommand(part, name), m_group(group), m_request(request) { @@ -887,7 +887,7 @@ RemoveResourceRequestCmd::RemoveResourceRequestCmd(Part *part, ResourceGroupReq //kdDebug()<resource()->name()< ait = m_resource->appointments(); + TQPtrListIterator ait = m_resource->appointments(); for (; ait.current(); ++ait) { m_appointments.append(ait.current()); } - QPtrListIterator mit = m_appointments; + TQPtrListIterator mit = m_appointments; for (; mit.current(); ++mit) { mit.current()->detach(); //NOTE: removes from m_resource->appointments() //kdDebug()<attach(); } - QPtrListIterator it = m_requests; + TQPtrListIterator it = m_requests; for (; it.current(); ++it) { - it.current()->parent()->addResourceRequest(it.current()); + it.current()->tqparent()->addResourceRequest(it.current()); //kdDebug()<<"Add request for "<resource()->name()<type(); - QIntDictIterator it = resource->schedules(); + TQIntDictIterator it = resource->schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -1215,13 +1215,13 @@ void ModifyResourceTypeCmd::unexecute() { setSchScheduled(); setCommandType(1); } -ModifyResourceUnitsCmd::ModifyResourceUnitsCmd(Part *part, Resource *resource, int value, QString name) +ModifyResourceUnitsCmd::ModifyResourceUnitsCmd(Part *part, Resource *resource, int value, TQString name) : NamedCommand(part, name), m_resource(resource), m_newvalue(value) { m_oldvalue = resource->units(); - QIntDictIterator it = resource->schedules(); + TQIntDictIterator it = resource->schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -1237,16 +1237,16 @@ void ModifyResourceUnitsCmd::unexecute() { setCommandType(1); } -ModifyResourceAvailableFromCmd::ModifyResourceAvailableFromCmd(Part *part, Resource *resource, DateTime value, QString name) +ModifyResourceAvailableFromCmd::ModifyResourceAvailableFromCmd(Part *part, Resource *resource, DateTime value, TQString name) : NamedCommand(part, name), m_resource(resource), m_newvalue(value) { m_oldvalue = resource->availableFrom(); - QIntDictIterator it = resource->schedules(); + TQIntDictIterator it = resource->schedules(); if (!it.isEmpty() && resource->project()) { - QDateTime s; - QDateTime e; + TQDateTime s; + TQDateTime e; for (; it.current(); ++it) { Schedule *sch = resource->project()->findSchedule(it.current()->id()); if (sch) { @@ -1271,16 +1271,16 @@ void ModifyResourceAvailableFromCmd::unexecute() { setCommandType(1); //FIXME } -ModifyResourceAvailableUntilCmd::ModifyResourceAvailableUntilCmd(Part *part, Resource *resource, DateTime value, QString name) +ModifyResourceAvailableUntilCmd::ModifyResourceAvailableUntilCmd(Part *part, Resource *resource, DateTime value, TQString name) : NamedCommand(part, name), m_resource(resource), m_newvalue(value) { m_oldvalue = resource->availableUntil(); - QIntDictIterator it = resource->schedules(); + TQIntDictIterator it = resource->schedules(); if (!it.isEmpty()) { - QDateTime s; - QDateTime e; + TQDateTime s; + TQDateTime e; for (; it.current(); ++it) { Schedule *sch = resource->project()->findSchedule(it.current()->id()); if (sch) { @@ -1305,7 +1305,7 @@ void ModifyResourceAvailableUntilCmd::unexecute() { setCommandType(1); //FIXME } -ModifyResourceNormalRateCmd::ModifyResourceNormalRateCmd(Part *part, Resource *resource, double value, QString name) +ModifyResourceNormalRateCmd::ModifyResourceNormalRateCmd(Part *part, Resource *resource, double value, TQString name) : NamedCommand(part, name), m_resource(resource), m_newvalue(value) { @@ -1321,7 +1321,7 @@ void ModifyResourceNormalRateCmd::unexecute() { setCommandType(0); } -ModifyResourceOvertimeRateCmd::ModifyResourceOvertimeRateCmd(Part *part, Resource *resource, double value, QString name) +ModifyResourceOvertimeRateCmd::ModifyResourceOvertimeRateCmd(Part *part, Resource *resource, double value, TQString name) : NamedCommand(part, name), m_resource(resource), m_newvalue(value) { @@ -1338,13 +1338,13 @@ void ModifyResourceOvertimeRateCmd::unexecute() { setCommandType(0); } -ModifyResourceCalendarCmd::ModifyResourceCalendarCmd(Part *part, Resource *resource, Calendar *value, QString name) +ModifyResourceCalendarCmd::ModifyResourceCalendarCmd(Part *part, Resource *resource, Calendar *value, TQString name) : NamedCommand(part, name), m_resource(resource), m_newvalue(value) { m_oldvalue = resource->calendar(true); - QIntDictIterator it = resource->schedules(); + TQIntDictIterator it = resource->schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -1360,7 +1360,7 @@ void ModifyResourceCalendarCmd::unexecute() { setCommandType(1); } -RemoveResourceGroupCmd::RemoveResourceGroupCmd(Part *part, ResourceGroup *group, QString name) +RemoveResourceGroupCmd::RemoveResourceGroupCmd(Part *part, ResourceGroup *group, TQString name) : NamedCommand(part, name), m_group(group) { @@ -1373,10 +1373,10 @@ RemoveResourceGroupCmd::~RemoveResourceGroupCmd() { void RemoveResourceGroupCmd::execute() { // remove all requests to this group int c=0; - QPtrListIterator it = m_group->requests(); + TQPtrListIterator it = m_group->requests(); for (; it.current(); ++it) { - if (it.current()->parent()) { - it.current()->parent()->takeRequest(it.current()); + if (it.current()->tqparent()) { + it.current()->tqparent()->takeRequest(it.current()); } c = 1; } @@ -1389,10 +1389,10 @@ void RemoveResourceGroupCmd::execute() { void RemoveResourceGroupCmd::unexecute() { // add all requests int c=0; - QPtrListIterator it = m_group->requests(); + TQPtrListIterator it = m_group->requests(); for (; it.current(); ++it) { - if (it.current()->parent()) { - it.current()->parent()->addRequest(it.current()); + if (it.current()->tqparent()) { + it.current()->tqparent()->addRequest(it.current()); } c = 1; } @@ -1404,7 +1404,7 @@ void RemoveResourceGroupCmd::unexecute() { setCommandType(c); } -AddResourceGroupCmd::AddResourceGroupCmd(Part *part, ResourceGroup *group, QString name) +AddResourceGroupCmd::AddResourceGroupCmd(Part *part, ResourceGroup *group, TQString name) : RemoveResourceGroupCmd(part, group, name) { m_mine = true; @@ -1416,7 +1416,7 @@ void AddResourceGroupCmd::unexecute() { RemoveResourceGroupCmd::execute(); } -ModifyResourceGroupNameCmd::ModifyResourceGroupNameCmd(Part *part, ResourceGroup *group, QString value, QString name) +ModifyResourceGroupNameCmd::ModifyResourceGroupNameCmd(Part *part, ResourceGroup *group, TQString value, TQString name) : NamedCommand(part, name), m_group(group), m_newvalue(value) { @@ -1433,7 +1433,7 @@ void ModifyResourceGroupNameCmd::unexecute() { setCommandType(0); } -TaskModifyProgressCmd::TaskModifyProgressCmd(Part *part, Task &task, struct Task::Progress &value, QString name) +TaskModifyProgressCmd::TaskModifyProgressCmd(Part *part, Task &task, struct Task::Progress &value, TQString name) : NamedCommand(part, name), m_task(task), m_newvalue(value) { @@ -1450,7 +1450,7 @@ void TaskModifyProgressCmd::unexecute() { setCommandType(0); } -ProjectModifyBaselineCmd::ProjectModifyBaselineCmd(Part *part, Project &project, bool value, QString name) +ProjectModifyBaselineCmd::ProjectModifyBaselineCmd(Part *part, Project &project, bool value, TQString name) : NamedCommand(part, name), m_project(project), m_newvalue(value) { @@ -1467,20 +1467,20 @@ void ProjectModifyBaselineCmd::unexecute() { setCommandType(2); } -AddAccountCmd::AddAccountCmd(Part *part, Project &project, Account *account, QString parent, QString name) +AddAccountCmd::AddAccountCmd(Part *part, Project &project, Account *account, TQString tqparent, TQString name) : NamedCommand(part, name), m_project(project), m_account(account), m_parent(0), - m_parentName(parent) { + m_parentName(tqparent) { m_mine = true; } -AddAccountCmd::AddAccountCmd(Part *part, Project &project, Account *account, Account *parent, QString name) +AddAccountCmd::AddAccountCmd(Part *part, Project &project, Account *account, Account *tqparent, TQString name) : NamedCommand(part, name), m_project(project), m_account(account), - m_parent(parent) { + m_parent(tqparent) { m_mine = true; } @@ -1511,7 +1511,7 @@ void AddAccountCmd::unexecute() { m_mine = true; } -RemoveAccountCmd::RemoveAccountCmd(Part *part, Project &project, Account *account, QString name) +RemoveAccountCmd::RemoveAccountCmd(Part *part, Project &project, Account *account, TQString name) : NamedCommand(part, name), m_project(project), m_account(account) { @@ -1528,8 +1528,8 @@ void RemoveAccountCmd::execute() { if (m_isDefault) { m_project.accounts().setDefaultAccount(0); } - if (m_account->parent()) - m_account->parent()->take(m_account); + if (m_account->tqparent()) + m_account->tqparent()->take(m_account); else m_project.accounts().take(m_account); @@ -1537,8 +1537,8 @@ void RemoveAccountCmd::execute() { m_mine = true; } void RemoveAccountCmd::unexecute() { - if (m_account->parent()) - m_account->parent()->append(m_account); + if (m_account->tqparent()) + m_account->tqparent()->append(m_account); else m_project.accounts().append(m_account); @@ -1549,7 +1549,7 @@ void RemoveAccountCmd::unexecute() { m_mine = false; } -RenameAccountCmd::RenameAccountCmd(Part *part, Account *account, QString value, QString name) +RenameAccountCmd::RenameAccountCmd(Part *part, Account *account, TQString value, TQString name) : NamedCommand(part, name), m_account(account) { m_oldvalue = account->name(); @@ -1565,7 +1565,7 @@ void RenameAccountCmd::unexecute() { setCommandType(0); } -ModifyAccountDescriptionCmd::ModifyAccountDescriptionCmd(Part *part, Account *account, QString value, QString name) +ModifyAccountDescriptionCmd::ModifyAccountDescriptionCmd(Part *part, Account *account, TQString value, TQString name) : NamedCommand(part, name), m_account(account) { m_oldvalue = account->description(); @@ -1582,7 +1582,7 @@ void ModifyAccountDescriptionCmd::unexecute() { } -NodeModifyStartupCostCmd::NodeModifyStartupCostCmd(Part *part, Node &node, double value, QString name) +NodeModifyStartupCostCmd::NodeModifyStartupCostCmd(Part *part, Node &node, double value, TQString name) : NamedCommand(part, name), m_node(node) { m_oldvalue = node.startupCost(); @@ -1598,7 +1598,7 @@ void NodeModifyStartupCostCmd::unexecute() { setCommandType(0); } -NodeModifyShutdownCostCmd::NodeModifyShutdownCostCmd(Part *part, Node &node, double value, QString name) +NodeModifyShutdownCostCmd::NodeModifyShutdownCostCmd(Part *part, Node &node, double value, TQString name) : NamedCommand(part, name), m_node(node) { m_oldvalue = node.startupCost(); @@ -1614,7 +1614,7 @@ void NodeModifyShutdownCostCmd::unexecute() { setCommandType(0); } -NodeModifyRunningAccountCmd::NodeModifyRunningAccountCmd(Part *part, Node &node, Account *oldvalue, Account *newvalue, QString name) +NodeModifyRunningAccountCmd::NodeModifyRunningAccountCmd(Part *part, Node &node, Account *oldvalue, Account *newvalue, TQString name) : NamedCommand(part, name), m_node(node) { m_oldvalue = oldvalue; @@ -1642,7 +1642,7 @@ void NodeModifyRunningAccountCmd::unexecute() { setCommandType(0); } -NodeModifyStartupAccountCmd::NodeModifyStartupAccountCmd(Part *part, Node &node, Account *oldvalue, Account *newvalue, QString name) +NodeModifyStartupAccountCmd::NodeModifyStartupAccountCmd(Part *part, Node &node, Account *oldvalue, Account *newvalue, TQString name) : NamedCommand(part, name), m_node(node) { m_oldvalue = oldvalue; @@ -1671,7 +1671,7 @@ void NodeModifyStartupAccountCmd::unexecute() { setCommandType(0); } -NodeModifyShutdownAccountCmd::NodeModifyShutdownAccountCmd(Part *part, Node &node, Account *oldvalue, Account *newvalue, QString name) +NodeModifyShutdownAccountCmd::NodeModifyShutdownAccountCmd(Part *part, Node &node, Account *oldvalue, Account *newvalue, TQString name) : NamedCommand(part, name), m_node(node) { m_oldvalue = oldvalue; @@ -1700,7 +1700,7 @@ void NodeModifyShutdownAccountCmd::unexecute() { setCommandType(0); } -ModifyDefaultAccountCmd::ModifyDefaultAccountCmd(Part *part, Accounts &acc, Account *oldvalue, Account *newvalue, QString name) +ModifyDefaultAccountCmd::ModifyDefaultAccountCmd(Part *part, Accounts &acc, Account *oldvalue, Account *newvalue, TQString name) : NamedCommand(part, name), m_accounts(acc) { m_oldvalue = oldvalue; @@ -1719,13 +1719,13 @@ void ModifyDefaultAccountCmd::unexecute() { setCommandType(0); } -ProjectModifyConstraintCmd::ProjectModifyConstraintCmd(Part *part, Project &node, Node::ConstraintType c, QString name) +ProjectModifyConstraintCmd::ProjectModifyConstraintCmd(Part *part, Project &node, Node::ConstraintType c, TQString name) : NamedCommand(part, name), m_node(node), newConstraint(c), oldConstraint(static_cast(node.constraint())) { - QIntDictIterator it = node.schedules(); + TQIntDictIterator it = node.schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -1741,13 +1741,13 @@ void ProjectModifyConstraintCmd::unexecute() { setCommandType(1); } -ProjectModifyStartTimeCmd::ProjectModifyStartTimeCmd(Part *part, Project &node, QDateTime dt, QString name) +ProjectModifyStartTimeCmd::ProjectModifyStartTimeCmd(Part *part, Project &node, TQDateTime dt, TQString name) : NamedCommand(part, name), m_node(node), newTime(dt), oldTime(node.startTime()) { - QIntDictIterator it = node.schedules(); + TQIntDictIterator it = node.schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -1764,13 +1764,13 @@ void ProjectModifyStartTimeCmd::unexecute() { setCommandType(1); } -ProjectModifyEndTimeCmd::ProjectModifyEndTimeCmd(Part *part, Project &node, QDateTime dt, QString name) +ProjectModifyEndTimeCmd::ProjectModifyEndTimeCmd(Part *part, Project &node, TQDateTime dt, TQString name) : NamedCommand(part, name), m_node(node), newTime(dt), oldTime(node.endTime()) { - QIntDictIterator it = node.schedules(); + TQIntDictIterator it = node.schedules(); for (; it.current(); ++it) { addSchScheduled(it.current()); } @@ -1787,7 +1787,7 @@ void ProjectModifyEndTimeCmd::unexecute() { setCommandType(1); } -CalculateProjectCmd::CalculateProjectCmd(Part *part, Project &node, QString tname, int type, QString name) +CalculateProjectCmd::CalculateProjectCmd(Part *part, Project &node, TQString tname, int type, TQString name) : NamedCommand(part, name), m_node(node), m_typename(tname), @@ -1817,7 +1817,7 @@ void CalculateProjectCmd::unexecute() { setCommandType(0); } -RecalculateProjectCmd::RecalculateProjectCmd(Part *part, Project &node, Schedule &sch, QString name) +RecalculateProjectCmd::RecalculateProjectCmd(Part *part, Project &node, Schedule &sch, TQString name) : NamedCommand(part, name), m_node(node), oldSchedule(sch), @@ -1849,7 +1849,7 @@ void RecalculateProjectCmd::unexecute() { } -ModifyStandardWorktimeYearCmd::ModifyStandardWorktimeYearCmd(Part *part, StandardWorktime *wt, double oldvalue, double newvalue, QString name) +ModifyStandardWorktimeYearCmd::ModifyStandardWorktimeYearCmd(Part *part, StandardWorktime *wt, double oldvalue, double newvalue, TQString name) : NamedCommand(part, name), swt(wt), m_oldvalue(oldvalue), @@ -1865,7 +1865,7 @@ void ModifyStandardWorktimeYearCmd::unexecute() { setCommandType(0); } -ModifyStandardWorktimeMonthCmd::ModifyStandardWorktimeMonthCmd(Part *part, StandardWorktime *wt, double oldvalue, double newvalue, QString name) +ModifyStandardWorktimeMonthCmd::ModifyStandardWorktimeMonthCmd(Part *part, StandardWorktime *wt, double oldvalue, double newvalue, TQString name) : NamedCommand(part, name), swt(wt), m_oldvalue(oldvalue), @@ -1881,7 +1881,7 @@ void ModifyStandardWorktimeMonthCmd::unexecute() { setCommandType(0); } -ModifyStandardWorktimeWeekCmd::ModifyStandardWorktimeWeekCmd(Part *part, StandardWorktime *wt, double oldvalue, double newvalue, QString name) +ModifyStandardWorktimeWeekCmd::ModifyStandardWorktimeWeekCmd(Part *part, StandardWorktime *wt, double oldvalue, double newvalue, TQString name) : NamedCommand(part, name), swt(wt), m_oldvalue(oldvalue), @@ -1897,7 +1897,7 @@ void ModifyStandardWorktimeWeekCmd::unexecute() { setCommandType(0); } -ModifyStandardWorktimeDayCmd::ModifyStandardWorktimeDayCmd(Part *part, StandardWorktime *wt, double oldvalue, double newvalue, QString name) +ModifyStandardWorktimeDayCmd::ModifyStandardWorktimeDayCmd(Part *part, StandardWorktime *wt, double oldvalue, double newvalue, TQString name) : NamedCommand(part, name), swt(wt), m_oldvalue(oldvalue), -- cgit v1.2.1