]> git.tdb.fi Git - r2c2.git/blobdiff - source/remote/trainpanel.h
Add networking library and a remote control program
[r2c2.git] / source / remote / trainpanel.h
diff --git a/source/remote/trainpanel.h b/source/remote/trainpanel.h
new file mode 100644 (file)
index 0000000..2dcd095
--- /dev/null
@@ -0,0 +1,36 @@
+/* $Id$
+
+This file is part of the MSP Märklin suite
+Copyright © 2009  Mikkosoft Productions, Mikko Rasa
+Distributed under the GPL
+*/
+
+#ifndef TRAINPANEL_H_
+#define TRAINPANEL_H_
+
+#include <gtkmm/checkbutton.h>
+#include <gtkmm/frame.h>
+#include <gtkmm/label.h>
+#include <gtkmm/scale.h>
+#include "network/train.h"
+
+class TrainPanel: public Gtk::Frame
+{
+private:
+       Marklin::NetTrain &train;
+       Gtk::Scale *scl_speed;
+       Gtk::Label *lbl_status;
+       std::map<unsigned, Gtk::CheckButton *> chk_funcs;
+
+public:
+       TrainPanel(Marklin::NetTrain &);
+private:
+       void name_changed(const std::string &);
+       void status_changed(const std::string &);
+       void speed_changed(unsigned);
+       void function_changed(unsigned, bool);
+       void ui_speed_changed();
+       void ui_function_changed(unsigned);
+};
+
+#endif