Rename TimelineVideoContentView -> ContentTimelineVideoView.
authorCarl Hetherington <cth@carlh.net>
Fri, 15 Dec 2023 00:04:26 +0000 (01:04 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 11 Mar 2024 23:43:51 +0000 (00:43 +0100)
src/wx/content_menu.cc
src/wx/content_timeline.cc
src/wx/content_timeline_video_view.cc [new file with mode: 0644]
src/wx/content_timeline_video_view.h [new file with mode: 0644]
src/wx/timeline_video_content_view.cc [deleted file]
src/wx/timeline_video_content_view.h [deleted file]
src/wx/wscript

index 9f89835ff5e7fd922ee60ef903dace21b53fb524..9c50d56dab76f49cf2969b44f91de0f59391ce78 100644 (file)
 #include "content_menu.h"
 #include "content_properties_dialog.h"
 #include "content_timeline_audio_view.h"
+#include "content_timeline_video_view.h"
 #include "dir_dialog.h"
 #include "file_dialog.h"
 #include "film_viewer.h"
 #include "id.h"
 #include "repeat_dialog.h"
-#include "timeline_video_content_view.h"
 #include "wx_util.h"
 #include "lib/audio_content.h"
 #include "lib/config.h"
@@ -314,11 +314,11 @@ ContentMenu::remove ()
                                continue;
                        }
 
-                       shared_ptr<TimelineVideoContentView> video;
+                       shared_ptr<ContentTimelineVideoView> video;
                        shared_ptr<ContentTimelineAudioView> audio;
 
                        for (auto j: _views) {
-                               auto v = dynamic_pointer_cast<TimelineVideoContentView>(j);
+                               auto v = dynamic_pointer_cast<ContentTimelineVideoView>(j);
                                auto a = dynamic_pointer_cast<ContentTimelineAudioView>(j);
                                if (v && v->content() == fc) {
                                        video = v;
index 3efb15d3f7c4fe63916bb551a27108b7f94d78bf..5e104f3b7e4270c3e874c131dc87a7f0c1f2ac69 100644 (file)
 #include "film_viewer.h"
 #include "content_timeline_atmos_view.h"
 #include "content_timeline_audio_view.h"
+#include "content_timeline_video_view.h"
 #include "timeline_labels_view.h"
 #include "timeline_reels_view.h"
 #include "timeline_text_content_view.h"
 #include "timeline_time_axis_view.h"
-#include "timeline_video_content_view.h"
 #include "wx_util.h"
 #include "lib/atmos_mxf_content.h"
 #include "lib/audio_content.h"
@@ -303,7 +303,7 @@ ContentTimeline::recreate_views()
 
        for (auto i: film->content ()) {
                if (i->video) {
-                       _views.push_back (make_shared<TimelineVideoContentView>(*this, i));
+                       _views.push_back(make_shared<ContentTimelineVideoView>(*this, i));
                }
 
                if (i->audio && !i->audio->mapping().mapped_output_channels().empty ()) {
@@ -450,7 +450,7 @@ ContentTimeline::assign_tracks()
                }
        }
 
-       int const video_tracks = place<TimelineVideoContentView> (film, _views, _tracks);
+       int const video_tracks = place<ContentTimelineVideoView>(film, _views, _tracks);
        int const text_tracks = place<TimelineTextContentView> (film, _views, _tracks);
 
        /* Atmos */
diff --git a/src/wx/content_timeline_video_view.cc b/src/wx/content_timeline_video_view.cc
new file mode 100644 (file)
index 0000000..63b26a5
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+    Copyright (C) 2013-2019 Carl Hetherington <cth@carlh.net>
+
+    This file is part of DCP-o-matic.
+
+    DCP-o-matic is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    DCP-o-matic is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include "lib/image_content.h"
+#include "lib/video_content.h"
+#include "content_timeline_video_view.h"
+
+
+using std::dynamic_pointer_cast;
+using std::shared_ptr;
+
+
+ContentTimelineVideoView::ContentTimelineVideoView(ContentTimeline& tl, shared_ptr<Content> c)
+       : TimelineContentView (tl, c)
+{
+
+}
+
+wxColour
+ContentTimelineVideoView::background_colour() const
+{
+       if (!active()) {
+               return wxColour (210, 210, 210, 128);
+       }
+
+       return wxColour (242, 92, 120, 255);
+}
+
+wxColour
+ContentTimelineVideoView::foreground_colour() const
+{
+       if (!active()) {
+               return wxColour (180, 180, 180, 128);
+       }
+
+       return wxColour (0, 0, 0, 255);
+}
+
+bool
+ContentTimelineVideoView::active() const
+{
+       auto c = _content.lock();
+       DCPOMATIC_ASSERT (c);
+       return c->video && c->video->use();
+}
diff --git a/src/wx/content_timeline_video_view.h b/src/wx/content_timeline_video_view.h
new file mode 100644 (file)
index 0000000..940a1a3
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+
+    This file is part of DCP-o-matic.
+
+    DCP-o-matic is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    DCP-o-matic is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include "timeline_content_view.h"
+
+
+/** @class ContentTimelineVideoView
+ *  @brief Content timeline view for VideoContent.
+ */
+class ContentTimelineVideoView : public TimelineContentView
+{
+public:
+       ContentTimelineVideoView(ContentTimeline& tl, std::shared_ptr<Content> c);
+
+private:
+       bool active () const override;
+       wxColour background_colour () const override;
+       wxColour foreground_colour () const override;
+};
diff --git a/src/wx/timeline_video_content_view.cc b/src/wx/timeline_video_content_view.cc
deleted file mode 100644 (file)
index d72b1e1..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-    Copyright (C) 2013-2019 Carl Hetherington <cth@carlh.net>
-
-    This file is part of DCP-o-matic.
-
-    DCP-o-matic is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    DCP-o-matic is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-
-#include "lib/image_content.h"
-#include "lib/video_content.h"
-#include "timeline_video_content_view.h"
-
-
-using std::dynamic_pointer_cast;
-using std::shared_ptr;
-
-
-TimelineVideoContentView::TimelineVideoContentView(ContentTimeline& tl, shared_ptr<Content> c)
-       : TimelineContentView (tl, c)
-{
-
-}
-
-wxColour
-TimelineVideoContentView::background_colour () const
-{
-       if (!active()) {
-               return wxColour (210, 210, 210, 128);
-       }
-
-       return wxColour (242, 92, 120, 255);
-}
-
-wxColour
-TimelineVideoContentView::foreground_colour () const
-{
-       if (!active()) {
-               return wxColour (180, 180, 180, 128);
-       }
-
-       return wxColour (0, 0, 0, 255);
-}
-
-bool
-TimelineVideoContentView::active () const
-{
-       shared_ptr<Content> c = _content.lock ();
-       DCPOMATIC_ASSERT (c);
-       return c->video && c->video->use();
-}
diff --git a/src/wx/timeline_video_content_view.h b/src/wx/timeline_video_content_view.h
deleted file mode 100644 (file)
index 507f3ca..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
-
-    This file is part of DCP-o-matic.
-
-    DCP-o-matic is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    DCP-o-matic is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-
-#include "timeline_content_view.h"
-
-
-/** @class TimelineVideoContentView
- *  @brief Timeline view for VideoContent.
- */
-class TimelineVideoContentView : public TimelineContentView
-{
-public:
-       TimelineVideoContentView(ContentTimeline& tl, std::shared_ptr<Content> c);
-
-private:
-       bool active () const override;
-       wxColour background_colour () const override;
-       wxColour foreground_colour () const override;
-};
index c2bcd72c5752609084867a84e0e9038e7df04b9d..a3e3c06ed0663b78ba8d7f3f9047e4fdb621bfee 100644 (file)
@@ -52,6 +52,7 @@ sources = """
           content_timeline_atmos_view.cc
           content_timeline_audio_view.cc
           content_timeline_dialog.cc
+          content_timeline_video_view.cc
           content_timeline_view.cc
           content_version_dialog.cc
           content_view.cc
@@ -171,7 +172,6 @@ sources = """
           timeline_text_content_view.cc
           timeline_reels_view.cc
           timeline_time_axis_view.cc
-          timeline_video_content_view.cc
           timing_panel.cc
           try_unmount_dialog.cc
           update_dialog.cc