]> git.tdb.fi Git - r2c2.git/blob - trainproperties.h
24458331bb4e1267b757092333efc4e848556651
[r2c2.git] / trainproperties.h
1 /* $Id$
2
3 This file is part of R²C²
4 Copyright © 2006-2009 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
6 */
7
8 #ifndef TRAINPROPERTIES_H_
9 #define TRAINPROPERTIES_H_
10
11 #include <msp/gltk/dropdown.h>
12 #include <msp/gltk/entry.h>
13 #include <libr2c2/train.h>
14 #include "dialog.h"
15
16 class Engineer;
17
18 class TrainProperties: public Dialog
19 {
20 private:
21         Engineer &engineer;
22         R2C2::Train *train;
23         Msp::GLtk::Entry *ent_addr;
24         Msp::GLtk::Dropdown *drp_protocol;
25         Msp::GLtk::Dropdown *drp_type;
26         Msp::GLtk::Entry *ent_name;
27         Msp::GLtk::Dropdown *drp_priority;
28         Msp::GLtk::List *lst_vehicles;
29         Msp::GLtk::Dropdown *drp_new_vehicle;
30         std::vector<const R2C2::VehicleType *> add_vehicles;
31         std::set<unsigned> rem_vehicles;
32
33 public:
34         TrainProperties(Engineer &, R2C2::Train *);
35 private:
36         virtual void on_ok_clicked();
37         void new_vehicle_selected(unsigned, const std::string &);
38         void remove_vehicle_clicked();
39         const R2C2::VehicleType &get_vehicle_type(unsigned, bool);
40 };
41
42 #endif