X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=inline;f=source%2Fremote%2Ftrainpanel.h;h=b969af406d2becef314f48b114823882801d4f3d;hb=2fe7cbcb761487bc7409b93b372da6f8ab3c581e;hp=2dcd095b593b403ae37576743be4c136e9a90be2;hpb=e95240551e3c34d2fb21e99c358fa5922a2060c9;p=r2c2.git diff --git a/source/remote/trainpanel.h b/source/remote/trainpanel.h index 2dcd095..b969af4 100644 --- a/source/remote/trainpanel.h +++ b/source/remote/trainpanel.h @@ -9,28 +9,45 @@ Distributed under the GPL #define TRAINPANEL_H_ #include -#include +#include +#include #include #include +#include "network/client.h" #include "network/train.h" -class TrainPanel: public Gtk::Frame +class TrainPanel: public Gtk::Expander { private: + struct RouteRecord: public Gtk::TreeModelColumnRecord + { + Gtk::TreeModelColumn name; + + RouteRecord(); + }; + + Marklin::Client &client; Marklin::NetTrain &train; Gtk::Scale *scl_speed; Gtk::Label *lbl_status; + Gtk::CheckButton *chk_reverse; + RouteRecord route_columns; + Gtk::ComboBox *cmb_route; std::map chk_funcs; public: - TrainPanel(Marklin::NetTrain &); + TrainPanel(Marklin::Client &, Marklin::NetTrain &); private: void name_changed(const std::string &); void status_changed(const std::string &); void speed_changed(unsigned); + void reverse_changed(bool); void function_changed(unsigned, bool); + void route_changed(const std::string &); void ui_speed_changed(); + void ui_reverse_changed(); void ui_function_changed(unsigned); + void ui_route_changed(); }; #endif