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
261
Issues
261
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
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
7f9804a0
Commit
7f9804a0
authored
Mar 07, 2008
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show current document name in window title
svn path=/branches/KDE4/; revision=2002
parent
83936ca4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
22 deletions
+25
-22
src/kdenlivedoc.cpp
src/kdenlivedoc.cpp
+15
-13
src/kdenlivedoc.h
src/kdenlivedoc.h
+8
-8
src/mainwindow.cpp
src/mainwindow.cpp
+2
-1
No files found.
src/kdenlivedoc.cpp
View file @
7f9804a0
...
...
@@ -28,7 +28,7 @@
#include "kdenlivedoc.h"
#include "docclipbase.h"
KdenliveDoc
::
KdenliveDoc
(
const
KUrl
&
url
,
MltVideoProfile
profile
,
QWidget
*
parent
)
:
QObject
(
parent
),
m_render
(
NULL
),
m_url
(
url
),
m_profile
(
profile
),
m_fps
((
double
)
profile
.
frame_rate_num
/
profile
.
frame_rate_den
),
m_width
(
profile
.
width
),
m_height
(
profile
.
height
),
m_
projectName
(
NULL
),
m_
commandStack
(
new
KUndoStack
())
{
KdenliveDoc
::
KdenliveDoc
(
const
KUrl
&
url
,
MltVideoProfile
profile
,
QWidget
*
parent
)
:
QObject
(
parent
),
m_render
(
NULL
),
m_url
(
url
),
m_profile
(
profile
),
m_fps
((
double
)
profile
.
frame_rate_num
/
profile
.
frame_rate_den
),
m_width
(
profile
.
width
),
m_height
(
profile
.
height
),
m_commandStack
(
new
KUndoStack
())
{
m_clipManager
=
new
ClipManager
(
this
);
if
(
!
url
.
isEmpty
())
{
QString
tmpFile
;
...
...
@@ -36,7 +36,6 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, MltVideoProfile profile, QWidget *pare
QFile
file
(
tmpFile
);
m_document
.
setContent
(
&
file
,
false
);
file
.
close
();
m_projectName
=
url
.
fileName
();
KIO
::
NetAccess
::
removeTempFile
(
tmpFile
);
}
else
{
KMessageBox
::
error
(
parent
,
KIO
::
NetAccess
::
lastErrorString
());
...
...
@@ -115,7 +114,7 @@ ClipManager *KdenliveDoc::clipManager() {
return
m_clipManager
;
}
QString
KdenliveDoc
::
profilePath
()
{
QString
KdenliveDoc
::
profilePath
()
const
{
return
m_profile
.
path
;
}
...
...
@@ -193,18 +192,14 @@ QDomDocument KdenliveDoc::generateSceneList() {
QDomElement
prod
=
doc
.
createElement
(
"producer"
);
}
QDomDocument
KdenliveDoc
::
toXml
()
{
QDomDocument
KdenliveDoc
::
toXml
()
const
{
return
m_document
;
}
Timecode
KdenliveDoc
::
timecode
()
{
Timecode
KdenliveDoc
::
timecode
()
const
{
return
m_timecode
;
}
QString
KdenliveDoc
::
documentName
()
{
return
m_projectName
;
}
QDomNodeList
KdenliveDoc
::
producersList
()
{
return
m_document
.
elementsByTagName
(
"producer"
);
}
...
...
@@ -213,22 +208,29 @@ void KdenliveDoc::backupMltPlaylist() {
if
(
m_render
)
m_scenelist
=
m_render
->
sceneList
();
}
double
KdenliveDoc
::
fps
()
{
double
KdenliveDoc
::
fps
()
const
{
return
m_fps
;
}
int
KdenliveDoc
::
width
()
{
int
KdenliveDoc
::
width
()
const
{
return
m_width
;
}
int
KdenliveDoc
::
height
()
{
int
KdenliveDoc
::
height
()
const
{
return
m_height
;
}
KUrl
KdenliveDoc
::
url
()
{
KUrl
KdenliveDoc
::
url
()
const
{
return
m_url
;
}
QString
KdenliveDoc
::
description
()
const
{
if
(
m_url
.
isEmpty
())
return
i18n
(
"Untitled"
)
+
" / "
+
m_profile
.
description
;
else
return
m_url
.
fileName
()
+
" / "
+
m_profile
.
description
;
}
void
KdenliveDoc
::
addClip
(
const
QDomElement
&
elem
,
const
int
clipId
)
{
kDebug
()
<<
"///////// DOCUM, CREATING NEW CLIP, ID:"
<<
clipId
;
DocClipBase
*
clip
=
new
DocClipBase
(
m_clipManager
,
elem
,
clipId
);
...
...
src/kdenlivedoc.h
View file @
7f9804a0
...
...
@@ -41,15 +41,14 @@ Q_OBJECT public:
KdenliveDoc
(
const
KUrl
&
url
,
MltVideoProfile
profile
,
QWidget
*
parent
=
0
);
~
KdenliveDoc
();
QString
documentName
();
QDomNodeList
producersList
();
double
fps
();
int
width
();
int
height
();
KUrl
url
();
double
fps
()
const
;
int
width
()
const
;
int
height
()
const
;
KUrl
url
()
const
;
void
backupMltPlaylist
();
Timecode
timecode
();
QDomDocument
toXml
();
Timecode
timecode
()
const
;
QDomDocument
toXml
()
const
;
void
setRenderer
(
Render
*
render
);
KUndoStack
*
commandStack
();
QString
producerName
(
int
id
);
...
...
@@ -67,7 +66,8 @@ Q_OBJECT public:
void
deleteProjectClip
(
const
uint
clipId
);
/** Inform application of the audio thumbnails generation progress */
void
setThumbsProgress
(
KUrl
url
,
int
progress
);
QString
profilePath
();
QString
profilePath
()
const
;
QString
description
()
const
;
private:
KUrl
m_url
;
...
...
src/mainwindow.cpp
View file @
7f9804a0
...
...
@@ -349,7 +349,7 @@ void MainWindow::openFile(const KUrl &url) { //new
if
(
prof
.
width
==
0
)
prof
=
ProfilesDialog
::
getVideoProfile
(
"dv_pal"
);
KdenliveDoc
*
doc
=
new
KdenliveDoc
(
url
,
prof
);
TrackView
*
trackView
=
new
TrackView
(
doc
);
m_timelineArea
->
setCurrentIndex
(
m_timelineArea
->
addTab
(
trackView
,
QIcon
(),
doc
->
d
ocumentName
()
+
" / "
+
prof
.
description
));
m_timelineArea
->
setCurrentIndex
(
m_timelineArea
->
addTab
(
trackView
,
QIcon
(),
doc
->
d
escription
()
));
m_timelineArea
->
setTabToolTip
(
m_timelineArea
->
currentIndex
(),
doc
->
url
().
path
());
if
(
m_timelineArea
->
count
()
>
1
)
m_timelineArea
->
setTabBarHidden
(
false
);
//connectDocument(trackView, doc);
...
...
@@ -497,6 +497,7 @@ void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc) { //cha
w
->
addAction
(
redo
);
}
m_undoView
->
setStack
(
doc
->
commandStack
());
setCaption
(
doc
->
description
());
m_activeDocument
=
doc
;
}
...
...
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