Gantt chart node class. More...
#include <ilviews/gantt/gantt.h>
Public Member Functions | |
IlvGanttNode (const char *name, IlBoolean copy, IlUInt count,...) | |
Initializes a new IlvGanttNode from a series of IlvGanttSubNode objects. More... | |
IlvGanttNode (const char *name, IlBoolean copy=IlTrue, IlBoolean asBreak=IlFalse) | |
Initializes an empty IlvGanttNode object. More... | |
virtual | ~IlvGanttNode () |
Destructor. More... | |
void | addSubNode (IlvGanttSubNode *subnode) |
Adds a subnode. More... | |
IlUShort | getCardinal () const |
Returns the total number of subnodes stored in the node. More... | |
IlvGanttNodeDrawMode | getDrawMode () const |
Gets the presentation mode. More... | |
IlvGraphic * | getSubGraphicModel () const |
Returns the subnode graphic model that the user may have set. More... | |
IlvGanttSubNode * | getSubNode (IlUShort index) const |
Gets a subnode. More... | |
IlvGanttSubNode *const * | getSubNodes (IlUShort &count) const |
Gets the subnodes stored in the node. More... | |
IlBoolean | isBreak () const |
Indicates whether the node is a break node. More... | |
void | removeSubNode (IlUShort index) |
Removes a subnode. More... | |
void | setDrawMode (IlvGanttNodeDrawMode mode) |
Sets the presentation mode. More... | |
void | setSubGraphicModel (IlvGraphic *graphic, IlBoolean destroyOld=IlTrue) |
Sets the subnode graphic model for this Gantt node to a given graphic object. More... | |
Public Member Functions inherited from IlvGanttAbstractObject | |
IlvGanttAbstractObject (const char *name=0, IlBoolean copy=IlTrue, IlvGraphic *graphic=0) | |
Initializes a new IlvGanttAbstractObject . More... | |
virtual | ~IlvGanttAbstractObject () |
Destructor. More... | |
IlAny | getClientData () const |
Gets the client data if any has been set. More... | |
IlvGraphic * | getGraphic () const |
Gets the graphic object stored in the Gantt object. More... | |
const char * | getName () const |
Gets the name stored in the Gantt object. More... | |
void | setClientData (IlAny data) |
Sets the new client data in this Gantt object. More... | |
virtual void | setGraphic (IlvGraphic *graphic, IlBoolean destroyOld=IlTrue, IlBoolean redraw=IlTrue) |
Sets the graphic object displayed by this Gantt object to graphic. More... | |
void | setName (const char *name, IlBoolean copy=IlTrue) |
Sets the name of the Gantt object. More... | |
Gantt chart node class.
Library: ilvgantt
An IlvGanttNode
object describes a Gantt activity. It handles a set of IlvGanttSubNode
objects. An IlvGanttNode
is used to handle subnode activities. It can also be used to handle breaks. A node that handles breaks is called a break node. Subnodes handled by a break node are called break subnodes.
To create a break node, call the IlvGanttNode
constructor, setting the asBreak parameter to IlTrue
.
Subnodes added to a break node should be break subnodes.
IlvGanttChart
, IlvGanttAbstractObject
, IlvGanttSubNode
. IlvGanttNode::IlvGanttNode | ( | const char * | name, |
IlBoolean | copy = IlTrue , |
||
IlBoolean | asBreak = IlFalse |
||
) |
Initializes an empty IlvGanttNode
object.
The new IlvGanttNode
object becomes a skeleton: you can call member functions such as addSubNode()
to add IlvGanttSubNode
objects to the IlvGanttNode
object.
name | The name of the Gantt node. |
copy | Specifies whether the object stores a copy of name or the string name itself. |
asBreak | Specifies whether the new node is a break node. |
Initializes a new IlvGanttNode
from a series of IlvGanttSubNode
objects.
The IlvGanttSubNode
objects are provided as the parameters following count.
name | The name of the Gantt node. |
copy | Specifies whether the object stores a copy of name or the string name itself. |
count | The number of subnodes in the node. This should also be the number of parameters that follow count, and all must be pointers to valid instances of IlvGanttSubNode . |
|
virtual |
Destructor.
The destructor deletes the subnode graphic model that the user may have set, and the string name stored in this Gantt node. It also calls the destructor of the subnodes stored in the Gantt node.
void IlvGanttNode::addSubNode | ( | IlvGanttSubNode * | subnode | ) |
Adds a subnode.
Adds the subnode subnode at the end of the subnode list.
subnode | The subnode to add. |
IlUShort IlvGanttNode::getCardinal | ( | ) | const |
Returns the total number of subnodes stored in the node.
IlvGanttNodeDrawMode IlvGanttNode::getDrawMode | ( | ) | const |
Gets the presentation mode.
Returns the presentation mode for this node, which can be one of the following values indicating the left and right positions of the graphic object representing the node:
IlvGanttNodeDrawMin
- Draws the node between startMin and endMin. IlvGanttNodeDrawMax
- Draws the node between startMax and endMax. IlvGanttNodeDrawComplete
- Draws the node between startMin and endMax. IlvGanttNodeDrawDefault
- Draws the node using the mode set with the setDrawMode()
member function. IlvGraphic* IlvGanttNode::getSubGraphicModel | ( | ) | const |
Returns the subnode graphic model that the user may have set.
IlvGanttSubNode* IlvGanttNode::getSubNode | ( | IlUShort | index | ) | const |
Gets a subnode.
Returns the index th subnode. The first subnode has an index of 0
.
index | The position of the subnode. |
IlvGanttSubNode* const* IlvGanttNode::getSubNodes | ( | IlUShort & | count | ) | const |
Gets the subnodes stored in the node.
The returned array must not be deleted by the programmer, as it is internally maintained.
count | Set to the number of subnodes in the array. |
IlBoolean IlvGanttNode::isBreak | ( | ) | const |
Indicates whether the node is a break node.
IlTrue
if the node is a break node. void IlvGanttNode::removeSubNode | ( | IlUShort | index | ) |
Removes a subnode.
Removes the index th subnode from the subnode list.
index | The position of the subnode to remove. |
void IlvGanttNode::setDrawMode | ( | IlvGanttNodeDrawMode | mode | ) |
Sets the presentation mode.
Sets the presentation mode for this node to the value given by the mode parameter. The mode parameter can be set to one of four values indicating the left and right positions of the graphic object representing the node:
IlvGanttNodeDrawMin
- Draws the node between startMin and endMin. IlvGanttNodeDrawMax
- Draws the node between startMax and endMax. IlvGanttNodeDrawComplete
- Draws the node between startMin and endMax. IlvGanttNodeDrawDefault
- Draws the node using the mode set with the setDrawMode()
member function. mode | The presentation mode. |
void IlvGanttNode::setSubGraphicModel | ( | IlvGraphic * | graphic, |
IlBoolean | destroyOld = IlTrue |
||
) |
Sets the subnode graphic model for this Gantt node to a given graphic object.
This model is used to draw the subnodes of this node. You can specify IlFalse
as the value of the destroyOld parameter to not call delete
for the old graphic model.
graphic | The IlvGraphic that will become the subnode graphic model. |
destroyOld | Indicates whether the old graphic model is destroyed. |