]> git.tdb.fi Git - r2c2.git/blobdiff - source/remote/statusbar.h
Add a new remote control program with GLtk-based UI
[r2c2.git] / source / remote / statusbar.h
diff --git a/source/remote/statusbar.h b/source/remote/statusbar.h
new file mode 100644 (file)
index 0000000..296b019
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef STATUSBAR_H_
+#define STATUSBAR_H_
+
+#include <msp/gltk/indicator.h>
+#include <msp/gltk/label.h>
+#include <msp/gltk/panel.h>
+#include "network/client.h"
+
+class StatusBar: public Msp::GLtk::Panel
+{
+private:
+       R2C2::Client &client;
+       Msp::GLtk::Indicator *ind_power_on;
+       Msp::GLtk::Indicator *ind_power_off;
+       Msp::GLtk::Indicator *ind_halt;
+       Msp::GLtk::Label *lbl_status;
+
+public:
+       StatusBar(R2C2::Client &);
+
+private:
+       void ui_on_clicked();
+       void ui_off_clicked();
+       void ui_halt_clicked();
+       void power_changed(bool);
+       void halt_changed(bool);
+       void emergency(const std::string &);
+};
+
+#endif