X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Ftrainproperties.cpp;h=360923514b40297dd46440d1ea0864cccd064bf1;hb=3e3675f8d86b06cdea7df197dfe8866ffb285aec;hp=eaddc8bb1c47a38a2ca94c5944deef0592b14773;hpb=6ac4610e9a94f7415b8f01a653242b570057a02b;p=r2c2.git diff --git a/source/engineer/trainproperties.cpp b/source/engineer/trainproperties.cpp index eaddc8b..3609235 100644 --- a/source/engineer/trainproperties.cpp +++ b/source/engineer/trainproperties.cpp @@ -1,22 +1,15 @@ -/* $Id$ - -This file is part of the MSP Märklin suite -Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #include -#include +#include #include -#include "libmarklin/driver.h" -#include "libmarklin/vehicle.h" -#include "libmarklin/vehicletype.h" +#include "libr2c2/driver.h" +#include "libr2c2/vehicle.h" +#include "libr2c2/vehicletype.h" #include "engineer.h" #include "trainproperties.h" using namespace std; using namespace Msp; -using namespace Marklin; +using namespace R2C2; TrainProperties::TrainProperties(Engineer &e, Train *t): engineer(e), @@ -94,7 +87,7 @@ TrainProperties::TrainProperties(Engineer &e, Train *t): if(train) { - ent_addr->set_text(lexical_cast(train->get_address())); + ent_addr->set_text(lexical_cast(train->get_address())); ent_name->set_text(train->get_name()); drp_priority->set_selected_index(train->get_priority()+2); @@ -178,5 +171,5 @@ const VehicleType &TrainProperties::get_vehicle_type(unsigned n, bool loco) ++i; } - throw InvalidParameterValue("Vehicle type index out of range"); + throw out_of_range("TrainProperties::get_vehicle_type"); }