X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Fengineer.h;h=907fae01ba268161966ef6425a7ff1788e679355;hb=4236c30c0a7a48854e9634e9ad7d8d6e0fd243a3;hp=dc7a7a02dddf64ca6712bc2986236961972aa70a;hpb=ff20abc71ef697eb241e1aea9f7d61adeccfefd6;p=r2c2.git diff --git a/source/engineer/engineer.h b/source/engineer/engineer.h index dc7a7a0..907fae0 100644 --- a/source/engineer/engineer.h +++ b/source/engineer/engineer.h @@ -1,23 +1,16 @@ -/* $Id$ - -This file is part of the MSP Märklin suite -Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #ifndef ENGINEER_H_ #define ENGINEER_H_ #include -#include +#include #include #include #include #include #include #include -#include "libmarklin/catalogue.h" -#include "libmarklin/train.h" +#include "libr2c2/catalogue.h" +#include "libr2c2/train.h" #include "3d/layout.h" #include "3d/overlay.h" #include "3d/path.h" @@ -26,12 +19,12 @@ Distributed under the GPL class MainPanel; class TrainPanel; -class TrainProperties; +class TrainView; class Engineer: public Msp::Application { public: - sigc::signal signal_pick_done; + sigc::signal signal_pick_done; private: Options options; @@ -40,13 +33,13 @@ private: Msp::GLtk::Resources ui_res; Msp::GLtk::Root *root; - Marklin::Catalogue catalogue; - Marklin::Layout layout; - Marklin::Layout3D layout_3d; - Marklin::Server *server; + R2C2::Catalogue catalogue; + R2C2::Layout layout; + R2C2::Layout3D layout_3d; + R2C2::Server *server; Msp::IO::EventDispatcher event_disp; - Marklin::Overlay3D *overlay; - std::map train_colors; + R2C2::Overlay3D *overlay; + std::map train_colors; Msp::GL::Camera camera; Msp::GL::Lighting lighting; @@ -56,11 +49,12 @@ private: MainPanel *main_panel; std::list train_panels; + std::list train_views; Msp::Time::TimeStamp status_timeout; bool picking; - Marklin::Track *picking_track; + R2C2::Track *picking_track; int picking_entry; - Marklin::Path3D *picking_path; + R2C2::Path3D *picking_path; int pointer_x; int pointer_y; bool pointer_moved; @@ -71,9 +65,14 @@ public: const Msp::GLtk::Resources &get_ui_resources() const { return ui_res; } Msp::GLtk::Root &get_root() const { return *root; } - const Marklin::Catalogue &get_catalogue() const { return catalogue; } - Marklin::Layout &get_layout() { return layout; } + const R2C2::Catalogue &get_catalogue() const { return catalogue; } + R2C2::Layout &get_layout() { return layout; } + R2C2::Layout3D &get_layout_3d() { return layout_3d; } + const Msp::GL::Lighting &get_lighting() const { return lighting; } void set_status(const std::string &); + void rearrange_panels(); + void add_train_view(TrainView &); + void remove_train_view(TrainView &); void pick(bool); int main(); void quit() { exit(0); } @@ -82,12 +81,12 @@ private: void button_press(int, int, unsigned, unsigned); void pointer_motion(int, int); void view_all(); - void set_block_color(const Marklin::Block &, const Msp::GL::Color &); - void reset_block_color(const Marklin::Block &); + void set_block_color(const R2C2::Block &, const Msp::GL::Color &); + void reset_block_color(const R2C2::Block &); void sensor_event(unsigned, bool); - void block_reserved(const Marklin::Block &, const Marklin::Train *); - Marklin::Track3D *pick_track(int, int); - void train_added(Marklin::Train &); + void block_reserved(const R2C2::Block &, const R2C2::Train *); + R2C2::Track *pick_track(int, int); + void train_added(R2C2::Train &); virtual void sighandler(int); static Msp::Application::RegApp reg;