"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/qmltypes/qmlfilter.cpp" between
shotcut-22.10.22.tar.gz and shotcut-22.11.25.tar.gz

About: Shotcut is a cross-platform (Qt) advanced video editor.

qmlfilter.cpp  (shotcut-22.10.22):qmlfilter.cpp  (shotcut-22.11.25)
skipping to change at line 63 skipping to change at line 63
, m_path(m_metadata->path().absolutePath().append('/')) , m_path(m_metadata->path().absolutePath().append('/'))
, m_isNew(false) , m_isNew(false)
{ {
if (m_service.type() == mlt_service_filter_type) { if (m_service.type() == mlt_service_filter_type) {
// Every attached filter has a service property that points to the servi ce to which it is attached. // Every attached filter has a service property that points to the servi ce to which it is attached.
m_producer = Mlt::Producer(mlt_producer(m_service.is_valid() ? m_service .get_data("service") : 0)); m_producer = Mlt::Producer(mlt_producer(m_service.is_valid() ? m_service .get_data("service") : 0));
} else if (m_service.type() == mlt_service_link_type) { } else if (m_service.type() == mlt_service_link_type) {
// Every attached link has a chain property that points to the chain to which it is attached. // Every attached link has a chain property that points to the chain to which it is attached.
m_producer = Mlt::Producer(mlt_producer(m_service.is_valid() ? m_service .get_data("chain") : 0)); m_producer = Mlt::Producer(mlt_producer(m_service.is_valid() ? m_service .get_data("chain") : 0));
} }
connect(this, SIGNAL(changed(QString)), SIGNAL(changed()));
} }
QmlFilter::~QmlFilter() QmlFilter::~QmlFilter()
{ {
} }
QString QmlFilter::get(QString name, int position) QString QmlFilter::get(QString name, int position)
{ {
if (m_service.is_valid()) { if (m_service.is_valid()) {
if (position < 0) if (position < 0)
skipping to change at line 282 skipping to change at line 280
void QmlFilter::setGradient(QString name, const QStringList &gradient) void QmlFilter::setGradient(QString name, const QStringList &gradient)
{ {
for (int i = 1; i <= 10; i++) { for (int i = 1; i <= 10; i++) {
QString colorName = name + "." + QString::number(i); QString colorName = name + "." + QString::number(i);
if (i <= gradient.length()) { if (i <= gradient.length()) {
m_service.set(qUtf8Printable(colorName), qUtf8Printable(gradient[i - 1])); m_service.set(qUtf8Printable(colorName), qUtf8Printable(gradient[i - 1]));
} else { } else {
m_service.clear(qUtf8Printable(colorName)); m_service.clear(qUtf8Printable(colorName));
} }
} }
emit changed(); emit changed(name.toUtf8().constData());
} }
void QmlFilter::set(QString name, const QRectF &rect, int position, mlt_keyframe _type keyframeType) void QmlFilter::set(QString name, const QRectF &rect, int position, mlt_keyframe _type keyframeType)
{ {
set(name, rect.x(), rect.y(), rect.width(), rect.height(), 1.0, position, ke yframeType); set(name, rect.x(), rect.y(), rect.width(), rect.height(), 1.0, position, ke yframeType);
} }
void QmlFilter::loadPresets() void QmlFilter::loadPresets()
{ {
m_presets.clear(); m_presets.clear();
skipping to change at line 632 skipping to change at line 630
} }
int QmlFilter::keyframeCount(const QString &name) int QmlFilter::keyframeCount(const QString &name)
{ {
return getAnimation(name).key_count(); return getAnimation(name).key_count();
} }
void QmlFilter::resetProperty(const QString &name) void QmlFilter::resetProperty(const QString &name)
{ {
m_service.clear(qUtf8Printable(name)); m_service.clear(qUtf8Printable(name));
emit changed(); emit changed(name.toUtf8().constData());
} }
void QmlFilter::clearSimpleAnimation(const QString &name) void QmlFilter::clearSimpleAnimation(const QString &name)
{ {
// Reset the animation if there are no keyframes yet. // Reset the animation if there are no keyframes yet.
if (animateIn() <= 0 && animateOut() <= 0 && keyframeCount(name) <= 0) if (animateIn() <= 0 && animateOut() <= 0 && keyframeCount(name) <= 0)
resetProperty(name); resetProperty(name);
setAnimateIn(0); setAnimateIn(0);
setAnimateOut(0); setAnimateOut(0);
} }
 End of changes. 3 change blocks. 
4 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)