]> git.tdb.fi Git - r2c2.git/blobdiff - source/remote/trainpanel.h
Foundations of using physics simulation for trains
[r2c2.git] / source / remote / trainpanel.h
index b969af406d2becef314f48b114823882801d4f3d..e1464e36331f4bd8923d141644a146ce3eeb7ea8 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of the MSP Märklin suite
-Copyright © 2009  Mikkosoft Productions, Mikko Rasa
+Copyright © 2009-2010  Mikkosoft Productions, Mikko Rasa
 Distributed under the GPL
 */
 
@@ -16,6 +16,8 @@ Distributed under the GPL
 #include "network/client.h"
 #include "network/train.h"
 
+class Remote;
+
 class TrainPanel: public Gtk::Expander
 {
 private:
@@ -26,6 +28,7 @@ private:
                RouteRecord();
        };
 
+       Remote &remote;
        Marklin::Client &client;
        Marklin::NetTrain &train;
        Gtk::Scale *scl_speed;
@@ -36,12 +39,11 @@ private:
        std::map<unsigned, Gtk::CheckButton *> chk_funcs;
 
 public:
-       TrainPanel(Marklin::Client &, Marklin::NetTrain &);
+       TrainPanel(Remote &, 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 control_changed(const std::string &, float);
        void function_changed(unsigned, bool);
        void route_changed(const std::string &);
        void ui_speed_changed();