X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Ftrainproperties.h;h=c75015b08f4b27f8c5b009af0af17aa572352713;hb=e13742268b7030f8d6152858d39f1c6b43f94c88;hp=5d24613a7329a3cf718189a94adf635fc0ff6760;hpb=1d735b80482317fd930eb47ca255ab9f1f120a7d;p=r2c2.git diff --git a/source/engineer/trainproperties.h b/source/engineer/trainproperties.h index 5d24613..c75015b 100644 --- a/source/engineer/trainproperties.h +++ b/source/engineer/trainproperties.h @@ -1,26 +1,39 @@ +/* $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 Engineer; -class TrainProperties: public Msp::GLtk::Panel +class TrainProperties: public Dialog { private: Engineer &engineer; Marklin::Train *train; Msp::GLtk::Entry *ent_addr; + 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; public: - sigc::signal signal_ok; - - TrainProperties(Engineer &, Msp::GLtk::Resources &, Marklin::Train *); + TrainProperties(Engineer &, const Msp::GLtk::Resources &, Marklin::Train *); private: - void ok_clicked(); + virtual void on_ok_clicked(); + void new_vehicle_selected(unsigned, const std::string &); + const Marklin::VehicleType &get_vehicle_type(unsigned, bool); }; #endif