]> git.tdb.fi Git - r2c2.git/blob - source/remote/trainpanel.h
Add networking library and a remote control program
[r2c2.git] / source / remote / trainpanel.h
1 /* $Id$
2
3 This file is part of the MSP Märklin suite
4 Copyright © 2009  Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
6 */
7
8 #ifndef TRAINPANEL_H_
9 #define TRAINPANEL_H_
10
11 #include <gtkmm/checkbutton.h>
12 #include <gtkmm/frame.h>
13 #include <gtkmm/label.h>
14 #include <gtkmm/scale.h>
15 #include "network/train.h"
16
17 class TrainPanel: public Gtk::Frame
18 {
19 private:
20         Marklin::NetTrain &train;
21         Gtk::Scale *scl_speed;
22         Gtk::Label *lbl_status;
23         std::map<unsigned, Gtk::CheckButton *> chk_funcs;
24
25 public:
26         TrainPanel(Marklin::NetTrain &);
27 private:
28         void name_changed(const std::string &);
29         void status_changed(const std::string &);
30         void speed_changed(unsigned);
31         void function_changed(unsigned, bool);
32         void ui_speed_changed();
33         void ui_function_changed(unsigned);
34 };
35
36 #endif