Commit 4724bb8b authored by Laurent Montel's avatar Laurent Montel 😁

Merge branch 'master' of git://anongit.kde.org/kdenlive

parents d33d59c2 8ec829f1
......@@ -26,12 +26,12 @@ set(QT_MIN_VERSION 5.6.0)
find_package(ECM 5.18.0 REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(FeatureSummary)
include(ECMInstallIcons)
include(GenerateExportHeader)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
include(ECMOptionalAddSubdirectory)
include(ECMMarkNonGuiExecutable)
include(ECMAddAppIcon)
......
......@@ -9,6 +9,7 @@ Item {
property string comment
property string framenum
property rect framesize
property rect adjustedFrame
property point profile
property point center
property double zoom
......@@ -241,23 +242,33 @@ Item {
anchors.centerIn: parent
hoverEnabled: true
cursorShape: Qt.SizeFDiagCursor
onEntered: { tlhandle.color = '#ffff00'}
onExited: { tlhandle.color = '#ff0000'}
onEntered: {
if (!pressed) {
tlhandle.color = '#ffff00'
}
}
onExited: {
if (!pressed) {
tlhandle.color = '#ff0000'
}
}
onPressed: {
oldMouseX = mouseX
oldMouseY = mouseY
effectsize.visible = true
tlhandle.color = '#ffff00'
}
onPositionChanged: {
if (pressed) {
if (root.lockratio > 0) {
var delta = Math.max(mouseX - oldMouseX, mouseY - oldMouseY)
var newwidth = framerect.width - delta
var newheight = newwidth / root.lockratio
framesize.x = (framerect.x + (framerect.width - newwidth) - frame.x) / root.scalex;
framesize.width = Math.round(newwidth / root.scalex);
framesize.y = (framerect.y + (framerect.height - newheight) - frame.y) / root.scaley;
framesize.height = Math.round(framesize.width / root.lockratio)
adjustedFrame = framesize
adjustedFrame.width = Math.round(newwidth / root.scalex);
adjustedFrame.height = Math.round(adjustedFrame.width / root.lockratio)
adjustedFrame.y = (framerect.y - frame.y) / root.scaley + framesize.height - adjustedFrame.height;
adjustedFrame.x = (framerect.x - frame.x) / root.scalex + framesize.width - adjustedFrame.width;
framesize = adjustedFrame
} else {
framesize.x = (framerect.x + (mouseX - oldMouseX) - frame.x) / root.scalex;
framesize.width = (framerect.width - (mouseX - oldMouseX)) / root.scalex;
......@@ -269,6 +280,7 @@ Item {
}
onReleased: {
effectsize.visible = false
tlhandle.color = '#ff0000'
}
}
Text {
......@@ -300,22 +312,32 @@ Item {
anchors.centerIn: parent
hoverEnabled: true
cursorShape: Qt.SizeBDiagCursor
onEntered: { trhandle.color = '#ffff00'}
onExited: { trhandle.color = '#ff0000'}
onEntered: {
if (!pressed) {
trhandle.color = '#ffff00'
}
}
onExited: {
if (!pressed) {
trhandle.color = '#ff0000'
}
}
onPressed: {
oldMouseX = mouseX
oldMouseY = mouseY
effectsize.visible = true
trhandle.color = '#ffff00'
}
onPositionChanged: {
if (pressed) {
if (root.lockratio > 0) {
var delta = Math.max(oldMouseX - mouseX, mouseY - oldMouseY)
var newheight = framerect.height - delta
var newwidth = newheight * root.lockratio
framesize.y = (framerect.y + (framerect.height - newheight) - frame.y) / root.scaley;
framesize.width = Math.round(newwidth / root.scalex);
framesize.height = Math.round(framesize.width / root.lockratio)
var newwidth = framerect.width - delta
adjustedFrame = framesize
adjustedFrame.width = Math.round(newwidth / root.scalex);
adjustedFrame.height = Math.round(adjustedFrame.width / root.lockratio)
adjustedFrame.y = (framerect.y - frame.y) / root.scaley + framesize.height - adjustedFrame.height;
framesize = adjustedFrame
} else {
framesize.width = (framerect.width + (mouseX - oldMouseX)) / root.scalex;
framesize.y = (framerect.y + (mouseY - oldMouseY) - frame.y) / root.scaley;
......@@ -326,6 +348,7 @@ Item {
}
onReleased: {
effectsize.visible = false
trhandle.color = '#ff0000'
}
}
}
......@@ -346,12 +369,21 @@ Item {
anchors.centerIn: parent
hoverEnabled: true
cursorShape: Qt.SizeBDiagCursor
onEntered: { blhandle.color = '#ffff00'}
onExited: { blhandle.color = '#ff0000'}
onEntered: {
if (!pressed) {
blhandle.color = '#ffff00'
}
}
onExited: {
if (!pressed) {
blhandle.color = '#ff0000'
}
}
onPressed: {
oldMouseX = mouseX
oldMouseY = mouseY
effectsize.visible = true
blhandle.color = '#ffff00'
}
onPositionChanged: {
if (pressed) {
......@@ -371,6 +403,7 @@ Item {
}
onReleased: {
effectsize.visible = false
blhandle.color = '#ff0000'
}
}
}
......@@ -391,12 +424,21 @@ Item {
anchors.centerIn: parent
hoverEnabled: true
cursorShape: Qt.SizeFDiagCursor
onEntered: { brhandle.color = '#ffff00'}
onExited: { brhandle.color = '#ff0000'}
onEntered: {
if (!pressed) {
brhandle.color = '#ffff00'
}
}
onExited: {
if (!pressed) {
brhandle.color = '#ff0000'
}
}
onPressed: {
oldMouseX = mouseX
oldMouseY = mouseY
effectsize.visible = true
brhandle.color = '#ffff00'
}
onPositionChanged: {
if (pressed) {
......@@ -414,6 +456,7 @@ Item {
}
onReleased: {
effectsize.visible = false
brhandle.color = '#ff0000'
}
}
Text {
......
......@@ -84,6 +84,7 @@ Comment[ca]=Editor de vídeo no lineal, creat per la comunitat KDE
Comment[ca@valencia]=Editor de vídeo no lineal, creat per la comunitat KDE
Comment[cs]=Nelineární editor videí od KDE
Comment[de]=Nichtlinearer Video-Editor von KDE
Comment[es]=Editor no lineal de video de KDE
Comment[it]=Editor di video non lineare di KDE
Comment[nl]=Niet-lineaire video-bewerker door KDE
Comment[pt]=Editor de vídeo não-linear do KDE
......
......@@ -25,7 +25,9 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsign-compare -Wconversion")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wmissing-noreturn -Wsign-conversion -Wunused ")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wstrict-aliasing -Wstrict-overflow -Wconversion")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wdisabled-optimization")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wlogical-op -Wunsafe-loop-optimizations ")
if (CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wlogical-op -Wunsafe-loop-optimizations ")
endif()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunused-parameter -Wshadow -Wno-variadic-macros -Wno-float-conversion")
find_package(PkgConfig QUIET)
......
......@@ -2925,6 +2925,7 @@ void Bin::slotExpandUrl(const ItemInfo &info, const QString &url, QUndoCommand *
QString hash;
QString mltService = EffectsList::property(prod, QStringLiteral("mlt_service"));
if (mltService == QLatin1String("pixbuf")
|| mltService == QLatin1String("qimage")
|| mltService == QLatin1String("kdenlivetitle")
|| mltService == QLatin1String("color")
|| mltService == QLatin1String("colour")) {
......@@ -2937,6 +2938,7 @@ void Bin::slotExpandUrl(const ItemInfo &info, const QString &url, QUndoCommand *
QCryptographicHash::Md5
).toHex()));
} else if (mltService == QLatin1String("pixbuf")
|| mltService == QLatin1String("qimage")
|| mltService == QLatin1String("color")
|| mltService == QLatin1String("colour")) {
hash.append(EffectsList::property(prod, QStringLiteral("resource")));
......
......@@ -30,11 +30,12 @@
#include "definitions.h"
#include "monitor/abstractmonitor.h"
#include <mlt/framework/mlt_types.h>
#include <QTimer>
#include <QMutex>
// include after QTimer to have C++ phtreads defined
#include <mlt/framework/mlt_types.h>
namespace Mlt
{
class Consumer;
......
......@@ -1178,8 +1178,15 @@ void RenderWidget::slotExport(bool scriptExport, int zoneIn, int zoneOut,
QMimeDatabase db;
QMimeType mime = db.mimeTypeForFile(dest);
KService::Ptr serv = KMimeTypeTrader::self()->preferredService(mime.name());
KIO::DesktopExecParser parser(*serv, QList<QUrl>() << QUrl::fromLocalFile(QUrl::toPercentEncoding(dest)));
render_process_args << parser.resultingArguments().join(QLatin1Char(' '));
if (serv) {
KIO::DesktopExecParser parser(*serv, QList<QUrl>() << QUrl::fromLocalFile(QUrl::toPercentEncoding(dest)));
render_process_args << parser.resultingArguments().join(QLatin1Char(' '));
} else {
// no service found to play mime type
//TODO: inform user
//errorMessage(PlaybackError, i18n("No service found to play %1", mime.name()));
render_process_args << QStringLiteral("-");
}
} else {
render_process_args << QStringLiteral("-");
}
......
......@@ -137,7 +137,8 @@ public:
enum RenderError {
CompositeError = 0,
ProfileError = 1,
ProxyWarning = 2
ProxyWarning = 2,
PlaybackError = 3
};
/** @brief Display warning message in render widget. */
......
......@@ -514,7 +514,6 @@ void AnimationWidget::slotPositionChanged(int pos, bool seek)
if (m_spinWidth && m_spinWidth->isEnabled()) {
double ratio = m_originalSize->isChecked() ? (double)m_frameSize.x() / m_frameSize.y() : (double)m_monitor->render->frameRenderWidth() / m_monitor->render->renderHeight();
bool lockRatio = m_spinHeight->value() == (int) (m_spinWidth->value() / ratio + 0.5);
qDebug()<<"CALCULATED: "<<m_spinHeight->value()<<" = "<<(int) (m_spinWidth->value() / ratio + 0.5);
m_lockRatio->blockSignals(true);
m_lockRatio->setChecked(lockRatio);
m_lockRatio->blockSignals(false);
......
......@@ -659,7 +659,7 @@ void MainWindow::init(const QString &MltPath, const QUrl &Url, const QString &cl
new JogManager(this);
#endif
scmanager->slotCheckActiveScopes();
m_messageLabel->setMessage(QStringLiteral("This is a beta version. Always backup your data"), MltError);
//m_messageLabel->setMessage(QStringLiteral("This is a beta version. Always backup your data"), MltError);
}
void MainWindow::slotThemeChanged(const QString &theme)
......
......@@ -271,10 +271,13 @@ void EffectsController::initTrackEffect(ProfileInfo pInfo, const QDomElement &ef
} else {
e.setAttribute(QStringLiteral("value"), evaluatedValue);
}
} else {
if (type == QLatin1String("animated") && !hasValue) {
} else if (!hasValue) {
if (type == QLatin1String("animated")) {
e.setAttribute(QStringLiteral("value"), AnimationWidget::getDefaultKeyframes(0, e.attribute(QStringLiteral("default"))));
} else if (!hasValue) {
} else if (type == QLatin1String("keyframe") || type == QLatin1String("simplekeyframe")) {
// Effect has a keyframe type parameter, we need to set the values
e.setAttribute(QStringLiteral("keyframes"), QStringLiteral("0=") + e.attribute(QStringLiteral("default")));
} else {
e.setAttribute(QStringLiteral("value"), e.attribute(QStringLiteral("default")));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment