- Cleanup, fix crash on adding keyframable effect to bin clip

- Start deprecating MltVideoProfile
- Fix empty crashing clip left when closing and opening another project file
parent 070b308e
......@@ -53,6 +53,11 @@ AbstractProjectItem::AbstractProjectItem(PROJECTITEMTYPE type, const QDomElement
AbstractProjectItem::~AbstractProjectItem()
{
while (!isEmpty()) {
AbstractProjectItem *child = takeFirst();
removeChild(child);
delete child;
}
}
bool AbstractProjectItem::operator==(const AbstractProjectItem* projectItem) const
......@@ -86,7 +91,7 @@ void AbstractProjectItem::setParent(AbstractProjectItem* parent)
/*if (bin()) {
bin()->setCurrentItem(NULL);
}*/
}
}
m_parent = parent;
QObject::setParent(m_parent);
}
......
......@@ -489,6 +489,15 @@ void Bin::setDocument(KdenliveDoc* project)
m_monitor->openClip(NULL);
closeEditing();
setEnabled(false);
// Cleanup previous project
if (m_rootFolder) {
while (!m_rootFolder->isEmpty()) {
AbstractProjectItem *child = m_rootFolder->at(0);
m_rootFolder->removeChild(child);
delete child;
}
}
delete m_rootFolder;
delete m_itemView;
m_itemView = NULL;
......
......@@ -316,5 +316,3 @@ void ProjectItemModel::onItemUpdated(AbstractProjectItem* item)
}
emit dataChanged(parentIndex, parentIndex);
}
......@@ -30,23 +30,22 @@ class KdenliveDoc;
class Bin;
/**
* @class ClipCreationDialog
* @brief This class contains a list of static methods displaying widgets
* @namespace ClipCreationDialog
* @brief This namespace contains a list of static methods displaying widgets
* allowing creation of all clip types.
*/
class ClipCreationDialog
namespace ClipCreationDialog
{
public:
static QStringList getExtensions();
static void createColorClip(KdenliveDoc *doc, QStringList groupInfo, Bin *bin);
static void createSlideshowClip(KdenliveDoc *doc, QStringList groupInfo, Bin *bin);
static void createTitleClip(KdenliveDoc *doc, QStringList groupInfo, QString templatePath, Bin *bin);
static void createTitleTemplateClip(KdenliveDoc *doc, QStringList groupInfo, QString templatePath, Bin *bin);
static void createClipsCommand(KdenliveDoc *doc, const QList<QUrl> &urls, QStringList groupInfo, Bin *bin, const QMap <QString, QString> &data = QMap <QString, QString>());
static void createClipsCommand(KdenliveDoc *doc, QStringList groupInfo, Bin *bin);
static void addXmlProperties(QDomElement &producer, QMap <QString, QString> &properties);
QStringList getExtensions();
void createColorClip(KdenliveDoc *doc, QStringList groupInfo, Bin *bin);
void createSlideshowClip(KdenliveDoc *doc, QStringList groupInfo, Bin *bin);
void createTitleClip(KdenliveDoc *doc, QStringList groupInfo, QString templatePath, Bin *bin);
void createTitleTemplateClip(KdenliveDoc *doc, QStringList groupInfo, QString templatePath, Bin *bin);
void createClipsCommand(KdenliveDoc *doc, const QList<QUrl> &urls, QStringList groupInfo, Bin *bin, const QMap <QString, QString> &data = QMap <QString, QString>());
void createClipsCommand(KdenliveDoc *doc, QStringList groupInfo, Bin *bin);
void addXmlProperties(QDomElement &producer, QMap <QString, QString> &properties);
};
......
......@@ -285,18 +285,6 @@ MltVideoProfile ProfilesDialog::getVideoProfile(const QString &name)
return result;
}
// static
double ProfilesDialog::getStringEval(const MltVideoProfile &profile, QString eval, const QPoint& frameSize)
{
QScriptEngine sEngine;
sEngine.globalObject().setProperty("maxWidth", profile.width > frameSize.x() ? profile.width : frameSize.x());
sEngine.globalObject().setProperty("maxHeight", profile.height > frameSize.y() ? profile.height : frameSize.y());
sEngine.globalObject().setProperty("width", profile.width);
sEngine.globalObject().setProperty("height", profile.height);
return sEngine.evaluate(eval.remove('%')).toNumber();
}
// static
bool ProfilesDialog::existingProfileDescription(const QString &desc)
{
......
......@@ -61,12 +61,6 @@ public:
* @return A string list of the matching profiles description */
static QMap <QString, QString> getProfilesFromProperties(int width, int height, double fps, double par, bool useDisplayWidth = false);
/** @brief Returns an value from a string by replacing "%width" and "%height" with given profile values:
* @param profile The profile that gives width & height
* @param eval The string to be evaluated, for example: "%width / 2"
* @return the evaluated value */
static double getStringEval(const MltVideoProfile &profile, QString eval, const QPoint &frameSize = QPoint());
/** @brief Get the descriptive text for given colorspace code (defined by MLT)
* @param colorspace An int as defined in mlt_profile.h
* @return The string description */
......
......@@ -38,6 +38,7 @@
#include "bin/bin.h"
#include "bin/projectclip.h"
#include "mltcontroller/bincontroller.h"
#include "mltcontroller/effectscontroller.h"
#include <KMessageBox>
#include <KRecentDirs>
......@@ -365,7 +366,6 @@ KdenliveDoc::KdenliveDoc(const QUrl &url, const QUrl &projectFolder, QUndoGroup
// Something went wrong, or a new file was requested: create a new project
if (!success) {
qDebug()<<" // / ERROR ON OPENING";
m_url.clear();
setProfilePath(profileName);
m_document = createEmptyDocument(tracks.x(), tracks.y());
......@@ -912,6 +912,11 @@ MltVideoProfile KdenliveDoc::mltProfile() const
return m_profile;
}
Mlt::Profile *KdenliveDoc::profile()
{
return pCore->binController()->profile();
}
bool KdenliveDoc::setProfilePath(QString path)
{
if (path.isEmpty())
......@@ -990,20 +995,6 @@ QUndoStack *KdenliveDoc::commandStack()
return m_commandStack;
}
/*
void KdenliveDoc::setRenderer(Render *render) {
if (m_render) return;
m_render = render;
emit progressInfo(i18n("Loading playlist..."), 0);
//qApp->processEvents();
if (m_render) {
m_render->setSceneList(m_document.toString(), m_startPos);
//qDebug() << "// SETTING SCENE LIST:\n\n" << m_document.toString();
checkProjectClips();
}
emit progressInfo(QString(), -1);
}*/
void KdenliveDoc::checkProjectClips(bool displayRatioChanged, bool fpsChanged)
{
if (m_render == NULL) return;
......@@ -1524,7 +1515,7 @@ void KdenliveDoc::addTrackEffect(int ix, QDomElement effect)
// Check if this effect has a variable parameter
if (e.attribute("default").contains('%')) {
double evaluatedValue = ProfilesDialog::getStringEval(m_profile, e.attribute("default"));
double evaluatedValue = EffectsController::getStringEval(profile(), e.attribute("default"));
e.setAttribute("default", evaluatedValue);
if (e.hasAttribute("value") && e.attribute("value").startsWith('%')) {
e.setAttribute("value", evaluatedValue);
......
......@@ -55,6 +55,10 @@ class QUndoGroup;
class QTimer;
class QUndoStack;
namespace Mlt {
class Profile;
}
class KdenliveDoc: public QObject
{
Q_OBJECT
......@@ -70,7 +74,6 @@ public:
KAutoSaveFile *m_autosave;
Timecode timecode() const;
QDomDocument toXml();
//void setRenderer(Render *render);
QUndoStack *commandStack();
Render *renderer();
ClipManager *clipManager();
......@@ -101,6 +104,7 @@ public:
void setThumbsProgress(const QString &message, int progress);
const QString &profilePath() const;
MltVideoProfile mltProfile() const;
Mlt::Profile *profile();
const QString description() const;
void setUrl(const QUrl &url);
......
......@@ -73,9 +73,8 @@ Monitor *EffectStackEdit::monitor()
return m_metaInfo.monitor;
}
void EffectStackEdit::updateProjectFormat(const MltVideoProfile &profile, const Timecode &t)
void EffectStackEdit::updateProjectFormat(const Timecode &t)
{
m_metaInfo.profile = profile;
m_metaInfo.timecode = t;
}
......
......@@ -37,7 +37,7 @@ class EffectStackEdit : public QScrollArea
public:
explicit EffectStackEdit(Monitor *monitor, QWidget *parent = 0);
~EffectStackEdit();
void updateProjectFormat(const MltVideoProfile &profile, const Timecode &t);
void updateProjectFormat(const Timecode &t);
static QMap<QString, QImage> iconCache;
/** @brief Sets attribute @param name to @param value.
*
......
......@@ -629,9 +629,8 @@ void EffectStackView2::deleteCurrentEffect()
}
}
void EffectStackView2::updateProjectFormat(const MltVideoProfile &profile, const Timecode &t)
void EffectStackView2::updateProjectFormat(const Timecode &t)
{
m_effectMetaInfo.profile = profile;
m_effectMetaInfo.timecode = t;
}
......@@ -780,7 +779,7 @@ void EffectStackView2::slotResetEffect(int ix)
}
emit updateEffect(NULL, m_trackindex, old, dom, ix,false);
} else if (m_status == TIMELINE_CLIP) {
m_clipref->initEffect(dom);
m_clipref->initEffect(m_effectMetaInfo.monitor->profile(), dom);
for (int i = 0; i < m_effects.count(); ++i) {
if (m_effects.at(i)->effectIndex() == ix) {
m_effects.at(i)->updateWidget(m_clipref->info(), dom, &m_effectMetaInfo);
......
......@@ -54,8 +54,8 @@ public:
/** @brief Clears the list of effects and updates the buttons accordingly. */
void clear();
/** @brief Passes updates on @param profile and @param t on to the effect editor. */
void updateProjectFormat(const MltVideoProfile &profile, const Timecode &t);
/** @brief Passes updates @param t on to the effect editor. */
void updateProjectFormat(const Timecode &t);
/** @brief Tells the effect editor to update its timecode format. */
void updateTimecodeFormat();
......
......@@ -28,8 +28,9 @@
#include <QMenu>
#include <QTimer>
#include <mlt++/Mlt.h>
Geometryval::Geometryval(const MltVideoProfile &profile, const Timecode &t, const QPoint &frame_size, int startPoint, QWidget* parent) :
Geometryval::Geometryval(const Mlt::Profile *profile, const Timecode &t, const QPoint &frame_size, int startPoint, QWidget* parent) :
QWidget(parent),
m_profile(profile),
m_paramRect(NULL),
......@@ -63,10 +64,10 @@ Geometryval::Geometryval(const MltVideoProfile &profile, const Timecode &t, cons
m_scene = new GraphicsSceneRectMove(this);
m_scene->setTool(TITLE_SELECT);
m_sceneview->setScene(m_scene);
m_dar = (m_profile.height * m_profile.display_aspect_num / (double) m_profile.display_aspect_den) / (double) m_profile.width;
m_dar = (m_profile->height() * m_profile->dar()) / (double) m_profile->width();
m_realWidth = (int)(profile.height * profile.display_aspect_num / (double) profile.display_aspect_den + 0.5);
QGraphicsRectItem *frameBorder = new QGraphicsRectItem(QRectF(0, 0, m_realWidth, profile.height));
m_realWidth = (int)(profile->height() * profile->dar() + 0.5);
QGraphicsRectItem *frameBorder = new QGraphicsRectItem(QRectF(0, 0, m_realWidth, profile->height()));
frameBorder->setZValue(-1100);
frameBorder->setBrush(QColor(255, 255, 0, 30));
frameBorder->setPen(QPen(QBrush(QColor(255, 255, 255, 255)), 1.0, Qt::DashLine));
......@@ -97,9 +98,9 @@ Geometryval::Geometryval(const MltVideoProfile &profile, const Timecode &t, cons
m_syncAction->setCheckable(true);
m_syncAction->setChecked(KdenliveSettings::transitionfollowcursor());
//scene->setSceneRect(0, 0, profile.width * 2, profile.height * 2);
//scene->setSceneRect(0, 0, profile->width * 2, profile->height * 2);
//view->fitInView(m_frameBorder, Qt::KeepAspectRatio);
const double sc = 100.0 / profile.height * 0.8;
const double sc = 100.0 / profile->height() * 0.8;
QRectF srect = m_sceneview->sceneRect();
m_sceneview->setSceneRect(srect.x(), -srect.height() / 3 + 10, srect.width(), srect.height() + srect.height() / 3 * 2 - 10);
m_scene->setZoom(sc);
......@@ -167,7 +168,7 @@ void Geometryval::slotAlignVCenter()
{
if (!keyframeSelected())
return;
m_paramRect->setPos(m_paramRect->pos().x(), (m_profile.height - m_paramRect->rect().height()) / 2);
m_paramRect->setPos(m_paramRect->pos().x(), (m_profile->height() - m_paramRect->rect().height()) / 2);
slotUpdateTransitionProperties();
}
......@@ -183,7 +184,7 @@ void Geometryval::slotAlignBottom()
{
if (!keyframeSelected())
return;
m_paramRect->setPos(m_paramRect->pos().x(), m_profile.height - m_paramRect->rect().height());
m_paramRect->setPos(m_paramRect->pos().x(), m_profile->height() - m_paramRect->rect().height());
slotUpdateTransitionProperties();
}
......@@ -208,7 +209,7 @@ void Geometryval::slotResizeOriginal()
if (!keyframeSelected())
return;
if (m_frameSize.isNull())
m_paramRect->setRect(0, 0, m_realWidth, m_profile.height);
m_paramRect->setRect(0, 0, m_realWidth, m_profile->height());
else
m_paramRect->setRect(0, 0, m_frameSize.x(), m_frameSize.y());
slotUpdateTransitionProperties();
......@@ -219,7 +220,7 @@ void Geometryval::slotResizeCustom()
if (!keyframeSelected())
return;
int value = spinResize->value();
m_paramRect->setRect(0, 0, m_realWidth * value / 100, m_profile.height * value / 100);
m_paramRect->setRect(0, 0, m_realWidth * value / 100, m_profile->height() * value / 100);
slotUpdateTransitionProperties();
}
......@@ -385,9 +386,9 @@ void Geometryval::setupParam(const QDomElement par, int minFrame, int maxFrame)
spinTransp->setHidden(true);
}
if (m_geom)
m_geom->parse(val.toUtf8().data(), maxFrame - minFrame, m_profile.width, m_profile.height);
m_geom->parse(val.toUtf8().data(), maxFrame - minFrame, m_profile->width(), m_profile->height());
else
m_geom = new Mlt::Geometry(val.toUtf8().data(), maxFrame - minFrame, m_profile.width, m_profile.height);
m_geom = new Mlt::Geometry(val.toUtf8().data(), maxFrame - minFrame, m_profile->width(), m_profile->height());
////qDebug() << " / / UPDATING TRANSITION VALUE: " << m_geom->serialise();
//read param her and set rect
......@@ -482,7 +483,7 @@ void Geometryval::slotResetPosition()
if (m_frameSize.isNull()) {
spinWidth->setValue(m_realWidth);
spinHeight->setValue(m_profile.height);
spinHeight->setValue(m_profile->height());
} else {
spinWidth->setValue(m_frameSize.x());
spinHeight->setValue(m_frameSize.y());
......
......@@ -34,12 +34,16 @@ class GraphicsSceneRectMove;
class QGraphicsRectItem;
class QGraphicsView;
namespace Mlt {
class Profile;
}
class Geometryval : public QWidget, public Ui::Geometryval
{
Q_OBJECT
public:
explicit Geometryval(const MltVideoProfile &profile, const Timecode &t, const QPoint &frame_size, int startPoint = 0, QWidget* parent = 0);
explicit Geometryval(const Mlt::Profile *profile, const Timecode &t, const QPoint &frame_size, int startPoint = 0, QWidget* parent = 0);
virtual ~Geometryval();
QDomElement getParamDesc();
QString getValue() const;
......@@ -49,7 +53,7 @@ public:
void slotUpdateRange(int inPoint, int outPoint);
private:
MltVideoProfile m_profile;
const Mlt::Profile *m_profile;
int m_realWidth;
GraphicsSceneRectMove *m_scene;
QGraphicsRectItem *m_paramRect;
......
......@@ -35,9 +35,8 @@
#include "kdenlivesettings.h"
#include "mainwindow.h"
#include "colortools.h"
#include "dialogs/profilesdialog.h"
#include "dialogs/clipcreationdialog.h"
#include "timeline/customtrackview.h"
#include "mltcontroller/effectscontroller.h"
#include "onmonitoritems/rotoscoping/rotowidget.h"
#include "ui_listval_ui.h"
......@@ -152,11 +151,11 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo
double min;
double max;
if (pa.attribute("min").contains('%'))
min = ProfilesDialog::getStringEval(m_metaInfo->profile, pa.attribute("min"), m_metaInfo->frameSize);
min = EffectsController::getStringEval(m_metaInfo->monitor->profile(), pa.attribute("min"), m_metaInfo->frameSize);
else
min = pa.attribute("min").toDouble();
if (pa.attribute("max").contains('%'))
max = ProfilesDialog::getStringEval(m_metaInfo->profile, pa.attribute("max"), m_metaInfo->frameSize);
max = EffectsController::getStringEval(m_metaInfo->monitor->profile(), pa.attribute("max"), m_metaInfo->frameSize);
else
max = pa.attribute("max").toDouble();
......@@ -244,7 +243,7 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo
connect(m_geometryWidget, SIGNAL(importClipKeyframes()), this, SIGNAL(importClipKeyframes()));
connect(this, SIGNAL(syncEffectsPos(int)), m_geometryWidget, SLOT(slotSyncPosition(int)));
} else {
Geometryval *geo = new Geometryval(m_metaInfo->profile, m_metaInfo->timecode, m_metaInfo->frameSize, 0);
Geometryval *geo = new Geometryval(m_metaInfo->monitor->profile(), m_metaInfo->timecode, m_metaInfo->frameSize, 0);
if (minFrame == maxFrame) {
geo->setupParam(pa, m_in, m_out);
connect(this, SIGNAL(updateRange(int,int)), geo, SLOT(slotUpdateRange(int,int)));
......@@ -856,7 +855,7 @@ void ParameterContainer::slotStartFilterJobAction()
// Replace with current geometry
EffectsParameterList parameters;
QDomNodeList params = m_effect.elementsByTagName("parameter");
CustomTrackView::adjustEffectParameters(parameters, params, m_metaInfo->profile);
EffectsController::adjustEffectParameters(parameters, params, m_metaInfo->monitor->profile());
QString paramData;
for (int j = 0; j < parameters.count(); ++j) {
filterParams.insert(parameters.at(j).name(), parameters.at(j).value());
......
......@@ -25,6 +25,10 @@
class GeometryWidget;
class Monitor;
namespace Mlt {
class Profile;
}
enum EFFECTMODE {
EMPTY = 0,
TIMELINE_CLIP,
......@@ -33,7 +37,6 @@ enum EFFECTMODE {
};
struct EffectMetaInfo {
MltVideoProfile profile;
Timecode timecode;
Monitor *monitor;
QPoint frameSize;
......
......@@ -1368,7 +1368,7 @@ void MainWindow::slotUpdateProjectProfile(const QString &profile)
project->clipManager()->clearUnusedProducers();
pCore->monitorManager()->resetProfiles(project->timecode());
m_transitionConfig->updateProjectFormat();
m_effectStack->updateProjectFormat(project->mltProfile(), project->timecode());
m_effectStack->updateProjectFormat(project->timecode());
if (m_renderWidget) {
m_renderWidget->setProfile(project->mltProfile());
}
......@@ -1487,7 +1487,7 @@ void MainWindow::connectDocument()
KdenliveSettings::setProject_fps(project->fps());
m_clipMonitorDock->raise();
m_transitionConfig->updateProjectFormat();
m_effectStack->updateProjectFormat(project->mltProfile(), project->timecode());
m_effectStack->updateProjectFormat(project->timecode());
//connect(m_projectList, SIGNAL(refreshClip(QString,bool)), trackView->projectView(), SLOT(slotRefreshThumbs(QString,bool)));
//connect(m_projectList, SIGNAL(projectModified()), project, SLOT(setModified()));
//connect(m_projectList, SIGNAL(clipNameChanged(QString,QString)), trackView->projectView(), SLOT(clipNameChanged(QString,QString)));
......
......@@ -3,4 +3,5 @@ set(kdenlive_SRCS
mltcontroller/bincontroller.cpp
mltcontroller/clipcontroller.cpp
mltcontroller/clippropertiescontroller.cpp
mltcontroller/effectscontroller.cpp
PARENT_SCOPE)
\ No newline at end of file
......@@ -80,6 +80,7 @@ void BinController::destroyBin()
m_binPlaylist = NULL;
}
// Controllers are deleted from the Bin's ProjectClip
qDeleteAll(m_clipList.values());
m_clipList.clear();
}
......@@ -124,6 +125,7 @@ void BinController::initializeBin(Mlt::Playlist playlist)
}
else {
// Controller has not been created yet
qDebug()<<" + + + +LOADING NEW CTRL\n"<<id<<"\n-------";
ClipController *controller = new ClipController(this, producer->parent());
m_clipList.insert(id, controller);
}
......
......@@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "clipcontroller.h"
#include "bincontroller.h"
#include "timeline/customtrackview.h"
#include "mltcontroller/effectscontroller.h"
#include "timeline/trackview.h"
#include "renderer.h"
......@@ -57,12 +57,6 @@ ClipController::ClipController(BinController *bincontroller, Mlt::Producer& prod
getInfoForProducer();
rebuildEffectList();
}
m_tracksTimer = new QTimer(this);
qDebug()<<"--------------\nTIMER BIN READY\n----------------------";
m_tracksTimer->setSingleShot(true);
m_tracksTimer->setInterval(200);
connect(m_tracksTimer, SIGNAL(timeout()), this, SLOT(slotRefreshTracks()));
connect(this, SIGNAL(refreshTracks()), m_tracksTimer, SLOT(start()));
}
ClipController::ClipController(BinController *bincontroller) : QObject()
......@@ -76,12 +70,6 @@ ClipController::ClipController(BinController *bincontroller) : QObject()
{
m_masterProducer = NULL;
m_effectList = EffectsList(true);
m_tracksTimer = new QTimer(this);
qDebug()<<"--------------\nTIMER BIN READY\n----------------------";
m_tracksTimer->setSingleShot(true);
m_tracksTimer->setInterval(200);
connect(m_tracksTimer, SIGNAL(timeout()), this, SLOT(slotRefreshTracks()));
connect(this, SIGNAL(refreshTracks()), m_tracksTimer, SLOT(start()));
}
ClipController::~ClipController()
......@@ -584,15 +572,18 @@ Mlt::Properties &ClipController::properties()
void ClipController::addEffect(QDomElement effect)
{
QDomDocument doc = effect.ownerDocument();
Mlt::Service service = m_masterProducer->parent();
int ix = m_effectFreeIndex++;
effect.setAttribute("kdenlive_ix", QString::number(ix));
EffectsParameterList params = CustomTrackView::getEffectArgs(effect);
//TODO Effects with keyframes should be initialized like in ClipItem::initEffect, or they will crash
ItemInfo info;
info.cropStart = GenTime();
info.cropDuration = getPlaytime();
EffectsController::initEffect(m_masterProducer->profile(), info, m_effectList, property("proxy"), effect);
EffectsParameterList params = EffectsController::getEffectArgs(m_masterProducer->profile(), effect);
Render::addFilterToService(m_masterProducer->parent(), params, getPlaytime().frames(m_binController->fps()));
rebuildEffectList();
m_effectList.append(effect);
m_binController->updateTrackProducer(clipId());
//slotRefreshTracks();
}
EffectsList ClipController::effectList()
......@@ -631,7 +622,7 @@ void ClipController::changeEffectState(const QList <int> indexes, bool disable)
void ClipController::updateEffect(const QDomElement &old, const QDomElement &e, int ix)
{
EffectsParameterList params = CustomTrackView::getEffectArgs(e);
EffectsParameterList params = EffectsController::getEffectArgs(m_masterProducer->profile(), e);
Mlt::Service service = m_masterProducer->parent();
for (int i = 0; i < service.filter_count(); ++i) {
Mlt::Filter *effect = service.filter(i);
......
......@@ -178,7 +178,6 @@ private:
ClipType m_clipType;
bool m_hasLimitedDuration;
int m_effectFreeIndex;
QTimer *m_tracksTimer;
BinController *m_binController;
/** @brief A list of snap markers; these markers are added to a clips snap-to points, and are displayed as necessary. */
QList < CommentedTime > m_snapMarkers;
......
/*
Copyright (C) 2012 Till Theato <root@ttill.de>
Copyright (C) 2014 Jean-Baptiste Mardelle <jb@kdenlive.org>
This file is part of Kdenlive. See www.kdenlive.org.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License or (at your option) version 3 or any later version
accepted by the membership of KDE e.V. (or its successor approved
by the membership of KDE e.V.), which shall act as a proxy
defined in Section 14 of version 3 of the license.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "effectscontroller.h"
#include "dialogs/profilesdialog.h"
#include <QUrl>
#include <QDebug>
#include <QPixmap>
#include <QScriptEngine>
#include <KLocalizedString>
EffectsParameterList EffectsController::getEffectArgs(Mlt::Profile *profile, const QDomElement &effect)
{
EffectsParameterList parameters;
QLocale locale;
locale.setNumberOptions(QLocale::OmitGroupSeparator);
parameters.addParam("tag", effect.attribute("tag"));
//if (effect.hasAttribute("region")) parameters.addParam("region", effect.attribute("region"));
parameters.addParam("kdenlive_ix", effect.attribute("kdenlive_ix"));
parameters.addParam("kdenlive_info", effect.attribute("kdenlive_info"));
parameters.addParam("id", effect.attribute("id"));
if (effect.hasAttribute("src")) parameters.addParam("src", effect.attribute("src"));