]> git.tdb.fi Git - r2c2.git/blob - source/engineer/trainlistdialog.h
Clear destination when setting a null route
[r2c2.git] / source / engineer / trainlistdialog.h
1 #ifndef TRAINLISTDIALOG_H_
2 #define TRAINLISTDIALOG_H_
3
4 #include <sigc++/trackable.h>
5 #include <msp/gltk/dialog.h>
6 #include <msp/gltk/list.h>
7 #include <msp/gltk/listdata.h>
8 #include "libr2c2/layout.h"
9
10 class Engineer;
11
12 class TrainListDialog: public Msp::GLtk::Dialog, public sigc::trackable
13 {
14 private:
15         Engineer &engineer;
16         R2C2::Layout &layout;
17         Msp::GLtk::BasicListData<R2C2::Train *> trains;
18         Msp::GLtk::List *lst_trains;
19         Msp::GLtk::BasicListData<const R2C2::Driver::DetectedLocomotive *> detected_locos;
20         Msp::GLtk::List *lst_imported;
21
22 public:
23         TrainListDialog(Engineer &);
24
25 private:
26         void new_clicked();
27         void show_clicked();
28         void tab_toggled(bool, Msp::GLtk::Widget *);
29         void locomotive_detected(const R2C2::Driver::DetectedLocomotive &);
30         void locomotive_gone(const R2C2::Driver::DetectedLocomotive &);
31         void train_added(R2C2::Train &);
32         void train_removed(R2C2::Train &);
33         void train_name_changed(R2C2::Train &);
34 };
35
36 #endif