X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Fmainpanel.cpp;h=8c3718b9176fa025bcda7087633cf8357a10522e;hb=4d84248a4990e913a56f013e67a608ad9698233e;hp=dd4d3f9e70e2512208de4a2c006e8353f83fedba;hpb=3e9c210ddc036cd015228504cc0803c909e27f84;p=r2c2.git diff --git a/source/engineer/mainpanel.cpp b/source/engineer/mainpanel.cpp index dd4d3f9..8c3718b 100644 --- a/source/engineer/mainpanel.cpp +++ b/source/engineer/mainpanel.cpp @@ -1,18 +1,20 @@ /* $Id$ This file is part of the MSP Märklin suite -Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa +Copyright © 2006-2009 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ #include #include "engineer.h" #include "mainpanel.h" +#include "trainproperties.h" using namespace std; using namespace Msp; MainPanel::MainPanel(Engineer &e, GLtk::Resources &r): + Widget(r), Panel(r), engineer(e) { @@ -80,7 +82,10 @@ void MainPanel::power_off() void MainPanel::new_loc() { - engineer.add_train(); + TrainProperties *dialog = new TrainProperties(engineer, res, 0); + engineer.get_root().add(*dialog); + dialog->set_position(geom.x+geom.w, geom.y+geom.h-dialog->get_geometry().h); + dialog->set_visible(true); } void MainPanel::quit()