YOUSEFUL / DELPHI / COMPONENTS
TAtlasTask
One task of a TAtlasTaskPlan: ID, caption, half-open interval and progress percentage.
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
| Member | Kind | What it does |
|---|---|---|
ID | field | Identifier assigned by TAtlasTaskPlan.AddTask (the internal graph node ID), starting at 1 and never reused. |
Caption | field | Task name shown in the first Gantt column. |
StartsAt | field | Start of the task, inclusive; at least 1 as a TDateTime (31 December 1899) and before EndsAt. |
EndsAt | field | End of the task, exclusive; a successor may start exactly here. |
Progress | field | Completion 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.
uses System.SysUtils, Atlas.Gantt;
function RemainingDays(const Task: TAtlasTask): Double;
begin
Result := (Task.EndsAt - Task.StartsAt) * (100 - Task.Progress) / 100;
end;Related
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