X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Ftrainpanel.h;h=12aa8fc835a8e1c5d9d355459e23be5aea0ae8ee;hb=9ddcd066e37e4c72685817c042c30897786ece05;hp=2597d040c3c76f2e05afad4a214c7b8df2bd1f8b;hpb=f9254f57b736927a57a2fd793ee18f6c9766dd43;p=r2c2.git diff --git a/source/engineer/trainpanel.h b/source/engineer/trainpanel.h index 2597d04..12aa8fc 100644 --- a/source/engineer/trainpanel.h +++ b/source/engineer/trainpanel.h @@ -1,22 +1,24 @@ /* $Id$ This file is part of the MSP Märklin suite -Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa +Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ #ifndef TRAINPANEL_H_ #define TRAINPANEL_H_ +#include #include #include #include #include +#include "libmarklin/route.h" #include "libmarklin/train.h" class Engineer; -class TrainPanel: public Msp::GLtk::Panel +class TrainPanel: public Msp::GLtk::Panel, public sigc::trackable { private: Engineer &engineer; @@ -25,20 +27,28 @@ private: Msp::GLtk::Label *lbl_name; Msp::GLtk::HSlider *sld_speed; Msp::GLtk::Label *lbl_speed; + Msp::GLtk::Label *lbl_route; Msp::GLtk::Label *lbl_status; Msp::GLtk::Toggle *tgl_forward; std::map tgl_funcs; + sigc::connection pick_conn; 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_control_changed(const std::string &, float); + void train_function_changed(unsigned, bool); + void train_route_changed(const Marklin::Route *); void train_status_changed(const std::string &); void place_clicked(); + void edit_clicked(); + void route_clicked(); + void goto_clicked(); void forward_toggled(bool); void func_toggled(bool, unsigned); + void place(Marklin::Track *, unsigned); + void go_to(Marklin::Track *, unsigned); }; #endif