Table of Contents

TTMSFNCGanttProject Class

Owns the task hierarchy, work-time calendar, task states, persistence, and scheduling services for a Gantt project.

API unit family: TMSFNCGanttClasses Inherits from: TTMSFNCCustomComponent

Syntax

TTMSFNCGanttProject = class(TTMSFNCCustomComponent)

Properties

Name Description
DataBoolean Application-defined Boolean value associated with the project.
DataInteger Application-defined integer value associated with the project.
DataObject Application-defined object reference associated with the project.
DataPointer Application-defined pointer value associated with the project.
DataString Application-defined string value associated with the project.
DefaultPriorityLevel Priority level assigned to newly created tasks when no explicit priority is set.
Description Description text for the project.
Options Project-level scheduling and behavior options.
ProjectId Application-defined project identifier.
ProjectName Display name of the project.
States Collection of available task states.
Tasks Root task collection for the project.
WorkTime Calendar settings used to calculate working days, working hours, and holidays.

Methods

Name Description
AddTask Adds a task to the project and initializes scheduling and display values.
BeginUpdate Starts a batched update so change notifications are delayed.
CalculateTasks Recalculates task scheduling, dependencies, and parent task date ranges.
ClearTasks Removes all tasks from the project.
DeleteTask Deletes the specified task from the project.
DeleteTaskByTaskId Deletes the task with the specified application-defined task identifier.
DoOnStatesChanged Handles changes from the owned task-state collection.
DoOnWorkTimeChanged Handles changes from the owned work-time calendar.
EndUpdate Ends a batched update and applies pending recalculation or change notification.
GetNextTask Returns the next task after the specified task in project order.
GetPreviousTask Returns the previous task before the specified task in project order.
GetTaskByCount Returns the task at the specified flattened project index.
GetTaskByInternalId Finds a task by internal identifier.
GetTaskByTaskId Finds a task by application-defined task identifier.
GetTaskByTaskName Finds a task by task name.
GetTaskByWBS Finds a task by work-breakdown structure value.
GetTaskCountByTask Returns the flattened project index for the specified task.
GetTasksCount Returns the number of tasks in the project.
InsertTask Inserts a task at the specified work-breakdown position.
LoadFromJSON Loads project data from a JSON string.
LoadFromJSONFile Loads project data from a JSON file.
LoadFromJSONStream Loads project data from a JSON stream.
RegisterNotifyOwner Registers a component that receives project change notifications.
SaveToJSON Saves project data to a JSON string.
SaveToJSONFile Saves project data to a JSON file.
SaveToJSONStream Saves project data to a JSON stream.
SetDefaultStates Creates the default task-state definitions.
SetSampleData Populates the project with sample tasks and state data.
Sort Sorts project tasks by the specified task property.
UnRegisterNotifyOwner Unregisters a component from project change notifications.

Events

Name Description
OnChanged Occurs when project data changes.
OnCustomTaskCompare Occurs when task sorting needs a custom comparison result.
OnGetTaskScheduledEnd Occurs when scheduled task end time is requested.
OnGetTaskScheduledStart Occurs when scheduled task start time is requested.

Used by