Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
258
Issues
258
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
fc32e134
Commit
fc32e134
authored
Jun 05, 2019
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Render dialog: add context menu to rendered jobs allowing to add rendered file as a project clip
parent
5b56e265
Pipeline
#4060
failed with stage
in 10 minutes and 37 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
src/dialogs/renderwidget.cpp
src/dialogs/renderwidget.cpp
+26
-0
src/dialogs/renderwidget.h
src/dialogs/renderwidget.h
+2
-0
No files found.
src/dialogs/renderwidget.cpp
View file @
fc32e134
...
...
@@ -19,6 +19,7 @@
#include "renderwidget.h"
#include "bin/projectitemmodel.h"
#include "bin/bin.h"
#include "core.h"
#include "dialogs/profilesdialog.h"
#include "doc/kdenlivedoc.h"
...
...
@@ -264,6 +265,8 @@ RenderWidget::RenderWidget(bool enableProxy, QWidget *parent)
parseProfiles
();
parseScriptFiles
();
m_view
.
running_jobs
->
setUniformRowHeights
(
false
);
m_view
.
running_jobs
->
setContextMenuPolicy
(
Qt
::
CustomContextMenu
);
connect
(
m_view
.
running_jobs
,
&
QTreeWidget
::
customContextMenuRequested
,
this
,
&
RenderWidget
::
prepareMenu
);
m_view
.
scripts_list
->
setUniformRowHeights
(
false
);
connect
(
m_view
.
start_script
,
&
QAbstractButton
::
clicked
,
this
,
&
RenderWidget
::
slotStartScript
);
connect
(
m_view
.
delete_script
,
&
QAbstractButton
::
clicked
,
this
,
&
RenderWidget
::
slotDeleteScript
);
...
...
@@ -3454,3 +3457,26 @@ void RenderWidget::slotProxyWarn(bool enableProxy)
{
errorMessage
(
ProxyWarning
,
enableProxy
?
i18n
(
"Rendering using low quality proxy"
)
:
QString
());
}
void
RenderWidget
::
prepareMenu
(
const
QPoint
&
pos
)
{
QTreeWidgetItem
*
nd
=
m_view
.
running_jobs
->
itemAt
(
pos
);
RenderJobItem
*
renderItem
=
nullptr
;
if
(
nd
)
{
renderItem
=
static_cast
<
RenderJobItem
*>
(
nd
);
}
if
(
!
renderItem
)
{
return
;
}
if
(
renderItem
->
status
()
!=
FINISHEDJOB
)
{
return
;
}
QMenu
menu
(
this
);
QAction
*
newAct
=
new
QAction
(
i18n
(
"Add to current project"
),
this
);
connect
(
newAct
,
&
QAction
::
triggered
,
[
&
,
renderItem
]()
{
pCore
->
bin
()
->
slotAddClipToProject
(
QUrl
::
fromLocalFile
(
renderItem
->
text
(
1
)));
});
menu
.
addAction
(
newAct
);
menu
.
exec
(
m_view
.
running_jobs
->
mapToGlobal
(
pos
));
}
src/dialogs/renderwidget.h
View file @
fc32e134
...
...
@@ -203,6 +203,8 @@ private slots:
void
slotProxyWarn
(
bool
enableProxy
);
/** @brief User shared a rendered file, give feedback. */
void
slotShareActionFinished
(
const
QJsonObject
&
output
,
int
error
,
const
QString
&
message
);
/** @brief running jobs menu. */
void
prepareMenu
(
const
QPoint
&
pos
);
private:
Ui
::
RenderWidget_UI
m_view
;
...
...
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