Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
8421430b
Commit
8421430b
authored
Jul 18, 2021
by
Jean-Baptiste Mardelle
Browse files
Timeremap: expose frame blending param
parent
202c2c1c
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/dialogs/timeremap.cpp
View file @
8421430b
...
...
@@ -1184,15 +1184,11 @@ TimeRemap::TimeRemap(QWidget *parent)
m_out
=
new
TimecodeDisplay
(
pCore
->
timecode
(),
this
);
outLayout
->
addWidget
(
m_out
);
m_view
=
new
RemapView
(
this
);
time_box
->
setEnabled
(
false
);
speed_box
->
setEnabled
(
false
);
speedBefore
->
setKeyboardTracking
(
false
);
speedAfter
->
setKeyboardTracking
(
false
);
remapLayout
->
addWidget
(
m_view
);
connect
(
m_view
,
&
RemapView
::
selectedKf
,
[
this
](
std
::
pair
<
int
,
int
>
selection
,
std
::
pair
<
double
,
double
>
speeds
)
{
qDebug
()
<<
"=== SELECTED KFR SPEEDS: "
<<
speeds
;
time_box
->
setEnabled
(
true
);
speed_box
->
setEnabled
(
true
);
info_frame
->
setEnabled
(
selection
.
first
>=
0
);
QSignalBlocker
bk
(
m_in
);
QSignalBlocker
bk2
(
m_out
);
m_in
->
setEnabled
(
selection
.
first
>=
0
);
...
...
@@ -1234,6 +1230,7 @@ TimeRemap::TimeRemap(QWidget *parent)
connect
(
button_prev
,
&
QToolButton
::
clicked
,
m_view
,
&
RemapView
::
goPrev
);
connect
(
move_next
,
&
QCheckBox
::
toggled
,
m_view
,
&
RemapView
::
toggleMoveNext
);
connect
(
pitch_compensate
,
&
QCheckBox
::
toggled
,
this
,
&
TimeRemap
::
switchPitch
);
connect
(
frame_blending
,
&
QCheckBox
::
toggled
,
this
,
&
TimeRemap
::
switchBlending
);
connect
(
m_view
,
&
RemapView
::
updateMaxDuration
,
[
this
](
int
duration
)
{
int
min
=
m_in
->
minimum
();
m_out
->
setRange
(
0
,
INT_MAX
);
...
...
@@ -1330,6 +1327,7 @@ void TimeRemap::selectedClip(int cid)
QString
mapData
(
fromLink
->
get
(
"map"
));
m_view
->
loadKeyframes
(
mapData
);
pitch_compensate
->
setChecked
(
fromLink
->
get_int
(
"pitch"
)
==
1
);
frame_blending
->
setChecked
(
fromLink
->
get
(
"image_mode"
)
==
QLatin1String
(
"blend"
));
keyframesLoaded
=
true
;
setEnabled
(
true
);
break
;
...
...
@@ -1486,6 +1484,14 @@ void TimeRemap::updateKeyframes(bool resize)
}
}
void
TimeRemap
::
switchBlending
()
{
m_view
->
m_remapLink
->
set
(
"image_mode"
,
frame_blending
->
isChecked
()
?
"blend"
:
""
);
if
(
m_splitRemap
)
{
m_splitRemap
->
set
(
"image_mode"
,
frame_blending
->
isChecked
()
?
"blend"
:
""
);
}
}
void
TimeRemap
::
switchPitch
()
{
m_view
->
m_remapLink
->
set
(
"pitch"
,
pitch_compensate
->
isChecked
()
?
1
:
0
);
...
...
src/dialogs/timeremap.h
View file @
8421430b
...
...
@@ -150,6 +150,7 @@ public:
private
slots
:
void
updateKeyframes
(
bool
resize
=
true
);
void
checkClipUpdate
(
const
QModelIndex
&
topLeft
,
const
QModelIndex
&
bottomRight
,
const
QVector
<
int
>&
roles
);
void
switchBlending
();
void
switchPitch
();
private:
...
...
src/ui/timeremap_ui.ui
View file @
8421430b
...
...
@@ -6,44 +6,43 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
399
</width>
<height>
34
6
</height>
<width>
288
</width>
<height>
25
6
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout_2"
>
<item
row=
"4"
column=
"0"
colspan=
"5"
>
<widget
class=
"QGroupBox"
name=
"time_box"
>
<property
name=
"title"
>
<string>
Time
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"text"
>
<string>
Source time
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<layout
class=
"QHBoxLayout"
name=
"inLayout"
/>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"text"
>
<string>
Output time
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<layout
class=
"QHBoxLayout"
name=
"outLayout"
/>
</item>
</layout>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"horizontalSpacing"
>
<number>
0
</number>
</property>
<property
name=
"verticalSpacing"
>
<number>
2
</number>
</property>
<item
row=
"6"
column=
"0"
>
<widget
class=
"QCheckBox"
name=
"pitch_compensate"
>
<property
name=
"text"
>
<string>
Pitch compensation
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
<property
name=
"tristate"
>
<bool>
false
</bool>
</property>
</widget>
</item>
<item
row=
"
8
"
column=
"4"
>
<item
row=
"
7
"
column=
"4"
>
<widget
class=
"QToolButton"
name=
"button_del"
>
<property
name=
"text"
>
<string>
...
</string>
...
...
@@ -54,74 +53,23 @@
</property>
</widget>
</item>
<item
row=
"6"
column=
"0"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
39
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"3"
column=
"2"
>
<widget
class=
"QToolButton"
name=
"button_add"
>
<item
row=
"2"
column=
"2"
colspan=
"3"
>
<widget
class=
"QCheckBox"
name=
"output_seek"
>
<property
name=
"text"
>
<string>
...
</string>
</property>
<property
name=
"icon"
>
<iconset
theme=
"list-add"
>
<normaloff>
../../../../.designer/backup
</normaloff>
../../../../.designer/backup
</iconset>
<string>
Seek monitor
</string>
</property>
<property
name=
"
autoRaise
"
>
<property
name=
"
checked
"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item
row=
"5"
column=
"0"
colspan=
"5"
>
<widget
class=
"QGroupBox"
name=
"speed_box"
>
<property
name=
"title"
>
<string>
Speed
</string>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QLabel"
name=
"label_3"
>
<property
name=
"text"
>
<string>
Before
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QDoubleSpinBox"
name=
"speedBefore"
>
<property
name=
"maximum"
>
<double>
100000.000000000000000
</double>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_4"
>
<property
name=
"text"
>
<string>
After
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QDoubleSpinBox"
name=
"speedAfter"
>
<property
name=
"maximum"
>
<double>
100000.000000000000000
</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item
row=
"2"
column=
"0"
colspan=
"2"
>
<widget
class=
"QLabel"
name=
"label_5"
>
<item
row=
"0"
column=
"2"
colspan=
"3"
>
<widget
class=
"QCheckBox"
name=
"source_seek"
>
<property
name=
"text"
>
<string>
Output
</string>
<string>
Seek monitor
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
...
...
@@ -138,16 +86,6 @@
</property>
</spacer>
</item>
<item
row=
"2"
column=
"2"
colspan=
"3"
>
<widget
class=
"QCheckBox"
name=
"output_seek"
>
<property
name=
"text"
>
<string>
Seek monitor
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QToolButton"
name=
"button_prev"
>
<property
name=
"text"
>
...
...
@@ -162,6 +100,120 @@
</property>
</widget>
</item>
<item
row=
"5"
column=
"0"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
39
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"2"
column=
"0"
colspan=
"2"
>
<widget
class=
"QLabel"
name=
"label_5"
>
<property
name=
"text"
>
<string>
Output
</string>
</property>
</widget>
</item>
<item
row=
"4"
column=
"0"
colspan=
"5"
>
<widget
class=
"QFrame"
name=
"info_frame"
>
<property
name=
"frameShape"
>
<enum>
QFrame::NoFrame
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Raised
</enum>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<property
name=
"spacing"
>
<number>
0
</number>
</property>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<item>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"text"
>
<string>
Source time
</string>
</property>
</widget>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"inLayout"
/>
</item>
</layout>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_3"
>
<item>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"text"
>
<string>
Output time
</string>
</property>
</widget>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"outLayout"
/>
</item>
</layout>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QLabel"
name=
"label_3"
>
<property
name=
"text"
>
<string>
Speed before
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QDoubleSpinBox"
name=
"speedBefore"
>
<property
name=
"maximum"
>
<double>
100000.000000000000000
</double>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_4"
>
<item>
<widget
class=
"QLabel"
name=
"label_4"
>
<property
name=
"text"
>
<string>
After
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QDoubleSpinBox"
name=
"speedAfter"
>
<property
name=
"maximum"
>
<double>
100000.000000000000000
</double>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item
row=
"1"
column=
"0"
colspan=
"5"
>
<layout
class=
"QVBoxLayout"
name=
"remapLayout"
/>
</item>
<item
row=
"0"
column=
"0"
colspan=
"2"
>
<widget
class=
"QLabel"
name=
"label_6"
>
<property
name=
"text"
>
...
...
@@ -169,6 +221,13 @@
</property>
</widget>
</item>
<item
row=
"6"
column=
"1"
colspan=
"4"
>
<widget
class=
"QCheckBox"
name=
"frame_blending"
>
<property
name=
"text"
>
<string>
Frame blending
</string>
</property>
</widget>
</item>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QToolButton"
name=
"button_next"
>
<property
name=
"text"
>
...
...
@@ -183,40 +242,28 @@
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
colspan=
"5"
>
<layout
class=
"QVBoxLayout"
name=
"remapLayout"
/>
</item>
<item
row=
"8"
column=
"0"
colspan=
"4"
>
<widget
class=
"QCheckBox"
name=
"move_next"
>
<item
row=
"3"
column=
"2"
>
<widget
class=
"QToolButton"
name=
"button_add"
>
<property
name=
"text"
>
<string>
Preserve speed of next keyframes
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
<string>
...
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"2"
colspan=
"3"
>
<widget
class=
"QCheckBox"
name=
"source_seek"
>
<property
name=
"text"
>
<string>
Seek monitor
</string>
<property
name=
"icon"
>
<iconset
theme=
"list-add"
>
<normaloff>
../../../../.designer/backup
</normaloff>
../../../../.designer/backup
</iconset>
</property>
<property
name=
"
checked
"
>
<property
name=
"
autoRaise
"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item
row=
"7"
column=
"0"
>
<widget
class=
"QCheckBox"
name=
"
pitch_compensate
"
>
<item
row=
"7"
column=
"0"
colspan=
"4"
>
<widget
class=
"QCheckBox"
name=
"
move_next
"
>
<property
name=
"text"
>
<string>
P
itch compensation
</string>
<string>
P
reserve speed of next keyframes
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
<property
name=
"tristate"
>
<bool>
false
</bool>
</property>
</widget>
</item>
</layout>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment