]> git.tdb.fi Git - r2c2.git/blobdiff - source/engineer/trainproperties.h
Maintain a Block pointer in Track
[r2c2.git] / source / engineer / trainproperties.h
index bcd0b1df921ff6f85dfe02491b9be5792f29874b..c75015b08f4b27f8c5b009af0af17aa572352713 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of the MSP Märklin suite
-Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
+Copyright © 2006-2009 Mikkosoft Productions, Mikko Rasa
 Distributed under the GPL
 */
 
@@ -10,29 +10,30 @@ Distributed under the GPL
 
 #include <msp/gltk/dropdown.h>
 #include <msp/gltk/entry.h>
-#include <msp/gltk/panel.h>
 #include <libmarklin/train.h>
+#include "dialog.h"
 
 class Engineer;
 
-class TrainProperties: public Msp::GLtk::Panel
+class TrainProperties: public Dialog
 {
-public:
-       sigc::signal<void> signal_ok;
-       sigc::signal<void> signal_cancel;
-
 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<const Marklin::VehicleType *> add_vehicles;
 
 public:
-       TrainProperties(Engineer &, Msp::GLtk::Resources &, Marklin::Train *);
+       TrainProperties(Engineer &, const Msp::GLtk::Resources &, Marklin::Train *);
 private:
-       void ok_clicked();
-       void cancel_clicked();
+       virtual void on_ok_clicked();
+       void new_vehicle_selected(unsigned, const std::string &);
+       const Marklin::VehicleType &get_vehicle_type(unsigned, bool);
 };
 
 #endif