X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Ftrainproperties.h;h=24458331bb4e1267b757092333efc4e848556651;hb=1ff06c5bc46a677fa389ef86c6b26664368f1653;hp=62dc85adaccc5b7a5b49f321c14586e074b176cb;hpb=3e9c210ddc036cd015228504cc0803c909e27f84;p=r2c2.git diff --git a/source/engineer/trainproperties.h b/source/engineer/trainproperties.h index 62dc85a..2445833 100644 --- a/source/engineer/trainproperties.h +++ b/source/engineer/trainproperties.h @@ -1,7 +1,7 @@ /* $Id$ -This file is part of the MSP Märklin suite -Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa +This file is part of R²C² +Copyright © 2006-2009 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ @@ -10,27 +10,33 @@ Distributed under the GPL #include #include -#include -#include +#include +#include "dialog.h" class Engineer; -class TrainProperties: public Msp::GLtk::Panel +class TrainProperties: public Dialog { private: Engineer &engineer; - Marklin::Train *train; + R2C2::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: - sigc::signal signal_ok; - - TrainProperties(Engineer &, Msp::GLtk::Resources &, Marklin::Train *); + TrainProperties(Engineer &, R2C2::Train *); private: - void ok_clicked(); - void cancel_clicked(); + virtual void on_ok_clicked(); + void new_vehicle_selected(unsigned, const std::string &); + void remove_vehicle_clicked(); + const R2C2::VehicleType &get_vehicle_type(unsigned, bool); }; #endif