X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fremote%2Ftrainpanel.h;h=02b0b06b97a5ca165774c504e7cc1a8e15a1b0eb;hb=f7ab597d035a053311c1a8c5baa51b090262f045;hp=2dcd095b593b403ae37576743be4c136e9a90be2;hpb=010d8321e982d1684fcbff5bf6fc2bdec7cb7bae;p=r2c2.git diff --git a/source/remote/trainpanel.h b/source/remote/trainpanel.h index 2dcd095..02b0b06 100644 --- a/source/remote/trainpanel.h +++ b/source/remote/trainpanel.h @@ -1,36 +1,34 @@ -/* $Id$ - -This file is part of the MSP Märklin suite -Copyright © 2009 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #ifndef TRAINPANEL_H_ #define TRAINPANEL_H_ -#include -#include -#include -#include +#include +#include +#include +#include #include "network/train.h" -class TrainPanel: public Gtk::Frame +class TrainPanel: public Msp::GLtk::Panel, public sigc::trackable { private: - Marklin::NetTrain &train; - Gtk::Scale *scl_speed; - Gtk::Label *lbl_status; - std::map chk_funcs; + R2C2::NetTrain &train; + Msp::GLtk::Indicator *ind_forward; + Msp::GLtk::Indicator *ind_reverse; + Msp::GLtk::Slider *sld_speed; + Msp::GLtk::Label *lbl_speed; + Msp::GLtk::Label *lbl_status; + std::map tgl_functions; + bool updating; public: - TrainPanel(Marklin::NetTrain &); + TrainPanel(R2C2::NetTrain &); + private: - void name_changed(const std::string &); - void status_changed(const std::string &); - void speed_changed(unsigned); + void update_reverse(bool); + void update_speed(float); + void ui_speed_changed(float); void function_changed(unsigned, bool); - void ui_speed_changed(); - void ui_function_changed(unsigned); + void ui_function_toggled(bool, unsigned); + void status_changed(const std::string &); }; #endif