From a12be862e22bdec6a243a3f0b5f4f28d69084a2a Mon Sep 17 00:00:00 2001
From: Brianna Rainey
Date: Thu, 22 Jan 2026 16:29:46 -0500
Subject: fix #89 with Image component v2.0 + 23 tests (#90)
* qtbot is needed in any test that uses a QObject
previously these tests would fail if they ran before qtbot was initialized by another test. I'm now running tests in a random order
* add tests for drawBars, readAudioFile, BlankFrame
* replace numpy.seterr with numpy.errstate
* fix incorrect comment
* add MockVideoWorker and imageDataSum
* test further into visualization (less likely to be a false positive)
* test FloodFrame function
* add failing test for Image component
one step towards fixing #89
* test component name CLI parsing
* prevent log warning when 1 setting changed
* correct tests to use widgets when needed
* test undo and blockSignals
* remove stretch_scale (use scale only)
* image ignores scale if stretch checkbox checked
fixes #89
* test Title Text component, ffmpeg command
* Image v2: replace stretched setting with resizeMode
3 resize modes are scale, cover, and stretch. Scale only applies when resizeMode is set to scale. Cover uses ImageOps.fit() to stretch while maintaining aspect ratio. Also, spinBox_scale was moved to be underneath comboBox_resizeMode.
* change transformData into staticmethod
the purpose is to allow easier reuse in other components
* add respondToAudio option to Image component
this causes the image to scale up and down slightly based on the input audio file
* cache static portion of image when animating
increases rendering speed of a 1-minute video by 12 seconds (based on two manual tests anyway)---
src/avp/components/image.ui | 154 +++++++++++++++++++++++++++-----------------
1 file changed, 95 insertions(+), 59 deletions(-)
(limited to 'src/avp/components/image.ui')
diff --git a/src/avp/components/image.ui b/src/avp/components/image.ui
index 2dad127..72593a3 100644
--- a/src/avp/components/image.ui
+++ b/src/avp/components/image.ui
@@ -84,10 +84,10 @@
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
- QSizePolicy::Fixed
+ QSizePolicy::Policy::Fixed
@@ -181,26 +181,29 @@
-
-
-
-
- Stretch
+
+
+
+ 0
+ 0
+
-
- false
+
+ Resize
-
-
+
+
+ -
+
- Qt::Horizontal
-
-
- QSizePolicy::Fixed
+ Qt::Orientation::Horizontal
- 5
+ 40
20
@@ -208,25 +211,34 @@
-
+
+ Qt::LayoutDirection::RightToLeft
+
Mirror
-
-
+
+
+
+ 0
+ 0
+
+
Rotate
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+ Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter
-
- QAbstractSpinBox::UpDownArrows
+ QAbstractSpinBox::ButtonSymbols::UpDownArrows
°
@@ -242,24 +254,12 @@
+
+
+ -
+
-
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Fixed
-
-
-
- 10
- 20
-
-
-
-
- -
-
+
0
@@ -270,14 +270,14 @@
Scale
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+ Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter
-
- QAbstractSpinBox::UpDownArrows
+ QAbstractSpinBox::ButtonSymbols::UpDownArrows
%
@@ -293,30 +293,10 @@
- -
-
-
- %
-
-
- 10
-
-
- 400
-
-
- 100
-
-
-
-
-
- -
-
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -338,14 +318,14 @@
Color
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+ Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter
-
- QAbstractSpinBox::UpDownArrows
+ QAbstractSpinBox::ButtonSymbols::UpDownArrows
%
@@ -366,12 +346,68 @@
+ -
+
+
-
+
+
+ Qt::Orientation::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Scale image in response to input audio file
+
+
+ Qt::LayoutDirection::RightToLeft
+
+
+ Respond to Audio
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ -
+
+
+ Sensitivity
+
+
+
+ -
+
+
+ 1
+
+
+ 20
+
+
+
+
+
-
- Qt::Vertical
+ Qt::Orientation::Vertical
--
cgit v1.2.3