Commit 388d9833 authored by Vincent Pinon's avatar Vincent Pinon

Merge branch 'Applications/17.04'

parents 79a0a889 47858957
......@@ -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 {
......
......@@ -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;
......
......@@ -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