From b6d131bc359c990b5acf977b95411111fd5e2a72 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 17 Oct 2014 03:01:11 +0200 Subject: [PATCH] Start remoulding the Timeline display: mark deprecation (#955) Mark parts of the timeline state handling which will certainly not be retained: any part where the GUI widgets "hold" some kind of model. GUI widgets shall be *mapped upon* a model representation and *wired* with callbacks. Especially I am suspicious when GUI presentation code "reaches into" any kind of model data structure to find out something. It should be the other way round (dont call us, we call you) --- src/gui/panels/timeline-panel.cpp | 1 + src/gui/widgets/timeline-widget.cpp | 8 ++++++++ src/gui/widgets/timeline-widget.hpp | 2 ++ src/gui/widgets/timeline/timeline-header-container.hpp | 1 + 4 files changed, 12 insertions(+) diff --git a/src/gui/panels/timeline-panel.cpp b/src/gui/panels/timeline-panel.cpp index 3d383d058..b10ec2d73 100644 --- a/src/gui/panels/timeline-panel.cpp +++ b/src/gui/panels/timeline-panel.cpp @@ -241,6 +241,7 @@ TimelinePanel::on_sequence_list_changed() update_sequence_chooser(); } +/** @deprecated for #955 : move this callback \em into the model! */ void TimelinePanel::on_sequence_chosen() { diff --git a/src/gui/widgets/timeline-widget.cpp b/src/gui/widgets/timeline-widget.cpp index 0f9615531..f6e31a893 100644 --- a/src/gui/widgets/timeline-widget.cpp +++ b/src/gui/widgets/timeline-widget.cpp @@ -92,12 +92,14 @@ TimelineWidget::~TimelineWidget() /* ===== Data Access ===== */ +/** @deprecated for #955 */ shared_ptr TimelineWidget::get_state() { return state; } +/** @deprecated for #955 */ void TimelineWidget::set_state(shared_ptr new_state) { @@ -290,6 +292,7 @@ TimelineWidget::create_timeline_tracks() headerContainer->update_headers(); } +/** @deprecated for #955 */ void TimelineWidget::create_timeline_tracks_from_branch( shared_ptr modelTrack) @@ -311,6 +314,7 @@ TimelineWidget::create_timeline_tracks_from_branch( create_timeline_tracks_from_branch(child); } +/** @deprecated for #955 */ shared_ptr TimelineWidget::create_timeline_track_from_modelTrack( shared_ptr modelTrack) @@ -330,6 +334,7 @@ TimelineWidget::create_timeline_track_from_modelTrack( return shared_ptr(); } +/** @deprecated for #955 */ void TimelineWidget::remove_orphaned_tracks() { @@ -353,6 +358,7 @@ TimelineWidget::remove_orphaned_tracks() } } +/** @deprecated for #955 */ void TimelineWidget::search_orphaned_tracks_in_branch( shared_ptr modelTrack, @@ -371,6 +377,7 @@ TimelineWidget::search_orphaned_tracks_in_branch( search_orphaned_tracks_in_branch(child, orphan_track_map); } +/** @deprecated for #955 */ shared_ptr TimelineWidget::lookup_timeline_track( shared_ptr modelTrack) const @@ -478,6 +485,7 @@ TimelineWidget::on_motion_in_body_notify_event(GdkEventMotion *event) return true; } +/** @deprecated for #955 */ shared_ptr TimelineWidget::sequence() const { diff --git a/src/gui/widgets/timeline-widget.hpp b/src/gui/widgets/timeline-widget.hpp index 67aebe4e7..26cb3c8ec 100644 --- a/src/gui/widgets/timeline-widget.hpp +++ b/src/gui/widgets/timeline-widget.hpp @@ -242,6 +242,7 @@ protected: /** * The state that will be used as the data source for this timeline * widget. + * @deprecated for #955 */ shared_ptr state; @@ -253,6 +254,7 @@ protected: * @remarks The tree structure is maintained by the model, and as the * widget is updated with update_tracks, timeline tracks are added and * removed from the map in correspondence with the tree. + * @deprecated for #955 */ std::map ,shared_ptr > diff --git a/src/gui/widgets/timeline/timeline-header-container.hpp b/src/gui/widgets/timeline/timeline-header-container.hpp index 6c32d6ce4..9eca49c21 100644 --- a/src/gui/widgets/timeline/timeline-header-container.hpp +++ b/src/gui/widgets/timeline/timeline-header-container.hpp @@ -179,6 +179,7 @@ private: * track was found. * @remarks If the return value is going to be NULL, an ENSURE will * fail. + * @deprecated for #955 */ shared_ptr lookup_timeline_track (shared_ptr modelTrack);