X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Ftrack.h;h=f065cb673e43a030115581d9e2380a1a54db2589;hb=6ba6af3637c299ab00828c49de9151429488cc17;hp=aff73966b36199b86751d75b972e0afce129aa1e;hpb=f79b3fd58999a73a4a28663b46fdd96c58167a18;p=r2c2.git diff --git a/source/libmarklin/track.h b/source/libmarklin/track.h index aff7396..f065cb6 100644 --- a/source/libmarklin/track.h +++ b/source/libmarklin/track.h @@ -16,6 +16,7 @@ Distributed under the GPL namespace Marklin { +class Block; class Layout; class TrackType; @@ -32,9 +33,12 @@ public: void turnout_id(unsigned); }; + sigc::signal signal_path_changed; + private: Layout &layout; const TrackType &type; + Block *block; Point pos; float rot; float slope; @@ -53,6 +57,8 @@ public: Layout &get_layout() const { return layout; } const TrackType &get_type() const { return type; } + void set_block(Block *); + Block &get_block() const; void set_position(const Point &); void set_rotation(float); void set_slope(float); @@ -73,14 +79,12 @@ public: int get_endpoint_by_link(Track &) const; Point get_endpoint_position(unsigned) const; float get_endpoint_direction(unsigned) const; - bool snap_to(Track &, bool); + bool snap_to(Track &, bool, float = 0); bool snap(Point &, float &) const; void break_link(Track &); void break_links(); const std::vector &get_links() const { return links; } Track *get_link(unsigned) const; - unsigned traverse(unsigned, unsigned) const; - unsigned traverse(unsigned) const; TrackPoint get_point(unsigned, unsigned, float) const; TrackPoint get_point(unsigned, float) const;