]> git.tdb.fi Git - r2c2.git/blobdiff - source/remote/trainpanel.h
Strip Id tags and copyright notices from files
[r2c2.git] / source / remote / trainpanel.h
index 2dcd095b593b403ae37576743be4c136e9a90be2..1cf7151a00b39cd45474899dc803d01a57e76039 100644 (file)
@@ -1,36 +1,48 @@
-/* $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/combobox.h>
+#include <gtkmm/expander.h>
 #include <gtkmm/label.h>
 #include <gtkmm/scale.h>
+#include "network/client.h"
 #include "network/train.h"
 
-class TrainPanel: public Gtk::Frame
+class Remote;
+
+class TrainPanel: public Gtk::Expander
 {
 private:
-       Marklin::NetTrain &train;
+       struct RouteRecord: public Gtk::TreeModelColumnRecord
+       {
+               Gtk::TreeModelColumn<Glib::ustring> name;
+
+               RouteRecord();
+       };
+
+       Remote &remote;
+       R2C2::Client &client;
+       R2C2::NetTrain &train;
        Gtk::Scale *scl_speed;
        Gtk::Label *lbl_status;
+       Gtk::CheckButton *chk_reverse;
+       RouteRecord route_columns;
+       Gtk::ComboBox *cmb_route;
        std::map<unsigned, Gtk::CheckButton *> chk_funcs;
 
 public:
-       TrainPanel(Marklin::NetTrain &);
+       TrainPanel(Remote &, R2C2::Client &, R2C2::NetTrain &);
 private:
        void name_changed(const std::string &);
        void status_changed(const std::string &);
-       void speed_changed(unsigned);
+       void control_changed(const std::string &, float);
        void function_changed(unsigned, bool);
+       void route_changed(const std::string &);
        void ui_speed_changed();
+       void ui_reverse_changed();
        void ui_function_changed(unsigned);
+       void ui_route_changed();
 };
 
 #endif