QScript Slot

From Q
Jump to navigation Jump to search

Slot

A slot on a page master — a placeholder position an item can occupy. A cut-down analysis item: it exposes on-page pixel geometry and a slotNumber. Put an item into this slot by setting the item's slotNumber to this slot's slotNumber.

equals(obj)

Whether two objects are the same.
objThe object to compare against.
Returns:true or false
Example:
data_file.getQuestionByName('Q2').equals(data_file.questions()[0])

guid

The slot's GUID — its durable identity. Prefer this over slotNumber to track a slot, as a slot number can be reused when a slot is deleted.

height

The height of the slot in pixels.

left

The left (X) position of the slot in pixels.

slotNumber

The slot's number. Assign this to an item's slotNumber to place the item in this slot.

slotType

The kind of item the slot holds: 'Title', 'Content' or 'Text'.

top

The top (Y) position of the slot in pixels.

type

Returns "Slot".

width

The width of the slot in pixels.