X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Ftrainproperties.h;h=465154d2948789734672233ad7b0f39d8766978f;hb=6ac4610e9a94f7415b8f01a653242b570057a02b;hp=89b6e94eb7311d427ec22fb60300435eba845828;hpb=36beacc579d3132642ed4d98ce5a6d99842b5812;p=r2c2.git diff --git a/source/engineer/trainproperties.h b/source/engineer/trainproperties.h index 89b6e94..465154d 100644 --- a/source/engineer/trainproperties.h +++ b/source/engineer/trainproperties.h @@ -1,18 +1,42 @@ +/* $Id$ + +This file is part of the MSP Märklin suite +Copyright © 2006-2009 Mikkosoft Productions, Mikko Rasa +Distributed under the GPL +*/ + #ifndef TRAINPROPERTIES_H_ #define TRAINPROPERTIES_H_ +#include #include -#include #include +#include "dialog.h" -class TrainProperties: public Msp::GLtk::Panel +class Engineer; + +class TrainProperties: public Dialog { -public: - TrainProperties(Msp::GLtk::Resources &, Marklin::Train &); private: - Marklin::Train &train; - Msp::GLtk::Entry *ent_id; + Engineer &engineer; + Marklin::Train *train; + Msp::GLtk::Entry *ent_addr; + Msp::GLtk::Dropdown *drp_protocol; + Msp::GLtk::Dropdown *drp_type; Msp::GLtk::Entry *ent_name; + Msp::GLtk::Dropdown *drp_priority; + Msp::GLtk::List *lst_vehicles; + Msp::GLtk::Dropdown *drp_new_vehicle; + std::vector add_vehicles; + std::set rem_vehicles; + +public: + TrainProperties(Engineer &, Marklin::Train *); +private: + virtual void on_ok_clicked(); + void new_vehicle_selected(unsigned, const std::string &); + void remove_vehicle_clicked(); + const Marklin::VehicleType &get_vehicle_type(unsigned, bool); }; #endif