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
fa8a7260
Commit
fa8a7260
authored
May 01, 2016
by
Jean-Baptiste Mardelle
Browse files
Add Lock all tracks but current
Ref: T1961
parent
6c1552c9
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/kdenliveui.rc
View file @
fa8a7260
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui
name=
"kdenlive"
version=
"11
5
"
translationDomain=
"kdenlive"
>
<kpartgui
name=
"kdenlive"
version=
"11
6
"
translationDomain=
"kdenlive"
>
<ToolBar
name=
"extraToolBar"
>
<text>
Extra Toolbar
</text>
<Action
name=
"project_render"
/>
...
...
@@ -135,6 +135,7 @@
<Action
name=
"send_library"
/>
<Menu
name=
"timeline_tracks"
><text>
Tracks
</text>
<Action
name=
"switch_track_lock"
/>
<Action
name=
"switch_all_track_lock"
/>
<Action
name=
"switch_track_target"
/>
</Menu>
<Separator
/>
...
...
src/mainwindow.cpp
View file @
fa8a7260
...
...
@@ -1335,6 +1335,7 @@ void MainWindow::setupActions()
//TODO: port stopmotion to new Monitor code
//addAction("stopmotion", i18n("Stop Motion Capture"), this, SLOT(slotOpenStopmotion()), KoIconUtils::themedIcon("image-x-generic"));
addAction
(
QStringLiteral
(
"switch_track_lock"
),
i18n
(
"Switch Track Lock"
),
pCore
->
projectManager
(),
SLOT
(
slotSwitchTrackLock
()),
QIcon
(),
Qt
::
SHIFT
+
Qt
::
Key_L
);
addAction
(
QStringLiteral
(
"switch_all_track_lock"
),
i18n
(
"Switch All Track Lock"
),
pCore
->
projectManager
(),
SLOT
(
slotSwitchAllTrackLock
()),
QIcon
(),
Qt
::
CTRL
+
Qt
::
SHIFT
+
Qt
::
Key_L
);
addAction
(
QStringLiteral
(
"switch_track_target"
),
i18n
(
"Switch Track Target"
),
pCore
->
projectManager
(),
SLOT
(
slotSwitchTrackTarget
()),
QIcon
(),
Qt
::
SHIFT
+
Qt
::
Key_T
);
QHash
<
QString
,
QAction
*>
actions
;
...
...
src/project/projectmanager.cpp
View file @
fa8a7260
...
...
@@ -708,6 +708,11 @@ void ProjectManager::slotSwitchTrackLock()
m_trackView
->
projectView
()
->
switchTrackLock
();
}
void
ProjectManager
::
slotSwitchAllTrackLock
()
{
m_trackView
->
projectView
()
->
switchAllTrackLock
();
}
void
ProjectManager
::
slotSwitchTrackTarget
()
{
m_trackView
->
switchTrackTarget
();
...
...
src/project/projectmanager.h
View file @
fa8a7260
...
...
@@ -109,6 +109,7 @@ public slots:
/** @brief Un/Lock current timeline track */
void
slotSwitchTrackLock
();
void
slotSwitchAllTrackLock
();
/** @brief Un/Set current track as target */
void
slotSwitchTrackTarget
();
...
...
src/timeline/customtrackview.cpp
View file @
fa8a7260
...
...
@@ -3709,9 +3709,20 @@ void CustomTrackView::slotSwitchTrackAudio(int ix, bool enable)
m_document->renderer()->doRefresh();
}
void CustomTrackView::slotSwitchTrackLock(int ix, bool enable)
void CustomTrackView::slotSwitchTrackLock(int ix, bool enable
, bool applyToAll
)
{
LockTrackCommand *command = new LockTrackCommand(this, ix, enable);
QUndoCommand *command = NULL;
if (!applyToAll) {
command = new LockTrackCommand(this, ix, enable);
} else {
command = new QUndoCommand;
command->setText(i18n("Switch All Track Lock"));
for (int i = 1; i <= m_timeline->visibleTracksCount(); ++i) {
if (i == ix)
continue;
new LockTrackCommand(this, i, enable, command);
}
}
m_commandStack->push(command);
}
...
...
@@ -8588,3 +8599,11 @@ void CustomTrackView::switchTrackLock()
slotSwitchTrackLock(m_selectedTrack, !m_timeline->getTrackInfo(m_selectedTrack).isLocked);
}
void CustomTrackView::switchAllTrackLock()
{
if (m_selectedTrack > 1)
slotSwitchTrackLock(m_selectedTrack, !m_timeline->getTrackInfo(1).isLocked, true);
else if (m_timeline->visibleTracksCount() > 1)
slotSwitchTrackLock(m_selectedTrack, !m_timeline->getTrackInfo(2).isLocked, true);
}
src/timeline/customtrackview.h
View file @
fa8a7260
...
...
@@ -254,6 +254,7 @@ public:
void
dropTransitionGeometry
(
Transition
*
trans
,
const
QString
&
geometry
);
/** @brief Switch current track lock state */
void
switchTrackLock
();
void
switchAllTrackLock
();
void
insertTimelineSpace
(
GenTime
startPos
,
GenTime
duration
);
public
slots
:
...
...
@@ -275,7 +276,7 @@ public slots:
void
slotTransitionUpdated
(
Transition
*
,
QDomElement
);
void
slotSwitchTrackAudio
(
int
ix
,
bool
enable
);
void
slotSwitchTrackVideo
(
int
ix
,
bool
enable
);
void
slotSwitchTrackLock
(
int
ix
,
bool
enable
);
void
slotSwitchTrackLock
(
int
ix
,
bool
enable
,
bool
applyToAll
=
false
);
void
slotUpdateClip
(
const
QString
&
clipId
,
bool
reload
=
true
);
bool
addGuide
(
const
GenTime
&
pos
,
const
QString
&
comment
,
bool
loadingProject
=
false
);
...
...
Write
Preview
Supports
Markdown
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