X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Ftrainpanel.h;h=817ba18b238d84a998bd4a6ade21166e15a13e62;hb=684cf3b8c41e9bb60b2d286bd6d632b0c5abf0ab;hp=5abec3b443e24941160ee525aa91a1f0b0bc0271;hpb=06c100aacb559fbbe7380e15981c4772092c269b;p=r2c2.git diff --git a/source/engineer/trainpanel.h b/source/engineer/trainpanel.h index 5abec3b..817ba18 100644 --- a/source/engineer/trainpanel.h +++ b/source/engineer/trainpanel.h @@ -1,27 +1,45 @@ +/* $Id$ + +This file is part of the MSP Märklin suite +Copyright © 2006-2009 Mikkosoft Productions, Mikko Rasa +Distributed under the GPL +*/ + #ifndef TRAINPANEL_H_ #define TRAINPANEL_H_ #include #include #include +#include #include "libmarklin/train.h" 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; + 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 edit_clicked(); + void forward_toggled(bool); + void func_toggled(bool, unsigned); }; #endif