3 This file is part of the MSP Märklin suite
4 Copyright © 2009 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"
19 class TrainPanel: public Gtk::Expander
22 struct RouteRecord: public Gtk::TreeModelColumnRecord
24 Gtk::TreeModelColumn<Glib::ustring> name;
29 Marklin::Client &client;
30 Marklin::NetTrain &train;
31 Gtk::Scale *scl_speed;
32 Gtk::Label *lbl_status;
33 Gtk::CheckButton *chk_reverse;
34 RouteRecord route_columns;
35 Gtk::ComboBox *cmb_route;
36 std::map<unsigned, Gtk::CheckButton *> chk_funcs;
39 TrainPanel(Marklin::Client &, Marklin::NetTrain &);
41 void name_changed(const std::string &);
42 void status_changed(const std::string &);
43 void speed_changed(unsigned);
44 void reverse_changed(bool);
45 void function_changed(unsigned, bool);
46 void route_changed(const std::string &);
47 void ui_speed_changed();
48 void ui_reverse_changed();
49 void ui_function_changed(unsigned);
50 void ui_route_changed();