X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Ftrainpanel.h;h=ba65fb886f351afeed2b03790e4e8527318a224c;hb=34f8bf04e4bdffefeceea59b186386b51c542b9d;hp=c8825af0120a5d8a98865c41fff7292ea1ba7259;hpb=651698847d5293cfb15b6fb23a394701388c0151;p=r2c2.git diff --git a/source/engineer/trainpanel.h b/source/engineer/trainpanel.h index c8825af..ba65fb8 100644 --- a/source/engineer/trainpanel.h +++ b/source/engineer/trainpanel.h @@ -1,7 +1,7 @@ /* $Id$ -This file is part of the MSP Märklin suite -Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa +This file is part of R²C² +Copyright © 2006-2011 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ @@ -9,12 +9,14 @@ Distributed under the GPL #define TRAINPANEL_H_ #include +#include #include #include #include #include -#include "libmarklin/route.h" -#include "libmarklin/train.h" +#include "libr2c2/route.h" +#include "libr2c2/train.h" +#include "libr2c2/trainstatus.h" class Engineer; @@ -22,7 +24,11 @@ class TrainPanel: public Msp::GLtk::Panel, public sigc::trackable { private: Engineer &engineer; - Marklin::Train &train; + R2C2::Train &train; + R2C2::TrainStatus status; + Msp::GLtk::Panel *pnl_basic; + Msp::GLtk::Panel *pnl_extra; + Msp::GLtk::Button *btn_expand; Msp::GLtk::Label *lbl_addr; Msp::GLtk::Label *lbl_name; Msp::GLtk::HSlider *sld_speed; @@ -31,21 +37,31 @@ private: Msp::GLtk::Label *lbl_status; Msp::GLtk::Toggle *tgl_forward; std::map tgl_funcs; + sigc::connection pick_conn; + bool expanded; public: - TrainPanel(Engineer &, const Msp::GLtk::Resources &, Marklin::Train &); + TrainPanel(Engineer &, R2C2::Train &); + void expand(bool = true); + private: - void speed_slider_changed(double); - void train_speed_changed(unsigned); - void train_reverse_changed(bool); + void ai_event(const R2C2::TrainAI::Message &); void train_function_changed(unsigned, bool); - void train_route_changed(const Marklin::Route *); + void train_route_changed(const R2C2::Route *); void train_status_changed(const std::string &); void place_clicked(); + void take_clicked(); void edit_clicked(); void route_clicked(); + void goto_clicked(); + void timetable_clicked(); + void view_clicked(); + void expand_clicked(); + void speed_slider_changed(double); void forward_toggled(bool); void func_toggled(bool, unsigned); + void place(R2C2::Track *, unsigned); + void go_to(R2C2::Track *, unsigned); }; #endif