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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
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
Farid Abdelnour
kdenlive
Commits
1089e039
Commit
1089e039
authored
Jan 15, 2009
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Jobs can now be aborted from the "running job" view
svn path=/branches/KDE4/; revision=2922
parent
997e9f8a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
0 deletions
+35
-0
renderer/renderjob.cpp
renderer/renderjob.cpp
+11
-0
renderer/renderjob.h
renderer/renderjob.h
+1
-0
src/mainwindow.cpp
src/mainwindow.cpp
+1
-0
src/mainwindow.h
src/mainwindow.h
+3
-0
src/org.kdenlive.MainWindow.xml
src/org.kdenlive.MainWindow.xml
+3
-0
src/renderwidget.cpp
src/renderwidget.cpp
+14
-0
src/renderwidget.h
src/renderwidget.h
+2
-0
No files found.
renderer/renderjob.cpp
View file @
1089e039
...
...
@@ -80,9 +80,18 @@ RenderJob::~RenderJob() {
m_logfile
.
close
();
}
void
RenderJob
::
slotAbort
(
const
QString
&
url
)
{
if
(
m_dest
==
url
)
slotAbort
();
}
void
RenderJob
::
slotAbort
()
{
qDebug
()
<<
"Kdenlive-render: JOB ABORTED BY USER..."
;
m_renderProcess
->
kill
();
if
(
m_kdenliveinterface
)
{
m_dbusargs
[
1
]
=
-
3
;
m_kdenliveinterface
->
callWithArgumentList
(
QDBus
::
NoBlock
,
"setRenderingProgress"
,
m_dbusargs
);
}
if
(
m_jobUiserver
)
m_jobUiserver
->
call
(
"terminate"
,
QString
());
if
(
m_erase
)
{
QFile
f
(
m_scenelist
);
...
...
@@ -173,6 +182,8 @@ void RenderJob::start() {
m_dbusargs
.
append
(
m_dest
);
m_dbusargs
.
append
((
int
)
0
);
m_kdenliveinterface
->
callWithArgumentList
(
QDBus
::
NoBlock
,
"setRenderingProgress"
,
m_dbusargs
);
connect
(
m_kdenliveinterface
,
SIGNAL
(
abortRenderJob
(
const
QString
&
)),
this
,
SLOT
(
slotAbort
(
const
QString
&
)));
}
// Because of the logging, we connect to stderr in all cases.
...
...
renderer/renderjob.h
View file @
1089e039
...
...
@@ -40,6 +40,7 @@ private slots:
void
slotIsOver
(
int
exitcode
,
QProcess
::
ExitStatus
status
);
void
receivedStderr
();
void
slotAbort
();
void
slotAbort
(
const
QString
&
url
);
private:
QString
m_scenelist
;
...
...
src/mainwindow.cpp
View file @
1089e039
...
...
@@ -1395,6 +1395,7 @@ void MainWindow::slotRenderProject() {
if
(
!
m_renderWidget
)
{
m_renderWidget
=
new
RenderWidget
(
this
);
connect
(
m_renderWidget
,
SIGNAL
(
doRender
(
const
QString
&
,
const
QString
&
,
const
QStringList
&
,
const
QStringList
&
,
bool
,
bool
,
double
,
double
,
bool
)),
this
,
SLOT
(
slotDoRender
(
const
QString
&
,
const
QString
&
,
const
QStringList
&
,
const
QStringList
&
,
bool
,
bool
,
double
,
double
,
bool
)));
connect
(
m_renderWidget
,
SIGNAL
(
abortProcess
(
const
QString
&
)),
this
,
SIGNAL
(
abortRenderJob
(
const
QString
&
)));
if
(
m_activeDocument
)
{
m_renderWidget
->
setProfile
(
m_activeDocument
->
mltProfile
());
m_renderWidget
->
setGuides
(
m_activeDocument
->
guidesXml
(),
m_activeDocument
->
projectDuration
());
...
...
src/mainwindow.h
View file @
1089e039
...
...
@@ -287,6 +287,9 @@ private slots:
void
generateClip
();
void
slotZoneMoved
(
int
start
,
int
end
);
void
slotUpdatePreviewSettings
();
signals:
Q_SCRIPTABLE
void
abortRenderJob
(
const
QString
&
url
);
};
...
...
src/org.kdenlive.MainWindow.xml
View file @
1089e039
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface
name=
"org.kdenlive.MainWindow"
>
<signal
name=
"abortRenderJob"
>
<arg
name=
"url"
type=
"s"
direction=
"out"
/>
</signal>
<method
name=
"setRenderingProgress"
>
<arg
name=
"url"
type=
"s"
direction=
"in"
/>
<arg
name=
"progress"
type=
"i"
direction=
"in"
/>
...
...
src/renderwidget.cpp
View file @
1089e039
...
...
@@ -68,6 +68,7 @@ RenderWidget::RenderWidget(QWidget * parent): QDialog(parent) {
connect
(
m_view
.
buttonEdit
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotEditProfile
()));
connect
(
m_view
.
buttonDelete
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotDeleteProfile
()));
connect
(
m_view
.
buttonStart
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotExport
()));
connect
(
m_view
.
abort_job
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotAbortCurrentJob
()));
connect
(
m_view
.
buttonClose
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
hide
()));
connect
(
m_view
.
buttonClose2
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
hide
()));
connect
(
m_view
.
out_file
,
SIGNAL
(
textChanged
(
const
QString
&
)),
this
,
SLOT
(
slotUpdateButtons
()));
...
...
@@ -645,6 +646,10 @@ void RenderWidget::setRenderJob(const QString &dest, int progress) {
// Rendering crashed
existing
.
at
(
0
)
->
setIcon
(
0
,
KIcon
(
"dialog-close"
));
existing
.
at
(
0
)
->
setData
(
1
,
Qt
::
UserRole
,
0
);
}
else
if
(
progress
==
-
3
)
{
// User aborted job
existing
.
at
(
0
)
->
setIcon
(
0
,
KIcon
(
"dialog-close"
));
existing
.
at
(
0
)
->
setData
(
1
,
Qt
::
UserRole
,
100
);
}
else
existing
.
at
(
0
)
->
setData
(
1
,
Qt
::
UserRole
,
progress
);
return
;
}
...
...
@@ -657,8 +662,17 @@ void RenderWidget::setRenderJob(const QString &dest, int progress) {
// Rendering crashed
item
->
setIcon
(
0
,
KIcon
(
"dialog-close"
));
item
->
setData
(
1
,
Qt
::
UserRole
,
0
);
}
else
if
(
progress
==
-
3
)
{
// User aborted job
item
->
setIcon
(
0
,
KIcon
(
"dialog-close"
));
item
->
setData
(
1
,
Qt
::
UserRole
,
100
);
}
else
item
->
setData
(
1
,
Qt
::
UserRole
,
progress
);
}
void
RenderWidget
::
slotAbortCurrentJob
()
{
QTreeWidgetItem
*
current
=
m_view
.
running_jobs
->
currentItem
();
if
(
current
)
emit
abortProcess
(
current
->
text
(
0
));
}
#include "renderwidget.moc"
src/renderwidget.h
View file @
1089e039
...
...
@@ -87,6 +87,7 @@ private slots:
void
slotCheckEndGuidePosition
();
void
showInfoPanel
();
void
slotUpdateExperimentalRendering
();
void
slotAbortCurrentJob
();
private:
Ui
::
RenderWidget_UI
m_view
;
...
...
@@ -97,6 +98,7 @@ private:
signals:
void
doRender
(
const
QString
&
,
const
QString
&
,
const
QStringList
&
,
const
QStringList
&
,
bool
,
bool
,
double
,
double
,
bool
);
void
abortProcess
(
const
QString
&
url
);
};
...
...
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