Preparation Queue Manager
Table models for prepared tasks (preparation station): the list model PrepModel and the queue ScheduleModel.
Overview
quatm/GUI/widgets/models.py provides base classes that map Python dictionaries / lists onto Qt table
models (derived from the ARTIQ models). The preparation queue (preparation station) uses the
list-type PrepModel: prepared tasks need no unique ID and their order can be changed freely; the
experiment queue uses the dictionary-type ScheduleModel (sorted by priority, then by task
number).
Core classes
| Class | Description |
|---|---|
_SyncSubstruct | Helper wrapping the dictionary operations of the underlying container (append/insert/pop callbacks refresh) |
DictSyncModel | Dictionary → table model base class |
ListSyncModel | List → table model base class |
ScheduleModel | Experiment queue (ExperimentQueue) model: tasks sorted by priority/task number |
PrepModel | Preparation queue (PrepStation) model: list type, order adjustable |
Concrete business models implement three hooks in a subclass: convert (key/value/column to cell
content), sort_key (sorting key) and flags (edit flags).
Usage
from quatm.GUI.widgets.models import PrepModel
model = PrepModel(init=prep_list) # list of prepared tasks
The models are described in Data models; preparation-queue operations are described in Preparation station.