/*
* 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
#define _CoreAttributes_h_
#include <qstring.h>
-#include <qdict.h>
+#include <q3dict.h>
#include "FlagList.h"
#include "CustomAttribute.h"
/**
* @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
{
void setHierarchIndex(uint no);
QString getHierarchIndex() const;
+ QString getHierarchLevel() const;
Project* getProject() const { return project; }
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.
FlagList flags;
/// User defined, optional attributes.
- QDict<CustomAttribute> customAttributes;
-
- CoreAttributes() { } // Don't use this!
+ Q3Dict<CustomAttribute> customAttributes;
} ;
#endif