]> git.tdb.fi Git - r2c2.git/blob - source/engineer/mainpanel.h
Rename the project to R²C²
[r2c2.git] / source / engineer / mainpanel.h
1 /* $Id$
2
3 This file is part of R²C²
4 Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
6 */
7
8 #ifndef MAINPANEL_H_
9 #define MAINPANEL_H_
10
11 #include <sigc++/trackable.h>
12 #include <msp/gltk/indicator.h>
13 #include <msp/gltk/label.h>
14 #include <msp/gltk/panel.h>
15
16 class Engineer;
17
18 class MainPanel: public Msp::GLtk::Panel, public sigc::trackable
19 {
20 private:
21         Engineer &engineer;
22         Msp::GLtk::Indicator *ind_on;
23         Msp::GLtk::Indicator *ind_off;
24         Msp::GLtk::Label *lbl_status;
25         Msp::GLtk::Indicator *ind_halt;
26
27 public:
28         MainPanel(Engineer &);
29
30         void set_status_text(const std::string &);
31 private:
32         void power_on();
33         void power_off();
34         void toggle_halt();
35         void new_loc();
36         void quit();
37         void power_event(bool);
38         void halt_event(bool);
39 };
40
41 #endif