From 53a7ef40723f6f8c6c71a7eeae30940055ec139d Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Thu, 25 Jun 2026 16:41:18 -0400 Subject: [PATCH 01/19] First version to create dependencies for compilation Signed-off-by: Leigh Smith --- Dockerfile | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..80bcec6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,66 @@ +# -*- mode: sh -*- +# vi: set ft=bash : + +FROM ubuntu:latest AS builder + +WORKDIR /home/ubuntu + +RUN apt-get update && apt-get install -y build-essential \ + cmake \ + g++ \ + git \ + minizip \ + xorg-dev \ + libglu1-mesa-dev \ + mesa-common-dev \ + mesa-utils \ + ffmpeg \ + openexr \ + curl \ + pipx \ + libjpeg-dev \ + libtiff-dev \ + libpng++-dev \ + libimath-dev + +# python3-venv \ +# python3-pip + +ENV PATH=/home/ubuntu/toucan_python/bin:$PATH + +RUN pipx ensurepath +RUN pipx install conan +# RUN conan profile detect + +# RUN python3 -m venv /home/ubuntu/toucan_python +# RUN /home/ubuntu/toucan_python/bin/pip install conan + +# Compile and install feather-tk library +RUN mkdir feather-tk +RUN cd feather-tk; git clone https://github.com/grizzlypeak3d/feather-tk.git +RUN cd feather-tk; sh feather-tk/sbuild-linux.sh feather-tk +# TODO replace with cmake --target install +RUN tar -C feather-tk/install-Release -c -f - . | tar -C /usr/local -x -f - + +# Unneeded because installed. +# RUN mkdir -p imath/imath_build +# RUN cd imath; git clone https://github.com/AcademySoftwareFoundation/Imath.git +# RUN cd imath/imath_build; cmake ../Imath --install-prefix /usr/local +# RUN cd imath; cmake --build imath_build --target install --config Release + + +RUN mkdir openFX +RUN cd openFX; git clone https://github.com/AcademySoftwareFoundation/openfx.git +# RUN cd openFX/openfx; scripts/build-cmake.sh + +# Unable to get it because of github blocking automation. +# curl -O https://github.com/AcademySoftwareFoundation/openfx/releases/download/OFX_Release_1.5.1/openfx-linux-ubuntu-1.5.1.tar.gz +# https://github.com/AcademySoftwareFoundation/Imath/releases/download/v3.2.2/Imath-3.2.2.tar.gz + +# RUN git clone https://github.com/AcademySoftwareFoundation/OpenImageIO.git +# RUN git clone https://github.com/AcademySoftwareFoundation/OpenColorIO.git +# RUN git clone https://github.com/AcademySoftwareFoundation/OpenTimelineIO.git + +COPY . /home/ubuntu/toucan + +# RUN sh toucan/sbuild-linux.sh From f1788fb82ac3e572511619493dc35339721d1222 Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Thu, 25 Jun 2026 17:03:38 -0400 Subject: [PATCH 02/19] Fix conan path, clean up FFMPEG_MINIMAL checking Signed-off-by: Leigh Smith --- Dockerfile | 18 ++++++++++-------- sbuild-linux.sh | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 80bcec6..57889f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,17 +23,12 @@ RUN apt-get update && apt-get install -y build-essential \ libpng++-dev \ libimath-dev -# python3-venv \ -# python3-pip - -ENV PATH=/home/ubuntu/toucan_python/bin:$PATH +# Add the pipx installation location: +ENV PATH=/root/.local/share/pipx/venvs/conan/bin:$PATH RUN pipx ensurepath RUN pipx install conan -# RUN conan profile detect - -# RUN python3 -m venv /home/ubuntu/toucan_python -# RUN /home/ubuntu/toucan_python/bin/pip install conan +RUN conan profile detect # Compile and install feather-tk library RUN mkdir feather-tk @@ -64,3 +59,10 @@ RUN cd openFX; git clone https://github.com/AcademySoftwareFoundation/openfx.git COPY . /home/ubuntu/toucan # RUN sh toucan/sbuild-linux.sh + + +# python3-venv \ +# python3-pip +# RUN python3 -m venv /home/ubuntu/toucan_python +# RUN /home/ubuntu/toucan_python/bin/pip install conan + diff --git a/sbuild-linux.sh b/sbuild-linux.sh index 9f3725c..5237be0 100644 --- a/sbuild-linux.sh +++ b/sbuild-linux.sh @@ -7,8 +7,8 @@ if [ "$#" -eq 1 ]; then BUILD_TYPE=$1 fi -if [ $FFMPEG_MINIMAL = "" ]; then - FFMPEG_MINIMAL = OFF +if [ ${FFMPEG_MINIMAL}_x = _x ]; then + FFMPEG_MINIMAL=OFF fi JOBS=4 From 2eb581ecc77c2e68d7a6d4b5905d94c2a0092fe7 Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Thu, 25 Jun 2026 17:44:45 -0400 Subject: [PATCH 03/19] Added many more dependencies to be installed by apt-get Signed-off-by: Leigh Smith --- Dockerfile | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/Dockerfile b/Dockerfile index 57889f6..bcf670b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,53 +9,48 @@ RUN apt-get update && apt-get install -y build-essential \ cmake \ g++ \ git \ - minizip \ + libminizip-dev \ + libminizip-ng-dev \ xorg-dev \ libglu1-mesa-dev \ mesa-common-dev \ mesa-utils \ - ffmpeg \ - openexr \ curl \ pipx \ libjpeg-dev \ libtiff-dev \ libpng++-dev \ - libimath-dev + libimath-dev \ + ffmpeg \ + libopenexr-dev \ + libopenimageio-dev \ + libopencolorio-dev \ + libopentimelineio-dev # Add the pipx installation location: ENV PATH=/root/.local/share/pipx/venvs/conan/bin:$PATH +# We need conan for openFX building. RUN pipx ensurepath RUN pipx install conan RUN conan profile detect -# Compile and install feather-tk library +# Clone, compile and install feather-tk library RUN mkdir feather-tk RUN cd feather-tk; git clone https://github.com/grizzlypeak3d/feather-tk.git RUN cd feather-tk; sh feather-tk/sbuild-linux.sh feather-tk # TODO replace with cmake --target install RUN tar -C feather-tk/install-Release -c -f - . | tar -C /usr/local -x -f - -# Unneeded because installed. -# RUN mkdir -p imath/imath_build -# RUN cd imath; git clone https://github.com/AcademySoftwareFoundation/Imath.git -# RUN cd imath/imath_build; cmake ../Imath --install-prefix /usr/local -# RUN cd imath; cmake --build imath_build --target install --config Release - - +# TODO Unable to get it because of github blocking automation. +# curl -O https://github.com/AcademySoftwareFoundation/openfx/releases/download/OFX_Release_1.5.1/openfx-linux-ubuntu-1.5.1.tar.gz RUN mkdir openFX RUN cd openFX; git clone https://github.com/AcademySoftwareFoundation/openfx.git -# RUN cd openFX/openfx; scripts/build-cmake.sh - -# Unable to get it because of github blocking automation. -# curl -O https://github.com/AcademySoftwareFoundation/openfx/releases/download/OFX_Release_1.5.1/openfx-linux-ubuntu-1.5.1.tar.gz -# https://github.com/AcademySoftwareFoundation/Imath/releases/download/v3.2.2/Imath-3.2.2.tar.gz - -# RUN git clone https://github.com/AcademySoftwareFoundation/OpenImageIO.git -# RUN git clone https://github.com/AcademySoftwareFoundation/OpenColorIO.git -# RUN git clone https://github.com/AcademySoftwareFoundation/OpenTimelineIO.git +# TODO this doesn't build on arm64 Linux currently, can't find the architecture. +RUN cd openFX/openfx; scripts/build-cmake.sh +# RUN git clone https://github.com/OpenTimelineIO/toucan.git +# RUN git clone https://github.com/leighsmith/toucan.git COPY . /home/ubuntu/toucan # RUN sh toucan/sbuild-linux.sh @@ -65,4 +60,3 @@ COPY . /home/ubuntu/toucan # python3-pip # RUN python3 -m venv /home/ubuntu/toucan_python # RUN /home/ubuntu/toucan_python/bin/pip install conan - From 09a54dfc78ea32f993306bb1454dbcaceff09876 Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Thu, 25 Jun 2026 22:53:36 -0400 Subject: [PATCH 04/19] Added ffmpeg dev libraries Signed-off-by: Leigh Smith --- Dockerfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Dockerfile b/Dockerfile index bcf670b..fcb54d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,11 +22,20 @@ RUN apt-get update && apt-get install -y build-essential \ libpng++-dev \ libimath-dev \ ffmpeg \ + libavcodec-dev \ + libavformat-dev \ + libswscale-dev \ + openimageio-tools \ libopenexr-dev \ libopenimageio-dev \ libopencolorio-dev \ libopentimelineio-dev +# TODO: +# yaml-cpp +# opencv4 + + # Add the pipx installation location: ENV PATH=/root/.local/share/pipx/venvs/conan/bin:$PATH @@ -48,6 +57,7 @@ RUN mkdir openFX RUN cd openFX; git clone https://github.com/AcademySoftwareFoundation/openfx.git # TODO this doesn't build on arm64 Linux currently, can't find the architecture. RUN cd openFX/openfx; scripts/build-cmake.sh +# TODO need to fully install this? # RUN git clone https://github.com/OpenTimelineIO/toucan.git # RUN git clone https://github.com/leighsmith/toucan.git From 1e88472164a99d5cb61b4f02f526c63a943cb956 Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Fri, 26 Jun 2026 09:52:28 -0400 Subject: [PATCH 05/19] Added minizip for command, opencv and yaml-cpp dev libraries Signed-off-by: Leigh Smith --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fcb54d5..8bb0e05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ RUN apt-get update && apt-get install -y build-essential \ cmake \ g++ \ git \ + minizip \ libminizip-dev \ libminizip-ng-dev \ xorg-dev \ @@ -21,7 +22,9 @@ RUN apt-get update && apt-get install -y build-essential \ libtiff-dev \ libpng++-dev \ libimath-dev \ + libopencv-dev \ ffmpeg \ + libyaml-cpp-dev \ libavcodec-dev \ libavformat-dev \ libswscale-dev \ @@ -33,7 +36,9 @@ RUN apt-get update && apt-get install -y build-essential \ # TODO: # yaml-cpp -# opencv4 + +# missing #include + # Add the pipx installation location: From da7c4f94594f6ddd2eda13b81ad6f90746bb6759 Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Fri, 26 Jun 2026 16:34:19 -0400 Subject: [PATCH 06/19] Experiment with simple rename of ObservableValue for Observable for latest feather-tk Signed-off-by: Leigh Smith --- Dockerfile | 20 +++++++++----------- lib/toucanView/File.cpp | 12 ++++++------ lib/toucanView/File.h | 14 +++++++------- 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8bb0e05..0e8b79b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,11 +35,17 @@ RUN apt-get update && apt-get install -y build-essential \ libopentimelineio-dev # TODO: -# yaml-cpp # missing #include +# Clone, compile and install feather-tk library +RUN mkdir feather-tk +RUN cd feather-tk; git clone https://github.com/grizzlypeak3d/feather-tk.git +RUN cd feather-tk; sh feather-tk/sbuild-linux.sh feather-tk +# TODO replace with cmake --target install +RUN tar -C feather-tk/install-Release -c -f - . | tar -C /usr/local -x -f - + # Add the pipx installation location: ENV PATH=/root/.local/share/pipx/venvs/conan/bin:$PATH @@ -49,19 +55,11 @@ RUN pipx ensurepath RUN pipx install conan RUN conan profile detect -# Clone, compile and install feather-tk library -RUN mkdir feather-tk -RUN cd feather-tk; git clone https://github.com/grizzlypeak3d/feather-tk.git -RUN cd feather-tk; sh feather-tk/sbuild-linux.sh feather-tk -# TODO replace with cmake --target install -RUN tar -C feather-tk/install-Release -c -f - . | tar -C /usr/local -x -f - - # TODO Unable to get it because of github blocking automation. # curl -O https://github.com/AcademySoftwareFoundation/openfx/releases/download/OFX_Release_1.5.1/openfx-linux-ubuntu-1.5.1.tar.gz -RUN mkdir openFX -RUN cd openFX; git clone https://github.com/AcademySoftwareFoundation/openfx.git +RUN git clone https://github.com/AcademySoftwareFoundation/openfx.git # TODO this doesn't build on arm64 Linux currently, can't find the architecture. -RUN cd openFX/openfx; scripts/build-cmake.sh +RUN cd openfx; scripts/build-cmake.sh # TODO need to fully install this? # RUN git clone https://github.com/OpenTimelineIO/toucan.git diff --git a/lib/toucanView/File.cpp b/lib/toucanView/File.cpp index 8410f96..b3a3bf2 100644 --- a/lib/toucanView/File.cpp +++ b/lib/toucanView/File.cpp @@ -31,10 +31,10 @@ namespace toucan _selectionModel = std::make_shared(); - _currentImage = ftk::ObservableValue >::create(); + _currentImage = ftk::Observable >::create(); - _rootNode = ftk::ObservableValue >::create(); - _currentNode = ftk::ObservableValue >::create(); + _rootNode = ftk::Observable >::create(); + _currentNode = ftk::Observable >::create(); _graph = std::make_shared( context, @@ -101,17 +101,17 @@ namespace toucan return _graph->getImageDataType(); } - std::shared_ptr > > File::observeCurrentImage() const + std::shared_ptr > > File::observeCurrentImage() const { return _currentImage; } - std::shared_ptr > > File::observeRootNode() const + std::shared_ptr > > File::observeRootNode() const { return _rootNode; } - std::shared_ptr > > File::observeCurrentNode() const + std::shared_ptr > > File::observeCurrentNode() const { return _currentNode; } diff --git a/lib/toucanView/File.h b/lib/toucanView/File.h index c8c1613..d69aa91 100644 --- a/lib/toucanView/File.h +++ b/lib/toucanView/File.h @@ -9,7 +9,7 @@ #include #include -#include +#include #include @@ -58,13 +58,13 @@ namespace toucan const std::string& getImageDataType() const; //! Observe the current image. - std::shared_ptr > > observeCurrentImage() const; + std::shared_ptr > > observeCurrentImage() const; //! Observe the root node. - std::shared_ptr > > observeRootNode() const; + std::shared_ptr > > observeRootNode() const; //! Observe the current node. - std::shared_ptr > > observeCurrentNode() const; + std::shared_ptr > > observeCurrentNode() const; //! Set the current node. void setCurrentNode(const std::shared_ptr&); @@ -78,12 +78,12 @@ namespace toucan std::shared_ptr _playbackModel; std::shared_ptr _viewModel; std::shared_ptr _selectionModel; - std::shared_ptr > > _currentImage; + std::shared_ptr > > _currentImage; OTIO_NS::RationalTime _currentTime; std::shared_ptr _graph; - std::shared_ptr > > _rootNode; - std::shared_ptr > > _currentNode; + std::shared_ptr > > _rootNode; + std::shared_ptr > > _currentNode; OIIO::ImageBuf _imageBuf; std::shared_ptr > _currentTimeObserver; From 5f99814135632e90446953a6d45528c59f3740a7 Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Fri, 26 Jun 2026 16:50:29 -0400 Subject: [PATCH 07/19] Rename ObservableValue for Observable template Signed-off-by: Leigh Smith --- Dockerfile | 4 ++-- lib/toucanView/FileMenu.h | 2 +- lib/toucanView/FilesModel.cpp | 28 ++++++++++++++-------------- lib/toucanView/FilesModel.h | 30 +++++++++++++++--------------- lib/toucanView/PlaybackModel.cpp | 16 ++++++++-------- lib/toucanView/PlaybackModel.h | 18 +++++++++--------- lib/toucanView/TimeUnitsModel.cpp | 4 ++-- lib/toucanView/TimeUnitsModel.h | 6 +++--- lib/toucanView/TimelineWidget.cpp | 4 ++-- lib/toucanView/TimelineWidget.h | 4 ++-- lib/toucanView/ViewMenu.h | 2 +- lib/toucanView/ViewModel.cpp | 24 ++++++++++++------------ lib/toucanView/ViewModel.h | 26 +++++++++++++------------- lib/toucanView/Viewport.cpp | 12 ++++++------ lib/toucanView/Viewport.h | 12 ++++++------ lib/toucanView/WindowModel.cpp | 8 ++++---- lib/toucanView/WindowModel.h | 10 +++++----- 17 files changed, 105 insertions(+), 105 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0e8b79b..d56d549 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,8 +36,8 @@ RUN apt-get update && apt-get install -y build-essential \ # TODO: -# missing #include - +# missing #include replace with #include +# Missing OpenFX/ofxProperty.h need to install OpenFX headers properly. # Clone, compile and install feather-tk library RUN mkdir feather-tk diff --git a/lib/toucanView/FileMenu.h b/lib/toucanView/FileMenu.h index 14cf2f6..6a8f92c 100644 --- a/lib/toucanView/FileMenu.h +++ b/lib/toucanView/FileMenu.h @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include diff --git a/lib/toucanView/FilesModel.cpp b/lib/toucanView/FilesModel.cpp index 4ba00f1..9c8a3c3 100644 --- a/lib/toucanView/FilesModel.cpp +++ b/lib/toucanView/FilesModel.cpp @@ -92,13 +92,13 @@ namespace toucan } _files = ftk::ObservableList< std::shared_ptr >::create(); - _add = ftk::ObservableValue::create(-1); - _remove = ftk::ObservableValue::create(-1); - _current = ftk::ObservableValue< std::shared_ptr >::create(nullptr); - _currentIndex = ftk::ObservableValue::create(-1); - _bFile = ftk::ObservableValue >::create(); - _bIndex = ftk::ObservableValue::create(-1); - _compareOptions = ftk::ObservableValue::create(compareOptions); + _add = ftk::Observable::create(-1); + _remove = ftk::Observable::create(-1); + _current = ftk::Observable< std::shared_ptr >::create(nullptr); + _currentIndex = ftk::Observable::create(-1); + _bFile = ftk::Observable >::create(); + _bIndex = ftk::Observable::create(-1); + _compareOptions = ftk::Observable::create(compareOptions); _recentFilesModel = ftk::RecentFilesModel::create(context); _recentFilesModel->setRecentMax(recentMax); _recentFilesModel->setRecent(recent); @@ -203,22 +203,22 @@ namespace toucan return _files; } - std::shared_ptr > FilesModel::observeAdd() const + std::shared_ptr > FilesModel::observeAdd() const { return _add; } - std::shared_ptr > FilesModel::observeRemove() const + std::shared_ptr > FilesModel::observeRemove() const { return _remove; } - std::shared_ptr > > FilesModel::observeCurrent() const + std::shared_ptr > > FilesModel::observeCurrent() const { return _current; } - std::shared_ptr > FilesModel::observeCurrentIndex() const + std::shared_ptr > FilesModel::observeCurrentIndex() const { return _currentIndex; } @@ -265,7 +265,7 @@ namespace toucan return _bFile->get(); } - std::shared_ptr > > FilesModel::observeBFile() const + std::shared_ptr > > FilesModel::observeBFile() const { return _bFile; } @@ -275,7 +275,7 @@ namespace toucan return _bIndex->get(); } - std::shared_ptr > FilesModel::observeBIndex() const + std::shared_ptr > FilesModel::observeBIndex() const { return _bIndex; } @@ -305,7 +305,7 @@ namespace toucan return _compareOptions->get(); } - std::shared_ptr > FilesModel::observeCompareOptions() const + std::shared_ptr > FilesModel::observeCompareOptions() const { return _compareOptions; } diff --git a/lib/toucanView/FilesModel.h b/lib/toucanView/FilesModel.h index b847323..c203e03 100644 --- a/lib/toucanView/FilesModel.h +++ b/lib/toucanView/FilesModel.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include namespace toucan { @@ -70,16 +70,16 @@ namespace toucan std::shared_ptr > > observeFiles() const; //! Observe when a file is added. - std::shared_ptr > observeAdd() const; + std::shared_ptr > observeAdd() const; //! Observe when a file is removed. - std::shared_ptr > observeRemove() const; + std::shared_ptr > observeRemove() const; //! Observe the current file. - std::shared_ptr > > observeCurrent() const; + std::shared_ptr > > observeCurrent() const; //! Observe the current file index. - std::shared_ptr > observeCurrentIndex() const; + std::shared_ptr > observeCurrentIndex() const; //! Set the current file index. void setCurrentIndex(int); @@ -94,13 +94,13 @@ namespace toucan const std::shared_ptr& getBFile() const; //! Observe the B file. - std::shared_ptr > > observeBFile() const; + std::shared_ptr > > observeBFile() const; //! Get the B file index. int getBIndex() const; //! Observe the B file index. - std::shared_ptr > observeBIndex() const; + std::shared_ptr > observeBIndex() const; //! Set the B file index. void setBIndex(int); @@ -109,7 +109,7 @@ namespace toucan const CompareOptions& getCompareOptions() const; //! Observe the compare options. - std::shared_ptr > observeCompareOptions() const; + std::shared_ptr > observeCompareOptions() const; //! Set the compare options. void setCompareOptions(const CompareOptions&); @@ -127,13 +127,13 @@ namespace toucan std::shared_ptr _settings; std::shared_ptr _host; std::shared_ptr > > _files; - std::shared_ptr > _add; - std::shared_ptr > _remove; - std::shared_ptr > > _current; - std::shared_ptr > _currentIndex; - std::shared_ptr > > _bFile; - std::shared_ptr > _bIndex; - std::shared_ptr > _compareOptions; + std::shared_ptr > _add; + std::shared_ptr > _remove; + std::shared_ptr > > _current; + std::shared_ptr > _currentIndex; + std::shared_ptr > > _bFile; + std::shared_ptr > _bIndex; + std::shared_ptr > _compareOptions; std::shared_ptr _recentFilesModel; std::shared_ptr > _currentTimeObserver; diff --git a/lib/toucanView/PlaybackModel.cpp b/lib/toucanView/PlaybackModel.cpp index 774a127..eb39813 100644 --- a/lib/toucanView/PlaybackModel.cpp +++ b/lib/toucanView/PlaybackModel.cpp @@ -11,10 +11,10 @@ namespace toucan { PlaybackModel::PlaybackModel(const std::shared_ptr& context) { - _timeRange = ftk::ObservableValue::create(); - _currentTime = ftk::ObservableValue::create(OTIO_NS::RationalTime(-1.0, -1.0)); - _inOutRange = ftk::ObservableValue::create(); - _playback = ftk::ObservableValue::create(Playback::Stop); + _timeRange = ftk::Observable::create(); + _currentTime = ftk::Observable::create(OTIO_NS::RationalTime(-1.0, -1.0)); + _inOutRange = ftk::Observable::create(); + _playback = ftk::Observable::create(Playback::Stop); _timer = ftk::Timer::create(context); _timer->setRepeating(true); } @@ -27,7 +27,7 @@ namespace toucan return _timeRange->get(); } - std::shared_ptr > PlaybackModel::observeTimeRange() const + std::shared_ptr > PlaybackModel::observeTimeRange() const { return _timeRange; } @@ -46,7 +46,7 @@ namespace toucan return _currentTime->get(); } - std::shared_ptr > PlaybackModel::observeCurrentTime() const + std::shared_ptr > PlaybackModel::observeCurrentTime() const { return _currentTime; } @@ -252,7 +252,7 @@ namespace toucan return _inOutRange->get(); } - std::shared_ptr > PlaybackModel::observeInOutRange() const + std::shared_ptr > PlaybackModel::observeInOutRange() const { return _inOutRange; } @@ -317,7 +317,7 @@ namespace toucan return _playback->get(); } - std::shared_ptr > PlaybackModel::observePlayback() const + std::shared_ptr > PlaybackModel::observePlayback() const { return _playback; } diff --git a/lib/toucanView/PlaybackModel.h b/lib/toucanView/PlaybackModel.h index b059f5e..2e6ae89 100644 --- a/lib/toucanView/PlaybackModel.h +++ b/lib/toucanView/PlaybackModel.h @@ -5,7 +5,7 @@ #include -#include +#include #include #include @@ -64,7 +64,7 @@ namespace toucan const OTIO_NS::TimeRange& getTimeRange() const; //! Observe the time range. - std::shared_ptr > observeTimeRange() const; + std::shared_ptr > observeTimeRange() const; //! Set the time range. void setTimeRange(const OTIO_NS::TimeRange&); @@ -73,7 +73,7 @@ namespace toucan const OTIO_NS::RationalTime& getCurrentTime() const; //! Observe the current time. - std::shared_ptr > observeCurrentTime() const; + std::shared_ptr > observeCurrentTime() const; //! Set the current time. void setCurrentTime( @@ -89,7 +89,7 @@ namespace toucan const OTIO_NS::TimeRange& getInOutRange() const; //! Observe the in/out range. - std::shared_ptr > observeInOutRange() const; + std::shared_ptr > observeInOutRange() const; //! Set the in/out range. void setInOutRange(const OTIO_NS::TimeRange&); @@ -113,7 +113,7 @@ namespace toucan Playback getPlayback() const; //! Observe the playback. - std::shared_ptr > observePlayback() const; + std::shared_ptr > observePlayback() const; //! Set the playback. void setPlayback(Playback); @@ -130,10 +130,10 @@ namespace toucan private: void _timeUpdate(); - std::shared_ptr > _timeRange; - std::shared_ptr > _currentTime; - std::shared_ptr > _inOutRange; - std::shared_ptr > _playback; + std::shared_ptr > _timeRange; + std::shared_ptr > _currentTime; + std::shared_ptr > _inOutRange; + std::shared_ptr > _playback; Playback _playbackPrev = Playback::Forward; std::optional _viewState; std::shared_ptr _timer; diff --git a/lib/toucanView/TimeUnitsModel.cpp b/lib/toucanView/TimeUnitsModel.cpp index fe2a85c..494d848 100644 --- a/lib/toucanView/TimeUnitsModel.cpp +++ b/lib/toucanView/TimeUnitsModel.cpp @@ -97,7 +97,7 @@ namespace toucan catch (const std::exception&) {} - _timeUnits = ftk::ObservableValue::create(value); + _timeUnits = ftk::Observable::create(value); } TimeUnitsModel::~TimeUnitsModel() @@ -114,7 +114,7 @@ namespace toucan return _timeUnits->get(); } - std::shared_ptr > TimeUnitsModel::observeTimeUnits() const + std::shared_ptr > TimeUnitsModel::observeTimeUnits() const { return _timeUnits; } diff --git a/lib/toucanView/TimeUnitsModel.h b/lib/toucanView/TimeUnitsModel.h index c1944e0..1b51586 100644 --- a/lib/toucanView/TimeUnitsModel.h +++ b/lib/toucanView/TimeUnitsModel.h @@ -5,7 +5,7 @@ #include #include -#include +#include #include @@ -46,13 +46,13 @@ namespace toucan TimeUnits getTimeUnits() const; //! Observe the time units. - std::shared_ptr > observeTimeUnits() const; + std::shared_ptr > observeTimeUnits() const; //! Set the time units. void setTimeUnits(TimeUnits); private: std::shared_ptr _settings; - std::shared_ptr > _timeUnits; + std::shared_ptr > _timeUnits; }; } diff --git a/lib/toucanView/TimelineWidget.cpp b/lib/toucanView/TimelineWidget.cpp index dfe91f3..f605750 100644 --- a/lib/toucanView/TimelineWidget.cpp +++ b/lib/toucanView/TimelineWidget.cpp @@ -28,7 +28,7 @@ namespace toucan 0, static_cast(ftk::KeyModifier::Alt)); - _frameView = ftk::ObservableValue::create(true); + _frameView = ftk::Observable::create(true); _scrollWidget = ftk::ScrollWidget::create(context, ftk::ScrollType::Both, shared_from_this()); _scrollWidget->setScrollEventsEnabled(false); @@ -156,7 +156,7 @@ namespace toucan return _frameView->get(); } - std::shared_ptr > TimelineWidget::observeFrameView() const + std::shared_ptr > TimelineWidget::observeFrameView() const { return _frameView; } diff --git a/lib/toucanView/TimelineWidget.h b/lib/toucanView/TimelineWidget.h index 5a958eb..724ee3c 100644 --- a/lib/toucanView/TimelineWidget.h +++ b/lib/toucanView/TimelineWidget.h @@ -47,7 +47,7 @@ namespace toucan bool hasFrameView() const; //! Observe whether frame view is enabled. - std::shared_ptr > observeFrameView() const; + std::shared_ptr > observeFrameView() const; //! Set whether frame view is enabled. void setFrameView(bool); @@ -81,7 +81,7 @@ namespace toucan OTIO_NS::RationalTime _currentTime; OTIO_NS::TimeRange _inOutRange; double _scale = 100.0; - std::shared_ptr > _frameView; + std::shared_ptr > _frameView; bool _sizeInit = true; std::optional _viewState; std::shared_ptr _thumbnailGenerator; diff --git a/lib/toucanView/ViewMenu.h b/lib/toucanView/ViewMenu.h index 212b089..51507cd 100644 --- a/lib/toucanView/ViewMenu.h +++ b/lib/toucanView/ViewMenu.h @@ -6,7 +6,7 @@ #include #include -#include +#include namespace toucan { diff --git a/lib/toucanView/ViewModel.cpp b/lib/toucanView/ViewModel.cpp index 40f1d4d..d158673 100644 --- a/lib/toucanView/ViewModel.cpp +++ b/lib/toucanView/ViewModel.cpp @@ -27,11 +27,11 @@ namespace toucan ViewModel::ViewModel(const std::shared_ptr& context) { - _zoomIn = ftk::ObservableValue::create(false); - _zoomOut = ftk::ObservableValue::create(false); - _zoomReset = ftk::ObservableValue::create(false); - _frameView = ftk::ObservableValue::create(true); - _options = ftk::ObservableValue::create(); + _zoomIn = ftk::Observable::create(false); + _zoomOut = ftk::Observable::create(false); + _zoomReset = ftk::Observable::create(false); + _frameView = ftk::Observable::create(true); + _options = ftk::Observable::create(); } ViewModel::~ViewModel() @@ -52,17 +52,17 @@ namespace toucan _zoomReset->setAlways(true); } - std::shared_ptr > ViewModel::observeZoomIn() const + std::shared_ptr > ViewModel::observeZoomIn() const { return _zoomIn; } - std::shared_ptr > ViewModel::observeZoomOut() const + std::shared_ptr > ViewModel::observeZoomOut() const { return _zoomOut; } - std::shared_ptr > ViewModel::observeZoomReset() const + std::shared_ptr > ViewModel::observeZoomReset() const { return _zoomReset; } @@ -72,7 +72,7 @@ namespace toucan return _frameView->get(); } - std::shared_ptr > ViewModel::observeFrameView() const + std::shared_ptr > ViewModel::observeFrameView() const { return _frameView; } @@ -87,7 +87,7 @@ namespace toucan return _options->get(); } - std::shared_ptr > ViewModel::observeOptions() const + std::shared_ptr > ViewModel::observeOptions() const { return _options; } @@ -175,7 +175,7 @@ namespace toucan catch (const std::exception&) {} - _options = ftk::ObservableValue::create(options); + _options = ftk::Observable::create(options); } GlobalViewModel::~GlobalViewModel() @@ -217,7 +217,7 @@ namespace toucan return _options->get(); } - std::shared_ptr > GlobalViewModel::observeOptions() const + std::shared_ptr > GlobalViewModel::observeOptions() const { return _options; } diff --git a/lib/toucanView/ViewModel.h b/lib/toucanView/ViewModel.h index 54ed737..aa2ae5a 100644 --- a/lib/toucanView/ViewModel.h +++ b/lib/toucanView/ViewModel.h @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include @@ -41,19 +41,19 @@ namespace toucan void zoomReset(); //! Observe the zoom in. - std::shared_ptr > observeZoomIn() const; + std::shared_ptr > observeZoomIn() const; //! Observe the zoom out. - std::shared_ptr > observeZoomOut() const; + std::shared_ptr > observeZoomOut() const; //! Observe the zoom reset. - std::shared_ptr > observeZoomReset() const; + std::shared_ptr > observeZoomReset() const; //! Get whether frame view is enabled. bool getFrameView() const; //! Observe whether frame view is enabled. - std::shared_ptr > observeFrameView() const; + std::shared_ptr > observeFrameView() const; //! Set whether frame view is enabled. void setFrameView(bool); @@ -62,17 +62,17 @@ namespace toucan const ViewOptions& getOptions() const; //! Observe the view options. - std::shared_ptr > observeOptions() const; + std::shared_ptr > observeOptions() const; //! Set the view options. void setOptions(const ViewOptions&); private: - std::shared_ptr > _zoomIn; - std::shared_ptr > _zoomOut; - std::shared_ptr > _zoomReset; - std::shared_ptr > _frameView; - std::shared_ptr > _options; + std::shared_ptr > _zoomIn; + std::shared_ptr > _zoomOut; + std::shared_ptr > _zoomReset; + std::shared_ptr > _frameView; + std::shared_ptr > _options; }; //! View background options. @@ -114,13 +114,13 @@ namespace toucan const GlobalViewOptions& getOptions() const; //! Observe the view options. - std::shared_ptr > observeOptions() const; + std::shared_ptr > observeOptions() const; //! Set the view options. void setOptions(const GlobalViewOptions&); private: std::shared_ptr _settings; - std::shared_ptr > _options; + std::shared_ptr > _options; }; } diff --git a/lib/toucanView/Viewport.cpp b/lib/toucanView/Viewport.cpp index c7f6435..c8211b8 100644 --- a/lib/toucanView/Viewport.cpp +++ b/lib/toucanView/Viewport.cpp @@ -26,9 +26,9 @@ namespace toucan _viewModel = file->getViewModel(); _imageSize.w = file->getImageSize().x; _imageSize.h = file->getImageSize().y; - _viewPos = ftk::ObservableValue::create(); - _viewZoom = ftk::ObservableValue::create(1.F); - _frameView = ftk::ObservableValue::create(true); + _viewPos = ftk::Observable::create(); + _viewZoom = ftk::Observable::create(1.F); + _frameView = ftk::Observable::create(true); _imageObserver = ftk::ValueObserver >::create( file->observeCurrentImage(), @@ -150,12 +150,12 @@ namespace toucan return _viewZoom->get(); } - std::shared_ptr > Viewport::observeViewPos() const + std::shared_ptr > Viewport::observeViewPos() const { return _viewPos; } - std::shared_ptr > Viewport::observeViewZoom() const + std::shared_ptr > Viewport::observeViewZoom() const { return _viewZoom; } @@ -207,7 +207,7 @@ namespace toucan return _frameView->get(); } - std::shared_ptr > Viewport::observeFrameView() const + std::shared_ptr > Viewport::observeFrameView() const { return _frameView; } diff --git a/lib/toucanView/Viewport.h b/lib/toucanView/Viewport.h index 579b87b..5634ee3 100644 --- a/lib/toucanView/Viewport.h +++ b/lib/toucanView/Viewport.h @@ -43,10 +43,10 @@ namespace toucan float getViewZoom() const; //! Observe the view position. - std::shared_ptr > observeViewPos() const; + std::shared_ptr > observeViewPos() const; //! Observe the view zoom. - std::shared_ptr > observeViewZoom() const; + std::shared_ptr > observeViewZoom() const; //! Set the view position and zoom. void setViewPosZoom(const ftk::V2I&, float); @@ -70,7 +70,7 @@ namespace toucan bool getFrameView() const; //! Observe whether frame view is enabled. - std::shared_ptr > observeFrameView() const; + std::shared_ptr > observeFrameView() const; //! Set whether frame view is enabled. void setFrameView(bool); @@ -93,9 +93,9 @@ namespace toucan ftk::Size2I _bImageSize; std::shared_ptr _bImage; CompareOptions _compareOptions; - std::shared_ptr > _viewPos; - std::shared_ptr > _viewZoom; - std::shared_ptr > _frameView; + std::shared_ptr > _viewPos; + std::shared_ptr > _viewZoom; + std::shared_ptr > _frameView; ViewOptions _options; GlobalViewOptions _globalOptions; ftk::V2I _viewMousePress; diff --git a/lib/toucanView/WindowModel.cpp b/lib/toucanView/WindowModel.cpp index 1487eb8..fcde926 100644 --- a/lib/toucanView/WindowModel.cpp +++ b/lib/toucanView/WindowModel.cpp @@ -67,8 +67,8 @@ namespace toucan } _components = ftk::ObservableMap::create(components); - _thumbnails = ftk::ObservableValue::create(thumbnails); - _tooltips = ftk::ObservableValue::create(tooltips); + _thumbnails = ftk::Observable::create(thumbnails); + _tooltips = ftk::Observable::create(tooltips); } WindowModel::~WindowModel() @@ -118,7 +118,7 @@ namespace toucan return _thumbnails->get(); } - std::shared_ptr > WindowModel::observeThumbnails() const + std::shared_ptr > WindowModel::observeThumbnails() const { return _thumbnails; } @@ -133,7 +133,7 @@ namespace toucan return _tooltips->get(); } - std::shared_ptr > WindowModel::observeTooltips() const + std::shared_ptr > WindowModel::observeTooltips() const { return _tooltips; } diff --git a/lib/toucanView/WindowModel.h b/lib/toucanView/WindowModel.h index b64cc6b..4aa5530 100644 --- a/lib/toucanView/WindowModel.h +++ b/lib/toucanView/WindowModel.h @@ -6,7 +6,7 @@ #include #include #include -#include +#include namespace toucan { @@ -52,7 +52,7 @@ namespace toucan bool getThumbnails() const; //! Observe whether thumbnails are enabled. - std::shared_ptr > observeThumbnails() const; + std::shared_ptr > observeThumbnails() const; //! Set whether thumbnails are enabled. void setThumbnails(bool); @@ -61,7 +61,7 @@ namespace toucan bool getTooltips() const; //! Observe whether tooltips are enabled. - std::shared_ptr > observeTooltips() const; + std::shared_ptr > observeTooltips() const; //! Set whether tooltips are enabled. void setTooltips(bool); @@ -69,7 +69,7 @@ namespace toucan private: std::shared_ptr _settings; std::shared_ptr > _components; - std::shared_ptr > _thumbnails; - std::shared_ptr > _tooltips; + std::shared_ptr > _thumbnails; + std::shared_ptr > _tooltips; }; } From deec0f7e5a444f74dad30270939ffd7a52534747 Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Fri, 26 Jun 2026 17:14:54 -0400 Subject: [PATCH 08/19] Renamed to latest feather-tk, ValueObserver to Observer, CmdLineValueArg to CmdLineArg Signed-off-by: Leigh Smith --- lib/toucanView/App.cpp | 2 +- lib/toucanView/App.h | 2 +- lib/toucanView/File.h | 2 +- lib/toucanView/FilesModel.h | 2 +- lib/toucanView/MainWindow.cpp | 8 ++++---- lib/toucanView/MainWindow.h | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/toucanView/App.cpp b/lib/toucanView/App.cpp index bec4e12..7de71b6 100644 --- a/lib/toucanView/App.cpp +++ b/lib/toucanView/App.cpp @@ -26,7 +26,7 @@ namespace toucan const std::shared_ptr& context, std::vector& argv) { - _input = ftk::CmdLineValueArg::create( + _input = ftk::CmdLineArg::create( "input", "Input timeline.", true); diff --git a/lib/toucanView/App.h b/lib/toucanView/App.h index ba7406a..326c251 100644 --- a/lib/toucanView/App.h +++ b/lib/toucanView/App.h @@ -55,7 +55,7 @@ namespace toucan void open(const std::filesystem::path&); private: - std::shared_ptr > _input; + std::shared_ptr > _input; std::shared_ptr _settings; std::shared_ptr _timeUnitsModel; std::shared_ptr _host; diff --git a/lib/toucanView/File.h b/lib/toucanView/File.h index d69aa91..45a28f1 100644 --- a/lib/toucanView/File.h +++ b/lib/toucanView/File.h @@ -86,6 +86,6 @@ namespace toucan std::shared_ptr > > _currentNode; OIIO::ImageBuf _imageBuf; - std::shared_ptr > _currentTimeObserver; + std::shared_ptr > _currentTimeObserver; }; } diff --git a/lib/toucanView/FilesModel.h b/lib/toucanView/FilesModel.h index c203e03..76c935d 100644 --- a/lib/toucanView/FilesModel.h +++ b/lib/toucanView/FilesModel.h @@ -136,7 +136,7 @@ namespace toucan std::shared_ptr > _compareOptions; std::shared_ptr _recentFilesModel; - std::shared_ptr > _currentTimeObserver; + std::shared_ptr > _currentTimeObserver; }; } diff --git a/lib/toucanView/MainWindow.cpp b/lib/toucanView/MainWindow.cpp index 462edb2..237ee2e 100644 --- a/lib/toucanView/MainWindow.cpp +++ b/lib/toucanView/MainWindow.cpp @@ -143,7 +143,7 @@ namespace toucan _files = files; }); - _addObserver = ftk::ValueObserver::create( + _addObserver = ftk::Observer::create( app->getFilesModel()->observeAdd(), [this, appWeak](int index) { @@ -161,7 +161,7 @@ namespace toucan } }); - _removeObserver = ftk::ValueObserver::create( + _removeObserver = ftk::Observer::create( app->getFilesModel()->observeRemove(), [this, appWeak](int index) { @@ -177,7 +177,7 @@ namespace toucan } }); - _fileObserver = ftk::ValueObserver::create( + _fileObserver = ftk::Observer::create( app->getFilesModel()->observeCurrentIndex(), [this](int index) { @@ -203,7 +203,7 @@ namespace toucan _infoBar->setVisible(i->second); }); - _tooltipsObserver = ftk::ValueObserver::create( + _tooltipsObserver = ftk::Observer::create( app->getWindowModel()->observeTooltips(), [this](bool value) { diff --git a/lib/toucanView/MainWindow.h b/lib/toucanView/MainWindow.h index 70667f7..d46f26d 100644 --- a/lib/toucanView/MainWindow.h +++ b/lib/toucanView/MainWindow.h @@ -74,11 +74,11 @@ namespace toucan std::shared_ptr _infoBar; std::shared_ptr > > _filesObserver; - std::shared_ptr > _addObserver; - std::shared_ptr > _removeObserver; - std::shared_ptr > _fileObserver; + std::shared_ptr > _addObserver; + std::shared_ptr > _removeObserver; + std::shared_ptr > _fileObserver; std::shared_ptr > _componentsObserver; - std::shared_ptr > _tooltipsObserver; + std::shared_ptr > _tooltipsObserver; }; } From 69ffa6a3e6c4411ba6839b01fcf08f89f1c1d1cf Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Fri, 26 Jun 2026 17:40:19 -0400 Subject: [PATCH 09/19] Renamed to latest feather-tk, ValueObserver to Observer, CmdLineValueArg to CmdLineArg Signed-off-by: Leigh Smith --- lib/toucanView/BackgroundTool.cpp | 2 +- lib/toucanView/BackgroundTool.h | 2 +- lib/toucanView/CompareMenu.cpp | 6 +++--- lib/toucanView/CompareMenu.h | 6 +++--- lib/toucanView/CompareTool.cpp | 6 +++--- lib/toucanView/CompareTool.h | 6 +++--- lib/toucanView/DetailsTool.cpp | 4 ++-- lib/toucanView/DetailsTool.h | 4 ++-- lib/toucanView/ExportTool.cpp | 2 +- lib/toucanView/ExportTool.h | 2 +- lib/toucanView/File.cpp | 2 +- lib/toucanView/FileMenu.cpp | 4 ++-- lib/toucanView/FileMenu.h | 4 ++-- lib/toucanView/FileTab.cpp | 2 +- lib/toucanView/FileTab.h | 2 +- lib/toucanView/FilesModel.cpp | 2 +- lib/toucanView/GraphTool.cpp | 6 +++--- lib/toucanView/GraphTool.h | 6 +++--- lib/toucanView/HUDWidget.cpp | 4 ++-- lib/toucanView/HUDWidget.h | 4 ++-- lib/toucanView/IItem.cpp | 2 +- lib/toucanView/IItem.h | 2 +- lib/toucanView/InfoBar.cpp | 2 +- lib/toucanView/InfoBar.h | 2 +- lib/toucanView/JSONTool.cpp | 2 +- lib/toucanView/JSONTool.h | 2 +- lib/toucanView/PlaybackBar.cpp | 10 +++++----- lib/toucanView/PlaybackBar.h | 10 +++++----- lib/toucanView/PlaybackMenu.cpp | 4 ++-- lib/toucanView/PlaybackMenu.h | 4 ++-- lib/toucanView/SelectMenu.cpp | 2 +- lib/toucanView/SelectMenu.h | 2 +- lib/toucanView/StackItem.cpp | 2 +- lib/toucanView/StackItem.h | 2 +- lib/toucanView/TimeMenu.cpp | 6 +++--- lib/toucanView/TimeMenu.h | 6 +++--- lib/toucanView/TimeWidgets.cpp | 4 ++-- lib/toucanView/TimeWidgets.h | 4 ++-- lib/toucanView/TimelineWidget.cpp | 6 +++--- lib/toucanView/TimelineWidget.h | 6 +++--- lib/toucanView/VideoClipItem.cpp | 2 +- lib/toucanView/VideoClipItem.h | 2 +- lib/toucanView/ViewMenu.cpp | 8 ++++---- lib/toucanView/ViewMenu.h | 8 ++++---- lib/toucanView/ViewToolBar.cpp | 4 ++-- lib/toucanView/ViewToolBar.h | 4 ++-- lib/toucanView/Viewport.cpp | 20 ++++++++++---------- lib/toucanView/Viewport.h | 20 ++++++++++---------- lib/toucanView/WindowMenu.cpp | 8 ++++---- lib/toucanView/WindowMenu.h | 8 ++++---- lib/toucanView/WindowToolBar.cpp | 2 +- lib/toucanView/WindowToolBar.h | 4 ++-- 52 files changed, 123 insertions(+), 123 deletions(-) diff --git a/lib/toucanView/BackgroundTool.cpp b/lib/toucanView/BackgroundTool.cpp index 4539335..ea291fd 100644 --- a/lib/toucanView/BackgroundTool.cpp +++ b/lib/toucanView/BackgroundTool.cpp @@ -97,7 +97,7 @@ namespace toucan } }); - _optionsObserver = ftk::ValueObserver::create( + _optionsObserver = ftk::Observer::create( _model->observeOptions(), [this](const GlobalViewOptions& value) { diff --git a/lib/toucanView/BackgroundTool.h b/lib/toucanView/BackgroundTool.h index c93c31f..8eaf7b8 100644 --- a/lib/toucanView/BackgroundTool.h +++ b/lib/toucanView/BackgroundTool.h @@ -52,7 +52,7 @@ namespace toucan std::shared_ptr _checkersColor1Widget; std::shared_ptr _checkersSizeSlider; - std::shared_ptr > _optionsObserver; + std::shared_ptr > _optionsObserver; }; } diff --git a/lib/toucanView/CompareMenu.cpp b/lib/toucanView/CompareMenu.cpp index ae5c9d3..b6237b8 100644 --- a/lib/toucanView/CompareMenu.cpp +++ b/lib/toucanView/CompareMenu.cpp @@ -94,7 +94,7 @@ namespace toucan }); addAction(_actions["Compare/Vertical"]); - _modeObserver = ftk::ValueObserver::create( + _modeObserver = ftk::Observer::create( app->getFilesModel()->observeCompareOptions(), [this](const CompareOptions& value) { @@ -126,7 +126,7 @@ namespace toucan } }); - _fileObserver = ftk::ValueObserver >::create( + _fileObserver = ftk::Observer >::create( app->getFilesModel()->observeCurrent(), [this](const std::shared_ptr& file) { @@ -134,7 +134,7 @@ namespace toucan _menuUpdate(); }); - _bIndexObserver = ftk::ValueObserver::create( + _bIndexObserver = ftk::Observer::create( _filesModel->observeBIndex(), [this](int index) { diff --git a/lib/toucanView/CompareMenu.h b/lib/toucanView/CompareMenu.h index 9eb5d2c..2f4e96f 100644 --- a/lib/toucanView/CompareMenu.h +++ b/lib/toucanView/CompareMenu.h @@ -45,8 +45,8 @@ namespace toucan std::vector > _bFileActions; std::shared_ptr > > _filesObserver; - std::shared_ptr > > _fileObserver; - std::shared_ptr > _bIndexObserver; - std::shared_ptr > _modeObserver; + std::shared_ptr > > _fileObserver; + std::shared_ptr > _bIndexObserver; + std::shared_ptr > _modeObserver; }; } diff --git a/lib/toucanView/CompareTool.cpp b/lib/toucanView/CompareTool.cpp index c1e26a7..9ac138b 100644 --- a/lib/toucanView/CompareTool.cpp +++ b/lib/toucanView/CompareTool.cpp @@ -164,7 +164,7 @@ namespace toucan _indexUpdate(); }); - _fileIndexObserver = ftk::ValueObserver::create( + _fileIndexObserver = ftk::Observer::create( _filesModel->observeCurrentIndex(), [this](int value) { @@ -172,7 +172,7 @@ namespace toucan _indexUpdate(); }); - _bIndexObserver = ftk::ValueObserver::create( + _bIndexObserver = ftk::Observer::create( _filesModel->observeBIndex(), [this](int value) { @@ -180,7 +180,7 @@ namespace toucan _indexUpdate(); }); - _compareOptionsObserver = ftk::ValueObserver::create( + _compareOptionsObserver = ftk::Observer::create( _filesModel->observeCompareOptions(), [this](const CompareOptions& value) { diff --git a/lib/toucanView/CompareTool.h b/lib/toucanView/CompareTool.h index b5c9185..6a9f31c 100644 --- a/lib/toucanView/CompareTool.h +++ b/lib/toucanView/CompareTool.h @@ -94,9 +94,9 @@ namespace toucan std::shared_ptr _resizeCheckBox; std::shared_ptr > > _filesObserver; - std::shared_ptr > _fileIndexObserver; - std::shared_ptr > _bIndexObserver; - std::shared_ptr > _compareOptionsObserver; + std::shared_ptr > _fileIndexObserver; + std::shared_ptr > _bIndexObserver; + std::shared_ptr > _compareOptionsObserver; }; } diff --git a/lib/toucanView/DetailsTool.cpp b/lib/toucanView/DetailsTool.cpp index 71737ca..e4bafa7 100644 --- a/lib/toucanView/DetailsTool.cpp +++ b/lib/toucanView/DetailsTool.cpp @@ -71,7 +71,7 @@ namespace toucan }); } - _timeUnitsObserver = ftk::ValueObserver::create( + _timeUnitsObserver = ftk::Observer::create( app->getTimeUnitsModel()->observeTimeUnits(), [this](TimeUnits value) { @@ -280,7 +280,7 @@ namespace toucan } }); - _fileObserver = ftk::ValueObserver >::create( + _fileObserver = ftk::Observer >::create( app->getFilesModel()->observeCurrent(), [this](const std::shared_ptr& file) { diff --git a/lib/toucanView/DetailsTool.h b/lib/toucanView/DetailsTool.h index c52bc7a..e0d5c1f 100644 --- a/lib/toucanView/DetailsTool.h +++ b/lib/toucanView/DetailsTool.h @@ -74,7 +74,7 @@ namespace toucan std::shared_ptr _inOutButton; std::vector, std::shared_ptr > > _labels; - std::shared_ptr > _timeUnitsObserver; + std::shared_ptr > _timeUnitsObserver; }; //! Details tool. @@ -108,7 +108,7 @@ namespace toucan std::shared_ptr _openButton; std::shared_ptr _closeButton; - std::shared_ptr > > _fileObserver; + std::shared_ptr > > _fileObserver; std::shared_ptr > _selectionObserver; }; } diff --git a/lib/toucanView/ExportTool.cpp b/lib/toucanView/ExportTool.cpp index 51090ce..9d445cd 100644 --- a/lib/toucanView/ExportTool.cpp +++ b/lib/toucanView/ExportTool.cpp @@ -46,7 +46,7 @@ namespace toucan _timer = ftk::Timer::create(context); _timer->setRepeating(true); - _fileObserver = ftk::ValueObserver >::create( + _fileObserver = ftk::Observer >::create( app->getFilesModel()->observeCurrent(), [this](const std::shared_ptr& file) { diff --git a/lib/toucanView/ExportTool.h b/lib/toucanView/ExportTool.h index 1f9a737..f08768d 100644 --- a/lib/toucanView/ExportTool.h +++ b/lib/toucanView/ExportTool.h @@ -112,7 +112,7 @@ namespace toucan std::shared_ptr _timer; - std::shared_ptr > > _fileObserver; + std::shared_ptr > > _fileObserver; }; //! Export tool. diff --git a/lib/toucanView/File.cpp b/lib/toucanView/File.cpp index b3a3bf2..e828f5a 100644 --- a/lib/toucanView/File.cpp +++ b/lib/toucanView/File.cpp @@ -41,7 +41,7 @@ namespace toucan path.parent_path(), _timelineWrapper); - _currentTimeObserver = ftk::ValueObserver::create( + _currentTimeObserver = ftk::Observer::create( _playbackModel->observeCurrentTime(), [this](const OTIO_NS::RationalTime& value) { diff --git a/lib/toucanView/FileMenu.cpp b/lib/toucanView/FileMenu.cpp index 9cd1d7b..025b6f6 100644 --- a/lib/toucanView/FileMenu.cpp +++ b/lib/toucanView/FileMenu.cpp @@ -146,7 +146,7 @@ namespace toucan } }); - _fileObserver = ftk::ValueObserver >::create( + _fileObserver = ftk::Observer >::create( _filesModel->observeCurrent(), [this](const std::shared_ptr& file) { @@ -154,7 +154,7 @@ namespace toucan _menuUpdate(); }); - _fileIndexObserver = ftk::ValueObserver::create( + _fileIndexObserver = ftk::Observer::create( _filesModel->observeCurrentIndex(), [this](int index) { diff --git a/lib/toucanView/FileMenu.h b/lib/toucanView/FileMenu.h index 6a8f92c..93aa4a6 100644 --- a/lib/toucanView/FileMenu.h +++ b/lib/toucanView/FileMenu.h @@ -52,8 +52,8 @@ namespace toucan std::vector > _recentFilesActions; std::shared_ptr > > _filesObserver; - std::shared_ptr > > _fileObserver; - std::shared_ptr > _fileIndexObserver; + std::shared_ptr > > _fileObserver; + std::shared_ptr > _fileIndexObserver; std::shared_ptr > _recentFilesObserver; }; } diff --git a/lib/toucanView/FileTab.cpp b/lib/toucanView/FileTab.cpp index c19ee1f..4200e6d 100644 --- a/lib/toucanView/FileTab.cpp +++ b/lib/toucanView/FileTab.cpp @@ -22,7 +22,7 @@ namespace toucan _hudWidget = HUDWidget::create(context, app, file, shared_from_this()); - _viewOptionsObserver = ftk::ValueObserver::create( + _viewOptionsObserver = ftk::Observer::create( app->getGlobalViewModel()->observeOptions(), [this](const GlobalViewOptions& value) { diff --git a/lib/toucanView/FileTab.h b/lib/toucanView/FileTab.h index 1630833..5cf8c94 100644 --- a/lib/toucanView/FileTab.h +++ b/lib/toucanView/FileTab.h @@ -40,7 +40,7 @@ namespace toucan private: std::shared_ptr _viewport; std::shared_ptr _hudWidget; - std::shared_ptr > _viewOptionsObserver; + std::shared_ptr > _viewOptionsObserver; }; } diff --git a/lib/toucanView/FilesModel.cpp b/lib/toucanView/FilesModel.cpp index 9c8a3c3..f085096 100644 --- a/lib/toucanView/FilesModel.cpp +++ b/lib/toucanView/FilesModel.cpp @@ -361,7 +361,7 @@ namespace toucan { if (auto file = _current->get()) { - _currentTimeObserver = ftk::ValueObserver::create( + _currentTimeObserver = ftk::Observer::create( file->getPlaybackModel()->observeCurrentTime(), [this](const OTIO_NS::RationalTime& value) { diff --git a/lib/toucanView/GraphTool.cpp b/lib/toucanView/GraphTool.cpp index e1717ba..c166205 100644 --- a/lib/toucanView/GraphTool.cpp +++ b/lib/toucanView/GraphTool.cpp @@ -36,14 +36,14 @@ namespace toucan } }); - _fileObserver = ftk::ValueObserver >::create( + _fileObserver = ftk::Observer >::create( app->getFilesModel()->observeCurrent(), [this](const std::shared_ptr& file) { _file = file; if (file) { - _rootNodeObserver = ftk::ValueObserver >::create( + _rootNodeObserver = ftk::Observer >::create( file->observeRootNode(), [this](const std::shared_ptr& node) { @@ -52,7 +52,7 @@ namespace toucan _graphUpdate(); }); - _currentNodeObserver = ftk::ValueObserver >::create( + _currentNodeObserver = ftk::Observer >::create( file->observeCurrentNode(), [this](const std::shared_ptr& node) { diff --git a/lib/toucanView/GraphTool.h b/lib/toucanView/GraphTool.h index 5f62183..1e7385d 100644 --- a/lib/toucanView/GraphTool.h +++ b/lib/toucanView/GraphTool.h @@ -74,9 +74,9 @@ namespace toucan }; SizeData _size; - std::shared_ptr > > _fileObserver; - std::shared_ptr > > _rootNodeObserver; - std::shared_ptr > > _currentNodeObserver; + std::shared_ptr > > _fileObserver; + std::shared_ptr > > _rootNodeObserver; + std::shared_ptr > > _currentNodeObserver; }; //! Image graph tool. diff --git a/lib/toucanView/HUDWidget.cpp b/lib/toucanView/HUDWidget.cpp index f882be0..3bc609c 100644 --- a/lib/toucanView/HUDWidget.cpp +++ b/lib/toucanView/HUDWidget.cpp @@ -66,7 +66,7 @@ namespace toucan _labels["Time"]->setMarginRole(ftk::SizeRole::MarginInside); _labels["Time"]->setBackgroundRole(ftk::ColorRole::Overlay); - _currentTimeObserver = ftk::ValueObserver::create( + _currentTimeObserver = ftk::Observer::create( file->getPlaybackModel()->observeCurrentTime(), [this](const OTIO_NS::RationalTime& value) { @@ -74,7 +74,7 @@ namespace toucan _widgetUpdate(); }); - _timeRangeObserver = ftk::ValueObserver::create( + _timeRangeObserver = ftk::Observer::create( file->getPlaybackModel()->observeTimeRange(), [this](const OTIO_NS::TimeRange& value) { diff --git a/lib/toucanView/HUDWidget.h b/lib/toucanView/HUDWidget.h index 8634eaf..d5fb85a 100644 --- a/lib/toucanView/HUDWidget.h +++ b/lib/toucanView/HUDWidget.h @@ -45,8 +45,8 @@ namespace toucan std::shared_ptr _layout; std::map > _labels; - std::shared_ptr > _currentTimeObserver; - std::shared_ptr > _timeRangeObserver; + std::shared_ptr > _currentTimeObserver; + std::shared_ptr > _timeRangeObserver; }; } diff --git a/lib/toucanView/IItem.cpp b/lib/toucanView/IItem.cpp index e514212..2b7f0ff 100644 --- a/lib/toucanView/IItem.cpp +++ b/lib/toucanView/IItem.cpp @@ -23,7 +23,7 @@ namespace toucan _file = data.file; _object = object; - _timeUnitsObserver = ftk::ValueObserver::create( + _timeUnitsObserver = ftk::Observer::create( data.app->getTimeUnitsModel()->observeTimeUnits(), [this](TimeUnits value) { diff --git a/lib/toucanView/IItem.h b/lib/toucanView/IItem.h index feef60c..b686723 100644 --- a/lib/toucanView/IItem.h +++ b/lib/toucanView/IItem.h @@ -66,6 +66,6 @@ namespace toucan std::shared_ptr _menu; private: - std::shared_ptr > _timeUnitsObserver; + std::shared_ptr > _timeUnitsObserver; }; } diff --git a/lib/toucanView/InfoBar.cpp b/lib/toucanView/InfoBar.cpp index 3cf7eee..511bf01 100644 --- a/lib/toucanView/InfoBar.cpp +++ b/lib/toucanView/InfoBar.cpp @@ -23,7 +23,7 @@ namespace toucan _label = ftk::Label::create(context, _layout); _label->setMarginRole(ftk::SizeRole::MarginInside); - _fileObserver = ftk::ValueObserver >::create( + _fileObserver = ftk::Observer >::create( app->getFilesModel()->observeCurrent(), [this](const std::shared_ptr& file) { diff --git a/lib/toucanView/InfoBar.h b/lib/toucanView/InfoBar.h index 5924d8a..92119f4 100644 --- a/lib/toucanView/InfoBar.h +++ b/lib/toucanView/InfoBar.h @@ -39,7 +39,7 @@ namespace toucan std::shared_ptr _layout; std::shared_ptr _label; - std::shared_ptr > > _fileObserver; + std::shared_ptr > > _fileObserver; }; } diff --git a/lib/toucanView/JSONTool.cpp b/lib/toucanView/JSONTool.cpp index 3400eda..5c3f9fc 100644 --- a/lib/toucanView/JSONTool.cpp +++ b/lib/toucanView/JSONTool.cpp @@ -175,7 +175,7 @@ namespace toucan } }); - _fileObserver = ftk::ValueObserver >::create( + _fileObserver = ftk::Observer >::create( app->getFilesModel()->observeCurrent(), [this](const std::shared_ptr& file) { diff --git a/lib/toucanView/JSONTool.h b/lib/toucanView/JSONTool.h index 7a64a14..4062483 100644 --- a/lib/toucanView/JSONTool.h +++ b/lib/toucanView/JSONTool.h @@ -92,7 +92,7 @@ namespace toucan std::shared_ptr _openButton; std::shared_ptr _closeButton; - std::shared_ptr > > _fileObserver; + std::shared_ptr > > _fileObserver; std::shared_ptr > _selectionObserver; }; } diff --git a/lib/toucanView/PlaybackBar.cpp b/lib/toucanView/PlaybackBar.cpp index d7aa635..27281e7 100644 --- a/lib/toucanView/PlaybackBar.cpp +++ b/lib/toucanView/PlaybackBar.cpp @@ -75,14 +75,14 @@ namespace toucan } }); - _fileObserver = ftk::ValueObserver >::create( + _fileObserver = ftk::Observer >::create( app->getFilesModel()->observeCurrent(), [this](const std::shared_ptr& file) { _file = file; if (file) { - _timeRangeObserver = ftk::ValueObserver::create( + _timeRangeObserver = ftk::Observer::create( file->getPlaybackModel()->observeTimeRange(), [this](const OTIO_NS::TimeRange& value) { @@ -90,7 +90,7 @@ namespace toucan _timeRangeUpdate(); }); - _currentTimeObserver = ftk::ValueObserver::create( + _currentTimeObserver = ftk::Observer::create( file->getPlaybackModel()->observeCurrentTime(), [this](const OTIO_NS::RationalTime& value) { @@ -98,7 +98,7 @@ namespace toucan _currentTimeUpdate(); }); - _playbackObserver = ftk::ValueObserver::create( + _playbackObserver = ftk::Observer::create( file->getPlaybackModel()->observePlayback(), [this](Playback value) { @@ -127,7 +127,7 @@ namespace toucan _durationLabel->setEnabled(file.get()); }); - _timeUnitsObserver = ftk::ValueObserver::create( + _timeUnitsObserver = ftk::Observer::create( app->getTimeUnitsModel()->observeTimeUnits(), [this](TimeUnits value) { diff --git a/lib/toucanView/PlaybackBar.h b/lib/toucanView/PlaybackBar.h index 3faf451..ad1ae77 100644 --- a/lib/toucanView/PlaybackBar.h +++ b/lib/toucanView/PlaybackBar.h @@ -54,11 +54,11 @@ namespace toucan std::shared_ptr _durationLabel; std::shared_ptr _timeUnitsComboBox; - std::shared_ptr > > _fileObserver; - std::shared_ptr > _timeRangeObserver; - std::shared_ptr > _currentTimeObserver; - std::shared_ptr > _playbackObserver; - std::shared_ptr > _timeUnitsObserver; + std::shared_ptr > > _fileObserver; + std::shared_ptr > _timeRangeObserver; + std::shared_ptr > _currentTimeObserver; + std::shared_ptr > _playbackObserver; + std::shared_ptr > _timeUnitsObserver; }; } diff --git a/lib/toucanView/PlaybackMenu.cpp b/lib/toucanView/PlaybackMenu.cpp index 2f3ddac..65d22ea 100644 --- a/lib/toucanView/PlaybackMenu.cpp +++ b/lib/toucanView/PlaybackMenu.cpp @@ -74,7 +74,7 @@ namespace toucan }); addAction(_actions["Playback/Toggle"]); - _fileObserver = ftk::ValueObserver >::create( + _fileObserver = ftk::Observer >::create( app->getFilesModel()->observeCurrent(), [this](const std::shared_ptr& file) { @@ -106,7 +106,7 @@ namespace toucan const bool file = _file.get(); if (file) { - _playbackObserver = ftk::ValueObserver::create( + _playbackObserver = ftk::Observer::create( _file->getPlaybackModel()->observePlayback(), [this](Playback value) { diff --git a/lib/toucanView/PlaybackMenu.h b/lib/toucanView/PlaybackMenu.h index fadc943..3c70862 100644 --- a/lib/toucanView/PlaybackMenu.h +++ b/lib/toucanView/PlaybackMenu.h @@ -42,8 +42,8 @@ namespace toucan std::map > _actions; - std::shared_ptr > > _fileObserver; - std::shared_ptr > _playbackObserver; + std::shared_ptr > > _fileObserver; + std::shared_ptr > _playbackObserver; }; } diff --git a/lib/toucanView/SelectMenu.cpp b/lib/toucanView/SelectMenu.cpp index 73559e2..2bc72fc 100644 --- a/lib/toucanView/SelectMenu.cpp +++ b/lib/toucanView/SelectMenu.cpp @@ -97,7 +97,7 @@ namespace toucan }); addAction(_actions["Select/Invert"]); - _fileObserver = ftk::ValueObserver >::create( + _fileObserver = ftk::Observer >::create( app->getFilesModel()->observeCurrent(), [this](const std::shared_ptr& file) { diff --git a/lib/toucanView/SelectMenu.h b/lib/toucanView/SelectMenu.h index 6253d24..8bdf434 100644 --- a/lib/toucanView/SelectMenu.h +++ b/lib/toucanView/SelectMenu.h @@ -40,7 +40,7 @@ namespace toucan std::map > _actions; - std::shared_ptr > > _fileObserver; + std::shared_ptr > > _fileObserver; }; } diff --git a/lib/toucanView/StackItem.cpp b/lib/toucanView/StackItem.cpp index ca62c38..6002c22 100644 --- a/lib/toucanView/StackItem.cpp +++ b/lib/toucanView/StackItem.cpp @@ -92,7 +92,7 @@ namespace toucan _textUpdate(); - _thumbnailsObserver = ftk::ValueObserver::create( + _thumbnailsObserver = ftk::Observer::create( data.app->getWindowModel()->observeThumbnails(), [this](bool value) { diff --git a/lib/toucanView/StackItem.h b/lib/toucanView/StackItem.h index a0200bf..e991413 100644 --- a/lib/toucanView/StackItem.h +++ b/lib/toucanView/StackItem.h @@ -57,7 +57,7 @@ namespace toucan std::vector > _markerItems; std::shared_ptr _timeLayout; - std::shared_ptr > _thumbnailsObserver; + std::shared_ptr > _thumbnailsObserver; struct SizeData { diff --git a/lib/toucanView/TimeMenu.cpp b/lib/toucanView/TimeMenu.cpp index cbf0d1a..6f9c3d6 100644 --- a/lib/toucanView/TimeMenu.cpp +++ b/lib/toucanView/TimeMenu.cpp @@ -270,21 +270,21 @@ namespace toucan }); addAction(_actions["Time/InOutPointSelection"]); - _fileObserver = ftk::ValueObserver >::create( + _fileObserver = ftk::Observer >::create( app->getFilesModel()->observeCurrent(), [this](const std::shared_ptr& file) { _file = file; if (_file) { - _timeRangeObserver = ftk::ValueObserver::create( + _timeRangeObserver = ftk::Observer::create( _file->getPlaybackModel()->observeTimeRange(), [this](const OTIO_NS::TimeRange& value) { _timeRange = value; _menuUpdate(); }); - _inOutRangeObserver = ftk::ValueObserver::create( + _inOutRangeObserver = ftk::Observer::create( _file->getPlaybackModel()->observeInOutRange(), [this](const OTIO_NS::TimeRange& value) { diff --git a/lib/toucanView/TimeMenu.h b/lib/toucanView/TimeMenu.h index 0d8bee4..11ef71c 100644 --- a/lib/toucanView/TimeMenu.h +++ b/lib/toucanView/TimeMenu.h @@ -47,9 +47,9 @@ namespace toucan std::map > _actions; - std::shared_ptr > > _fileObserver; - std::shared_ptr > _timeRangeObserver; - std::shared_ptr > _inOutRangeObserver; + std::shared_ptr > > _fileObserver; + std::shared_ptr > _timeRangeObserver; + std::shared_ptr > _inOutRangeObserver; std::shared_ptr > _selectionObserver; }; } diff --git a/lib/toucanView/TimeWidgets.cpp b/lib/toucanView/TimeWidgets.cpp index 039bb2d..7c529cc 100644 --- a/lib/toucanView/TimeWidgets.cpp +++ b/lib/toucanView/TimeWidgets.cpp @@ -209,7 +209,7 @@ namespace toucan _timeDec(); }); - _timeUnitsObserver = ftk::ValueObserver::create( + _timeUnitsObserver = ftk::Observer::create( timeUnitsModel->observeTimeUnits(), [this](TimeUnits value) { @@ -343,7 +343,7 @@ namespace toucan _timeUpdate(); - _timeUnitsObserver = ftk::ValueObserver::create( + _timeUnitsObserver = ftk::Observer::create( timeUnitsModel->observeTimeUnits(), [this](TimeUnits value) { diff --git a/lib/toucanView/TimeWidgets.h b/lib/toucanView/TimeWidgets.h index 95906a0..59ac76a 100644 --- a/lib/toucanView/TimeWidgets.h +++ b/lib/toucanView/TimeWidgets.h @@ -124,7 +124,7 @@ namespace toucan std::shared_ptr _incButtons; std::function _callback; - std::shared_ptr > _timeUnitsObserver; + std::shared_ptr > _timeUnitsObserver; }; //! Time label. @@ -162,7 +162,7 @@ namespace toucan std::shared_ptr _label; - std::shared_ptr > _timeUnitsObserver; + std::shared_ptr > _timeUnitsObserver; }; } diff --git a/lib/toucanView/TimelineWidget.cpp b/lib/toucanView/TimelineWidget.cpp index f605750..00474e1 100644 --- a/lib/toucanView/TimelineWidget.cpp +++ b/lib/toucanView/TimelineWidget.cpp @@ -35,7 +35,7 @@ namespace toucan _scrollWidget->setBorder(false); auto appWeak = std::weak_ptr(app); - _fileObserver = ftk::ValueObserver >::create( + _fileObserver = ftk::Observer >::create( app->getFilesModel()->observeCurrent(), [this, appWeak](const std::shared_ptr& file) { @@ -87,7 +87,7 @@ namespace toucan }); _scrollWidget->setWidget(_timelineItem); - _currentTimeObserver = ftk::ValueObserver::create( + _currentTimeObserver = ftk::Observer::create( file->getPlaybackModel()->observeCurrentTime(), [this](const OTIO_NS::RationalTime& value) { @@ -99,7 +99,7 @@ namespace toucan _scrollUpdate(); }); - _inOutRangeObserver = ftk::ValueObserver::create( + _inOutRangeObserver = ftk::Observer::create( file->getPlaybackModel()->observeInOutRange(), [this](const OTIO_NS::TimeRange& value) { diff --git a/lib/toucanView/TimelineWidget.h b/lib/toucanView/TimelineWidget.h index 724ee3c..fb6542e 100644 --- a/lib/toucanView/TimelineWidget.h +++ b/lib/toucanView/TimelineWidget.h @@ -102,8 +102,8 @@ namespace toucan }; MouseData _mouse; - std::shared_ptr > > _fileObserver; - std::shared_ptr > _currentTimeObserver; - std::shared_ptr > _inOutRangeObserver; + std::shared_ptr > > _fileObserver; + std::shared_ptr > _currentTimeObserver; + std::shared_ptr > _inOutRangeObserver; }; } diff --git a/lib/toucanView/VideoClipItem.cpp b/lib/toucanView/VideoClipItem.cpp index 6893349..3f8e921 100644 --- a/lib/toucanView/VideoClipItem.cpp +++ b/lib/toucanView/VideoClipItem.cpp @@ -88,7 +88,7 @@ namespace toucan _textUpdate(); - _thumbnailsObserver = ftk::ValueObserver::create( + _thumbnailsObserver = ftk::Observer::create( data.app->getWindowModel()->observeThumbnails(), [this](bool value) { diff --git a/lib/toucanView/VideoClipItem.h b/lib/toucanView/VideoClipItem.h index eed412b..8c5d91c 100644 --- a/lib/toucanView/VideoClipItem.h +++ b/lib/toucanView/VideoClipItem.h @@ -61,7 +61,7 @@ namespace toucan std::shared_ptr _markerLayout; std::vector > _markerItems; - std::shared_ptr > _thumbnailsObserver; + std::shared_ptr > _thumbnailsObserver; struct SizeData { diff --git a/lib/toucanView/ViewMenu.cpp b/lib/toucanView/ViewMenu.cpp index 6b79c69..b10a5a4 100644 --- a/lib/toucanView/ViewMenu.cpp +++ b/lib/toucanView/ViewMenu.cpp @@ -190,7 +190,7 @@ namespace toucan _actions["View/HUD"]->setTooltip("Toggle the HUD (Heads Up Display)"); addAction(_actions["View/HUD"]); - _fileObserver = ftk::ValueObserver >::create( + _fileObserver = ftk::Observer >::create( app->getFilesModel()->observeCurrent(), [this](const std::shared_ptr& file) { @@ -198,7 +198,7 @@ namespace toucan _menuUpdate(); }); - _globalOptionsObserver = ftk::ValueObserver::create( + _globalOptionsObserver = ftk::Observer::create( app->getGlobalViewModel()->observeOptions(), [this](const GlobalViewOptions& value) { @@ -229,14 +229,14 @@ namespace toucan const bool file = _file.get(); if (file) { - _frameViewObserver = ftk::ValueObserver::create( + _frameViewObserver = ftk::Observer::create( _file->getViewModel()->observeFrameView(), [this](bool value) { setChecked(_actions["View/Frame"], value); }); - _optionsObserver = ftk::ValueObserver::create( + _optionsObserver = ftk::Observer::create( _file->getViewModel()->observeOptions(), [this](const ViewOptions& value) { diff --git a/lib/toucanView/ViewMenu.h b/lib/toucanView/ViewMenu.h index 51507cd..1579f3a 100644 --- a/lib/toucanView/ViewMenu.h +++ b/lib/toucanView/ViewMenu.h @@ -41,10 +41,10 @@ namespace toucan std::map > _actions; - std::shared_ptr > > _fileObserver; - std::shared_ptr > _frameViewObserver; - std::shared_ptr > _optionsObserver; - std::shared_ptr > _globalOptionsObserver; + std::shared_ptr > > _fileObserver; + std::shared_ptr > _frameViewObserver; + std::shared_ptr > _optionsObserver; + std::shared_ptr > _globalOptionsObserver; }; } diff --git a/lib/toucanView/ViewToolBar.cpp b/lib/toucanView/ViewToolBar.cpp index b3a9f43..72e500f 100644 --- a/lib/toucanView/ViewToolBar.cpp +++ b/lib/toucanView/ViewToolBar.cpp @@ -49,7 +49,7 @@ namespace toucan _widgetUpdate(); }); - _fileObserver = ftk::ValueObserver >::create( + _fileObserver = ftk::Observer >::create( app->getFilesModel()->observeCurrent(), [this](const std::shared_ptr& file) { @@ -93,7 +93,7 @@ namespace toucan if (_file) { - _frameViewObserver = ftk::ValueObserver::create( + _frameViewObserver = ftk::Observer::create( _file->getViewModel()->observeFrameView(), [this](bool value) { diff --git a/lib/toucanView/ViewToolBar.h b/lib/toucanView/ViewToolBar.h index fdf1503..22ef4f9 100644 --- a/lib/toucanView/ViewToolBar.h +++ b/lib/toucanView/ViewToolBar.h @@ -46,8 +46,8 @@ namespace toucan std::map > _buttons; std::shared_ptr > > _filesObserver; - std::shared_ptr > > _fileObserver; - std::shared_ptr > _frameViewObserver; + std::shared_ptr > > _fileObserver; + std::shared_ptr > _frameViewObserver; }; } diff --git a/lib/toucanView/Viewport.cpp b/lib/toucanView/Viewport.cpp index c8211b8..1218062 100644 --- a/lib/toucanView/Viewport.cpp +++ b/lib/toucanView/Viewport.cpp @@ -30,7 +30,7 @@ namespace toucan _viewZoom = ftk::Observable::create(1.F); _frameView = ftk::Observable::create(true); - _imageObserver = ftk::ValueObserver >::create( + _imageObserver = ftk::Observer >::create( file->observeCurrentImage(), [this](const std::shared_ptr& value) { @@ -38,7 +38,7 @@ namespace toucan setDrawUpdate(); }); - _bObserver = ftk::ValueObserver >::create( + _bObserver = ftk::Observer >::create( app->getFilesModel()->observeBFile(), [this](const std::shared_ptr& value) { @@ -47,7 +47,7 @@ namespace toucan const auto& imageSize = value->getImageSize(); _bImageSize.w = imageSize.x; _bImageSize.h = imageSize.y; - _bImageObserver = ftk::ValueObserver >::create( + _bImageObserver = ftk::Observer >::create( value->observeCurrentImage(), [this](const std::shared_ptr& value) { @@ -64,7 +64,7 @@ namespace toucan } }); - _compareOptionsObserver = ftk::ValueObserver::create( + _compareOptionsObserver = ftk::Observer::create( app->getFilesModel()->observeCompareOptions(), [this](const CompareOptions& value) { @@ -72,7 +72,7 @@ namespace toucan setDrawUpdate(); }); - _zoomInObserver = ftk::ValueObserver::create( + _zoomInObserver = ftk::Observer::create( _viewModel->observeZoomIn(), [this](bool value) { @@ -82,7 +82,7 @@ namespace toucan } }); - _zoomOutObserver = ftk::ValueObserver::create( + _zoomOutObserver = ftk::Observer::create( _viewModel->observeZoomOut(), [this](bool value) { @@ -92,7 +92,7 @@ namespace toucan } }); - _zoomResetObserver = ftk::ValueObserver::create( + _zoomResetObserver = ftk::Observer::create( _viewModel->observeZoomReset(), [this](bool value) { @@ -102,14 +102,14 @@ namespace toucan } }); - _frameObserver = ftk::ValueObserver::create( + _frameObserver = ftk::Observer::create( _viewModel->observeFrameView(), [this](bool value) { setFrameView(value); }); - _optionsObserver = ftk::ValueObserver::create( + _optionsObserver = ftk::Observer::create( _viewModel->observeOptions(), [this](const ViewOptions& value) { @@ -117,7 +117,7 @@ namespace toucan setDrawUpdate(); }); - _globalOptionsObserver = ftk::ValueObserver::create( + _globalOptionsObserver = ftk::Observer::create( app->getGlobalViewModel()->observeOptions(), [this](const GlobalViewOptions& value) { diff --git a/lib/toucanView/Viewport.h b/lib/toucanView/Viewport.h index 5634ee3..92f98be 100644 --- a/lib/toucanView/Viewport.h +++ b/lib/toucanView/Viewport.h @@ -100,16 +100,16 @@ namespace toucan GlobalViewOptions _globalOptions; ftk::V2I _viewMousePress; - std::shared_ptr > > _imageObserver; - std::shared_ptr > > _bObserver; - std::shared_ptr > > _bImageObserver; - std::shared_ptr > _compareOptionsObserver; - std::shared_ptr > _zoomInObserver; - std::shared_ptr > _zoomOutObserver; - std::shared_ptr > _zoomResetObserver; - std::shared_ptr > _frameObserver; - std::shared_ptr > _optionsObserver; - std::shared_ptr > _globalOptionsObserver; + std::shared_ptr > > _imageObserver; + std::shared_ptr > > _bObserver; + std::shared_ptr > > _bImageObserver; + std::shared_ptr > _compareOptionsObserver; + std::shared_ptr > _zoomInObserver; + std::shared_ptr > _zoomOutObserver; + std::shared_ptr > _zoomResetObserver; + std::shared_ptr > _frameObserver; + std::shared_ptr > _optionsObserver; + std::shared_ptr > _globalOptionsObserver; }; } diff --git a/lib/toucanView/WindowMenu.cpp b/lib/toucanView/WindowMenu.cpp index 3c5b590..03a1497 100644 --- a/lib/toucanView/WindowMenu.cpp +++ b/lib/toucanView/WindowMenu.cpp @@ -193,7 +193,7 @@ namespace toucan }); addAction(_actions["Window/Tooltips"]); - _fullScreenObserver = ftk::ValueObserver::create( + _fullScreenObserver = ftk::Observer::create( window->observeFullScreen(), [this](bool value) { @@ -214,7 +214,7 @@ namespace toucan setChecked(_actions["Window/InfoBar"], i->second); }); - _displayScaleObserver = ftk::ValueObserver::create( + _displayScaleObserver = ftk::Observer::create( window->observeDisplayScale(), [this](float value) { @@ -225,14 +225,14 @@ namespace toucan _menus["Window/DisplayScale"]->setChecked(_actions["Window/DisplayScale/3.0"], 3.F == value); }); - _thumbnailsObserver = ftk::ValueObserver::create( + _thumbnailsObserver = ftk::Observer::create( app->getWindowModel()->observeThumbnails(), [this](bool value) { setChecked(_actions["Window/Thumbnails"], value); }); - _tooltipsObserver = ftk::ValueObserver::create( + _tooltipsObserver = ftk::Observer::create( app->getWindowModel()->observeTooltips(), [this](bool value) { diff --git a/lib/toucanView/WindowMenu.h b/lib/toucanView/WindowMenu.h index c624bbf..1ffa197 100644 --- a/lib/toucanView/WindowMenu.h +++ b/lib/toucanView/WindowMenu.h @@ -41,11 +41,11 @@ namespace toucan std::map > _menus; std::map > _actions; - std::shared_ptr > _fullScreenObserver; + std::shared_ptr > _fullScreenObserver; std::shared_ptr > _componentsObserver; - std::shared_ptr > _displayScaleObserver; - std::shared_ptr > _thumbnailsObserver; - std::shared_ptr > _tooltipsObserver; + std::shared_ptr > _displayScaleObserver; + std::shared_ptr > _thumbnailsObserver; + std::shared_ptr > _tooltipsObserver; }; } diff --git a/lib/toucanView/WindowToolBar.cpp b/lib/toucanView/WindowToolBar.cpp index c1e1cf0..30dc3ef 100644 --- a/lib/toucanView/WindowToolBar.cpp +++ b/lib/toucanView/WindowToolBar.cpp @@ -37,7 +37,7 @@ namespace toucan button = ftk::ToolButton::create(context, i->second, hLayout); _buttons["Window/Playback"] = button; - _fullScreenObserver = ftk::ValueObserver::create( + _fullScreenObserver = ftk::Observer::create( window->observeFullScreen(), [this](bool value) { diff --git a/lib/toucanView/WindowToolBar.h b/lib/toucanView/WindowToolBar.h index 4def544..225e4d5 100644 --- a/lib/toucanView/WindowToolBar.h +++ b/lib/toucanView/WindowToolBar.h @@ -45,8 +45,8 @@ namespace toucan std::shared_ptr _layout; std::map > _buttons; - std::shared_ptr > _frameViewObserver; - std::shared_ptr > _fullScreenObserver; + std::shared_ptr > _frameViewObserver; + std::shared_ptr > _fullScreenObserver; std::shared_ptr > _componentObserver; }; } From 4c255058e5c767cacf8d2894fc4ac1797cc75f21 Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Fri, 26 Jun 2026 17:52:27 -0400 Subject: [PATCH 10/19] Renamed CmdLineValueOption and CmdLineValueArg to CmdLineOption and CmdLineArg for new feather-tk API Signed-off-by: Leigh Smith --- bin/toucan-filmstrip/App.cpp | 4 ++-- bin/toucan-render/App.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/toucan-filmstrip/App.cpp b/bin/toucan-filmstrip/App.cpp index fb19d48..7a9efeb 100644 --- a/bin/toucan-filmstrip/App.cpp +++ b/bin/toucan-filmstrip/App.cpp @@ -15,10 +15,10 @@ namespace toucan const std::shared_ptr& context, std::vector& argv) { - _cmdLine.input = ftk::CmdLineValueArg::create( + _cmdLine.input = ftk::CmdLineArg::create( "input", "Input .otio file."); - _cmdLine.output = ftk::CmdLineValueArg::create( + _cmdLine.output = ftk::CmdLineArg::create( "output", "Output image file."); diff --git a/bin/toucan-render/App.cpp b/bin/toucan-render/App.cpp index 83f658e..db84636 100644 --- a/bin/toucan-render/App.cpp +++ b/bin/toucan-render/App.cpp @@ -47,10 +47,10 @@ namespace toucan const std::shared_ptr& context, std::vector& argv) { - _cmdLine.input = ftk::CmdLineValueArg::create( + _cmdLine.input = ftk::CmdLineArg::create( "input", "Input .otio file."); - _cmdLine.output = ftk::CmdLineValueArg::create( + _cmdLine.output = ftk::CmdLineArg::create( "output", "Output image or movie file. Use a dash ('-') to write raw frames or y4m to stdout."); @@ -64,7 +64,7 @@ namespace toucan { y4mList.push_back(spec.first); } - _cmdLine.videoCodec = ftk::CmdLineValueOption::create( + _cmdLine.videoCodec = ftk::CmdLineOption::create( std::vector{ "-vcodec" }, "Set the video codec.", "", @@ -82,13 +82,13 @@ namespace toucan _cmdLine.printSize = ftk::CmdLineFlagOption::create( std::vector{ "-print_size" }, "Print the timeline image size."); - _cmdLine.raw = ftk::CmdLineValueOption::create( + _cmdLine.raw = ftk::CmdLineOption::create( std::vector{ "-raw" }, "Raw pixel format to send to stdout.", "", std::optional(), ftk::join(rawList, ", ")); - _cmdLine.y4m = ftk::CmdLineValueOption::create( + _cmdLine.y4m = ftk::CmdLineOption::create( std::vector{ "-y4m" }, "y4m format to send to stdout.", "", From cf141f6a249ccdb8095ec9973c4d7f88f1693956 Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Fri, 26 Jun 2026 17:55:40 -0400 Subject: [PATCH 11/19] Renamed CmdLineValueOption and CmdLineValueArg to CmdLineOption and CmdLineArg for new feather-tk API Signed-off-by: Leigh Smith --- bin/toucan-filmstrip/App.h | 4 ++-- bin/toucan-render/App.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/toucan-filmstrip/App.h b/bin/toucan-filmstrip/App.h index f3fac70..91a2270 100644 --- a/bin/toucan-filmstrip/App.h +++ b/bin/toucan-filmstrip/App.h @@ -35,8 +35,8 @@ namespace toucan private: struct CmdLine { - std::shared_ptr > input; - std::shared_ptr > output; + std::shared_ptr > input; + std::shared_ptr > output; }; CmdLine _cmdLine; diff --git a/bin/toucan-render/App.h b/bin/toucan-render/App.h index c73a206..db2e6c9 100644 --- a/bin/toucan-render/App.h +++ b/bin/toucan-render/App.h @@ -45,17 +45,17 @@ namespace toucan struct CmdLine { - std::shared_ptr > input; - std::shared_ptr > output; + std::shared_ptr > input; + std::shared_ptr > output; bool outputRaw = false; - std::shared_ptr > videoCodec; + std::shared_ptr > videoCodec; std::shared_ptr printStart; std::shared_ptr printDuration; std::shared_ptr printRate; std::shared_ptr printSize; - std::shared_ptr > raw; - std::shared_ptr > y4m; + std::shared_ptr > raw; + std::shared_ptr > y4m; std::shared_ptr verbose; }; CmdLine _cmdLine; From 976f0d09c5337aebdb1310ae80dad22444f8786c Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Fri, 26 Jun 2026 18:04:20 -0400 Subject: [PATCH 12/19] Renamed CmdLineFlagOption to CmdLineFlag Signed-off-by: Leigh Smith --- bin/toucan-render/App.cpp | 10 +++++----- bin/toucan-render/App.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/toucan-render/App.cpp b/bin/toucan-render/App.cpp index db84636..563f9c8 100644 --- a/bin/toucan-render/App.cpp +++ b/bin/toucan-render/App.cpp @@ -70,16 +70,16 @@ namespace toucan "", "MJPEG", ftk::join(ffmpeg::getVideoCodecStrings(), ", ")); - _cmdLine.printStart = ftk::CmdLineFlagOption::create( + _cmdLine.printStart = ftk::CmdLineFlag::create( std::vector{ "-print_start" }, "Print the timeline start time and exit."); - _cmdLine.printDuration = ftk::CmdLineFlagOption::create( + _cmdLine.printDuration = ftk::CmdLineFlag::create( std::vector{ "-print_duration" }, "Print the timeline duration and exit."); - _cmdLine.printRate = ftk::CmdLineFlagOption::create( + _cmdLine.printRate = ftk::CmdLineFlag::create( std::vector{ "-print_rate" }, "Print the timeline frame rate and exit."); - _cmdLine.printSize = ftk::CmdLineFlagOption::create( + _cmdLine.printSize = ftk::CmdLineFlag::create( std::vector{ "-print_size" }, "Print the timeline image size."); _cmdLine.raw = ftk::CmdLineOption::create( @@ -94,7 +94,7 @@ namespace toucan "", std::optional(), ftk::join(y4mList, ", ")); - _cmdLine.verbose = ftk::CmdLineFlagOption::create( + _cmdLine.verbose = ftk::CmdLineFlag::create( std::vector{ "-v" }, "Print verbose output."); diff --git a/bin/toucan-render/App.h b/bin/toucan-render/App.h index db2e6c9..87ac18d 100644 --- a/bin/toucan-render/App.h +++ b/bin/toucan-render/App.h @@ -50,13 +50,13 @@ namespace toucan bool outputRaw = false; std::shared_ptr > videoCodec; - std::shared_ptr printStart; - std::shared_ptr printDuration; - std::shared_ptr printRate; - std::shared_ptr printSize; + std::shared_ptr printStart; + std::shared_ptr printDuration; + std::shared_ptr printRate; + std::shared_ptr printSize; std::shared_ptr > raw; std::shared_ptr > y4m; - std::shared_ptr verbose; + std::shared_ptr verbose; }; CmdLine _cmdLine; From 6b91bfb8f5176cbcd0adb0b76977a1c96fed494f Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Fri, 26 Jun 2026 18:20:48 -0400 Subject: [PATCH 13/19] Clean up declarations for changed feature-tk API Signed-off-by: Leigh Smith --- lib/toucanView/App.cpp | 2 +- lib/toucanView/MainWindow.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/toucanView/App.cpp b/lib/toucanView/App.cpp index 7de71b6..7c64b40 100644 --- a/lib/toucanView/App.cpp +++ b/lib/toucanView/App.cpp @@ -56,7 +56,7 @@ namespace toucan std::dynamic_pointer_cast(shared_from_this()), "toucan-view", ftk::Size2I(1920, 1080)); - addWindow(_window); + _addWindow(_window); _window->show(); if (_input->hasValue()) diff --git a/lib/toucanView/MainWindow.h b/lib/toucanView/MainWindow.h index d46f26d..b830cbb 100644 --- a/lib/toucanView/MainWindow.h +++ b/lib/toucanView/MainWindow.h @@ -50,7 +50,7 @@ namespace toucan void keyReleaseEvent(ftk::KeyEvent&) override; protected: - void _drop(const std::vector&) override; + void _drop(const std::vector&); private: std::weak_ptr _app; From 592d2b343e723e725b67f7e529ec62e7eec0c9fa Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Mon, 29 Jun 2026 12:49:39 -0400 Subject: [PATCH 14/19] Create a version of getExit() to replace the deprecated feather-tk API function Signed-off-by: Leigh Smith --- Dockerfile | 2 ++ bin/toucan-render/App.cpp | 5 +++++ bin/toucan-render/App.h | 5 ++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d56d549..0d13d6b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,6 +61,8 @@ RUN git clone https://github.com/AcademySoftwareFoundation/openfx.git # TODO this doesn't build on arm64 Linux currently, can't find the architecture. RUN cd openfx; scripts/build-cmake.sh # TODO need to fully install this? +RUN mkdir /usr/local/include/OpenFX +RUN tar -C include -c -f - . | tar -C /usr/local/include/OpenFX -x -f - # RUN git clone https://github.com/OpenTimelineIO/toucan.git # RUN git clone https://github.com/leighsmith/toucan.git diff --git a/bin/toucan-render/App.cpp b/bin/toucan-render/App.cpp index 563f9c8..cad7523 100644 --- a/bin/toucan-render/App.cpp +++ b/bin/toucan-render/App.cpp @@ -149,6 +149,11 @@ namespace toucan return out; } + int App::getExit() const + { + return 0; // TODO stub for now to replace deprecated API of feather-tk IApp.h. + } + void App::run() { const std::filesystem::path parentPath = std::filesystem::path(getExeName()).parent_path(); diff --git a/bin/toucan-render/App.h b/bin/toucan-render/App.h index 87ac18d..e09501c 100644 --- a/bin/toucan-render/App.h +++ b/bin/toucan-render/App.h @@ -36,7 +36,10 @@ namespace toucan const std::shared_ptr&, std::vector&); - void run() override; + //! Get the exit code. + FTK_API int getExit() const; + + void run(); private: void _writeRawFrame(const OIIO::ImageBuf&); From caf0fb9e0c7b5e1fe66270fff50e1ce10625cbd6 Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Mon, 29 Jun 2026 12:56:54 -0400 Subject: [PATCH 15/19] Create a version of getExit() to replace the deprecated feather-tk API function Signed-off-by: Leigh Smith --- bin/toucan-filmstrip/App.cpp | 7 ++++++- bin/toucan-filmstrip/App.h | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/toucan-filmstrip/App.cpp b/bin/toucan-filmstrip/App.cpp index 7a9efeb..6fceb6a 100644 --- a/bin/toucan-filmstrip/App.cpp +++ b/bin/toucan-filmstrip/App.cpp @@ -44,7 +44,12 @@ namespace toucan out->_init(context, argv); return out; } - + + int App::getExit() const + { + return 0; // TODO stub for now to replace deprecated API of feather-tk IApp.h. + } + void App::run() { const std::filesystem::path parentPath = std::filesystem::path(getExeName()).parent_path(); diff --git a/bin/toucan-filmstrip/App.h b/bin/toucan-filmstrip/App.h index 91a2270..1171231 100644 --- a/bin/toucan-filmstrip/App.h +++ b/bin/toucan-filmstrip/App.h @@ -30,7 +30,10 @@ namespace toucan const std::shared_ptr&, std::vector&); - void run() override; + //! Get the exit code. + FTK_API int getExit() const; + + void run(); private: struct CmdLine From cf892788ca89ec6d33d1bfce94afc6f6b9e45d2e Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Mon, 29 Jun 2026 15:31:29 -0400 Subject: [PATCH 16/19] Revamped for new Action::create() parameters, accepting a KeyShortcut() instance Signed-off-by: Leigh Smith --- lib/toucanView/CompareMenu.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/lib/toucanView/CompareMenu.cpp b/lib/toucanView/CompareMenu.cpp index b6237b8..fb261ce 100644 --- a/lib/toucanView/CompareMenu.cpp +++ b/lib/toucanView/CompareMenu.cpp @@ -24,8 +24,7 @@ namespace toucan _actions["Compare/A"] = ftk::Action::create( "A", - ftk::Key::A, - static_cast(ftk::KeyModifier::Shift), + KeyShortcut(ftk::Key::A, ftk::KeyModifier::Shift), [this](bool) { CompareOptions options = _filesModel->getCompareOptions(); @@ -36,8 +35,7 @@ namespace toucan _actions["Compare/B"] = ftk::Action::create( "B", - ftk::Key::B, - static_cast(ftk::KeyModifier::Shift), + KeyShortcut(ftk::Key::B, ftk::KeyModifier::Shift), [this](bool) { CompareOptions options = _filesModel->getCompareOptions(); @@ -48,8 +46,7 @@ namespace toucan _actions["Compare/Split"] = ftk::Action::create( "Split", - ftk::Key::S, - static_cast(ftk::KeyModifier::Shift), + KeyShortcut(ftk::Key::S, ftk::KeyModifier::Shift), [this](bool) { CompareOptions options = _filesModel->getCompareOptions(); @@ -60,8 +57,7 @@ namespace toucan _actions["Compare/Overlay"] = ftk::Action::create( "Overlay", - ftk::Key::E, - static_cast(ftk::KeyModifier::Shift), + KeyShortcut(ftk::Key::E, ftk::KeyModifier::Shift), [this](bool) { CompareOptions options = _filesModel->getCompareOptions(); @@ -72,8 +68,7 @@ namespace toucan _actions["Compare/Horizontal"] = ftk::Action::create( "Horizontal", - ftk::Key::H, - static_cast(ftk::KeyModifier::Shift), + KeyShortcut(ftk::Key::H, ftk::KeyModifier::Shift), [this](bool) { CompareOptions options = _filesModel->getCompareOptions(); @@ -84,8 +79,7 @@ namespace toucan _actions["Compare/Vertical"] = ftk::Action::create( "Vertical", - ftk::Key::V, - static_cast(ftk::KeyModifier::Shift), + KeyShortcut(ftk::Key::V, ftk::KeyModifier::Shift), [this](bool) { CompareOptions options = _filesModel->getCompareOptions(); From b41abb4656e184632f79083d3e9ed6934814d537 Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Mon, 29 Jun 2026 15:41:00 -0400 Subject: [PATCH 17/19] Corrected feather-tk declarations for updated API Signed-off-by: Leigh Smith --- Dockerfile | 16 ++-------------- lib/toucanView/CompareMenu.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0d13d6b..105f39c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,11 +34,6 @@ RUN apt-get update && apt-get install -y build-essential \ libopencolorio-dev \ libopentimelineio-dev -# TODO: - -# missing #include replace with #include -# Missing OpenFX/ofxProperty.h need to install OpenFX headers properly. - # Clone, compile and install feather-tk library RUN mkdir feather-tk RUN cd feather-tk; git clone https://github.com/grizzlypeak3d/feather-tk.git @@ -46,7 +41,6 @@ RUN cd feather-tk; sh feather-tk/sbuild-linux.sh feather-tk # TODO replace with cmake --target install RUN tar -C feather-tk/install-Release -c -f - . | tar -C /usr/local -x -f - - # Add the pipx installation location: ENV PATH=/root/.local/share/pipx/venvs/conan/bin:$PATH @@ -60,18 +54,12 @@ RUN conan profile detect RUN git clone https://github.com/AcademySoftwareFoundation/openfx.git # TODO this doesn't build on arm64 Linux currently, can't find the architecture. RUN cd openfx; scripts/build-cmake.sh -# TODO need to fully install this? +# TODO need to find a better installation method, cmake --target install RUN mkdir /usr/local/include/OpenFX -RUN tar -C include -c -f - . | tar -C /usr/local/include/OpenFX -x -f - +RUN tar -C openfx/include -c -f - . | tar -C /usr/local/include/OpenFX -x -f - # RUN git clone https://github.com/OpenTimelineIO/toucan.git # RUN git clone https://github.com/leighsmith/toucan.git COPY . /home/ubuntu/toucan # RUN sh toucan/sbuild-linux.sh - - -# python3-venv \ -# python3-pip -# RUN python3 -m venv /home/ubuntu/toucan_python -# RUN /home/ubuntu/toucan_python/bin/pip install conan diff --git a/lib/toucanView/CompareMenu.cpp b/lib/toucanView/CompareMenu.cpp index fb261ce..87a1122 100644 --- a/lib/toucanView/CompareMenu.cpp +++ b/lib/toucanView/CompareMenu.cpp @@ -24,7 +24,7 @@ namespace toucan _actions["Compare/A"] = ftk::Action::create( "A", - KeyShortcut(ftk::Key::A, ftk::KeyModifier::Shift), + ftk::KeyShortcut(ftk::Key::A, ftk::KeyModifier::Shift), [this](bool) { CompareOptions options = _filesModel->getCompareOptions(); @@ -35,7 +35,7 @@ namespace toucan _actions["Compare/B"] = ftk::Action::create( "B", - KeyShortcut(ftk::Key::B, ftk::KeyModifier::Shift), + ftk::KeyShortcut(ftk::Key::B, ftk::KeyModifier::Shift), [this](bool) { CompareOptions options = _filesModel->getCompareOptions(); @@ -46,7 +46,7 @@ namespace toucan _actions["Compare/Split"] = ftk::Action::create( "Split", - KeyShortcut(ftk::Key::S, ftk::KeyModifier::Shift), + ftk::KeyShortcut(ftk::Key::S, ftk::KeyModifier::Shift), [this](bool) { CompareOptions options = _filesModel->getCompareOptions(); @@ -57,7 +57,7 @@ namespace toucan _actions["Compare/Overlay"] = ftk::Action::create( "Overlay", - KeyShortcut(ftk::Key::E, ftk::KeyModifier::Shift), + ftk::KeyShortcut(ftk::Key::E, ftk::KeyModifier::Shift), [this](bool) { CompareOptions options = _filesModel->getCompareOptions(); @@ -68,7 +68,7 @@ namespace toucan _actions["Compare/Horizontal"] = ftk::Action::create( "Horizontal", - KeyShortcut(ftk::Key::H, ftk::KeyModifier::Shift), + ftk::KeyShortcut(ftk::Key::H, ftk::KeyModifier::Shift), [this](bool) { CompareOptions options = _filesModel->getCompareOptions(); @@ -79,7 +79,7 @@ namespace toucan _actions["Compare/Vertical"] = ftk::Action::create( "Vertical", - KeyShortcut(ftk::Key::V, ftk::KeyModifier::Shift), + ftk::KeyShortcut(ftk::Key::V, ftk::KeyModifier::Shift), [this](bool) { CompareOptions options = _filesModel->getCompareOptions(); From 1d2614c662f422f448eab4937ef969d55cffbad3 Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Tue, 30 Jun 2026 15:14:24 -0400 Subject: [PATCH 18/19] Bulk conversion of ::sizeHintEvent(const ftk::SizeHintEvent& event) to ::getSizeHint(). These are all ripe for a refactor to create a ToucanWidget class which removes the redunancy of such instance functions Signed-off-by: Leigh Smith --- lib/toucanView/BackgroundTool.cpp | 5 ++--- lib/toucanView/BackgroundTool.h | 2 +- lib/toucanView/CompareTool.cpp | 10 ++++------ lib/toucanView/CompareTool.h | 4 ++-- lib/toucanView/DetailsTool.cpp | 10 ++++------ lib/toucanView/DetailsTool.h | 4 ++-- lib/toucanView/ExportTool.cpp | 10 ++++------ lib/toucanView/ExportTool.h | 4 ++-- lib/toucanView/FileTab.cpp | 5 ++--- lib/toucanView/FileTab.h | 2 +- lib/toucanView/FileToolBar.cpp | 5 ++--- lib/toucanView/FileToolBar.h | 2 +- lib/toucanView/GraphTool.cpp | 5 ++--- lib/toucanView/GraphTool.h | 2 +- lib/toucanView/InfoBar.cpp | 5 ++--- lib/toucanView/InfoBar.h | 2 +- lib/toucanView/JSONTool.cpp | 10 ++++------ lib/toucanView/JSONTool.h | 4 ++-- lib/toucanView/LogTool.cpp | 5 ++--- lib/toucanView/LogTool.h | 2 +- lib/toucanView/MainWindow.cpp | 5 ++--- lib/toucanView/MainWindow.h | 2 +- lib/toucanView/PlaybackBar.cpp | 5 ++--- lib/toucanView/PlaybackBar.h | 2 +- lib/toucanView/TimeWidgets.cpp | 20 ++++++++------------ lib/toucanView/TimeWidgets.h | 8 ++++---- lib/toucanView/TimelineWidget.cpp | 4 ++-- lib/toucanView/TimelineWidget.h | 2 +- lib/toucanView/ToolBar.cpp | 5 ++--- lib/toucanView/ToolBar.h | 2 +- lib/toucanView/ViewToolBar.cpp | 5 ++--- lib/toucanView/ViewToolBar.h | 2 +- lib/toucanView/WindowToolBar.cpp | 5 ++--- lib/toucanView/WindowToolBar.h | 2 +- 34 files changed, 72 insertions(+), 95 deletions(-) diff --git a/lib/toucanView/BackgroundTool.cpp b/lib/toucanView/BackgroundTool.cpp index ea291fd..5a35bad 100644 --- a/lib/toucanView/BackgroundTool.cpp +++ b/lib/toucanView/BackgroundTool.cpp @@ -125,10 +125,9 @@ namespace toucan _scrollWidget->setGeometry(value); } - void BackgroundTool::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I BackgroundTool::getSizeHint() const { - IToolWidget::sizeHintEvent(event); - _setSizeHint(_scrollWidget->getSizeHint()); + return _scrollWidget->getSizeHint(); } void BackgroundTool::_widgetUpdate() diff --git a/lib/toucanView/BackgroundTool.h b/lib/toucanView/BackgroundTool.h index 8eaf7b8..693ac61 100644 --- a/lib/toucanView/BackgroundTool.h +++ b/lib/toucanView/BackgroundTool.h @@ -36,7 +36,7 @@ namespace toucan const std::shared_ptr& parent = nullptr); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: void _widgetUpdate(); diff --git a/lib/toucanView/CompareTool.cpp b/lib/toucanView/CompareTool.cpp index 9ac138b..ae9bb9f 100644 --- a/lib/toucanView/CompareTool.cpp +++ b/lib/toucanView/CompareTool.cpp @@ -78,10 +78,9 @@ namespace toucan _layout->setGeometry(value); } - void CompareWidget::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I CompareWidget::getSizeHint() const { - IWidget::sizeHintEvent(event); - _setSizeHint(_layout->getSizeHint()); + return _layout->getSizeHint(); } void CompareTool::_init( @@ -209,10 +208,9 @@ namespace toucan _layout->setGeometry(value); } - void CompareTool::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I CompareTool::getSizeHint() const { - IToolWidget::sizeHintEvent(event); - _setSizeHint(_layout->getSizeHint()); + return _layout->getSizeHint(); } void CompareTool::_widgetUpdate() diff --git a/lib/toucanView/CompareTool.h b/lib/toucanView/CompareTool.h index 6a9f31c..d08c347 100644 --- a/lib/toucanView/CompareTool.h +++ b/lib/toucanView/CompareTool.h @@ -43,7 +43,7 @@ namespace toucan void setBCallback(const std::function&); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: bool _current = false; @@ -73,7 +73,7 @@ namespace toucan const std::shared_ptr& parent = nullptr); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I CompareTool::getSizeHint() const override; private: void _widgetUpdate(); diff --git a/lib/toucanView/DetailsTool.cpp b/lib/toucanView/DetailsTool.cpp index e4bafa7..a04b4ba 100644 --- a/lib/toucanView/DetailsTool.cpp +++ b/lib/toucanView/DetailsTool.cpp @@ -115,10 +115,9 @@ namespace toucan _bellows->setGeometry(value); } - void DetailsWidget::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I DetailsWidget::getSizeHint() const { - IWidget::sizeHintEvent(event); - _setSizeHint(_bellows->isVisible(false) ? _bellows->getSizeHint() : ftk::Size2I()); + return _bellows->isVisible(false) ? _bellows->getSizeHint() : ftk::Size2I(); } void DetailsWidget::_textUpdate() @@ -345,9 +344,8 @@ namespace toucan _layout->setGeometry(value); } - void DetailsTool::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I DetailsTool::getSizeHint() const { - IToolWidget::sizeHintEvent(event); - _setSizeHint(_layout->getSizeHint()); + return _layout->getSizeHint(); } } diff --git a/lib/toucanView/DetailsTool.h b/lib/toucanView/DetailsTool.h index e0d5c1f..929f1c9 100644 --- a/lib/toucanView/DetailsTool.h +++ b/lib/toucanView/DetailsTool.h @@ -55,7 +55,7 @@ namespace toucan void setSearch(const std::string&); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: void _textUpdate(); @@ -96,7 +96,7 @@ namespace toucan const std::shared_ptr& parent = nullptr); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: std::shared_ptr _layout; diff --git a/lib/toucanView/ExportTool.cpp b/lib/toucanView/ExportTool.cpp index 9d445cd..40545f6 100644 --- a/lib/toucanView/ExportTool.cpp +++ b/lib/toucanView/ExportTool.cpp @@ -91,10 +91,9 @@ namespace toucan _layout->setGeometry(value); } - void ExportWidget::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I ExportWidget::getSizeHint() const { - IWidget::sizeHintEvent(event); - _setSizeHint(_layout->getSizeHint()); + return _layout->getSizeHint(); } void ExportWidget::_initSettings( @@ -551,9 +550,8 @@ namespace toucan _scrollWidget->setGeometry(value); } - void ExportTool::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I ExportTool::getSizeHint() const { - IToolWidget::sizeHintEvent(event); - _setSizeHint(_scrollWidget->getSizeHint()); + return _scrollWidget->getSizeHint(); } } diff --git a/lib/toucanView/ExportTool.h b/lib/toucanView/ExportTool.h index f08768d..9cfbed2 100644 --- a/lib/toucanView/ExportTool.h +++ b/lib/toucanView/ExportTool.h @@ -46,7 +46,7 @@ namespace toucan const std::shared_ptr& parent = nullptr); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: struct SettingsValues @@ -134,7 +134,7 @@ namespace toucan const std::shared_ptr& parent = nullptr); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: std::shared_ptr _scrollWidget; diff --git a/lib/toucanView/FileTab.cpp b/lib/toucanView/FileTab.cpp index 4200e6d..d3ed572 100644 --- a/lib/toucanView/FileTab.cpp +++ b/lib/toucanView/FileTab.cpp @@ -51,9 +51,8 @@ namespace toucan _hudWidget->setGeometry(value); } - void FileTab::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I FileTab::getSizeHint() const { - ftk::IWidget::sizeHintEvent(event); - _setSizeHint(_viewport->getSizeHint()); + return _viewport->getSizeHint(); } } diff --git a/lib/toucanView/FileTab.h b/lib/toucanView/FileTab.h index 5cf8c94..62d5e38 100644 --- a/lib/toucanView/FileTab.h +++ b/lib/toucanView/FileTab.h @@ -35,7 +35,7 @@ namespace toucan const std::shared_ptr& parent = nullptr); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: std::shared_ptr _viewport; diff --git a/lib/toucanView/FileToolBar.cpp b/lib/toucanView/FileToolBar.cpp index b31d415..53ebea3 100644 --- a/lib/toucanView/FileToolBar.cpp +++ b/lib/toucanView/FileToolBar.cpp @@ -65,10 +65,9 @@ namespace toucan _layout->setGeometry(value); } - void FileToolBar::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I FileToolBar::getSizeHint() const { - IWidget::sizeHintEvent(event); - _setSizeHint(_layout->getSizeHint()); + return _layout->getSizeHint(); } void FileToolBar::_widgetUpdate() diff --git a/lib/toucanView/FileToolBar.h b/lib/toucanView/FileToolBar.h index 6eb0fe6..288076c 100644 --- a/lib/toucanView/FileToolBar.h +++ b/lib/toucanView/FileToolBar.h @@ -34,7 +34,7 @@ namespace toucan const std::shared_ptr& parent = nullptr); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: void _widgetUpdate(); diff --git a/lib/toucanView/GraphTool.cpp b/lib/toucanView/GraphTool.cpp index c166205..d6a5bc7 100644 --- a/lib/toucanView/GraphTool.cpp +++ b/lib/toucanView/GraphTool.cpp @@ -253,9 +253,8 @@ namespace toucan _scrollWidget->setGeometry(value); } - void GraphTool::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I GraphTool::getSizeHint() const { - IToolWidget::sizeHintEvent(event); - _setSizeHint(_scrollWidget->getSizeHint()); + return _scrollWidget->getSizeHint(); } } diff --git a/lib/toucanView/GraphTool.h b/lib/toucanView/GraphTool.h index 1e7385d..8b63c77 100644 --- a/lib/toucanView/GraphTool.h +++ b/lib/toucanView/GraphTool.h @@ -35,7 +35,7 @@ namespace toucan const std::shared_ptr& parent = nullptr); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; void drawEvent(const ftk::Box2I&, const ftk::DrawEvent&) override; private: diff --git a/lib/toucanView/InfoBar.cpp b/lib/toucanView/InfoBar.cpp index 511bf01..e4e2a7e 100644 --- a/lib/toucanView/InfoBar.cpp +++ b/lib/toucanView/InfoBar.cpp @@ -76,9 +76,8 @@ namespace toucan _layout->setGeometry(value); } - void InfoBar::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I InfoBar::getSizeHint() const { - IWidget::sizeHintEvent(event); - _setSizeHint(_layout->getSizeHint()); + return _layout->getSizeHint(); } } diff --git a/lib/toucanView/InfoBar.h b/lib/toucanView/InfoBar.h index 92119f4..7008cda 100644 --- a/lib/toucanView/InfoBar.h +++ b/lib/toucanView/InfoBar.h @@ -33,7 +33,7 @@ namespace toucan const std::shared_ptr& parent = nullptr); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: std::shared_ptr _layout; diff --git a/lib/toucanView/JSONTool.cpp b/lib/toucanView/JSONTool.cpp index 5c3f9fc..c607a9f 100644 --- a/lib/toucanView/JSONTool.cpp +++ b/lib/toucanView/JSONTool.cpp @@ -81,10 +81,9 @@ namespace toucan _bellows->setGeometry(value); } - void JSONWidget::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I JSONWidget::getSizeHint() const { - IWidget::sizeHintEvent(event); - _setSizeHint(_bellows->getSizeHint()); + return _bellows->getSizeHint(); } void JSONWidget::_textUpdate() @@ -238,9 +237,8 @@ namespace toucan _layout->setGeometry(value); } - void JSONTool::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I JSONTool::getSizeHint() const { - IToolWidget::sizeHintEvent(event); - _setSizeHint(_layout->getSizeHint()); + return _layout->getSizeHint(); } } diff --git a/lib/toucanView/JSONTool.h b/lib/toucanView/JSONTool.h index 4062483..2f47bb1 100644 --- a/lib/toucanView/JSONTool.h +++ b/lib/toucanView/JSONTool.h @@ -45,7 +45,7 @@ namespace toucan void setSearch(const std::string&); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: void _textUpdate(); @@ -78,7 +78,7 @@ namespace toucan const std::shared_ptr& parent = nullptr); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: std::shared_ptr _file; diff --git a/lib/toucanView/LogTool.cpp b/lib/toucanView/LogTool.cpp index f6c0035..f84bcd1 100644 --- a/lib/toucanView/LogTool.cpp +++ b/lib/toucanView/LogTool.cpp @@ -99,10 +99,9 @@ namespace toucan _layout->setGeometry(value); } - void LogTool::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I LogTool::getSizeHint() const { - IToolWidget::sizeHintEvent(event); - _setSizeHint(_layout->getSizeHint()); + return _layout->getSizeHint(); } void LogTool::_textUpdate() diff --git a/lib/toucanView/LogTool.h b/lib/toucanView/LogTool.h index aad30c1..10c3971 100644 --- a/lib/toucanView/LogTool.h +++ b/lib/toucanView/LogTool.h @@ -33,7 +33,7 @@ namespace toucan const std::shared_ptr& parent = nullptr); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: void _textUpdate(); diff --git a/lib/toucanView/MainWindow.cpp b/lib/toucanView/MainWindow.cpp index 237ee2e..a00a449 100644 --- a/lib/toucanView/MainWindow.cpp +++ b/lib/toucanView/MainWindow.cpp @@ -235,10 +235,9 @@ namespace toucan _layout->setGeometry(value); } - void MainWindow::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I MainWindow::getSizeHint() const { - ftk::Window::sizeHintEvent(event); - _setSizeHint(_layout->getSizeHint()); + return _layout->getSizeHint(); } void MainWindow::keyPressEvent(ftk::KeyEvent& event) diff --git a/lib/toucanView/MainWindow.h b/lib/toucanView/MainWindow.h index b830cbb..3043f91 100644 --- a/lib/toucanView/MainWindow.h +++ b/lib/toucanView/MainWindow.h @@ -45,7 +45,7 @@ namespace toucan const ftk::Size2I&); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; void keyPressEvent(ftk::KeyEvent&) override; void keyReleaseEvent(ftk::KeyEvent&) override; diff --git a/lib/toucanView/PlaybackBar.cpp b/lib/toucanView/PlaybackBar.cpp index 27281e7..6c29eb4 100644 --- a/lib/toucanView/PlaybackBar.cpp +++ b/lib/toucanView/PlaybackBar.cpp @@ -154,10 +154,9 @@ namespace toucan _layout->setGeometry(value); } - void PlaybackBar::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I PlaybackBar::getSizeHint() const { - IWidget::sizeHintEvent(event); - _setSizeHint(_layout->getSizeHint()); + return _layout->getSizeHint(); } void PlaybackBar::_timelineUpdate() diff --git a/lib/toucanView/PlaybackBar.h b/lib/toucanView/PlaybackBar.h index ad1ae77..704c4d1 100644 --- a/lib/toucanView/PlaybackBar.h +++ b/lib/toucanView/PlaybackBar.h @@ -34,7 +34,7 @@ namespace toucan const std::shared_ptr& parent = nullptr); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: void _timelineUpdate(); diff --git a/lib/toucanView/TimeWidgets.cpp b/lib/toucanView/TimeWidgets.cpp index 7c529cc..8ed172d 100644 --- a/lib/toucanView/TimeWidgets.cpp +++ b/lib/toucanView/TimeWidgets.cpp @@ -82,10 +82,9 @@ namespace toucan _layout->setGeometry(value); } - void FrameButtons::sizeHintEvent(const ftk::SizeHintEvent& value) + Size2I FrameButtons::getSizeHint() const { - IWidget::sizeHintEvent(value); - _setSizeHint(_layout->getSizeHint()); + return _layout->getSizeHint(); } void PlaybackButtons::_init( @@ -160,10 +159,9 @@ namespace toucan _layout->setGeometry(value); } - void PlaybackButtons::sizeHintEvent(const ftk::SizeHintEvent& value) + Size2I PlaybackButtons::getSizeHint() const { - IWidget::sizeHintEvent(value); - _setSizeHint(_layout->getSizeHint()); + return _layout->getSizeHint(); } void PlaybackButtons::_playbackUpdate() @@ -259,10 +257,9 @@ namespace toucan _layout->setGeometry(value); } - void TimeEdit::sizeHintEvent(const ftk::SizeHintEvent& value) + Size2I TimeEdit::getSizeHint() const { - IWidget::sizeHintEvent(value); - _setSizeHint(_layout->getSizeHint()); + return _layout->getSizeHint(); } void TimeEdit::keyPressEvent(ftk::KeyEvent& event) @@ -384,10 +381,9 @@ namespace toucan _label->setGeometry(value); } - void TimeLabel::sizeHintEvent(const ftk::SizeHintEvent& value) + Size2I TimeLabel::getSizeHint() const { - IWidget::sizeHintEvent(value); - _setSizeHint(_label->getSizeHint()); + return _layout->getSizeHint(); } void TimeLabel::_timeUpdate() diff --git a/lib/toucanView/TimeWidgets.h b/lib/toucanView/TimeWidgets.h index 59ac76a..dcae2d4 100644 --- a/lib/toucanView/TimeWidgets.h +++ b/lib/toucanView/TimeWidgets.h @@ -36,7 +36,7 @@ namespace toucan void setCallback(const std::function&); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: std::function _callback; @@ -67,7 +67,7 @@ namespace toucan void setCallback(const std::function&); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: void _playbackUpdate(); @@ -106,7 +106,7 @@ namespace toucan void setCallback(const std::function&); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; void keyPressEvent(ftk::KeyEvent&) override; void keyReleaseEvent(ftk::KeyEvent&) override; @@ -152,7 +152,7 @@ namespace toucan void setMarginRole(ftk::SizeRole); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: void _timeUpdate(); diff --git a/lib/toucanView/TimelineWidget.cpp b/lib/toucanView/TimelineWidget.cpp index 00474e1..959ba82 100644 --- a/lib/toucanView/TimelineWidget.cpp +++ b/lib/toucanView/TimelineWidget.cpp @@ -216,9 +216,9 @@ namespace toucan } } - void TimelineWidget::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I TimelineWidget::getSizeHint() const { - _setSizeHint(_scrollWidget->getSizeHint()); + return _scrollWidget->getSizeHint(); } void TimelineWidget::mouseMoveEvent(ftk::MouseMoveEvent& event) diff --git a/lib/toucanView/TimelineWidget.h b/lib/toucanView/TimelineWidget.h index fb6542e..2363bb7 100644 --- a/lib/toucanView/TimelineWidget.h +++ b/lib/toucanView/TimelineWidget.h @@ -56,7 +56,7 @@ namespace toucan void frameView(); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; void mouseMoveEvent(ftk::MouseMoveEvent&) override; void mousePressEvent(ftk::MouseClickEvent&) override; void mouseReleaseEvent(ftk::MouseClickEvent&) override; diff --git a/lib/toucanView/ToolBar.cpp b/lib/toucanView/ToolBar.cpp index 1a544c6..b7fd1fd 100644 --- a/lib/toucanView/ToolBar.cpp +++ b/lib/toucanView/ToolBar.cpp @@ -55,9 +55,8 @@ namespace toucan _layout->setGeometry(value); } - void ToolBar::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I ToolBar::getSizeHint() const { - IWidget::sizeHintEvent(event); - _setSizeHint(_layout->getSizeHint()); + return _layout->getSizeHint(); } } diff --git a/lib/toucanView/ToolBar.h b/lib/toucanView/ToolBar.h index 7ac5329..f0a8fc3 100644 --- a/lib/toucanView/ToolBar.h +++ b/lib/toucanView/ToolBar.h @@ -34,7 +34,7 @@ namespace toucan const std::shared_ptr& parent = nullptr); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: std::shared_ptr _layout; diff --git a/lib/toucanView/ViewToolBar.cpp b/lib/toucanView/ViewToolBar.cpp index 72e500f..30efd23 100644 --- a/lib/toucanView/ViewToolBar.cpp +++ b/lib/toucanView/ViewToolBar.cpp @@ -78,10 +78,9 @@ namespace toucan _layout->setGeometry(value); } - void ViewToolBar::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I ViewToolBar::getSizeHint() const { - IWidget::sizeHintEvent(event); - _setSizeHint(_layout->getSizeHint()); + return _layout->getSizeHint(); } void ViewToolBar::_widgetUpdate() diff --git a/lib/toucanView/ViewToolBar.h b/lib/toucanView/ViewToolBar.h index 22ef4f9..dd163dc 100644 --- a/lib/toucanView/ViewToolBar.h +++ b/lib/toucanView/ViewToolBar.h @@ -34,7 +34,7 @@ namespace toucan const std::shared_ptr& parent = nullptr); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: void _widgetUpdate(); diff --git a/lib/toucanView/WindowToolBar.cpp b/lib/toucanView/WindowToolBar.cpp index 30dc3ef..38b221d 100644 --- a/lib/toucanView/WindowToolBar.cpp +++ b/lib/toucanView/WindowToolBar.cpp @@ -76,9 +76,8 @@ namespace toucan _layout->setGeometry(value); } - void WindowToolBar::sizeHintEvent(const ftk::SizeHintEvent& event) + Size2I WindowToolBar::getSizeHint() const { - IWidget::sizeHintEvent(event); - _setSizeHint(_layout->getSizeHint()); + return _layout->getSizeHint(); } } diff --git a/lib/toucanView/WindowToolBar.h b/lib/toucanView/WindowToolBar.h index 225e4d5..ab367bf 100644 --- a/lib/toucanView/WindowToolBar.h +++ b/lib/toucanView/WindowToolBar.h @@ -39,7 +39,7 @@ namespace toucan const std::shared_ptr& parent = nullptr); void setGeometry(const ftk::Box2I&) override; - void sizeHintEvent(const ftk::SizeHintEvent&) override; + Size2I getSizeHint() const override; private: std::shared_ptr _layout; From 146cf08148259fd4bf7e34a5fa0074412fb1fc0c Mon Sep 17 00:00:00 2001 From: Leigh Smith Date: Tue, 30 Jun 2026 15:36:52 -0400 Subject: [PATCH 19/19] Removed older libminizip-dev which probably confuses CMake Signed-off-by: Leigh Smith --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 105f39c..7fc9592 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,6 @@ RUN apt-get update && apt-get install -y build-essential \ g++ \ git \ minizip \ - libminizip-dev \ libminizip-ng-dev \ xorg-dev \ libglu1-mesa-dev \