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
18d09e2f
Commit
18d09e2f
authored
Oct 15, 2020
by
Pushkar Kukde
Browse files
Timeline Archive, QCheckBox problem
parent
e50ed4e1
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/core.cpp
View file @
18d09e2f
...
...
@@ -842,6 +842,16 @@ QString Core::getTimelineClipBinId(int cid)
}
return
QString
();
}
std
::
unordered_set
<
QString
>
Core
::
getAllTimelineTracksId
()
{
std
::
unordered_set
<
int
>
timelineClipIds
=
m_mainWindow
->
getCurrentTimeline
()
->
controller
()
->
getModel
()
->
getItemsInRange
(
-
1
,
0
);
std
::
unordered_set
<
QString
>
tClipBinIds
;
for
(
int
id
:
timelineClipIds
)
{
auto
idString
=
m_mainWindow
->
getCurrentTimeline
()
->
controller
()
->
getModel
()
->
getClipBinId
(
id
);
tClipBinIds
.
insert
(
idString
);
}
return
tClipBinIds
;
}
int
Core
::
getDurationFromString
(
const
QString
&
time
)
{
...
...
src/core.h
View file @
18d09e2f
...
...
@@ -21,6 +21,7 @@ the Free Software Foundation, either version 3 of the License, or
#include <memory>
#include <QPoint>
#include <KSharedDataCache>
#include <unordered_set>
#include "timecode.h"
class
Bin
;
...
...
@@ -206,6 +207,8 @@ public:
QString
getProjectFolderName
();
/** @brief Returns a timeline clip's bin id */
QString
getTimelineClipBinId
(
int
cid
);
/** @brief Returns all track ids in timeline */
std
::
unordered_set
<
QString
>
getAllTimelineTracksId
();
/** @brief Returns a frame duration from a timecode */
int
getDurationFromString
(
const
QString
&
time
);
/** @brief An error occurred within a filter, inform user */
...
...
src/project/dialogs/archivewidget.cpp
View file @
18d09e2f
...
...
@@ -60,6 +60,7 @@ ArchiveWidget::ArchiveWidget(const QString &projectName, const QString xmlData,
connect
(
this
,
&
ArchiveWidget
::
archivingFinished
,
this
,
&
ArchiveWidget
::
slotArchivingBoolFinished
);
connect
(
this
,
&
ArchiveWidget
::
archiveProgress
,
this
,
&
ArchiveWidget
::
slotArchivingIntProgress
);
connect
(
proxy_only
,
&
QCheckBox
::
stateChanged
,
this
,
&
ArchiveWidget
::
slotProxyOnly
);
//connect(timeline_archive, &QCheckBox::stateChanged, this, &ArchiveWidget::generateItems);
// Prepare xml
m_doc
.
setContent
(
xmlData
);
...
...
@@ -429,7 +430,15 @@ void ArchiveWidget::generateItems(QTreeWidgetItem *parentItem, const QMap<QStrin
int
ix
=
0
;
bool
isSlideshow
=
parentItem
->
data
(
0
,
Qt
::
UserRole
).
toString
()
==
QLatin1String
(
"slideshows"
);
QMap
<
QString
,
QString
>::
const_iterator
it
=
items
.
constBegin
();
const
auto
timelineBinId
=
pCore
->
getAllTimelineTracksId
();
bool
TimelineArchive
=
timeline_archive
->
isChecked
();
while
(
it
!=
items
.
constEnd
())
{
if
(
TimelineArchive
)
{
if
(
timelineBinId
.
find
(
it
.
key
())
==
timelineBinId
.
end
())
{
++
it
;
continue
;
}
}
QString
file
=
it
.
value
();
QTreeWidgetItem
*
item
=
new
QTreeWidgetItem
(
parentItem
,
QStringList
()
<<
file
);
// Store the clip's id
...
...
src/project/dialogs/archivewidget.h
View file @
18d09e2f
...
...
@@ -21,6 +21,7 @@
#define ARCHIVEWIDGET_H
#include "ui_archivewidget_ui.h"
#include "timeline2/model/timelinemodel.hpp"
#include <KIO/CopyJob>
#include <QTemporaryFile>
...
...
@@ -41,7 +42,6 @@ class KArchive;
*/
class
KMessageWidget
;
class
ArchiveWidget
:
public
QDialog
,
public
Ui
::
ArchiveWidget_UI
{
Q_OBJECT
...
...
src/titler/titlewidget.cpp
View file @
18d09e2f
...
...
@@ -962,11 +962,7 @@ void TitleWidget::slotAdjustZoom()
if (scalex > scaley) scalex = scaley;
int zoompos = (int)(scalex * 7 + 0.5);*/
graphicsView
->
fitInView
(
m_frameBorder
,
Qt
::
KeepAspectRatio
);
<<<<<<<
HEAD
int
zoompos
=
graphicsView
->
transform
().
m11
()
*
100
;
=======
int
zoompos
=
graphicsView
->
transform
().
m11
()
*
100
;
>>>>>>>
4
f51bc3e2baf25fccae8e1742bc992b92e89abbf
zoom_slider
->
setValue
(
zoompos
);
graphicsView
->
centerOn
(
m_frameBorder
);
}
...
...
@@ -1834,11 +1830,8 @@ void TitleWidget::itemHCenter()
newPos
+=
item
->
pos
().
x
()
-
br
.
left
();
// Check item transformation
item
->
setPos
(
newPos
,
item
->
pos
().
y
());
updateCoordinates
(
item
);
<<<<<<<
HEAD
slotAdjustZoom
();
=======
graphicsView
->
centerOn
(
m_frameBorder
);
>>>>>>>
4
f51bc3e2baf25fccae8e1742bc992b92e89abbf
}
}
...
...
src/ui/archivewidget_ui.ui
View file @
18d09e2f
...
...
@@ -54,6 +54,13 @@
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"timeline_archive"
>
<property
name=
"text"
>
<string>
Archive only timeline clips
</string>
</property>
</widget>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<item>
...
...
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