diff options
| author | Brianna Rainey | 2026-01-22 16:29:46 -0500 |
|---|---|---|
| committer | GitHub | 2026-01-22 16:29:46 -0500 |
| commit | a12be862e22bdec6a243a3f0b5f4f28d69084a2a (patch) | |
| tree | 7f2b21f58cf54deb81bfe77d7ef45358c80454f0 /src/avp/components/image.ui | |
| parent | 36760579a0ae604074034c4b78cda2e3f3b001de (diff) | |
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)
Diffstat (limited to 'src/avp/components/image.ui')
| -rw-r--r-- | src/avp/components/image.ui | 154 |
1 files changed, 95 insertions, 59 deletions
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 @@ <item> <spacer name="horizontalSpacer_9"> <property name="orientation"> - <enum>Qt::Horizontal</enum> + <enum>Qt::Orientation::Horizontal</enum> </property> <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" stdset="0"> <size> @@ -181,26 +181,29 @@ <item> <layout class="QHBoxLayout" name="horizontalLayout_9"> <item> - <widget class="QCheckBox" name="checkBox_stretch"> - <property name="text"> - <string>Stretch</string> + <widget class="QLabel" name="label_resizeMode"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> </property> - <property name="checked"> - <bool>false</bool> + <property name="text"> + <string>Resize</string> </property> </widget> </item> <item> - <spacer name="horizontalSpacer_10"> + <widget class="QComboBox" name="comboBox_resizeMode"/> + </item> + <item> + <spacer name="horizontalSpacer_3"> <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> + <enum>Qt::Orientation::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> - <width>5</width> + <width>40</width> <height>20</height> </size> </property> @@ -208,25 +211,34 @@ </item> <item> <widget class="QCheckBox" name="checkBox_mirror"> + <property name="layoutDirection"> + <enum>Qt::LayoutDirection::RightToLeft</enum> + </property> <property name="text"> <string>Mirror</string> </property> </widget> </item> <item> - <widget class="QLabel" name="label_2"> + <widget class="QLabel" name="label_rotate"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="text"> <string>Rotate</string> </property> <property name="alignment"> - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + <set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set> </property> </widget> </item> <item> <widget class="QSpinBox" name="spinBox_rotate"> <property name="buttonSymbols"> - <enum>QAbstractSpinBox::UpDownArrows</enum> + <enum>QAbstractSpinBox::ButtonSymbols::UpDownArrows</enum> </property> <property name="suffix"> <string notr="true">°</string> @@ -242,24 +254,12 @@ </property> </widget> </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>10</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="label"> + <widget class="QLabel" name="label_scale"> <property name="sizePolicy"> <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> <horstretch>0</horstretch> @@ -270,14 +270,14 @@ <string>Scale</string> </property> <property name="alignment"> - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + <set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set> </property> </widget> </item> <item> <widget class="QSpinBox" name="spinBox_scale"> <property name="buttonSymbols"> - <enum>QAbstractSpinBox::UpDownArrows</enum> + <enum>QAbstractSpinBox::ButtonSymbols::UpDownArrows</enum> </property> <property name="suffix"> <string>%</string> @@ -294,29 +294,9 @@ </widget> </item> <item> - <widget class="QSpinBox" name="spinBox_scale_stretch"> - <property name="suffix"> - <string>%</string> - </property> - <property name="minimum"> - <number>10</number> - </property> - <property name="maximum"> - <number>400</number> - </property> - <property name="value"> - <number>100</number> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> <spacer name="horizontalSpacer_2"> <property name="orientation"> - <enum>Qt::Horizontal</enum> + <enum>Qt::Orientation::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> @@ -338,14 +318,14 @@ <string>Color</string> </property> <property name="alignment"> - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + <set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set> </property> </widget> </item> <item> <widget class="QSpinBox" name="spinBox_color"> <property name="buttonSymbols"> - <enum>QAbstractSpinBox::UpDownArrows</enum> + <enum>QAbstractSpinBox::ButtonSymbols::UpDownArrows</enum> </property> <property name="suffix"> <string>%</string> @@ -366,12 +346,68 @@ </item> </layout> </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Orientation::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QCheckBox" name="checkBox_respondToAudio"> + <property name="toolTip"> + <string>Scale image in response to input audio file</string> + </property> + <property name="layoutDirection"> + <enum>Qt::LayoutDirection::RightToLeft</enum> + </property> + <property name="text"> + <string>Respond to Audio</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="checked"> + <bool>false</bool> + </property> + <property name="autoRepeat"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_sensitivity"> + <property name="text"> + <string>Sensitivity</string> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="spinBox_sensitivity"> + <property name="minimum"> + <number>1</number> + </property> + <property name="value"> + <number>20</number> + </property> + </widget> + </item> + </layout> + </item> </layout> </item> <item> <spacer name="verticalSpacer"> <property name="orientation"> - <enum>Qt::Vertical</enum> + <enum>Qt::Orientation::Vertical</enum> </property> <property name="sizeHint" stdset="0"> <size> |
