Skip to content
GitLab
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
601e5177
Commit
601e5177
authored
Oct 17, 2022
by
Rusty Striker
Committed by
Jean-Baptiste Mardelle
Nov 10, 2022
Browse files
add zone-in/zone-out to contextual mouse menu for clip monitor(issue 1508)
parent
fa73c4a5
Pipeline
#265207
failed with stage
in 20 minutes and 34 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/mainwindow.cpp
View file @
601e5177
...
...
@@ -698,9 +698,9 @@ void MainWindow::init(const QString &mltPath)
connect
(
monitorOverlay
,
&
QMenu
::
triggered
,
this
,
&
MainWindow
::
slotSwitchMonitorOverlay
);
m_projectMonitor
->
setupMenu
(
static_cast
<
QMenu
*>
(
factory
()
->
container
(
QStringLiteral
(
"monitor_go"
),
this
)),
monitorOverlay
,
m_playZone
,
m_loopZone
,
nullptr
,
m_loopClip
);
m_loopClip
,
pCore
->
monitorManager
()
);
m_clipMonitor
->
setupMenu
(
static_cast
<
QMenu
*>
(
factory
()
->
container
(
QStringLiteral
(
"monitor_go"
),
this
)),
monitorOverlay
,
m_playZone
,
m_loopZone
,
static_cast
<
QMenu
*>
(
factory
()
->
container
(
QStringLiteral
(
"marker_menu"
),
this
)));
static_cast
<
QMenu
*>
(
factory
()
->
container
(
QStringLiteral
(
"marker_menu"
),
this
))
,
nullptr
,
pCore
->
monitorManager
()
);
QMenu
*
clipInTimeline
=
static_cast
<
QMenu
*>
(
factory
()
->
container
(
QStringLiteral
(
"clip_in_timeline"
),
this
));
clipInTimeline
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"go-jump"
)));
...
...
@@ -995,9 +995,9 @@ void MainWindow::saveNewToolbarConfig()
QMenu
*
monitorOverlay
=
static_cast
<
QMenu
*>
(
factory
()
->
container
(
QStringLiteral
(
"monitor_config_overlay"
),
this
));
if
(
monitorOverlay
)
{
m_projectMonitor
->
setupMenu
(
static_cast
<
QMenu
*>
(
factory
()
->
container
(
QStringLiteral
(
"monitor_go"
),
this
)),
monitorOverlay
,
m_playZone
,
m_loopZone
,
nullptr
,
m_loopClip
);
nullptr
,
m_loopClip
,
pCore
->
monitorManager
()
);
m_clipMonitor
->
setupMenu
(
static_cast
<
QMenu
*>
(
factory
()
->
container
(
QStringLiteral
(
"monitor_go"
),
this
)),
monitorOverlay
,
m_playZone
,
m_loopZone
,
static_cast
<
QMenu
*>
(
factory
()
->
container
(
QStringLiteral
(
"marker_menu"
),
this
)));
static_cast
<
QMenu
*>
(
factory
()
->
container
(
QStringLiteral
(
"marker_menu"
),
this
))
,
nullptr
,
pCore
->
monitorManager
()
);
}
}
...
...
src/monitor/monitor.cpp
View file @
601e5177
...
...
@@ -557,7 +557,7 @@ void Monitor::slotLockMonitor(bool lock)
m_monitorManager
->
lockMonitor
(
m_id
,
lock
);
}
void
Monitor
::
setupMenu
(
QMenu
*
goMenu
,
QMenu
*
overlayMenu
,
QAction
*
playZone
,
QAction
*
loopZone
,
QMenu
*
markerMenu
,
QAction
*
loopClip
)
void
Monitor
::
setupMenu
(
QMenu
*
goMenu
,
QMenu
*
overlayMenu
,
QAction
*
playZone
,
QAction
*
loopZone
,
QMenu
*
markerMenu
,
QAction
*
loopClip
,
MonitorManager
*
manager
)
{
delete
m_contextMenu
;
m_contextMenu
=
new
QMenu
(
this
);
...
...
@@ -597,6 +597,19 @@ void Monitor::setupMenu(QMenu *goMenu, QMenu *overlayMenu, QAction *playZone, QA
m_contextMenu
->
addAction
(
m_monitorManager
->
getAction
(
QStringLiteral
(
"extract_frame_to_project"
)));
m_contextMenu
->
addAction
(
m_monitorManager
->
getAction
(
QStringLiteral
(
"add_project_note"
)));
QAction
*
markIn
=
new
QAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"zone-in"
)),
i18n
(
"Set Zone In"
),
this
);
QAction
*
markOut
=
new
QAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"zone-out"
)),
i18n
(
"Set Zone Out"
),
this
);
m_contextMenu
->
addAction
(
markIn
);
m_contextMenu
->
addAction
(
markOut
);
connect
(
markIn
,
&
QAction
::
triggered
,
this
,
[
&
,
manager
]()
{
m_monitorManager
->
activateMonitor
(
m_id
);
manager
->
getAction
(
QStringLiteral
(
"mark_in"
))
->
trigger
();
});
connect
(
markOut
,
&
QAction
::
triggered
,
this
,
[
&
,
manager
]()
{
m_monitorManager
->
activateMonitor
(
m_id
);
manager
->
getAction
(
QStringLiteral
(
"mark_out"
))
->
trigger
();
});
if
(
m_id
==
Kdenlive
::
ProjectMonitor
)
{
m_contextMenu
->
addAction
(
m_monitorManager
->
getAction
(
QStringLiteral
(
"monitor_multitrack"
)));
}
else
if
(
m_id
==
Kdenlive
::
ClipMonitor
)
{
...
...
src/monitor/monitor.h
View file @
601e5177
...
...
@@ -67,7 +67,8 @@ public:
void
resetProfile
();
/** @brief Rebuild consumers after a property change */
void
resetConsumer
(
bool
fullReset
);
void
setupMenu
(
QMenu
*
goMenu
,
QMenu
*
overlayMenu
,
QAction
*
playZone
,
QAction
*
loopZone
,
QMenu
*
markerMenu
=
nullptr
,
QAction
*
loopClip
=
nullptr
);
void
setupMenu
(
QMenu
*
goMenu
,
QMenu
*
overlayMenu
,
QAction
*
playZone
,
QAction
*
loopZone
,
QMenu
*
markerMenu
=
nullptr
,
QAction
*
loopClip
=
nullptr
,
MonitorManager
*
manager
=
nullptr
);
const
QString
activeClipId
();
int
position
();
void
updateTimecodeFormat
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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