+/* $Id$
+
+This file is part of the MSP Märklin suite
+Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
+Distributed under the GPL
+*/
+
#include <msp/gltk/button.h>
#include "engineer.h"
#include "mainpanel.h"
ind_on->set_active(true);
else
ind_off->set_active(true);
+
+ engineer.get_control().signal_power_event.connect(sigc::mem_fun(this, &MainPanel::power_event));
}
void MainPanel::set_status_text(const string &txt)
void MainPanel::new_loc()
{
- engineer.add_train(0);
+ engineer.add_train();
}
void MainPanel::quit()
{
engineer.quit();
}
+
+void MainPanel::power_event(bool p)
+{
+ ind_on->set_active(p);
+ ind_off->set_active(!p);
+}