X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Ftrainpanel.h;h=7cfaf8fec5056136b6e849511e96cb10fd750dd5;hb=80e10207bee4d774f3015a5e946d463d2c828029;hp=79b9d490456b6ede1d71290bd5de517c6d166eec;hpb=6c61179fe09af2f5366d50f10aadbf5f83438087;p=r2c2.git diff --git a/source/engineer/trainpanel.h b/source/engineer/trainpanel.h index 79b9d49..7cfaf8f 100644 --- a/source/engineer/trainpanel.h +++ b/source/engineer/trainpanel.h @@ -1,7 +1,15 @@ +/* $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" @@ -10,16 +18,25 @@ class Engineer; class TrainPanel: public Msp::GLtk::Panel { -public: - TrainPanel(Engineer &, const Msp::GLtk::Resources &, Marklin::Train &); private: Engineer &engineer; Marklin::Train &train; + 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; + std::map ind_funcs; +public: + TrainPanel(Engineer &, const Msp::GLtk::Resources &, Marklin::Train &); +private: void speed_slider_changed(double); + void loco_speed_changed(unsigned); + void loco_function_changed(unsigned, bool); + void train_status_changed(const std::string &); + void place_clicked(); + void func_clicked(unsigned); }; #endif