Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
Kdenlive
Commits
d364bac9
Commit
d364bac9
authored
May 28, 2019
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow shortcut for change speed action.
Fixes
#201
parent
28633d7a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
16 deletions
+18
-16
src/assets/assetpanel.cpp
src/assets/assetpanel.cpp
+0
-6
src/assets/assetpanel.hpp
src/assets/assetpanel.hpp
+0
-2
src/kdenliveui.rc
src/kdenliveui.rc
+2
-1
src/mainwindow.cpp
src/mainwindow.cpp
+8
-6
src/mainwindow.h
src/mainwindow.h
+1
-1
src/timeline2/view/timelinecontroller.cpp
src/timeline2/view/timelinecontroller.cpp
+7
-0
No files found.
src/assets/assetpanel.cpp
View file @
d364bac9
...
...
@@ -330,12 +330,6 @@ ObjectId AssetPanel::effectStackOwner()
return
m_effectStackWidget
->
stackOwner
();
}
void
AssetPanel
::
parameterChanged
(
QString
name
,
int
value
)
{
Q_UNUSED
(
name
)
emit
changeSpeed
(
value
);
}
bool
AssetPanel
::
addEffect
(
const
QString
&
effectId
)
{
if
(
!
m_effectStackWidget
->
isVisible
())
{
...
...
src/assets/assetpanel.hpp
View file @
d364bac9
...
...
@@ -69,7 +69,6 @@ public:
public
slots
:
/** @brief Clear panel if displaying itemId */
void
clearAssetPanel
(
int
itemId
);
void
parameterChanged
(
QString
name
,
int
value
);
void
deleteCurrentEffect
();
protected:
...
...
@@ -98,7 +97,6 @@ signals:
void
doSplitEffect
(
bool
);
void
doSplitBinEffect
(
bool
);
void
seekToPos
(
int
);
void
changeSpeed
(
int
);
void
reloadEffect
(
const
QString
&
path
);
};
...
...
src/kdenliveui.rc
View file @
d364bac9
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui
name=
"kdenlive"
version=
"1
59
"
translationDomain=
"kdenlive"
>
<kpartgui
name=
"kdenlive"
version=
"1
60
"
translationDomain=
"kdenlive"
>
<MenuBar>
<Menu
name=
"file"
>
<Action
name=
"dvd_wizard"
/>
...
...
@@ -103,6 +103,7 @@
<Action
name=
"cut_timeline_clip"
/>
<Action
name=
"delete_timeline_clip"
/>
<Action
name=
"edit_item_duration"
/>
<Action
name=
"edit_item_speed"
/>
<Action
name=
"clip_split"
/>
<Action
name=
"clip_disable"
/>
<Action
name=
"clip_in_project_tree"
/>
...
...
src/mainwindow.cpp
View file @
d364bac9
...
...
@@ -306,7 +306,6 @@ void MainWindow::init()
m_effectStackDock
=
addDock
(
i18n
(
"Properties"
),
QStringLiteral
(
"effect_stack"
),
m_assetPanel
);
connect
(
m_assetPanel
,
&
AssetPanel
::
doSplitEffect
,
m_projectMonitor
,
&
Monitor
::
slotSwitchCompare
);
connect
(
m_assetPanel
,
&
AssetPanel
::
doSplitBinEffect
,
m_clipMonitor
,
&
Monitor
::
slotSwitchCompare
);
connect
(
m_assetPanel
,
&
AssetPanel
::
changeSpeed
,
this
,
&
MainWindow
::
slotChangeSpeed
);
connect
(
m_timelineTabs
,
&
TimelineTabs
::
showTransitionModel
,
m_assetPanel
,
&
AssetPanel
::
showTransition
);
connect
(
m_timelineTabs
,
&
TimelineTabs
::
showTransitionModel
,
[
&
]
()
{
m_effectStackDock
->
raise
();
...
...
@@ -1285,6 +1284,10 @@ void MainWindow::setupActions()
QIcon
::
fromTheme
(
QStringLiteral
(
"measure"
)),
QKeySequence
(),
clipActionCategory
);
act
->
setEnabled
(
false
);
act
=
addAction
(
QStringLiteral
(
"edit_item_speed"
),
i18n
(
"Change Speed"
),
this
,
SLOT
(
slotEditItemSpeed
()),
QIcon
::
fromTheme
(
QStringLiteral
(
"speedometer"
)),
QKeySequence
(),
clipActionCategory
);
act
->
setEnabled
(
false
);
act
=
addAction
(
QStringLiteral
(
"clip_in_project_tree"
),
i18n
(
"Clip in Project Bin"
),
this
,
SLOT
(
slotClipInProjectTree
()),
QIcon
::
fromTheme
(
QStringLiteral
(
"go-jump-definition"
)),
QKeySequence
(),
clipActionCategory
);
act
->
setEnabled
(
false
);
...
...
@@ -3739,12 +3742,11 @@ void MainWindow::resetTimelineTracks()
}
}
void
MainWindow
::
slot
ChangeSpeed
(
int
speed
)
void
MainWindow
::
slot
EditItemSpeed
(
)
{
ObjectId
owner
=
m_assetPanel
->
effectStackOwner
();
// TODO: manage bin clips / tracks
if
(
owner
.
first
==
ObjectType
::
TimelineClip
)
{
getCurrentTimeline
()
->
controller
()
->
changeItemSpeed
(
owner
.
second
,
speed
);
TimelineWidget
*
current
=
getCurrentTimeline
();
if
(
current
)
{
current
->
controller
()
->
changeItemSpeed
(
-
1
,
-
1
);
}
}
...
...
src/mainwindow.h
View file @
d364bac9
...
...
@@ -465,7 +465,7 @@ private slots:
void
setTrimMode
(
const
QString
&
mode
);
/** @brief Set timeline toolbar icon size. */
void
setTimelineToolbarIconSize
(
QAction
*
a
);
void
slot
ChangeSpeed
(
int
speed
);
void
slot
EditItemSpeed
(
);
void
updateAction
();
/** @brief Request adjust of timeline track height */
void
resetTimelineTracks
();
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
d364bac9
...
...
@@ -1442,6 +1442,13 @@ void TimelineController::invalidateZone(int in, int out)
void
TimelineController
::
changeItemSpeed
(
int
clipId
,
double
speed
)
{
if
(
clipId
==
-
1
)
{
clipId
=
getMainSelectedItem
(
false
,
true
);
}
if
(
clipId
==
-
1
)
{
pCore
->
displayMessage
(
i18n
(
"No item to edit"
),
InformationMessage
,
500
);
return
;
}
if
(
qFuzzyCompare
(
speed
,
-
1
))
{
speed
=
100
*
m_model
->
getClipSpeed
(
clipId
);
double
duration
=
m_model
->
getItemPlaytime
(
clipId
);
...
...
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