loco_types.append(vt);
}
+void NewTrainDialog::prefill(const Driver::DetectedLocomotive &loco)
+{
+ drp_protocol->set_selected_index(protocols.find(loco.protocol));
+ ent_address->set_text(lexical_cast<string>(loco.address));
+ ent_name->set_text(loco.name);
+}
+
void NewTrainDialog::on_response(int code)
{
if(code)
#include <msp/gltk/entry.h>
#include <msp/gltk/listdata.h>
#include "libr2c2/catalogue.h"
+#include "libr2c2/driver.h"
class Engineer;
public:
NewTrainDialog(Engineer &);
+ void prefill(const R2C2::Driver::DetectedLocomotive &);
+
private:
virtual void on_response(int);
};