]> git.tdb.fi Git - r2c2.git/blob - source/engineer/trainproperties.h
c75015b08f4b27f8c5b009af0af17aa572352713
[r2c2.git] / source / engineer / trainproperties.h
1 /* $Id$
2
3 This file is part of the MSP Märklin suite
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 <libmarklin/train.h>
14 #include "dialog.h"
15
16 class Engineer;
17
18 class TrainProperties: public Dialog
19 {
20 private:
21         Engineer &engineer;
22         Marklin::Train *train;
23         Msp::GLtk::Entry *ent_addr;
24         Msp::GLtk::Dropdown *drp_type;
25         Msp::GLtk::Entry *ent_name;
26         Msp::GLtk::Dropdown *drp_priority;
27         Msp::GLtk::List *lst_vehicles;
28         Msp::GLtk::Dropdown *drp_new_vehicle;
29         std::vector<const Marklin::VehicleType *> add_vehicles;
30
31 public:
32         TrainProperties(Engineer &, const Msp::GLtk::Resources &, Marklin::Train *);
33 private:
34         virtual void on_ok_clicked();
35         void new_vehicle_selected(unsigned, const std::string &);
36         const Marklin::VehicleType &get_vehicle_type(unsigned, bool);
37 };
38
39 #endif