Driver &driver = layout.get_driver();
driver.signal_locomotive_detected.connect(sigc::mem_fun(this, &TrainListDialog::locomotive_detected));
driver.signal_locomotive_gone.connect(sigc::mem_fun(this, &TrainListDialog::locomotive_gone));
+
+ unsigned i = 0;
+ while(const Driver::DetectedLocomotive *loco = driver.enumerate_detected_locos(i++))
+ detected_locos.append(loco);
}
layout.signal_train_added.connect(sigc::mem_fun(this, &TrainListDialog::train_added));
layout.signal_train_removed.connect(sigc::mem_fun(this, &TrainListDialog::train_removed));