X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Ftrainpanel.h;h=d8b1ab0bae0b4f63ccdb62a4b6083deb714c2870;hb=e6b7f8c4dd12199c3c5c0bec555fa73c87079729;hp=87e17c9a14570b193c293f6902103407cbe09d68;hpb=bc955b09faf8365a72d07bb5ee1253c9b958c897;p=r2c2.git diff --git a/source/engineer/trainpanel.h b/source/engineer/trainpanel.h index 87e17c9..d8b1ab0 100644 --- a/source/engineer/trainpanel.h +++ b/source/engineer/trainpanel.h @@ -1,9 +1,17 @@ +/* $Id$ + +This file is part of the MSP Märklin suite +Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa +Distributed under the GPL +*/ + #ifndef TRAINPANEL_H_ #define TRAINPANEL_H_ #include #include #include +#include #include "libmarklin/train.h" class Engineer; @@ -16,17 +24,21 @@ private: Msp::GLtk::Label *lbl_addr; Msp::GLtk::Label *lbl_name; Msp::GLtk::HSlider *sld_speed; - Marklin::Locomotive *loco; Msp::GLtk::Label *lbl_speed; Msp::GLtk::Label *lbl_status; + Msp::GLtk::Toggle *tgl_forward; + std::map tgl_funcs; public: TrainPanel(Engineer &, const Msp::GLtk::Resources &, Marklin::Train &); private: void speed_slider_changed(double); - void loco_speed_changed(unsigned); + void train_speed_changed(unsigned); + void loco_function_changed(unsigned, bool); void train_status_changed(const std::string &); void place_clicked(); + void forward_toggled(bool); + void func_toggled(bool, unsigned); }; #endif