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
252
Issues
252
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
56536237
Commit
56536237
authored
Sep 20, 2019
by
Vincent Pinon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compile warnings
parent
cf60d92f
Pipeline
#8189
passed with stage
in 18 minutes and 14 seconds
Changes
43
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
94 additions
and
118 deletions
+94
-118
src/assets/keyframes/model/keyframemodellist.cpp
src/assets/keyframes/model/keyframemodellist.cpp
+0
-1
src/assets/view/assetparameterview.cpp
src/assets/view/assetparameterview.cpp
+5
-5
src/assets/view/widgets/colorwheel.cpp
src/assets/view/widgets/colorwheel.cpp
+1
-1
src/assets/view/widgets/curves/abstractcurvewidget.ipp
src/assets/view/widgets/curves/abstractcurvewidget.ipp
+1
-1
src/assets/view/widgets/curves/bezier/cubicbezierspline.cpp
src/assets/view/widgets/curves/bezier/cubicbezierspline.cpp
+1
-1
src/assets/view/widgets/curves/cubic/kis_cubic_curve.cpp
src/assets/view/widgets/curves/cubic/kis_cubic_curve.cpp
+1
-1
src/assets/view/widgets/curves/curveparamwidget.ipp
src/assets/view/widgets/curves/curveparamwidget.ipp
+1
-1
src/bin/bin.cpp
src/bin/bin.cpp
+1
-2
src/bin/model/markerlistmodel.cpp
src/bin/model/markerlistmodel.cpp
+1
-1
src/bin/projectsubclip.cpp
src/bin/projectsubclip.cpp
+1
-1
src/capture/mediacapture.cpp
src/capture/mediacapture.cpp
+1
-1
src/dialogs/kdenlivesettingsdialog.cpp
src/dialogs/kdenlivesettingsdialog.cpp
+8
-2
src/dialogs/splash.cpp
src/dialogs/splash.cpp
+1
-0
src/doc/kthumb.cpp
src/doc/kthumb.cpp
+1
-1
src/dvdwizard/dvdwizardchapters.cpp
src/dvdwizard/dvdwizardchapters.cpp
+1
-1
src/effects/effectstack/view/builtstack.cpp
src/effects/effectstack/view/builtstack.cpp
+1
-0
src/jobs/cachejob.cpp
src/jobs/cachejob.cpp
+4
-2
src/jobs/filterjob.cpp
src/jobs/filterjob.cpp
+1
-1
src/jobs/stabilizejob.cpp
src/jobs/stabilizejob.cpp
+1
-1
src/lib/audio/audioEnvelope.cpp
src/lib/audio/audioEnvelope.cpp
+1
-1
src/lib/audio/fftCorrelation.cpp
src/lib/audio/fftCorrelation.cpp
+4
-4
src/mainwindow.cpp
src/mainwindow.cpp
+2
-2
src/mltcontroller/clipcontroller.cpp
src/mltcontroller/clipcontroller.cpp
+1
-1
src/monitor/monitor.cpp
src/monitor/monitor.cpp
+12
-15
src/monitor/recmanager.cpp
src/monitor/recmanager.cpp
+2
-2
src/monitor/scopes/audiographspectrum.cpp
src/monitor/scopes/audiographspectrum.cpp
+7
-7
src/monitor/scopes/monitoraudiolevel.cpp
src/monitor/scopes/monitoraudiolevel.cpp
+1
-1
src/project/clipstabilize.cpp
src/project/clipstabilize.cpp
+1
-1
src/project/clipstabilize.h
src/project/clipstabilize.h
+1
-1
src/scopes/audioscopes/audiosignal.cpp
src/scopes/audioscopes/audiosignal.cpp
+1
-1
src/scopes/scopemanager.cpp
src/scopes/scopemanager.cpp
+2
-9
src/simplekeyframes/simpletimelinewidget.cpp
src/simplekeyframes/simpletimelinewidget.cpp
+4
-4
src/timecodedisplay.cpp
src/timecodedisplay.cpp
+1
-1
src/timeline2/model/timelinefunctions.cpp
src/timeline2/model/timelinefunctions.cpp
+0
-7
src/timeline2/model/timelinemodel.cpp
src/timeline2/model/timelinemodel.cpp
+3
-3
src/timeline2/view/previewmanager.cpp
src/timeline2/view/previewmanager.cpp
+4
-4
src/timeline2/view/timelinecontroller.cpp
src/timeline2/view/timelinecontroller.cpp
+5
-6
src/titler/graphicsscenerectmove.cpp
src/titler/graphicsscenerectmove.cpp
+2
-2
src/titler/titlewidget.cpp
src/titler/titlewidget.cpp
+4
-15
src/titler/titlewidget.h
src/titler/titlewidget.h
+0
-3
src/utils/thumbnailcache.cpp
src/utils/thumbnailcache.cpp
+2
-2
src/widgets/dragvalue.cpp
src/widgets/dragvalue.cpp
+1
-1
thumbnailer/mltpreview.cpp
thumbnailer/mltpreview.cpp
+1
-1
No files found.
src/assets/keyframes/model/keyframemodellist.cpp
View file @
56536237
...
...
@@ -360,7 +360,6 @@ void KeyframeModelList::resizeKeyframes(int oldIn, int oldOut, int in, int out,
if
(
offset
!=
0
)
{
// this is an endless resize clip
GenTime
old_in
(
oldIn
,
pCore
->
getCurrentFps
());
Keyframe
kf
=
getKeyframe
(
old_in
,
&
ok
);
GenTime
new_in
(
in
+
offset
,
pCore
->
getCurrentFps
());
getKeyframe
(
new_in
,
&
ok2
);
positions
=
m_parameters
.
begin
()
->
second
->
getKeyframePos
();
...
...
src/assets/view/assetparameterview.cpp
View file @
56536237
...
...
@@ -240,14 +240,14 @@ void AssetParameterView::refresh(const QModelIndex &topLeft, const QModelIndex &
m_widgets
[
0
]
->
slotRefresh
();
return
;
}
in
t
max
;
size_
t
max
;
if
(
!
bottomRight
.
isValid
())
{
max
=
(
int
)
m_widgets
.
size
()
-
1
;
max
=
m_widgets
.
size
()
-
1
;
}
else
{
max
=
bottomRight
.
row
();
max
=
(
size_t
)
bottomRight
.
row
();
}
Q_ASSERT
(
max
<
(
int
)
m_widgets
.
size
());
for
(
auto
i
=
(
size_t
)
topLeft
.
row
();
i
<=
max
;
++
i
)
{
Q_ASSERT
(
max
<
m_widgets
.
size
());
for
(
size_t
i
=
(
size_t
)
topLeft
.
row
();
i
<=
max
;
++
i
)
{
m_widgets
[
i
]
->
slotRefresh
();
}
}
...
...
src/assets/view/widgets/colorwheel.cpp
View file @
56536237
...
...
@@ -250,7 +250,7 @@ void ColorWheel::mouseReleaseEvent(QMouseEvent *event)
void
ColorWheel
::
resizeEvent
(
QResizeEvent
*
event
)
{
m_image
=
QImage
(
event
->
size
(),
QImage
::
Format_ARGB32_Premultiplied
);
m_image
.
fill
(
palette
().
background
().
color
().
rgb
());
m_image
.
fill
(
palette
().
window
().
color
().
rgb
());
drawWheel
();
drawSlider
();
...
...
src/assets/view/widgets/curves/abstractcurvewidget.ipp
View file @
56536237
...
...
@@ -54,7 +54,7 @@ template <typename Curve_t> void AbstractCurveWidget<Curve_t>::paintBackground(Q
/*
* Background
*/
p->fillRect(rect().translated(-offsetX, -offsetY), palette().
background
());
p->fillRect(rect().translated(-offsetX, -offsetY), palette().
window
());
if (!m_pixmap.isNull()) {
if (m_pixmapIsDirty || !m_pixmapCache) {
m_pixmapCache = std::make_shared<QPixmap>(m_wWidth + 1, m_wHeight + 1);
...
...
src/assets/view/widgets/curves/bezier/cubicbezierspline.cpp
View file @
56536237
...
...
@@ -156,7 +156,7 @@ void CubicBezierSpline::validatePoints()
void
CubicBezierSpline
::
keepSorted
()
{
qS
ort
(
m_points
.
begin
(),
m_points
.
end
(),
pointLessThan
);
std
::
s
ort
(
m_points
.
begin
(),
m_points
.
end
(),
pointLessThan
);
}
int
CubicBezierSpline
::
indexOf
(
const
BPoint
&
p
)
...
...
src/assets/view/widgets/curves/cubic/kis_cubic_curve.cpp
View file @
56536237
...
...
@@ -278,7 +278,7 @@ void KisCubicCurve::Data::invalidate()
void
KisCubicCurve
::
Data
::
keepSorted
()
{
qS
ort
(
points
.
begin
(),
points
.
end
(),
pointLessThan
);
std
::
s
ort
(
points
.
begin
(),
points
.
end
(),
pointLessThan
);
}
qreal
KisCubicCurve
::
Data
::
value
(
qreal
x
)
...
...
src/assets/view/widgets/curves/curveparamwidget.ipp
View file @
56536237
...
...
@@ -301,7 +301,7 @@ template <typename CurveWidget_t> void CurveParamWidget<CurveWidget_t>::slotShow
m_edit->setPixmap(QPixmap());
} else {
auto color = modeToColorsRGB(m_mode);
m_edit->setPixmap(QPixmap::fromImage(ColorTools::rgbCurvePlane(m_edit->size(), color, 1, palette().
background
().color().rgb())));
m_edit->setPixmap(QPixmap::fromImage(ColorTools::rgbCurvePlane(m_edit->size(), color, 1, palette().
window
().color().rgb())));
}
} else {
m_edit->setPixmap(QPixmap());
...
...
src/bin/bin.cpp
View file @
56536237
...
...
@@ -168,7 +168,7 @@ public:
QString
line1
=
index
.
data
(
Qt
::
DisplayRole
).
toString
();
QString
line2
=
index
.
data
(
Qt
::
UserRole
).
toString
();
int
textW
=
qMax
(
option
.
fontMetrics
.
width
(
line1
),
option
.
fontMetrics
.
width
(
line2
));
int
textW
=
qMax
(
option
.
fontMetrics
.
horizontalAdvance
(
line1
),
option
.
fontMetrics
.
horizontalAdvance
(
line2
));
QSize
iconSize
=
icon
.
actualSize
(
option
.
decorationSize
);
return
{
qMax
(
textW
,
iconSize
.
width
())
+
4
,
option
.
fontMetrics
.
lineSpacing
()
*
2
+
4
};
}
...
...
@@ -400,7 +400,6 @@ void MyListView::focusInEvent(QFocusEvent *event)
void
MyListView
::
mouseMoveEvent
(
QMouseEvent
*
event
)
{
bool
dragged
=
false
;
if
(
event
->
modifiers
()
==
Qt
::
ShiftModifier
)
{
QModelIndex
index
=
indexAt
(
event
->
pos
());
if
(
index
.
isValid
())
{
...
...
src/bin/model/markerlistmodel.cpp
View file @
56536237
...
...
@@ -336,7 +336,7 @@ std::vector<size_t> MarkerListModel::getSnapPoints() const
READ_LOCK
();
std
::
vector
<
size_t
>
markers
;
for
(
const
auto
&
marker
:
m_markerList
)
{
markers
.
push_back
(
marker
.
first
.
frames
(
pCore
->
getCurrentFps
()));
markers
.
push_back
(
(
size_t
)
marker
.
first
.
frames
(
pCore
->
getCurrentFps
()));
}
return
markers
;
}
...
...
src/bin/projectsubclip.cpp
View file @
56536237
...
...
@@ -45,7 +45,7 @@ ProjectSubClip::ProjectSubClip(const QString &id, const std::shared_ptr<ProjectC
m_inPoint
=
in
;
m_outPoint
=
out
;
m_duration
=
timecode
;
m_parentDuration
=
m_masterClip
->
frameDuration
();
m_parentDuration
=
(
int
)
m_masterClip
->
frameDuration
();
m_parentClipId
=
m_masterClip
->
clipId
();
QPixmap
pix
(
64
,
36
);
pix
.
fill
(
Qt
::
lightGray
);
...
...
src/capture/mediacapture.cpp
View file @
56536237
...
...
@@ -29,9 +29,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
MediaCapture
::
MediaCapture
(
QObject
*
parent
)
:
QObject
(
parent
)
,
m_volume
(
1.
)
,
currentState
(
-
1
)
,
m_audioDevice
(
"default:"
)
,
m_volume
(
1.
)
,
m_path
(
QUrl
())
,
m_recordState
(
0
)
{
...
...
src/dialogs/kdenlivesettingsdialog.cpp
View file @
56536237
...
...
@@ -129,7 +129,7 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QMap<QString, QString> mappable_a
// Mime types
QStringList
mimes
=
ClipCreationDialog
::
getExtensions
();
qSort
(
mimes
);
std
::
sort
(
mimes
.
begin
(),
mimes
.
end
()
);
m_configEnv
.
supportedmimes
->
setPlainText
(
mimes
.
join
(
QLatin1Char
(
' '
)));
m_page2
=
addPage
(
p2
,
i18n
(
"Environment"
));
...
...
@@ -562,6 +562,8 @@ void KdenliveSettingsDialog::setupJogshuttleBtns(const QString &device)
button
->
setCurrentIndex
(
action_pos
[
actions_map
[
i
]]);
}
}
#else
Q_UNUSED
(
device
)
#endif
}
...
...
@@ -757,6 +759,8 @@ void KdenliveSettingsDialog::slotCheckShuttle(int state)
if
(
state
!=
0
)
{
setupJogshuttleBtns
(
m_configShuttle
.
shuttledevicelist
->
itemData
(
m_configShuttle
.
shuttledevicelist
->
currentIndex
()).
toString
());
}
#else
Q_UNUSED
(
state
)
#endif
/* USE_JOGSHUTTLE */
}
...
...
@@ -767,6 +771,8 @@ void KdenliveSettingsDialog::slotUpdateShuttleDevice(int ix)
// KdenliveSettings::setShuttledevice(device);
setupJogshuttleBtns
(
device
);
m_configShuttle
.
kcfg_shuttledevice
->
setText
(
device
);
#else
Q_UNUSED
(
ix
)
#endif
/* USE_JOGSHUTTLE */
}
...
...
@@ -1035,7 +1041,7 @@ void KdenliveSettingsDialog::updateSettings()
// Update list
KdenliveSettings
::
setAddedExtensions
(
m_configEnv
.
kcfg_addedExtensions
->
text
());
QStringList
mimes
=
ClipCreationDialog
::
getExtensions
();
qSort
(
mimes
);
std
::
sort
(
mimes
.
begin
(),
mimes
.
end
()
);
m_configEnv
.
supportedmimes
->
setPlainText
(
mimes
.
join
(
QLatin1Char
(
' '
)));
}
...
...
src/dialogs/splash.cpp
View file @
56536237
...
...
@@ -26,6 +26,7 @@
#include <QQuickItem>
#include <QQuickWindow>
#include <QStandardPaths>
#include <kdeclarative_version.h>
Splash
::
Splash
(
QObject
*
parent
)
:
QObject
(
parent
)
...
...
src/doc/kthumb.cpp
View file @
56536237
...
...
@@ -125,7 +125,7 @@ int KThumb::imageVariance(const QImage &image)
{
int
delta
=
0
;
int
avg
=
0
;
int
bytes
=
image
.
byteCount
();
int
bytes
=
(
int
)
image
.
sizeInBytes
();
int
STEPS
=
bytes
/
2
;
QVarLengthArray
<
uchar
>
pivot
(
STEPS
);
const
uchar
*
bits
=
image
.
bits
();
...
...
src/dvdwizard/dvdwizardchapters.cpp
View file @
56536237
...
...
@@ -95,7 +95,7 @@ void DvdWizardChapters::slotAddChapter()
for
(
int
i
=
0
;
i
<
currentChaps
.
count
();
++
i
)
{
chapterTimes
.
append
(
currentChaps
.
at
(
i
).
toInt
());
}
qSort
(
chapterTimes
);
std
::
sort
(
chapterTimes
.
begin
(),
chapterTimes
.
end
()
);
// rebuild chapters
QStringList
chaptersString
;
...
...
src/effects/effectstack/view/builtstack.cpp
View file @
56536237
...
...
@@ -28,6 +28,7 @@
#include <KDeclarative/KDeclarative>
#include <QQmlContext>
#include <QQuickItem>
#include <kdeclarative_version.h>
BuiltStack
::
BuiltStack
(
AssetPanel
*
parent
)
:
QQuickWidget
(
parent
)
...
...
src/jobs/cachejob.cpp
View file @
56536237
...
...
@@ -72,7 +72,7 @@ bool CacheJob::startJob()
qDebug
()
<<
"********
\n
COULD NOT READ THUMB PRODUCER
\n
********"
;
return
false
;
}
int
duration
=
m_outPoint
>
0
?
m_outPoint
-
m_inPoint
:
m_binClip
->
frameDuration
();
int
duration
=
m_outPoint
>
0
?
m_outPoint
-
m_inPoint
:
(
int
)
m_binClip
->
frameDuration
();
if
(
m_thumbsCount
*
5
>
duration
)
{
m_thumbsCount
=
duration
/
10
;
}
...
...
@@ -80,7 +80,7 @@ bool CacheJob::startJob()
for
(
int
i
=
1
;
i
<=
m_thumbsCount
;
++
i
)
{
frames
.
insert
(
m_inPoint
+
(
duration
*
i
/
m_thumbsCount
));
}
int
size
=
frames
.
size
();
int
size
=
(
int
)
frames
.
size
();
int
count
=
0
;
connect
(
this
,
&
CacheJob
::
jobCanceled
,
[
&
]
()
{
m_clipId
.
clear
();
...
...
@@ -111,6 +111,8 @@ bool CacheJob::startJob()
bool
CacheJob
::
commitResult
(
Fun
&
undo
,
Fun
&
redo
)
{
Q_UNUSED
(
undo
)
Q_UNUSED
(
redo
)
Q_ASSERT
(
!
m_resultConsumed
);
m_resultConsumed
=
true
;
return
m_done
;
...
...
src/jobs/filterjob.cpp
View file @
56536237
...
...
@@ -211,7 +211,7 @@ QHash<ProjectClip *, AbstractClipJob *> FilterJob::prepareJob(const QList<Projec
if
(
clips
.
count
()
==
1
)
{
out
=
clips
.
constFirst
()
->
duration
().
frames
(
KdenliveSettings
::
project_fps
());
}
QPointer
<
ClipStabilize
>
d
=
new
ClipStabilize
(
sources
,
filterName
,
out
);
QPointer
<
ClipStabilize
>
d
=
new
ClipStabilize
(
sources
,
filterName
);
if
(
d
->
exec
()
==
QDialog
::
Accepted
)
{
QMap
<
QString
,
QString
>
producerParams
=
d
->
producerParams
();
QMap
<
QString
,
QString
>
filterParams
=
d
->
filterParams
();
...
...
src/jobs/stabilizejob.cpp
View file @
56536237
...
...
@@ -86,7 +86,7 @@ int StabilizeJob::prepareJob(const std::shared_ptr<JobManager> &ptr, const std::
Q_ASSERT
(
supportedFilters
().
count
(
filterName
)
>
0
);
if
(
filterName
==
QLatin1String
(
"vidstab"
))
{
// vidstab
QScopedPointer
<
ClipStabilize
>
d
(
new
ClipStabilize
(
binIds
,
filterName
,
100000
));
QScopedPointer
<
ClipStabilize
>
d
(
new
ClipStabilize
(
binIds
,
filterName
));
if
(
d
->
exec
()
==
QDialog
::
Accepted
)
{
std
::
unordered_map
<
QString
,
QString
>
filterParams
=
d
->
filterParams
();
QString
destination
=
d
->
destination
();
...
...
src/lib/audio/audioEnvelope.cpp
View file @
56536237
...
...
@@ -32,7 +32,7 @@ AudioEnvelope::AudioEnvelope(const QString &binId, int clipId, size_t offset, si
m_offset
=
0
;
m_producer
->
set_in_and_out
((
int
)
offset
,
(
int
)
(
offset
+
length
));
}
m_envelopeSize
=
m_producer
->
get_playtime
();
m_envelopeSize
=
(
size_t
)
m_producer
->
get_playtime
();
m_producer
->
set
(
"set.test_image"
,
1
);
connect
(
&
m_watcher
,
&
QFutureWatcherBase
::
finished
,
this
,
[
this
]
{
envelopeReady
(
this
);
});
...
...
src/lib/audio/fftCorrelation.cpp
View file @
56536237
...
...
@@ -48,13 +48,13 @@ void FFTCorrelation::correlate(const qint64 *left, const size_t leftSize, const
qint64
maxLeft
=
1
;
qint64
maxRight
=
1
;
for
(
size_t
i
=
0
;
i
<
leftSize
;
++
i
)
{
if
(
la
bs
(
left
[
i
])
>
maxLeft
)
{
maxLeft
=
la
bs
(
left
[
i
]);
if
(
qA
bs
(
left
[
i
])
>
maxLeft
)
{
maxLeft
=
qA
bs
(
left
[
i
]);
}
}
for
(
size_t
i
=
0
;
i
<
rightSize
;
++
i
)
{
if
(
la
bs
(
right
[
i
])
>
maxRight
)
{
maxRight
=
la
bs
(
right
[
i
]);
if
(
qA
bs
(
right
[
i
])
>
maxRight
)
{
maxRight
=
qA
bs
(
right
[
i
]);
}
}
...
...
src/mainwindow.cpp
View file @
56536237
...
...
@@ -286,7 +286,7 @@ void MainWindow::init()
grabLayout
->
addWidget
(
recToolbar
);
grabLayout
->
addStretch
(
10
);
// Check number of monitors for FFmpeg screen capture
int
screens
=
QApplication
::
desktop
()
->
screenC
ount
();
int
screens
=
QApplication
::
screens
().
c
ount
();
if
(
screens
>
1
)
{
QComboBox
*
screenCombo
=
new
QComboBox
(
recToolbar
);
for
(
int
ix
=
0
;
ix
<
screens
;
ix
++
)
{
...
...
@@ -3553,7 +3553,7 @@ void MainWindow::showTimelineToolbarMenu(const QPoint &pos)
avSizes
=
theme
->
querySizes
(
KIconLoader
::
Toolbar
);
}
qSort
(
avSizes
);
std
::
sort
(
avSizes
.
begin
(),
avSizes
.
end
()
);
if
(
avSizes
.
count
()
<
10
)
{
// Fixed or threshold type icons
...
...
src/mltcontroller/clipcontroller.cpp
View file @
56536237
...
...
@@ -50,8 +50,8 @@ ClipController::ClipController(const QString &clipId, const std::shared_ptr<Mlt:
,
m_effectStack
(
producer
?
EffectStackModel
::
construct
(
producer
,
{
ObjectType
::
BinClip
,
clipId
.
toInt
()},
pCore
->
undoStack
())
:
nullptr
)
,
m_hasAudio
(
false
)
,
m_hasVideo
(
false
)
,
m_controllerBinId
(
clipId
)
,
m_producerLock
(
QReadWriteLock
::
Recursive
)
,
m_controllerBinId
(
clipId
)
{
if
(
m_masterProducer
&&
!
m_masterProducer
->
is_valid
())
{
qCDebug
(
KDENLIVE_LOG
)
<<
"// WARNING, USING INVALID PRODUCER"
;
...
...
src/monitor/monitor.cpp
View file @
56536237
...
...
@@ -52,6 +52,7 @@
#include "kdenlive_debug.h"
#include <QDesktopWidget>
#include <QScreen>
#include <QDrag>
#include <QFileDialog>
#include <QMenu>
...
...
@@ -530,7 +531,7 @@ void Monitor::slotForceSize(QAction *a)
int
profileHeight
=
200
;
if
(
resizeType
>
0
)
{
// calculate size
QRect
r
=
QApplication
::
desktop
()
->
screenG
eometry
();
QRect
r
=
QApplication
::
primaryScreen
()
->
g
eometry
();
profileHeight
=
m_glMonitor
->
profileSize
().
height
()
*
resizeType
/
100
;
profileWidth
=
pCore
->
getCurrentProfile
()
->
dar
()
*
profileHeight
;
if
(
profileWidth
>
r
.
width
()
*
0.8
||
profileHeight
>
r
.
height
()
*
0.7
)
{
...
...
@@ -778,22 +779,18 @@ void Monitor::slotSwitchFullScreen(bool minimizeOnly)
{
// TODO: disable screensaver?
if
(
!
m_glWidget
->
isFullScreen
()
&&
!
minimizeOnly
)
{
// Check if we have a multiple monitor setup
int
monitors
=
QApplication
::
desktop
()
->
screenCount
();
int
screen
=
-
1
;
if
(
monitors
>
1
)
{
QRect
screenres
;
// Move monitor widget to the second screen (one screen for Kdenlive, the other one for the Monitor widget
// int currentScreen = QApplication::desktop()->screenNumber(this);
for
(
int
i
=
0
;
screen
==
-
1
&&
i
<
QApplication
::
desktop
()
->
screenCount
();
i
++
)
{
if
(
i
!=
QApplication
::
desktop
()
->
screenNumber
(
this
->
parentWidget
()
->
parentWidget
()))
{
screen
=
i
;
// Move monitor widget to the second screen (one screen for Kdenlive, the other one for the Monitor widget)
if
(
qApp
->
screens
().
count
()
>
1
)
{
for
(
auto
screen
:
qApp
->
screens
())
{
if
(
screen
!=
qApp
->
screenAt
(
this
->
parentWidget
()
->
pos
()))
{
m_glWidget
->
setParent
(
qApp
->
desktop
()
->
screen
(
qApp
->
screens
().
indexOf
(
screen
)));
break
;
}
}
}
else
{
m_glWidget
->
setParent
(
qApp
->
desktop
()
->
screen
(
0
));
}
m_qmlManager
->
enableAudioThumbs
(
false
);
m_glWidget
->
setParent
(
QApplication
::
desktop
()
->
screen
(
screen
));
m_glWidget
->
move
(
QApplication
::
desktop
()
->
screenGeometry
(
screen
).
bottomLeft
());
m_glWidget
->
showFullScreen
();
}
else
{
m_glWidget
->
showNormal
();
...
...
@@ -877,7 +874,7 @@ void Monitor::slotStartDrag()
/*QPixmap pix = m_currentClip->thumbnail();
drag->setPixmap(pix);
drag->setHotSpot(QPoint(0, 50));*/
drag
->
start
(
Qt
::
MoveAction
);
drag
->
exec
(
Qt
::
MoveAction
);
}
void
Monitor
::
enterEvent
(
QEvent
*
event
)
...
...
@@ -916,7 +913,7 @@ void Monitor::mouseMoveEvent(QMouseEvent *event)
clipData
.
append
(
list
.
join
(
QLatin1Char
(
';'
)).
toUtf8
());
mimeData
->
setData
(
QStringLiteral
(
"kdenlive/clip"
),
clipData
);
drag
->
setMimeData
(
mimeData
);
drag
->
start
(
Qt
::
MoveAction
);
drag
->
exec
(
Qt
::
MoveAction
);
}
event
->
accept
();
}
...
...
src/monitor/recmanager.cpp
View file @
56536237
...
...
@@ -31,7 +31,7 @@
#include <KMessageBox>
#include <QComboBox>
#include <Q
DesktopWidget
>
#include <Q
Screen
>
#include <QDir>
#include <QFile>
#include <QMenu>
...
...
@@ -227,7 +227,6 @@ void RecManager::slotRecord(bool record)
}
m_captureFile
=
QUrl
::
fromLocalFile
(
path
);
QString
captureSize
;
QRect
screenSize
=
QApplication
::
desktop
()
->
screenGeometry
(
m_screenIndex
);
QStringList
captureArgs
;
#ifdef Q_OS_WIN
captureArgs
<<
QStringLiteral
(
"-f"
)
<<
QStringLiteral
(
"gdigrab"
);
...
...
@@ -245,6 +244,7 @@ void RecManager::slotRecord(bool record)
captureSize
=
QStringLiteral
(
":0.0"
);
if
(
KdenliveSettings
::
grab_capture_type
()
==
0
)
{
// Full screen capture
QRect
screenSize
=
QApplication
::
screens
()[
m_screenIndex
]
->
geometry
();
captureArgs
<<
QStringLiteral
(
"-s"
)
<<
QString
::
number
(
screenSize
.
width
())
+
QLatin1Char
(
'x'
)
+
QString
::
number
(
screenSize
.
height
());
captureSize
.
append
(
QLatin1Char
(
'+'
)
+
QString
::
number
(
screenSize
.
left
())
+
QLatin1Char
(
'.'
)
+
QString
::
number
(
screenSize
.
top
()));
}
else
{
...
...
src/monitor/scopes/audiographspectrum.cpp
View file @
56536237
...
...
@@ -138,7 +138,7 @@ AudioGraphWidget::AudioGraphWidget(QWidget *parent)
m_freqLabels
<<
BAND_TAB
[
i
].
label
;
}
m_maxDb
=
0
;
setMinimumWidth
(
2
*
m_freqLabels
.
size
()
+
fontMetrics
().
width
(
QStringLiteral
(
"888"
))
+
2
);
setMinimumWidth
(
2
*
m_freqLabels
.
size
()
+
fontMetrics
().
horizontalAdvance
(
QStringLiteral
(
"888"
))
+
2
);
setFont
(
QFontDatabase
::
systemFont
(
QFontDatabase
::
SmallestReadableFont
));
setMinimumHeight
(
100
);
setSizePolicy
(
QSizePolicy
::
MinimumExpanding
,
QSizePolicy
::
MinimumExpanding
);
...
...
@@ -159,14 +159,14 @@ void AudioGraphWidget::drawDbLabels(QPainter &p, const QRect &rect)
return
;
}
int
maxWidth
=
fontMetrics
().
width
(
QStringLiteral
(
"-45"
));
int
maxWidth
=
fontMetrics
().
horizontalAdvance
(
QStringLiteral
(
"-45"
));
// dB scale is vertical along the left side
int
prevY
=
height
();
QColor
textCol
=
palette
().
text
().
color
();
p
.
setPen
(
textCol
);
for
(
int
i
=
0
;
i
<
dbLabelCount
;
i
++
)
{
QString
label
=
QString
::
number
(
m_dbLabels
.
at
(
i
));
int
x
=
rect
.
left
()
+
maxWidth
-
fontMetrics
().
width
(
label
);
int
x
=
rect
.
left
()
+
maxWidth
-
fontMetrics
().
horizontalAdvance
(
label
);
int
yline
=
rect
.
bottom
()
-
pow
(
10.0
,
(
double
)
m_dbLabels
.
at
(
i
)
/
50.0
)
*
rect
.
height
()
*
40.0
/
42
;
int
y
=
yline
+
textHeight
/
2
;
if
(
y
-
textHeight
<
0
)
{
...
...
@@ -196,7 +196,7 @@ void AudioGraphWidget::drawChanLabels(QPainter &p, const QRect &rect, int barWid
// Find the widest channel label
int
chanLabelWidth
=
0
;
for
(
int
i
=
0
;
i
<
chanLabelCount
;
i
++
)
{
int
width
=
fontMetrics
().
width
(
m_freqLabels
.
at
(
i
))
+
2
;
int
width
=
fontMetrics
().
horizontalAdvance
(
m_freqLabels
.
at
(
i
))
+
2
;
chanLabelWidth
=
width
>
chanLabelWidth
?
width
:
chanLabelWidth
;
}
int
length
=
rect
.
width
();
...
...
@@ -208,10 +208,10 @@ void AudioGraphWidget::drawChanLabels(QPainter &p, const QRect &rect, int barWid
int
y
=
rect
.
bottom
();
for
(
int
i
=
0
;
i
<
chanLabelCount
;
i
+=
stride
)
{
QString
label
=
m_freqLabels
.
at
(
i
);
int
x
=
rect
.
left
()
+
(
2
*
i
)
+
i
*
barWidth
+
barWidth
/
2
-
fontMetrics
().
width
(
label
)
/
2
;
int
x
=
rect
.
left
()
+
(
2
*
i
)
+
i
*
barWidth
+
barWidth
/
2
-
fontMetrics
().
horizontalAdvance
(
label
)
/
2
;
if
(
x
>
prevX
)
{
p
.
drawText
(
x
,
y
,
label
);
prevX
=
x
+
fontMetrics
().
width
(
label
);
prevX
=
x
+
fontMetrics
().
horizontalAdvance
(
label
);
}
}
}
...
...
@@ -237,7 +237,7 @@ void AudioGraphWidget::drawBackground()
QRect
rect
(
0
,
0
,
width
()
-
3
,
height
());
p
.
setFont
(
QFontDatabase
::
systemFont
(
QFontDatabase
::
SmallestReadableFont
));
p
.
setOpacity
(
0.6
);
int
offset
=
fontMetrics
().
width
(
QStringLiteral
(
"888"
))
+
2
;
int
offset
=
fontMetrics
().
horizontalAdvance
(
QStringLiteral
(
"888"
))
+
2
;
if
(
rect
.
width
()
-
offset
>
10
)
{
drawDbLabels
(
p
,
rect
);
rect
.
adjust
(
offset
,
0
,
0
,
0
);
...
...
src/monitor/scopes/monitoraudiolevel.cpp
View file @
56536237
...
...
@@ -153,7 +153,7 @@ void MonitorAudioLevel::drawBackground(int channels)
for
(
int
i
=
0
;
i
<
dbLabelCount
;
i
++
)
{
int
value
=
dbscale
.
at
(
i
);
QString
label
=
QString
().
sprintf
(
"%d"
,
value
);
int
labelWidth
=
fontMetrics
().
width
(
label
);
int
labelWidth
=
fontMetrics
().
horizontalAdvance
(
label
);
double
xf
=
pow
(
10.0
,
(
double
)
dbscale
.
at
(
i
)
/
50.0
)
*
m_pixmap
.
width
()
*
40.0
/
42
;
if
(
xf
+
labelWidth
/
2
>
m_pixmap
.
width
())
{
xf
=
width
()
-
labelWidth
/
2
;
...
...
src/project/clipstabilize.cpp
View file @
56536237
...
...
@@ -33,7 +33,7 @@
#include <QFontDatabase>
#include <mlt++/Mlt.h>
ClipStabilize
::
ClipStabilize
(
const
std
::
vector
<
QString
>
&
binIds
,
QString
filterName
,
int
out
,
QWidget
*
parent
)
ClipStabilize
::
ClipStabilize
(
const
std
::
vector
<
QString
>
&
binIds
,
QString
filterName
,
QWidget
*
parent
)
:
QDialog
(
parent
)
,
m_filtername
(
std
::
move
(
filterName
))
,
m_binIds
(
binIds
)
...
...
src/project/clipstabilize.h
View file @
56536237
...
...
@@ -35,7 +35,7 @@ class ClipStabilize : public QDialog, public Ui::ClipStabilize_UI
Q_OBJECT
public:
explicit
ClipStabilize
(
const
std
::
vector
<
QString
>
&
binIds
,
QString
filterName
,
int
out
,
QWidget
*
parent
=
nullptr
);
explicit
ClipStabilize
(
const
std
::
vector
<
QString
>
&
binIds
,
QString
filterName
,
QWidget
*
parent
=
nullptr
);
~
ClipStabilize
()
override
;
/** @brief Should the generated clip be added to current project. */
bool
autoAddClip
()
const
;
...
...
src/scopes/audioscopes/audiosignal.cpp
View file @
56536237
...
...
@@ -76,7 +76,7 @@ QImage AudioSignal::renderAudioScope(uint, const audioShortVector &audioFrame, c
int
dbsize
=
20
;
if
(
!
horiz
)
{
// calculate actual width of lowest=longest db scale mark based on drawing font
dbsize
=
p
.
fontMetrics
().
width
(
QString
().
sprintf
(
"%d"
,
m_dbscale
.
at
(
m_dbscale
.
size
()
-
1
)));
dbsize
=
p
.
fontMetrics
().
horizontalAdvance
(
QString
().
sprintf
(
"%d"
,
m_dbscale
.
at
(
m_dbscale
.
size
()
-
1
)));
}
bool
showdb
=
width
()
>
(
dbsize
+
40
);
// valpixel=1.0 for 127, 1.0+(1/40) for 1 short oversample, 1.0+(2/40) for longer oversample
...
...
src/scopes/scopemanager.cpp
View file @
56536237
...
...
@@ -34,12 +34,9 @@ ScopeManager::ScopeManager(QObject *parent)
:
QObject
(
parent
)
{
m_signalMapper
=
new
QSignalMapper
(
this
);
connect
(
pCore
->
monitorManager
(),
&
MonitorManager
::
checkColorScopes
,
this
,
&
ScopeManager
::
slotUpdateActiveRenderer
);
connect
(
pCore
->
monitorManager
(),
&
MonitorManager
::
clearScopes
,
this
,
&
ScopeManager
::
slotClearColorScopes
);
connect
(
pCore
->
monitorManager
(),
&
MonitorManager
::
checkScopes
,
this
,
&
ScopeManager
::
slotCheckActiveScopes
);
connect
(
m_signalMapper
,
SIGNAL
(
mapped
(
QString
)),
SLOT
(
slotRequestFrame
(
QString
)));
slotUpdateActiveRenderer
();
...
...
@@ -63,8 +60,6 @@ bool ScopeManager::addScope(AbstractAudioScopeWidget *audioScope, QDockWidget *a
qCDebug
(
KDENLIVE_LOG
)
<<
"Adding scope to scope manager: "
<<
audioScope
->
widgetName
();
#endif
m_signalMapper
->
setMapping
(
audioScopeWidget
,
QString
(
audioScope
->
widgetName
()));
AudioScopeData
asd
;
asd
.
scope
=
audioScope
;
m_audioScopes
.
append
(
asd
);
...
...
@@ -72,7 +67,7 @@ bool ScopeManager::addScope(AbstractAudioScopeWidget *audioScope, QDockWidget *a
connect
(
audioScope
,
&
AbstractScopeWidget
::
requestAutoRefresh
,
this
,
&
ScopeManager
::
slotCheckActiveScopes
);
if
(
audioScopeWidget
!=
nullptr
)
{
connect
(
audioScopeWidget
,
&
QDockWidget
::
visibilityChanged
,
this
,
&
ScopeManager
::
slotCheckActiveScopes
);
connect
(
audioScopeWidget
,
SIGNAL
(
visibilityChanged
(
bool
)),
m_signalMapper
,
SLOT
(
map
())
);
connect
(
audioScopeWidget
,
&
QDockWidget
::
visibilityChanged
,
this
,
[
this
,
audioScope
](){
slotRequestFrame
(
QString
(
audioScope
->
widgetName
()));}
);
}
added
=
true
;
...
...
@@ -94,8 +89,6 @@ bool ScopeManager::addScope(AbstractGfxScopeWidget *colorScope, QDockWidget *col
qCDebug
(
KDENLIVE_LOG
)
<<
"Adding scope to scope manager: "
<<
colorScope
->
widgetName
();
#endif
m_signalMapper
->
setMapping
(
colorScopeWidget
,
QString
(
colorScope
->
widgetName
()));
GfxScopeData
gsd
;
gsd
.
scope
=
colorScope
;
m_colorScopes
.
append
(
gsd
);
...
...
@@ -105,7 +98,7 @@ bool ScopeManager::addScope(AbstractGfxScopeWidget *colorScope, QDockWidget *col
connect
(
colorScope
,
&
AbstractScopeWidget
::
signalScopeRenderingFinished
,
this
,
&
ScopeManager
::
slotScopeReady
);
if
(
colorScopeWidget
!=
nullptr
)
{
connect
(
colorScopeWidget
,
&
QDockWidget
::
visibilityChanged
,
this
,
&
ScopeManager
::
slotCheckActiveScopes
);
connect
(
colorScopeWidget
,
SIGNAL
(
visibilityChanged
(
bool
)),
m_signalMapper
,
SLOT
(
map
())
);
connect
(
colorScopeWidget
,
&
QDockWidget
::
visibilityChanged
,
this
,
[
this
,
colorScope
](){
slotRequestFrame
(
QString
(
colorScope
->
widgetName
()));}
);
}
added
=
true
;
...
...
src/simplekeyframes/simpletimelinewidget.cpp
View file @
56536237
...
...
@@ -46,7 +46,7 @@ SimpleTimelineWidget::SimpleTimelineWidget(QWidget *parent)
void
SimpleTimelineWidget
::
setKeyframes
(
const
QList
<
int
>
&
keyframes
)
{
m_keyframes
=
keyframes
;
qSort
(
m_keyframes
);
std
::
sort
(
m_keyframes
.
begin
(),
m_keyframes
.
end
()
);
m_currentKeyframe
=
m_currentKeyframeOriginal
=
-
1
;
emit
atKeyframe
(
m_keyframes
.
contains
(
m_position
));
update
();
...
...
@@ -68,7 +68,7 @@ void SimpleTimelineWidget::slotAddKeyframe(int pos, int select)
}
m_keyframes
.
append
(
pos
);
qSort
(
m_keyframes
);
std
::
sort
(
m_keyframes
.
begin
(),
m_keyframes
.
end
()
);
if
(
select
!=
0
)
{
m_currentKeyframe
=
m_currentKeyframeOriginal
=
pos
;
}
...
...
@@ -220,7 +220,7 @@ void SimpleTimelineWidget::mouseReleaseEvent(QMouseEvent *event)
Q_UNUSED
(
event
)
if
(
m_currentKeyframe
>=
0
)
{
qSort
(
m_keyframes
);
std
::
sort
(
m_keyframes
.
begin
(),
m_keyframes
.
end
()
);
emit
keyframeMoved
(
m_currentKeyframeOriginal
,
m_currentKeyframe
);
}
}
...
...
@@ -245,7 +245,7 @@ void SimpleTimelineWidget::mouseDoubleClickEvent(QMouseEvent *event)
// add new keyframe
m_keyframes
.
append
(
pos
);
qSort
(
m_keyframes
);