X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Fmainpanel.cpp;h=dd4d3f9e70e2512208de4a2c006e8353f83fedba;hb=444c7efb2fadb10e98197a62b791829d821370c0;hp=7866a1cf1d1348340f7ccfc7e578a28a10653752;hpb=447d621e93e71b710fed0920b473350122426b97;p=r2c2.git diff --git a/source/engineer/mainpanel.cpp b/source/engineer/mainpanel.cpp index 7866a1c..dd4d3f9 100644 --- a/source/engineer/mainpanel.cpp +++ b/source/engineer/mainpanel.cpp @@ -1,3 +1,10 @@ +/* $Id$ + +This file is part of the MSP Märklin suite +Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa +Distributed under the GPL +*/ + #include #include "engineer.h" #include "mainpanel.h" @@ -48,6 +55,8 @@ MainPanel::MainPanel(Engineer &e, GLtk::Resources &r): 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) @@ -78,3 +87,9 @@ void MainPanel::quit() { engineer.quit(); } + +void MainPanel::power_event(bool p) +{ + ind_on->set_active(p); + ind_off->set_active(!p); +}