X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Ftrainpanel.h;h=7b929856b840e6ff04e6eede5d338986f91f0332;hb=bc8ac89bbe774bb133b758416182aa18e5e0a5a5;hp=d21e5618694c8fc69d86c69fc71d4b64cb76f5d9;hpb=52cbe8d99669f843f8f75c51128e2748584dd03a;p=r2c2.git diff --git a/source/engineer/trainpanel.h b/source/engineer/trainpanel.h index d21e561..7b92985 100644 --- a/source/engineer/trainpanel.h +++ b/source/engineer/trainpanel.h @@ -1,28 +1,51 @@ +/* $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 +#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 { -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_route; + 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 train_reverse_changed(bool); + void loco_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 forward_toggled(bool); + void func_toggled(bool, unsigned); }; #endif