-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathseries.pas
85 lines (68 loc) · 1.74 KB
/
series.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
unit series;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils,
fgl,
images,
scout;
type
{ TSeries }
TSerie = class;
TSeriesSpecialization = specialize TFPGList<TSerie>;
TSeries = class(TSeriesSpecialization)
destructor Destroy; override;
end;
TSerie = class
private
FDownloadedSize: LongInt;
FImages: TImages;
FIndex: Integer;
FLoading: Boolean;
FScoutColPixel: TColPixel;
FScoutRowPixel: TRowPixel;
FSeries: TSeries;
FSeriesDescription: string;
FSeriesInstanceUID: string;
FSeriesNumber: string;
public
constructor Create(ASeries: TSeries);
destructor Destroy; override;
property Images: TImages read FImages;
property SeriesDescription: string read FSeriesDescription write FSeriesDescription;
property SeriesNumber: string read FSeriesNumber write FSeriesNumber;
property Series: TSeries read FSeries;
property Index: Integer read FIndex;
property ScoutRowPixel: TRowPixel read FScoutRowPixel write FScoutRowPixel;
property ScoutColPixel: TColPixel read FScoutColPixel write FScoutColPixel;
property SeriesInstanceUID: string read FSeriesInstanceUID write FSeriesInstanceUID;
property DownloadedSize: LongInt read FDownloadedSize write FDownloadedSize;
property Loading: Boolean read FLoading write FLoading;
end;
implementation
{ TSeries }
destructor TSeries.Destroy;
var
lSerie: TSerie;
I: Integer;
begin
for lSerie in Self do
begin
lSerie.free;
end;
inherited Destroy;
end;
{ TSeries }
constructor TSerie.Create(ASeries: TSeries);
begin
inherited Create;
FImages := TImages.Create;
FSeries := ASeries;
FIndex := FSeries.Count;
end;
destructor TSerie.Destroy;
begin
FImages.Free;
inherited Destroy;
end;
end.