]> git.tdb.fi Git - r2c2.git/blob - source/engineer/trainproperties.h
8cd0b2f9c3d7e3d080e596cb13e3dda0c2fcae4d
[r2c2.git] / source / engineer / trainproperties.h
1 #ifndef TRAINPROPERTIES_H_
2 #define TRAINPROPERTIES_H_
3
4 #include <msp/gltk/dropdown.h>
5 #include <msp/gltk/entry.h>
6 #include <libr2c2/train.h>
7 #include "dialog.h"
8
9 class Engineer;
10
11 class TrainProperties: public Dialog
12 {
13 private:
14         Engineer &engineer;
15         R2C2::Train *train;
16         Msp::GLtk::Entry *ent_addr;
17         Msp::GLtk::Dropdown *drp_protocol;
18         Msp::GLtk::Dropdown *drp_type;
19         Msp::GLtk::Entry *ent_name;
20         Msp::GLtk::Dropdown *drp_priority;
21         Msp::GLtk::List *lst_vehicles;
22         Msp::GLtk::Dropdown *drp_new_vehicle;
23         std::vector<const R2C2::VehicleType *> add_vehicles;
24         std::set<unsigned> rem_vehicles;
25
26 public:
27         TrainProperties(Engineer &, R2C2::Train *);
28 private:
29         virtual void on_ok_clicked();
30         void new_vehicle_selected(unsigned, const std::string &);
31         void remove_vehicle_clicked();
32         const R2C2::VehicleType &get_vehicle_type(unsigned, bool);
33 };
34
35 #endif