Commit f59659f0 authored by Laurent Montel's avatar Laurent Montel

Fix some other clazy warning

parent 55234ae8
......@@ -79,7 +79,7 @@ QStringList ClipCreationDialog::getExtensions()
}
//static
void ClipCreationDialog::createClipFromXml(KdenliveDoc *doc, QDomElement xml, QStringList groupInfo, Bin *bin)
void ClipCreationDialog::createClipFromXml(KdenliveDoc *doc, QDomElement xml, const QStringList &groupInfo, Bin *bin)
{
//FIXME?
Q_UNUSED(groupInfo)
......@@ -91,7 +91,7 @@ void ClipCreationDialog::createClipFromXml(KdenliveDoc *doc, QDomElement xml, QS
}
//static
void ClipCreationDialog::createColorClip(KdenliveDoc *doc, QStringList groupInfo, Bin *bin)
void ClipCreationDialog::createColorClip(KdenliveDoc *doc, const QStringList &groupInfo, Bin *bin)
{
QPointer<QDialog> dia = new QDialog(bin);
Ui::ColorClip_UI dia_ui;
......@@ -132,7 +132,7 @@ void ClipCreationDialog::createColorClip(KdenliveDoc *doc, QStringList groupInfo
delete dia;
}
void ClipCreationDialog::createQTextClip(KdenliveDoc *doc, QStringList groupInfo, Bin *bin, ProjectClip *clip)
void ClipCreationDialog::createQTextClip(KdenliveDoc *doc, const QStringList &groupInfo, Bin *bin, ProjectClip *clip)
{
KSharedConfigPtr config = KSharedConfig::openConfig();
KConfigGroup titleConfig(config, "TitleWidget");
......@@ -225,7 +225,7 @@ void ClipCreationDialog::createQTextClip(KdenliveDoc *doc, QStringList groupInfo
}
//static
void ClipCreationDialog::createSlideshowClip(KdenliveDoc *doc, QStringList groupInfo, Bin *bin)
void ClipCreationDialog::createSlideshowClip(KdenliveDoc *doc, const QStringList &groupInfo, Bin *bin)
{
QPointer<SlideshowClip> dia = new SlideshowClip(doc->timecode(), KRecentDirs::dir(QStringLiteral(":KdenliveSlideShowFolder")), Q_NULLPTR, bin);
......@@ -260,7 +260,7 @@ void ClipCreationDialog::createSlideshowClip(KdenliveDoc *doc, QStringList group
delete dia;
}
void ClipCreationDialog::createTitleClip(KdenliveDoc *doc, QStringList groupInfo, QString templatePath, Bin *bin)
void ClipCreationDialog::createTitleClip(KdenliveDoc *doc, const QStringList &groupInfo, const QString &templatePath, Bin *bin)
{
// Make sure the titles folder exists
QDir dir(doc->projectDataFolder() + QStringLiteral("/titles"));
......@@ -294,7 +294,7 @@ void ClipCreationDialog::createTitleClip(KdenliveDoc *doc, QStringList groupInfo
}
void ClipCreationDialog::createTitleTemplateClip(KdenliveDoc *doc, QStringList groupInfo, Bin *bin)
void ClipCreationDialog::createTitleTemplateClip(KdenliveDoc *doc, const QStringList &groupInfo, Bin *bin)
{
QPointer<TitleTemplateDialog> dia = new TitleTemplateDialog(doc->projectDataFolder(), QApplication::activeWindow());
......@@ -356,7 +356,7 @@ void ClipCreationDialog::addXmlProperties(QDomElement &producer, QMap <QString,
}
}
void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, const QList<QUrl> &urls, QStringList groupInfo, Bin *bin, const QMap <QString, QString> &data)
void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, const QList<QUrl> &urls, const QStringList &groupInfo, Bin *bin, const QMap <QString, QString> &data)
{
QUndoCommand *addClips = new QUndoCommand();
......@@ -491,7 +491,7 @@ void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, const QList<QUrl>
}
}
void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, QStringList groupInfo, Bin *bin)
void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, const QStringList &groupInfo, Bin *bin)
{
QList <QUrl> list;
QString allExtensions = getExtensions().join(QStringLiteral(" "));
......@@ -595,7 +595,7 @@ void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, QStringList groupI
}
}
void ClipCreationDialog::createClipsCommand(Bin *bin, QDomElement producer, const QString &id, QUndoCommand *command)
void ClipCreationDialog::createClipsCommand(Bin *bin, const QDomElement &producer, const QString &id, QUndoCommand *command)
{
new AddClipCommand(bin, producer, id, true, command);
}
......
......@@ -41,15 +41,15 @@ namespace ClipCreationDialog
{
QStringList getExtensions();
void createColorClip(KdenliveDoc *doc, QStringList groupInfo, Bin *bin);
void createQTextClip(KdenliveDoc *doc, QStringList groupInfo, Bin *bin, ProjectClip *clip = 0);
void createClipFromXml(KdenliveDoc *doc, QDomElement xml, 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, Bin *bin);
void createClipsCommand(KdenliveDoc *doc, const QList<QUrl> &urls, QStringList groupInfo, Bin *bin, const QMap <QString, QString> &data = QMap <QString, QString>());
void createClipsCommand(Bin *bin, QDomElement producer, const QString &id, QUndoCommand *command);
void createClipsCommand(KdenliveDoc *doc, QStringList groupInfo, Bin *bin);
void createColorClip(KdenliveDoc *doc, const QStringList &groupInfo, Bin *bin);
void createQTextClip(KdenliveDoc *doc, const QStringList &groupInfo, Bin *bin, ProjectClip *clip = Q_NULLPTR);
void createClipFromXml(KdenliveDoc *doc, QDomElement xml, const QStringList &groupInfo, Bin *bin);
void createSlideshowClip(KdenliveDoc *doc, const QStringList &groupInfo, Bin *bin);
void createTitleClip(KdenliveDoc *doc, const QStringList &groupInfo, const QString &templatePath, Bin *bin);
void createTitleTemplateClip(KdenliveDoc *doc, const QStringList &groupInfo, Bin *bin);
void createClipsCommand(KdenliveDoc *doc, const QList<QUrl> &urls, const QStringList &groupInfo, Bin *bin, const QMap <QString, QString> &data = QMap <QString, QString>());
void createClipsCommand(Bin *bin, const QDomElement &producer, const QString &id, QUndoCommand *command);
void createClipsCommand(KdenliveDoc *doc, const QStringList &groupInfo, Bin *bin);
void addXmlProperties(QDomElement &producer, QMap <QString, QString> &properties);
};
......
......@@ -352,7 +352,7 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(const QMap<QString, QString>& map
} else m_configCapture.dvgrab_info->setText(i18n("<strong><em>dvgrab</em> utility not found, please install it for firewire capture</strong>"));
}
void KdenliveSettingsDialog::setupJogshuttleBtns(QString device)
void KdenliveSettingsDialog::setupJogshuttleBtns(const QString &device)
{
QList<KComboBox*> list;
QList<QLabel*> list1;
......
......@@ -113,7 +113,7 @@ private:
void loadCurrentV4lProfileInfo();
void saveCurrentV4lProfile();
void loadEncodingProfiles();
void setupJogshuttleBtns(QString device);
void setupJogshuttleBtns(const QString &device);
signals:
void customChanged();
......
......@@ -156,7 +156,7 @@ QStringList EffectsList::effectInfo(const QDomElement &effect) const
return info;
}
QStringList EffectsList::effectNames()
QStringList EffectsList::effectNames() const
{
QStringList list;
QDomNodeList effects = m_baseElement.childNodes();
......
......@@ -65,7 +65,7 @@ public:
QStringList effectInfo(const QDomElement &effect) const;
/** @brief Lists effects names. */
QStringList effectNames();
QStringList effectNames() const;
QString getInfo(const QString & tag, const QString & id) const;
QDomElement effectById(const QString & id) const;
QString getInfoFromIndex(const int ix) const;
......
......@@ -55,7 +55,7 @@
#include "../animkeyframeruler.h"
AnimationWidget::AnimationWidget(EffectMetaInfo *info, int clipPos, int min, int max, int effectIn, const QString &effectId, QDomElement xml, QWidget *parent) :
AnimationWidget::AnimationWidget(EffectMetaInfo *info, int clipPos, int min, int max, int effectIn, const QString &effectId, const QDomElement &xml, QWidget *parent) :
QWidget(parent)
, m_monitor(info->monitor)
, m_frameSize(info->frameSize)
......
......@@ -45,7 +45,7 @@ class AnimationWidget : public QWidget
{
Q_OBJECT
public:
explicit AnimationWidget(EffectMetaInfo *info, int clipPos, int min, int max, int effectIn, const QString &effectId, QDomElement xml, QWidget *parent = Q_NULLPTR);
explicit AnimationWidget(EffectMetaInfo *info, int clipPos, int min, int max, int effectIn, const QString &effectId, const QDomElement &xml, QWidget *parent = Q_NULLPTR);
virtual ~AnimationWidget();
void updateTimecodeFormat();
void addParameter(const QDomElement &e);
......
......@@ -422,7 +422,7 @@ KisCubicCurve KisCurveWidget::curve()
return d->m_curve;
}
void KisCurveWidget::setCurve(KisCubicCurve inlist)
void KisCurveWidget::setCurve(const KisCubicCurve &inlist)
{
d->m_curve = inlist;
d->m_grab_point_index = qBound(0, d->m_grab_point_index, d->m_curve.points().count() - 1);
......
......@@ -107,7 +107,7 @@ public:
* Replace the current curve with a curve specified by the curve defined by the control
* points in @param inlist.
*/
void setCurve(KisCubicCurve inlist);
void setCurve(const KisCubicCurve &inlist);
/**
* Connect/disconnect external spinboxes to the curve
......
......@@ -37,7 +37,7 @@ public:
cornersActions getMode(const QPointF &pos, int *corner);
/** @brief Reimplemented to draw the handles. */
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0 ) Q_DECL_OVERRIDE;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR ) Q_DECL_OVERRIDE;
protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
......
......@@ -43,7 +43,7 @@ public:
QPainterPath shape () const Q_DECL_OVERRIDE;
/** @brief Reimplemented to draw the handles. */
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0 ) Q_DECL_OVERRIDE;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR ) Q_DECL_OVERRIDE;
QRectF boundingRect () const Q_DECL_OVERRIDE;
protected:
......
......@@ -40,7 +40,7 @@ public:
rectActions getMode(const QPointF &pos);
/** @brief Reimplemented to draw the handles. */
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0 ) Q_DECL_OVERRIDE;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR ) Q_DECL_OVERRIDE;
protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
......
......@@ -28,7 +28,7 @@ class QGraphicsView;
class BPointItem : public QAbstractGraphicsShapeItem
{
public:
explicit BPointItem(const BPoint &point, QGraphicsItem* parent = 0);
explicit BPointItem(const BPoint &point, QGraphicsItem* parent = Q_NULLPTR);
BPoint getPoint() const;
void setPoint(const BPoint &point);
......@@ -37,7 +37,7 @@ public:
int type() const Q_DECL_OVERRIDE;
QRectF boundingRect() const Q_DECL_OVERRIDE;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) Q_DECL_OVERRIDE;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) Q_DECL_OVERRIDE;
/** @brief Gets The action mode for the area @param pos +- 4. */
int getSelection(const QPointF &pos);
......
......@@ -29,7 +29,7 @@ class SplineItem : public QObject, public QGraphicsPathItem
Q_OBJECT
public:
explicit SplineItem(const QList <BPoint> &points, QGraphicsItem* parent = 0, QGraphicsScene *scene = 0);
explicit SplineItem(const QList <BPoint> &points, QGraphicsItem* parent = Q_NULLPTR, QGraphicsScene *scene = Q_NULLPTR);
enum { Type = UserType + 10 };
......
......@@ -692,7 +692,7 @@ void ProjectManager::slotAutoSave()
m_lastSave.start();
}
QString ProjectManager::projectSceneList(const QString outputFolder)
QString ProjectManager::projectSceneList(const QString &outputFolder)
{
bool multitrackEnabled = m_trackView->multitrackView;
if (multitrackEnabled) {
......
......@@ -60,7 +60,7 @@ public:
/** @brief Returns true if there is a selected item in timeline */
bool hasSelection() const;
/** @brief Returns current project's xml scene */
QString projectSceneList(const QString outputFolder);
QString projectSceneList(const QString &outputFolder);
/** @brief returns a default hd profile depending on timezone*/
static QString getDefaultProjectFormat();
void saveZone(const QStringList &info, const QDir &dir);
......
......@@ -1320,7 +1320,7 @@ void ClipItem::updateEffect(const QDomElement &effect)
}
}
bool ClipItem::enableEffects(QList<int> indexes, bool disable)
bool ClipItem::enableEffects(const QList<int> &indexes, bool disable)
{
return m_effectList.enableEffects(indexes, disable);
}
......
......@@ -110,7 +110,7 @@ public:
void updateEffect(const QDomElement &effect);
/** @brief Enable / disable a list of effect from their indexes.
* @returns true if some the effects are video effects, requiring a monitor refresh */
bool enableEffects(QList<int> indexes, bool disable);
bool enableEffects(const QList<int> &indexes, bool disable);
bool moveEffect(QDomElement effect, int ix);
void flashClip();
void addTransition(Transition*);
......
This diff is collapsed.
This diff is collapsed.
......@@ -256,7 +256,7 @@ bool EffectManager::doAddFilter(EffectsParameterList params, int duration)
return true;
}
bool EffectManager::editEffect(EffectsParameterList params, int duration, bool replaceEffect)
bool EffectManager::editEffect(const EffectsParameterList &params, int duration, bool replaceEffect)
{
int index = params.paramValue(QStringLiteral("kdenlive_ix")).toInt();
QString tag = params.paramValue(QStringLiteral("tag"));
......
......@@ -44,7 +44,7 @@ public:
void setProducer(Mlt::Service& producer);
bool addEffect(const EffectsParameterList &params, int duration);
bool doAddFilter(EffectsParameterList params, int duration);
bool editEffect(EffectsParameterList params, int duration, bool replaceEffect);
bool editEffect(const EffectsParameterList &params, int duration, bool replaceEffect);
bool removeEffect(int effectIndex, bool updateIndex);
bool enableEffects(const QList<int> &effectIndexes, bool disable, bool rememberState = false);
bool moveEffect(int oldPos, int newPos);
......
......@@ -37,7 +37,7 @@
#include <QDomDocument>
#include <QMimeData>
HeaderTrack::HeaderTrack(TrackInfo info, const QList <QAction *> &actions, Track *parent, int height, QWidget *parentWidget) :
HeaderTrack::HeaderTrack(const TrackInfo &info, const QList <QAction *> &actions, Track *parent, int height, QWidget *parentWidget) :
QWidget(parentWidget),
isTarget(false),
m_type(info.type),
......
......@@ -34,7 +34,7 @@ class HeaderTrack : public QWidget, public Ui::TrackHeader_UI
Q_OBJECT
public:
HeaderTrack(TrackInfo info, const QList <QAction *>& actions, Track *parent, int height, QWidget *parentWidget);
HeaderTrack(const TrackInfo &info, const QList <QAction *>& actions, Track *parent, int height, QWidget *parentWidget);
virtual ~HeaderTrack();
bool isTarget;
void setLock(bool lock);
......
......@@ -492,7 +492,7 @@ QString KeyframeView::getOffsetAnimation(int in, int out, int offset, int limitK
}
int KeyframeView::mouseOverKeyFrames(QRectF br, QPointF pos, double scale)
int KeyframeView::mouseOverKeyFrames(const QRectF &br, QPointF pos, double scale)
{
if (m_keyframeType == NoKeyframe)
return -1;
......@@ -1017,7 +1017,7 @@ const QString KeyframeView::addBorderKeyframes(const QString &animation, int sta
}
//static
QString KeyframeView::switchAnimation(QString animation, int newPos, int oldPos, int newDuration, int oldDuration, bool isRect)
QString KeyframeView::switchAnimation(const QString &animation, int newPos, int oldPos, int newDuration, int oldDuration, bool isRect)
{
Mlt::Properties props;
props.set("keyframes", animation.toUtf8().constData());
......
......@@ -89,12 +89,12 @@ public:
void drawKeyFrames(const QRectF &br, int length, bool active, QPainter *painter, const QTransform &transformation);
/** @brief Draw the x, y, w, h channels of an animated geometry */
void drawKeyFrameChannels(const QRectF &br, int in, int out, QPainter *painter, const QList<QPoint> &maximas, int limitKeyframes, const QColor &textColor);
int mouseOverKeyFrames(QRectF br, QPointF pos, double scale);
int mouseOverKeyFrames(const QRectF &br, QPointF pos, double scale);
void showMenu(QWidget *parent, QPoint pos);
QAction *parseKeyframeActions(const QList<QAction *> &actions);
static QString cutAnimation(const QString &animation, int start, int duration, int fullduration, bool doCut = true);
/** @brief when an animation is resized, update in / out point keyframes */
static QString switchAnimation(QString animation, int newPos, int oldPos, int newDuration, int oldDuration, bool isRect);
static QString switchAnimation(const QString &animation, int newPos, int oldPos, int newDuration, int oldDuration, bool isRect);
/** @brief when loading an animation from a serialized string, check where is the first negative keyframe) */
static int checkNegatives(const QString &data, int maxDuration);
/** @brief Add keyframes at start / end points if not existing */
......
......@@ -203,7 +203,7 @@ bool PreviewManager::loadParams()
return true;
}
void PreviewManager::invalidatePreviews(QList<int> chunks)
void PreviewManager::invalidatePreviews(const QList<int> &chunks)
{
QMutexLocker lock(&m_previewMutex);
bool timer = false;
......
......@@ -57,7 +57,7 @@ public:
/** @brief: a timeline operation caused changes to frames between startFrame and endFrame. */
void invalidatePreview(int startFrame, int endFrame);
/** @brief: after a small delay (some operations trigger several invalidatePreview calls), take care of these invalidated chunks. */
void invalidatePreviews(QList<int> chunks);
void invalidatePreviews(const QList<int> &chunks);
/** @brief: user adds current timeline zone to the preview zone. */
void addPreviewRange(bool add);
/** @brief: Remove all existing previews. */
......
......@@ -1040,7 +1040,7 @@ int Timeline::loadTrack(int ix, int offset, Mlt::Playlist &playlist, int start,
return playlist.get_length();
}
void Timeline::loadGuides(QMap <double, QString> guidesData)
void Timeline::loadGuides(const QMap <double, QString> &guidesData)
{
QMapIterator<double, QString> i(guidesData);
while (i.hasNext()) {
......@@ -1098,7 +1098,7 @@ void Timeline::getEffects(Mlt::Service &service, ClipItem *clip, int track) {
}
}
QString Timeline::getKeyframes(Mlt::Service service, int &ix, QDomElement e) {
QString Timeline::getKeyframes(Mlt::Service service, int &ix, const QDomElement &e) {
QLocale locale;
locale.setNumberOptions(QLocale::OmitGroupSeparator);
QString starttag = e.attribute(QStringLiteral("starttag"), QStringLiteral("start"));
......@@ -1532,7 +1532,7 @@ int Timeline::getTrackSpaceLength(int trackIndex, int pos, bool fromBlankStart)
return track(trackIndex)->getBlankLength(pos, fromBlankStart);
}
void Timeline::updateClipProperties(const QString &id, QMap <QString, QString> properties)
void Timeline::updateClipProperties(const QString &id, const QMap <QString, QString> &properties)
{
for (int i = 1; i< m_tracks.count(); i++) {
track(i)->updateClipProperties(id, properties);
......
......@@ -105,7 +105,7 @@ public:
bool checkProjectAudio();
/** @brief Load guides from data */
void loadGuides(QMap <double, QString> guidesData);
void loadGuides(const QMap<double, QString> &guidesData);
void checkTrackHeight(bool force = false);
void updatePalette();
......@@ -136,7 +136,7 @@ public:
/** @brief Check if we have a blank space on selected track.
* Returns -1 if track is shorter, 0 if not blank and > 0 for blank length */
int getTrackSpaceLength(int trackIndex, int pos, bool fromBlankStart);
void updateClipProperties(const QString &id, QMap <QString, QString> properties);
void updateClipProperties(const QString &id, const QMap<QString, QString> &properties);
int changeClipSpeed(const ItemInfo &info, const ItemInfo &speedIndependantInfo, PlaylistState::ClipState state, double speed, int strobe, Mlt::Producer *originalProd, bool removeEffect = false);
/** @brief Set an effect's XML accordingly to MLT::filter values. */
static void setParam(ProfileInfo info, QDomElement param, const QString &value);
......@@ -150,7 +150,7 @@ public:
void loadTimeline();
/** @brief Dis/enable all effects in timeline*/
void disableTimelineEffects(bool disable);
QString getKeyframes(Mlt::Service service, int &ix, QDomElement e);
QString getKeyframes(Mlt::Service service, int &ix, const QDomElement &e);
void getSubfilters(Mlt::Filter *effect, QDomElement &currenteffect);
static bool isSlide(QString geometry);
/** @brief Import amultitrack MLT playlist in timeline */
......
......@@ -629,7 +629,7 @@ void MoveTransitionCommand::redo()
m_doIt = true;
}
RazorClipCommand::RazorClipCommand(CustomTrackView *view, const ItemInfo &info, EffectsList stack, const GenTime &cutTime, bool doIt, QUndoCommand * parent) :
RazorClipCommand::RazorClipCommand(CustomTrackView *view, const ItemInfo &info, const EffectsList &stack, const GenTime &cutTime, bool doIt, QUndoCommand * parent) :
QUndoCommand(parent),
m_view(view),
m_info(info),
......@@ -653,7 +653,7 @@ void RazorClipCommand::redo()
m_doIt = true;
}
RazorTransitionCommand::RazorTransitionCommand(CustomTrackView *view, const ItemInfo &info, const QDomElement params, const GenTime &cutTime, bool doIt, QUndoCommand * parent) :
RazorTransitionCommand::RazorTransitionCommand(CustomTrackView *view, const ItemInfo &info, const QDomElement &params, const GenTime &cutTime, bool doIt, QUndoCommand * parent) :
QUndoCommand(parent),
m_view(view),
m_info(info),
......
......@@ -339,7 +339,7 @@ private:
class RazorClipCommand : public QUndoCommand
{
public:
RazorClipCommand(CustomTrackView *view, const ItemInfo &info, EffectsList stack, const GenTime &cutTime, bool doIt = true, QUndoCommand * parent = Q_NULLPTR);
RazorClipCommand(CustomTrackView *view, const ItemInfo &info, const EffectsList &stack, const GenTime &cutTime, bool doIt = true, QUndoCommand * parent = Q_NULLPTR);
void undo() Q_DECL_OVERRIDE;
void redo() Q_DECL_OVERRIDE;
private:
......@@ -354,7 +354,7 @@ private:
class RazorTransitionCommand : public QUndoCommand
{
public:
RazorTransitionCommand(CustomTrackView *view, const ItemInfo &info, const QDomElement params, const GenTime &cutTime, bool doIt = true, QUndoCommand * parent = Q_NULLPTR);
RazorTransitionCommand(CustomTrackView *view, const ItemInfo &info, const QDomElement &params, const GenTime &cutTime, bool doIt = true, QUndoCommand * parent = Q_NULLPTR);
void undo() Q_DECL_OVERRIDE;
void redo() Q_DECL_OVERRIDE;
private:
......
......@@ -680,7 +680,7 @@ Mlt::Producer *Track::buildSlowMoProducer(Mlt::Properties passProps, const QStri
return prod;
}
int Track::changeClipSpeed(ItemInfo info, ItemInfo speedIndependantInfo, PlaylistState::ClipState state, double speed, int strobe, Mlt::Producer *prod, const QString &id, Mlt::Properties passProps, bool removeEffect)
int Track::changeClipSpeed(const ItemInfo &info, const ItemInfo &speedIndependantInfo, PlaylistState::ClipState state, double speed, int strobe, Mlt::Producer *prod, const QString &id, Mlt::Properties passProps, bool removeEffect)
{
//TODO: invalidate preview rendering
int newLength = 0;
......@@ -874,7 +874,7 @@ void Track::disableEffects(bool disable)
}
}
bool Track::addEffect(double start, EffectsParameterList params)
bool Track::addEffect(double start, const EffectsParameterList &params)
{
int pos = frame(start);
int clipIndex = m_playlist.get_clip_index_at(pos);
......@@ -888,7 +888,7 @@ bool Track::addEffect(double start, EffectsParameterList params)
return effect.addEffect(params, duration);
}
bool Track::addTrackEffect(EffectsParameterList params)
bool Track::addTrackEffect(const EffectsParameterList &params)
{
Mlt::Service trackService(m_playlist.get_service());
EffectManager effect(trackService);
......@@ -896,7 +896,7 @@ bool Track::addTrackEffect(EffectsParameterList params)
return effect.addEffect(params, duration);
}
bool Track::editEffect(double start, EffectsParameterList params, bool replace)
bool Track::editEffect(double start, const EffectsParameterList &params, bool replace)
{
int pos = frame(start);
int clipIndex = m_playlist.get_clip_index_at(pos);
......@@ -910,7 +910,7 @@ bool Track::editEffect(double start, EffectsParameterList params, bool replace)
return result;
}
bool Track::editTrackEffect(EffectsParameterList params, bool replace)
bool Track::editTrackEffect(const EffectsParameterList &params, bool replace)
{
EffectManager effect(m_playlist);
int duration = m_playlist.get_playtime() - 1;
......
......@@ -169,7 +169,7 @@ public:
* "speed" is the current speed.
* If removeEffect is true, we revert to original avformat producer
*/
int changeClipSpeed(ItemInfo info, ItemInfo speedIndependantInfo, PlaylistState::ClipState state, double speed, int strobe, Mlt::Producer *prod, const QString &id, Mlt::Properties passProps, bool removeEffect = false);
int changeClipSpeed(const ItemInfo &info, const ItemInfo &speedIndependantInfo, PlaylistState::ClipState state, double speed, int strobe, Mlt::Producer *prod, const QString &id, Mlt::Properties passProps, bool removeEffect = false);
Mlt::Producer *buildSlowMoProducer(Mlt::Properties passProps, const QString &url, const QString &id, Track::SlowmoInfo info);
/** @brief Returns true if there is a clip with audio on this track */
bool hasAudio();
......@@ -195,10 +195,10 @@ public:
void disableEffects(bool disable);
/** @brief Returns true if position is on last clip or beyond track length. */
bool isLastClip(qreal t);
bool addEffect(double start, EffectsParameterList params);
bool addTrackEffect(EffectsParameterList params);
bool editEffect(double start, EffectsParameterList params, bool replace);
bool editTrackEffect(EffectsParameterList params, bool replace);
bool addEffect(double start, const EffectsParameterList &params);
bool addTrackEffect(const EffectsParameterList &params);
bool editEffect(double start, const EffectsParameterList &params, bool replace);
bool editTrackEffect(const EffectsParameterList &params, bool replace);
bool removeEffect(double start, int effectIndex, bool updateIndex);
bool removeTrackEffect(int effectIndex, bool updateIndex);
bool enableEffects(double start, const QList<int> &effectIndexes, bool disable);
......
......@@ -28,7 +28,7 @@ TransitionHandler::TransitionHandler(Mlt::Tractor *tractor) : QObject()
{
}
bool TransitionHandler::addTransition(QString tag, int a_track, int b_track, GenTime in, GenTime out, QDomElement xml)
bool TransitionHandler::addTransition(const QString &tag, int a_track, int b_track, GenTime in, GenTime out, const QDomElement &xml)
{
if (in >= out) return false;
double fps = m_tractor->get_fps();
......@@ -235,7 +235,7 @@ void TransitionHandler::updateTransition(const QString &oldTag, const QString &t
}
}
void TransitionHandler::updateTransitionParams(QString type, int a_track, int b_track, GenTime in, GenTime out, QDomElement xml)
void TransitionHandler::updateTransitionParams(const QString &type, int a_track, int b_track, GenTime in, GenTime out, const QDomElement &xml)
{
QScopedPointer<Mlt::Field> field(m_tractor->field());
field->lock();
......@@ -357,7 +357,7 @@ void TransitionHandler::deleteTrackTransitions(int ix)
}
}
bool TransitionHandler::moveTransition(QString type, int startTrack, int newTrack, int newTransitionTrack, GenTime oldIn, GenTime oldOut, GenTime newIn, GenTime newOut)
bool TransitionHandler::moveTransition(const QString &type, int startTrack, int newTrack, int newTransitionTrack, GenTime oldIn, GenTime oldOut, GenTime newIn, GenTime newOut)
{
double fps = m_tractor->get_fps();
int new_in = (int)newIn.frames(fps);
......
......@@ -36,17 +36,17 @@ class TransitionHandler : public QObject
public:
explicit TransitionHandler(Mlt::Tractor *tractor);
bool addTransition(QString tag, int a_track, int b_track, GenTime in, GenTime out, QDomElement xml);
bool addTransition(const QString &tag, int a_track, int b_track, GenTime in, GenTime out, const QDomElement &xml);
/** @brief Initialize transition settings if necessary and return an array of values. */
QMap<QString, QString> getTransitionParamsFromXml(const QDomElement &xml);
void plantTransition(Mlt::Transition &tr, int a_track, int b_track);
void plantTransition(Mlt::Field *field, Mlt::Transition &tr, int a_track, int b_track);
void cloneProperties(Mlt::Properties &dest, Mlt::Properties &source);
void updateTransition(const QString &oldTag, const QString &tag, int a_track, int b_track, GenTime in, GenTime out, const QDomElement &xml, bool force = false);
void updateTransitionParams(QString type, int a_track, int b_track, GenTime in, GenTime out, QDomElement xml);
void updateTransitionParams(const QString &type, int a_track, int b_track, GenTime in, GenTime out, const QDomElement &xml);
bool deleteTransition(const QString &tag, int a_track, int b_track, GenTime in, GenTime out, const QDomElement &xml, bool refresh = true);
void deleteTrackTransitions(int ix);
bool moveTransition(QString type, int startTrack, int newTrack, int newTransitionTrack, GenTime oldIn, GenTime oldOut, GenTime newIn, GenTime newOut);
bool moveTransition(const QString &type, int startTrack, int newTrack, int newTransitionTrack, GenTime oldIn, GenTime oldOut, GenTime newIn, GenTime newOut);
QList <TransitionInfo> mltInsertTrack(int ix, const QString &name, bool videoTrack);
void duplicateTransitionOnPlaylist(int in, int out, const QString &tag, const QDomElement &xml, int a_track, int b_track, Mlt::Field *field);
/** @brief Get a transition with tag name. */
......
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