This topic covers the implementation details of TQxdFile.
Scope: cpQxdFile.pas; class derived from TBtnEditProperty. Prepared from the curated implementation supplied for this review on 2 October 2026.
Path is imported through FixQxdFilesFolderOf, using Server_Path. A nonempty path enables import of scan metadata. PDF subclasses use PdfPagesID; other instances use QuarkPagesID. ModDate is floating Delphi date text converted from UTC to local time when read and back to UTC when written.
TPdfFile.xmlClassName explicitly returns TPdfFilename. This is an intentional source-class/XML-class alias. FixQxdFilesFolderOf and the resource setters/scan refresh logic are needed to specify relocation and stale metadata behavior.
Notation and shared helper rules: Reading this reference.
No literal rec_type value is emitted directly by the selected routines. A property envelope, an inherited writer or a delegated record can supply its identifying attributes.
Inherited implementation: TBtnEditProperty. Follow it when the ordered behavior invokes inherited methods; inherited fields are not repeated as locally owned fields.
Exact XML fields and attributes
The paths below start at this record or property node. A slash identifies a child element; @ identifies an attribute. Curly braces mark a variable index or expression, not literal XML text. Initial values describe initialization; they do not establish what an omitted individual element does. The Implementation toggle below contains the supplied routines for exact branch order and conversions.
Path
XML representation: The text of the Path element.
Initial value: PropValue (TQxdFile.Create).
Reading: Reads the element into s. The subsequent conversion is shown in Implementation.
Writing: Stores DataValue.QxdFileInfo.Path whenever the writer reaches this field.
IsNewDbFormat
XML representation: The text of the IsNewDbFormat element.
Initial value: false (TQxdFile.Create).
Reading: Reads the element into IsNewDbFormat when aPropValue.QxdFileInfo.Path is not empty.
Writing: Stores true or false according to IsNewDbFormat when DataValue.QxdFileInfo.Path is not empty.
NumPages
XML representation: The text of the NumPages element.
Initial value: PropValue (TQxdFile.Create).
Reading: Reads the element into aPropValue.QxdFileInfo.NumPages when aPropValue.QxdFileInfo.Path is not empty.
Writing: Stores the numeric value of DataValue.QxdFileInfo.NumPages when DataValue.QxdFileInfo.Path is not empty.
Width
XML representation: The text of the Width element.
Initial value: PropValue (TQxdFile.Create).
Reading: Reads the element into aPropValue.QxdFileInfo.Width when aPropValue.QxdFileInfo.Path is not empty.
Writing: Stores the numeric value of DataValue.QxdFileInfo.Width when DataValue.QxdFileInfo.Path is not empty.
Height
XML representation: The text of the Height element.
Initial value: PropValue (TQxdFile.Create).
Reading: Reads the element into aPropValue.QxdFileInfo.Height when aPropValue.QxdFileInfo.Path is not empty.
Writing: Stores the numeric value of DataValue.QxdFileInfo.Height when DataValue.QxdFileInfo.Path is not empty.
PdfPagesID
XML representation: The text of the PdfPagesID element.
Initial value: PropValue (TQxdFile.Create).
Reading: Reads the element into aPropValue.QxdFileInfo.prevID when aPropValue.QxdFileInfo.Path is not empty; self is TPdfFile.
Writing: Stores the numeric value of DataValue.QxdFileInfo.prevID when DataValue.QxdFileInfo.Path is not empty; self is TPdfFile.
QuarkPagesID
XML representation: The text of the QuarkPagesID element.
Initial value: PropValue (TQxdFile.Create).
Reading: Reads the element into aPropValue.QxdFileInfo.prevID when aPropValue.QxdFileInfo.Path is not empty; the following is false: self is TPdfFile.
Writing: Stores the numeric value of DataValue.QxdFileInfo.prevID when DataValue.QxdFileInfo.Path is not empty; the following is false: self is TPdfFile.
FileSize
XML representation: The text of the FileSize element.
Initial value: PropValue (TQxdFile.Create).
Reading: Reads the element into aPropValue.QxdFileInfo.FileSize when aPropValue.QxdFileInfo.Path is not empty.
Writing: Stores the numeric value of DataValue.QxdFileInfo.FileSize when DataValue.QxdFileInfo.Path is not empty.
ModDate
XML representation: The text of the ModDate element.
Initial value: PropValue (TQxdFile.Create).
Reading: Reads the element into s when aPropValue.QxdFileInfo.Path is not empty. The subsequent conversion is shown in Implementation.
Writing: Stores FloatToStrWithDot (LocalDateTimeToUTC (DataValue.QxdFileInfo.ModDate)) when DataValue.QxdFileInfo.Path is not empty.
Initialization and reset values
TQxdFile.Create
Setting or temporary variable |
Initial value |
When it is assigned |
IsNewDbFormat |
false |
Always |
NeedsReinspect |
false |
Always |
PropName |
“Quark File” |
Always |
Required |
2 |
Always |
PropValue |
Default (TSL_PropValue) |
Always |
PropValue.PropertyType |
ptQxdFile |
Always |
PropValue.QxdFileInfo.Path |
an empty string |
Always |
PropValue.QxdFileInfo.Width |
0 |
Always |
PropValue.QxdFileInfo.Height |
0 |
Always |
PropValue.QxdFileInfo.NumPages |
0 |
Always |
PropValue.QxdFileInfo.ModDate |
EncodeDate (1980, 1, 1) |
Always |
PropValue.QxdFileInfo.prevID |
- 1 |
Always |
PropValue.QxdFileInfo.FileSize |
0 |
Always |
DataValue |
PropValue |
Always |
This routine also calls inherited Create; self.FillDisplayValue. See Implementation for their order and any conditional calls.
Storage declarations relevant to interpretation
These are in-memory member and property types, not a list of mandatory XML children. They retain array bounds, fixed buffers and selector types. The field reference above defines what is actually serialized.
Name |
Declared type / bounds |
Kind |
IsNewDbFormat |
boolean |
member |
NeedsReinspect |
boolean |
member |
The Implementation toggle contains only TQxdFile methods. Initializers and helpers belonging to other types are identified separately below. Shared XML-helper limitations are explained in Reading this reference.