]> git.tdb.fi Git - r2c2.git/blob - source/engineer/mainwindow.h
ec207958084a5d6c09aa0c438a897bfa781a8ed7
[r2c2.git] / source / engineer / mainwindow.h
1 #ifndef MAINWINDOW_H_
2 #define MAINWINDOW_H_
3
4 #include <sigc++/trackable.h>
5 #include <msp/gltk/indicator.h>
6 #include <msp/gltk/label.h>
7 #include <msp/gltk/panel.h>
8
9 class Engineer;
10
11 class MainWindow: public Msp::GLtk::Panel, public sigc::trackable
12 {
13 private:
14         Engineer &engineer;
15         Msp::GLtk::Indicator *ind_on;
16         Msp::GLtk::Indicator *ind_off;
17         Msp::GLtk::Indicator *ind_halt;
18         Msp::GLtk::Label *lbl_status;
19         Msp::GLtk::Label *lbl_clock;
20
21 public:
22         MainWindow(Engineer &);
23
24         void set_status_text(const std::string &);
25 private:
26         void on_clicked();
27         void off_clicked();
28         void halt_clicked();
29         void trains_clicked();
30         void quit_clicked();
31         void power_event(bool);
32         void halt_event(bool);
33         void clock_minute();
34 };
35
36 #endif