X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Ftrainpanel.h;h=63e6e734bf8bb12ef665199bbdf7aba1f39a0abd;hb=447d621e93e71b710fed0920b473350122426b97;hp=5abec3b443e24941160ee525aa91a1f0b0bc0271;hpb=06c100aacb559fbbe7380e15981c4772092c269b;p=r2c2.git diff --git a/source/engineer/trainpanel.h b/source/engineer/trainpanel.h index 5abec3b..63e6e73 100644 --- a/source/engineer/trainpanel.h +++ b/source/engineer/trainpanel.h @@ -2,6 +2,7 @@ #define TRAINPANEL_H_ #include +#include #include #include #include "libmarklin/train.h" @@ -10,18 +11,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