YOUSEFUL / DELPHI / COMPONENTS

TAtlasTask

One task of a TAtlasTaskPlan: ID, caption, half-open interval and progress percentage.

Record Unit Atlas.Gantt · Product Atlas VCL

Description

Value record returned by TAtlasTaskPlan.Task and Tasks. It is a copy; change a task with TAtlasTaskPlan.UpdateTask. Dependencies are not part of the record: read them with TAtlasTaskPlan.Dependencies.

Members

MemberKindWhat it does
IDfieldIdentifier assigned by TAtlasTaskPlan.AddTask (the internal graph node ID), starting at 1 and never reused.
CaptionfieldTask name shown in the first Gantt column.
StartsAtfieldStart of the task, inclusive; at least 1 as a TDateTime (31 December 1899) and before EndsAt.
EndsAtfieldEnd of the task, exclusive; a successor may start exactly here.
ProgressfieldCompletion in percent, 0..100.

Fields

ID field

ID: Integer;

Identifier assigned by TAtlasTaskPlan.AddTask (the internal graph node ID), starting at 1 and never reused. TAtlasGantt prints predecessor IDs in brackets after the caption.

Caption field

Caption: string;

Task name shown in the first Gantt column.

StartsAt field

StartsAt, EndsAt: TDateTime;

Start of the task, inclusive; at least 1 as a TDateTime (31 December 1899) and before EndsAt.

EndsAt field

StartsAt, EndsAt: TDateTime;

End of the task, exclusive; a successor may start exactly here. No later than 31 December 9999.

Progress field

Progress: Double;

Completion in percent, 0..100. TAtlasGantt fills this share of the bar in a second colour and prints the rounded value.

Examples

Duration and remaining work

Durations are differences of TDateTime values, so they are in days.

pascal
uses System.SysUtils, Atlas.Gantt;

function RemainingDays(const Task: TAtlasTask): Double;
begin
  Result := (Task.EndsAt - Task.StartsAt) * (100 - Task.Progress) / 100;
end;

TAtlasTaskPlan · TAtlasGantt

Also in Atlas VCL

TAtlasTable · TAtlasGrid · TAtlasValueEdit · TAtlasTree · TAtlasWorkbook · TAtlasSheetGrid · TAtlasPivot · TAtlasInspector · TAtlasRichEdit · TAtlasSpellChecker · TAtlasChart · TAtlasGauge · TAtlasThemer · TAtlasWizard · TAtlasWorkspace · TAtlasCommandBar · TAtlasActionTile · TAtlasTileBoard · TAtlasNavigation · TAtlasMap · TAtlasGraph · TAtlasDiagram · TAtlasPrintDocument · TAtlasSchedule · TAtlasScheduler · TAtlasTaskPlan · TAtlasGantt · TAtlasPdfDocument · TAtlasPdfViewer