]> git.tdb.fi Git - r2c2.git/blob - source/engineer/mainpanel.h
017617dafff437f9fdec9281b7337a10a5d2b7c8
[r2c2.git] / source / engineer / mainpanel.h
1 /* $Id$
2
3 This file is part of the MSP Märklin suite
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
26 public:
27         MainPanel(Engineer &, Msp::GLtk::Resources &);
28
29         void set_status_text(const std::string &);
30 private:
31         void power_on();
32         void power_off();
33         void new_loc();
34         void quit();
35         void power_event(bool);
36 };
37
38 #endif