OSDN Git Service

adjust integer's signedness
[tjqt4port/tj2qt4.git] / taskjuggler / CoreAttributes.h
index 0eac867..210648f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * CoreAttributes.h - TaskJuggler
  *
- * Copyright (c) 2001, 2002, 2003, 2004, 2005 by Chris Schlaeger <cs@suse.de>
+ * Copyright (c) 2001, 2002, 2003, 2004, 2005 by Chris Schlaeger <cs@kde.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of version 2 of the GNU General Public License as
@@ -14,7 +14,7 @@
 #define _CoreAttributes_h_
 
 #include <qstring.h>
-#include <qdict.h>
+#include <q3dict.h>
 
 #include "FlagList.h"
 #include "CustomAttribute.h"
@@ -27,7 +27,7 @@ class CustomAttributeDefinition;
 
 /**
  * @short This class is the base class for all attribute classes.
- * @author Chris Schlaeger <cs@suse.de>
+ * @author Chris Schlaeger <cs@kde.org>
  */
 class CoreAttributes
 {
@@ -56,6 +56,7 @@ public:
 
     void setHierarchIndex(uint no);
     QString getHierarchIndex() const;
+    QString getHierarchLevel() const;
 
     Project* getProject() const { return project; }
 
@@ -72,26 +73,26 @@ public:
 
     bool hasSubs() const;
     void addFlag(QString flag) { flags.addFlag(flag); }
+    void purgeFlags() { flags.clear(); }
     void clearFlag(const QString& flag) { flags.clearFlag(flag); }
     bool hasFlag(const QString& flag) { return flags.hasFlag(flag); }
     FlagList getFlagList() const { return flags; }
 
     bool hasSameAncestor(const CoreAttributes* c) const;
-    bool isDescendentOf(const CoreAttributes* c) const;
+    bool isDescendantOf(const CoreAttributes* c) const;
     bool isParentOf(const CoreAttributes* c) const;
-    bool isChildOf(const CoreAttributes* c) const;
 
     bool isRoot() const { return parent == 0; }
     bool isLeaf() const;
 
     void addCustomAttribute(const QString& id, CustomAttribute* ca);
     const CustomAttribute* getCustomAttribute(const QString& id) const;
-    const QDict<const CustomAttribute>& getCustomAttributeDict() const
+    const Q3Dict<CustomAttribute>& getCustomAttributeDict() const
     {
-        return (const QDict<const CustomAttribute>&) customAttributes;
+        return customAttributes;
     }
     void inheritCustomAttributes
-        (const QDict<const CustomAttributeDefinition>& dict);
+        (const Q3Dict<CustomAttributeDefinition>& dict);
 
 protected:
     /// A pointer to access information that are global to the project.
@@ -145,9 +146,7 @@ protected:
     FlagList flags;
 
     /// User defined, optional attributes.
-    QDict<CustomAttribute> customAttributes;
-
-    CoreAttributes() { }    // Don't use this!
+    Q3Dict<CustomAttribute> customAttributes;
 } ;
 
 #endif