X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fremote%2Ftrainpanel.h;fp=source%2Fremote%2Ftrainpanel.h;h=02b0b06b97a5ca165774c504e7cc1a8e15a1b0eb;hb=f8873062b146028c07f55ad625d2767e45133c27;hp=0000000000000000000000000000000000000000;hpb=a9bbf8d37a2f94a720897fe4f0ab06a016779c69;p=r2c2.git diff --git a/source/remote/trainpanel.h b/source/remote/trainpanel.h new file mode 100644 index 0000000..02b0b06 --- /dev/null +++ b/source/remote/trainpanel.h @@ -0,0 +1,34 @@ +#ifndef TRAINPANEL_H_ +#define TRAINPANEL_H_ + +#include +#include +#include +#include +#include "network/train.h" + +class TrainPanel: public Msp::GLtk::Panel, public sigc::trackable +{ +private: + 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(R2C2::NetTrain &); + +private: + void update_reverse(bool); + void update_speed(float); + void ui_speed_changed(float); + void function_changed(unsigned, bool); + void ui_function_toggled(bool, unsigned); + void status_changed(const std::string &); +}; + +#endif