X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Fengineer.h;h=333af73a871362d698903965b91319aad1d9f760;hb=d6516b0d9faa26fe6c64000c34f8d820f91ac479;hp=418c0cdf730d9f4cfcee5e1bbd48320f69d581b1;hpb=5a02a4f42dfc5dc6b4daef5fc02431bdfb2968d8;p=r2c2.git diff --git a/source/engineer/engineer.h b/source/engineer/engineer.h index 418c0cd..333af73 100644 --- a/source/engineer/engineer.h +++ b/source/engineer/engineer.h @@ -10,16 +10,18 @@ #include #include #include "libr2c2/catalogue.h" +#include "libr2c2/driver.h" #include "libr2c2/train.h" #include "3d/layout.h" #include "3d/overlay.h" #include "3d/path.h" +#include "3d/trackchain.h" #include "3d/view.h" #include "network/server.h" #include "options.h" class MainWindow; -class TrainView; +class DynamicDialog; class Engineer: public Msp::RegisteredApplication { @@ -32,6 +34,7 @@ private: Msp::GLtk::Resources ui_res; Msp::GLtk::Root *root; Msp::GLtk::Arrangement *root_arrangement; + bool import_active; R2C2::Catalogue catalogue; R2C2::Layout layout; @@ -45,9 +48,12 @@ private: MainWindow *main_wnd; std::list new_trains; - std::list train_views; + std::list dyn_dialogs; Msp::Time::TimeStamp status_timeout; R2C2::Vector pointer; + std::list emergencies; + Msp::Time::TimeStamp emergency_blink_timeout; + unsigned emergency_blink_state; public: Engineer(int argc, char **argv); @@ -60,8 +66,8 @@ public: R2C2::Layout3D &get_layout_3d() { return layout_3d; } R2C2::View3D &get_main_view() { return main_view; } void set_status(const std::string &); - void add_train_view(TrainView &); - void remove_train_view(TrainView &); + void add_dynamic_dialog(DynamicDialog &); + void remove_dynamic_dialog(DynamicDialog &); int main(); void quit() { exit(0); } private: @@ -69,9 +75,11 @@ private: void button_press(unsigned); void axis_motion(unsigned, float, float); void view_all(); - void sensor_event(unsigned, bool); - void block_reserved(const R2C2::Block &, const R2C2::Train *); R2C2::Object *pick_object(const R2C2::Vector &); + void emergency(R2C2::Block *, const std::string &); + void halt_event(bool); + void locomotive_detected(const R2C2::Driver::DetectedLocomotive &); + void import_finished(int); void train_added(R2C2::Train &); void process_new_train(R2C2::Train &); virtual void sighandler(int);