3 This file is part of the MSP Märklin suite
4 Copyright © 2009-2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
11 #include <gtkmm/checkbutton.h>
12 #include <gtkmm/combobox.h>
13 #include <gtkmm/expander.h>
14 #include <gtkmm/label.h>
15 #include <gtkmm/scale.h>
16 #include "network/client.h"
17 #include "network/train.h"
21 class TrainPanel: public Gtk::Expander
24 struct RouteRecord: public Gtk::TreeModelColumnRecord
26 Gtk::TreeModelColumn<Glib::ustring> name;
32 Marklin::Client &client;
33 Marklin::NetTrain &train;
34 Gtk::Scale *scl_speed;
35 Gtk::Label *lbl_status;
36 Gtk::CheckButton *chk_reverse;
37 RouteRecord route_columns;
38 Gtk::ComboBox *cmb_route;
39 std::map<unsigned, Gtk::CheckButton *> chk_funcs;
42 TrainPanel(Remote &, Marklin::Client &, Marklin::NetTrain &);
44 void name_changed(const std::string &);
45 void status_changed(const std::string &);
46 void control_changed(const std::string &, float);
47 void function_changed(unsigned, bool);
48 void route_changed(const std::string &);
49 void ui_speed_changed();
50 void ui_reverse_changed();
51 void ui_function_changed(unsigned);
52 void ui_route_changed();