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/kptproject.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/kptproject.h')
-rw-r--r-- | kplato/kptproject.h | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/kplato/kptproject.h b/kplato/kptproject.h index 93953745..f9444d8b 100644 --- a/kplato/kptproject.h +++ b/kplato/kptproject.h @@ -29,9 +29,9 @@ #include "kptduration.h" #include "kptresource.h" -#include <qmap.h> -#include <qptrlist.h> -#include <qdict.h> +#include <tqmap.h> +#include <tqptrlist.h> +#include <tqdict.h> #include <klistview.h> #include <klocale.h> @@ -51,7 +51,7 @@ class StandardWorktime; */ class Project : public Node { public: - Project(Node *parent = 0); + Project(Node *tqparent = 0); ~Project(); /// Returns the node type. Can be Type_Project or Type_Subproject. @@ -87,20 +87,20 @@ public: */ Duration *getRandomDuration(); - virtual bool load(QDomElement &element); - virtual void save(QDomElement &element) const; + virtual bool load(TQDomElement &element); + virtual void save(TQDomElement &element) const; - QPtrList<ResourceGroup> &resourceGroups(); + TQPtrList<ResourceGroup> &resourceGroups(); virtual void addResourceGroup(ResourceGroup *resource); virtual void insertResourceGroup(unsigned int index, ResourceGroup *resource); void removeResourceGroup(ResourceGroup *resource); void removeResourceGroup(int number); ResourceGroup *takeResourceGroup(ResourceGroup *resource) - { return m_resourceGroups.take(m_resourceGroups.findRef(resource)); } + { return m_resourceGroups.take(m_resourceGroups.tqfindRef(resource)); } bool addTask( Node* task, Node* position ); bool addSubTask( Node* task, Node* position ); - bool addSubTask( Node* task, int index, Node* parent ); + bool addSubTask( Node* task, int index, Node* tqparent ); void delTask(Node *node); bool canIndentTask(Node* node); bool indentTask( Node* node ); @@ -110,52 +110,52 @@ public: bool moveTaskUp( Node* node ); bool canMoveTaskDown( Node* node ); bool moveTaskDown( Node* node ); - Task *createTask(Node* parent); - Task *createTask(Task &def, Node* parent); + Task *createTask(Node* tqparent); + Task *createTask(Task &def, Node* tqparent); /// Returns the resourcegroup with identity id. - ResourceGroup *group(QString id); + ResourceGroup *group(TQString id); /// Returns the resource with identity id. - Resource *resource(QString id); + Resource *resource(TQString id); - virtual EffortCostMap plannedEffortCostPrDay(const QDate &start, const QDate &end) const; + virtual EffortCostMap plannedEffortCostPrDay(const TQDate &start, const TQDate &end) const; /// Returns the total planned effort for this project (or subproject) virtual Duration plannedEffort(); /// Returns the total planned effort for this project (or subproject) on date - virtual Duration plannedEffort(const QDate &date); + virtual Duration plannedEffort(const TQDate &date); /// Returns the planned effort up to and including date - virtual Duration plannedEffortTo(const QDate &date); + virtual Duration plannedEffortTo(const TQDate &date); /// Returns the actual effort virtual Duration actualEffort(); /// Returns the actual effort on date - virtual Duration actualEffort(const QDate &date); + virtual Duration actualEffort(const TQDate &date); /// Returns the actual effort up to and including date - virtual Duration actualEffortTo(const QDate &date); + virtual Duration actualEffortTo(const TQDate &date); /** * Returns the total planned cost for this project */ virtual double plannedCost(); /// Planned cost on date - virtual double plannedCost(const QDate &date); + virtual double plannedCost(const TQDate &date); /// Planned cost up to and including date - virtual double plannedCostTo(const QDate &date); + virtual double plannedCostTo(const TQDate &date); /** * Returns the actually reported cost for this project */ virtual double actualCost(); /// Actual cost on date - virtual double actualCost(const QDate &date); + virtual double actualCost(const TQDate &date); /// Actual cost up to and including date - virtual double actualCostTo(const QDate &date); + virtual double actualCostTo(const TQDate &date); Calendar *defaultCalendar() { return m_standardWorktime->calendar(); } - QPtrList<Calendar> calendars(); + TQPtrList<Calendar> calendars(); void addCalendar(Calendar *calendar); /// Returns the calendar with identity id. - Calendar *calendar(const QString id) const; + Calendar *calendar(const TQString id) const; /** * Defines the length of days, weeks, months and years @@ -169,45 +169,45 @@ public: /// Check if node par can be linked to node child. bool legalToLink(Node *par, Node *child); - virtual const QDict<Node> &nodeDict() { return nodeIdDict; } + virtual const TQDict<Node> &nodeDict() { return nodeIdDict; } /// Find the node with identity id - virtual Node *findNode(const QString &id) const - { return (m_parent ? m_parent->findNode(id) : nodeIdDict.find(id)); } + virtual Node *findNode(const TQString &id) const + { return (m_parent ? m_parent->findNode(id) : nodeIdDict.tqfind(id)); } /// Remove the node with identity id from the register - virtual bool removeId(const QString &id); + virtual bool removeId(const TQString &id); /// Insert the node with identity id - virtual void insertId(const QString &id, const Node *node); + virtual void insertId(const TQString &id, const Node *node); /// Register node. The nodes id must be unique and non-empty. bool registerNodeId(Node *node); /// Create a unique id. - QString uniqueNodeId(int seed=1); + TQString uniqueNodeId(int seed=1); - ResourceGroup *findResourceGroup(const QString &id) const - { return resourceGroupIdDict.find(id); } + ResourceGroup *findResourceGroup(const TQString &id) const + { return resourceGroupIdDict.tqfind(id); } /// Remove the resourcegroup with identity id from the register - bool removeResourceGroupId(const QString &id) + bool removeResourceGroupId(const TQString &id) { return resourceGroupIdDict.remove(id); } /// Insert the resourcegroup with identity id - void insertResourceGroupId(const QString &id, const ResourceGroup* group) + void insertResourceGroupId(const TQString &id, const ResourceGroup* group) { resourceGroupIdDict.insert(id, group); } - Resource *findResource(const QString &id) const - { return resourceIdDict.find(id); } + Resource *findResource(const TQString &id) const + { return resourceIdDict.tqfind(id); } /// Remove the resource with identity id from the register - bool removeResourceId(const QString &id) + bool removeResourceId(const TQString &id) { return resourceIdDict.remove(id); } /// Insert the resource with identity id - void insertResourceId(const QString &id, const Resource *resource) + void insertResourceId(const TQString &id, const Resource *resource) { resourceIdDict.insert(id, resource); } /// Find the calendar with identity id - virtual Calendar *findCalendar(const QString &id) const - { return id.isEmpty() ? 0 : calendarIdDict.find(id); } + virtual Calendar *findCalendar(const TQString &id) const + { return id.isEmpty() ? 0 : calendarIdDict.tqfind(id); } /// Remove the calendar with identity id from the register - virtual bool removeCalendarId(const QString &id); + virtual bool removeCalendarId(const TQString &id); /// Insert the calendar with identity id - virtual void insertCalendarId(const QString &id, const Calendar *calendar); + virtual void insertCalendarId(const TQString &id, const Calendar *calendar); /** * Setting a project to be baselined means the project data can not be edited anymore. @@ -219,22 +219,22 @@ public: */ bool isBaselined() const { return m_baselined; } - void generateWBS(int count, WBSDefinition &def, QString wbs=QString()); + void generateWBS(int count, WBSDefinition &def, TQString wbs=TQString()); Accounts &accounts() { return m_accounts; } - /// 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); /// Create new schedule with unique id. - MainSchedule *createSchedule(QString name, Schedule::Type type); - /// Set parent schedule for my children + MainSchedule *createSchedule(TQString name, Schedule::Type type); + /// Set tqparent schedule for my tqchildren virtual void setParentSchedule(Schedule *sch); protected: Accounts m_accounts; - QPtrList<ResourceGroup> m_resourceGroups; + TQPtrList<ResourceGroup> m_resourceGroups; - QPtrList<Calendar> m_calendars; + TQPtrList<Calendar> m_calendars; StandardWorktime *m_standardWorktime; @@ -245,7 +245,7 @@ protected: void adjustSummarytask(); void initiateCalculation(Schedule &sch); - void initiateCalculationLists(QPtrList<Node> &startnodes, QPtrList<Node> &endnodes, QPtrList<Node> &summarytasks); + void initiateCalculationLists(TQPtrList<Node> &startnodes, TQPtrList<Node> &endnodes, TQPtrList<Node> &summarytasks); bool legalParents(Node *par, Node *child); bool legalChildren(Node *par, Node *child); @@ -253,25 +253,25 @@ protected: private: void init(); - QPtrList<Node> m_startNodes; - QPtrList<Node> m_endNodes; - QPtrList<Node> m_summarytasks; + TQPtrList<Node> m_startNodes; + TQPtrList<Node> m_endNodes; + TQPtrList<Node> m_summarytasks; bool m_baselined; - QDict<ResourceGroup> resourceGroupIdDict; - QDict<Resource> resourceIdDict; - QDict<Node> nodeIdDict; - QDict<Calendar> calendarIdDict; + TQDict<ResourceGroup> resourceGroupIdDict; + TQDict<Resource> resourceIdDict; + TQDict<Node> nodeIdDict; + TQDict<Calendar> calendarIdDict; #ifndef NDEBUG -#include <qcstring.h> +#include <tqcstring.h> public: - void printDebug(bool children, QCString indent); - void printCalendarDebug(QCString indent=""); + void printDebug(bool tqchildren, TQCString indent); + void printCalendarDebug(TQCString indent=""); #ifdef DEBUGPERT static void pert_test(); - static void printTree(Node *n, QString s); + static void printTree(Node *n, TQString s); #endif #endif }; |