namespace Mlt
{
class Producer;
-};
+}
class ClipManager: public QObject
{
public:
/** @brief Sets up the widget. */
- ColorPickerWidget(QWidget *parent = 0);
+ explicit ColorPickerWidget(QWidget *parent = 0);
/** @brief Makes sure the event filter is removed. */
virtual ~ColorPickerWidget();
return a + (b - a) * t;
}
-CornersWidget::CornersWidget(Monitor *monitor, QDomElement e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent) :
+CornersWidget::CornersWidget(Monitor *monitor, const QDomElement& e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent) :
KeyframeEdit(e, minFrame, maxFrame, tc, activeKeyframe, parent),
m_monitor(monitor),
m_showScene(true),
* @param isEffect true if used in an effect, false if used in a transition
* @param factor Factor by which the parameters differ from the range 0-1
* @param parent (optional) Parent widget */
- CornersWidget(Monitor *monitor, QDomElement e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent = 0);
+ explicit CornersWidget(Monitor *monitor, const QDomElement &e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent = 0);
virtual ~CornersWidget();
virtual void addParameter(QDomElement e, int activeKeyframe = -1);
return GenTime(pos, m_document->fps()).frames(m_document->fps());
}
-void CustomTrackScene::setSnapList(QList <GenTime> snaps)
+void CustomTrackScene::setSnapList(const QList <GenTime>& snaps)
{
m_snapPoints = snaps;
}
public:
explicit CustomTrackScene(KdenliveDoc *doc, QObject *parent = 0);
virtual ~ CustomTrackScene();
- void setSnapList(QList <GenTime> snaps);
+ void setSnapList(const QList <GenTime>& snaps);
GenTime previousSnapPoint(GenTime pos) const;
GenTime nextSnapPoint(GenTime pos) const;
double getSnapPointForPos(double pos, bool doSnap = true);
isMute(0),
isBlind(0),
isLocked(0),
- duration(0) {};
+ duration(0) {}
};
typedef QMap<QString, QString> stringMap;
/** cropDuration is the duration of the clip */
GenTime cropDuration;
int track;
- ItemInfo() : track(0) {};
+ ItemInfo() : track(0) {}
};
class TransitionInfo {
TransitionInfo() :
b_track(0),
a_track(0),
- forceTrack(0) {};
+ forceTrack(0) {}
};
class MltVideoProfile {
sample_aspect_den(0),
display_aspect_num(0),
display_aspect_den(0),
- colorspace(0) {};
+ colorspace(0) {}
bool operator==(const MltVideoProfile& point) const
{
if (!description.isEmpty() && point.description == description) return true;
}
void setParamValue(const QString &name, const QString &value) {
bool found = false;
- for (int i = 0; i < size(); i++)
+ for (int i = 0; i < size(); ++i)
if (at(i).name() == name) {
// update value
replace(i, EffectParameter(name, value));
}
QString paramValue(const QString &name, QString defaultValue = QString()) const {
- for (int i = 0; i < size(); i++) {
+ for (int i = 0; i < size(); ++i) {
if (at(i).name() == name) return at(i).value();
}
return defaultValue;
append(EffectParameter(name, value));
}
void removeParam(const QString &name) {
- for (int i = 0; i < size(); i++)
+ for (int i = 0; i < size(); ++i)
if (at(i).name() == name) {
removeAt(i);
break;
namespace Mlt
{
class Producer;
-};
+}
struct CutZoneInfo {
QPoint zone;
class DocClipBase: public QObject
{
-Q_OBJECT public:
+Q_OBJECT
+public:
/** this enum determines the types of "feed" available within this clip. types must be non-exclusive
* - e.g. if you can have audio and video separately, it should be possible to combin the two, as is
* done here. If a new clip type is added then it should be possible to combine it with both audio
enum TITLECLIPTYPE { TITLE_IMAGE_ELEMENT = 20, TITLE_FONT_ELEMENT = 21 };
-DocumentChecker::DocumentChecker(QDomNodeList infoproducers, QDomDocument doc):
+DocumentChecker::DocumentChecker(const QDomNodeList &infoproducers, const QDomDocument &doc):
m_info(infoproducers), m_doc(doc), m_dialog(NULL)
{
Q_OBJECT
public:
- explicit DocumentChecker(QDomNodeList infoproducers, QDomDocument doc);
+ explicit DocumentChecker(const QDomNodeList &infoproducers, const QDomDocument &doc);
~DocumentChecker();
bool hasErrorInClips();
#include <locale>
-DocumentValidator::DocumentValidator(QDomDocument doc, KUrl documentUrl):
+DocumentValidator::DocumentValidator(const QDomDocument &doc, const KUrl &documentUrl):
m_doc(doc),
m_url(documentUrl),
m_modified(false)
}
}
-bool DocumentValidator::updateEffectParameters(QDomNodeList parameters, const QScriptValue* updateRules, const double serviceVersion, const double effectVersion)
+bool DocumentValidator::updateEffectParameters(const QDomNodeList ¶meters, const QScriptValue* updateRules, const double serviceVersion, const double effectVersion)
{
bool updated = false;
bool isDowngrade = serviceVersion < effectVersion;
{
public:
- DocumentValidator(QDomDocument doc, KUrl documentUrl);
+ DocumentValidator(const QDomDocument &doc, const KUrl &documentUrl);
bool isProject() const;
bool validate(const double currentVersion);
bool isModified() const;
void updateEffects();
/** @brief Updates the parameters according to the updateRules.
* @see the related in README in effects/update */
- bool updateEffectParameters(QDomNodeList parameters, const QScriptValue *updateRules, const double serviceVersion, const double effectVersion);
+ bool updateEffectParameters(const QDomNodeList ¶meters, const QScriptValue *updateRules, const double serviceVersion, const double effectVersion);
};
#endif
DragValue::~DragValue()
{
- if (m_intEdit) delete m_intEdit;
- if (m_doubleEdit) delete m_doubleEdit;
+ delete m_intEdit;
+ delete m_doubleEdit;
delete m_menu;
//delete m_scale;
//delete m_directUpdate;
{
Q_OBJECT
public:
- DvdTreeWidget(QWidget *parent);
+ explicit DvdTreeWidget(QWidget *parent);
protected:
virtual void dragEnterEvent(QDragEnterEvent * event );
m_metaInfo.timecode = t;
}
-void EffectStackEdit::setFrameSize(QPoint p)
+void EffectStackEdit::setFrameSize(const QPoint &p)
{
m_metaInfo.frameSize = p;
}
*
* Used to disable the effect, by setting disabled="1" */
void updateParameter(const QString &name, const QString &value);
- void setFrameSize(QPoint p);
+ void setFrameSize(const QPoint &p);
/** @brief Tells the parameters to update their timecode format according to KdenliveSettings. */
void updateTimecodeFormat();
/** @brief Returns true if this effect wants to keep track of current position in clip. */
ParameterContainer *m_paramWidget;
public slots:
- /** @brief Called when an effect is selected, builds the UI for this effect. */
+ /** @brief Called when an effect is selected, builds the UI for this effect. */
void transferParamDesc(const QDomElement &d, ItemInfo info, bool isEffect = true);
/** @brief Pass position changes of the timeline cursor to the effects to keep their local timelines in sync. */
#include <QTimer>
-Geometryval::Geometryval(const MltVideoProfile &profile, Timecode t, QPoint frame_size, int startPoint, QWidget* parent) :
+Geometryval::Geometryval(const MltVideoProfile &profile, Timecode t, const QPoint &frame_size, int startPoint, QWidget* parent) :
QWidget(parent),
m_profile(profile),
m_paramRect(NULL),
{
Q_OBJECT
public:
- explicit Geometryval(const MltVideoProfile &profile, Timecode t, QPoint frame_size, int startPoint = 0, QWidget* parent = 0);
+ explicit Geometryval(const MltVideoProfile &profile, Timecode t, const QPoint &frame_size, int startPoint = 0, QWidget* parent = 0);
virtual ~Geometryval();
QDomElement getParamDesc();
QString getValue() const;
#include <QGraphicsView>
#include <QScrollBar>
-Guide::Guide(CustomTrackView *view, GenTime pos, QString label, double height) :
+Guide::Guide(CustomTrackView *view, GenTime pos, const QString &label, double height) :
QGraphicsLineItem(),
m_position(pos),
m_label(label),
{
public:
- Guide(CustomTrackView *view, GenTime pos, QString label, double height);
+ Guide(CustomTrackView *view, GenTime pos, const QString &label, double height);
GenTime position() const;
void updateGuide(const GenTime &newPos, const QString &comment = QString());
QString label() const;
#include <QTimer>
#include <QDomDocument>
-HeaderTrack::HeaderTrack(int index, TrackInfo info, int height, QList <QAction *> actions, QWidget *parent) :
+HeaderTrack::HeaderTrack(int index, TrackInfo info, int height, const QList <QAction *> &actions, QWidget *parent) :
QWidget(parent),
m_index(index),
m_type(info.type),
Q_OBJECT
public:
- HeaderTrack(int index, TrackInfo info, int height, QList <QAction *> actions, QWidget *parent = 0);
+ HeaderTrack(int index, TrackInfo info, int height, const QList <QAction *>& actions, QWidget *parent = 0);
//virtual ~HeaderTrack();
void setLock(bool lock);
void adjustSize(int height);
#define JOG_STOP 10020
#define MAX_SHUTTLE_RANGE 7
-void ShuttleThread::init(QObject *parent, QString device)
+void ShuttleThread::init(QObject *parent, const QString &device)
{
m_parent = parent;
m_device = device;
public:
virtual void run();
- void init(QObject *parent, QString device);
+ void init(QObject *parent, const QString &device);
QObject *m_parent;
int shuttlevalue;
int shuttlecounter;
const double DOCUMENTVERSION = 0.88;
-KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup *undoGroup, QString profileName, QMap <QString, QString> properties, QMap <QString, QString> metadata, const QPoint &tracks, Render *render, KTextEdit *notes, bool *openBackup, MainWindow *parent, KProgressDialog *progressDialog) :
+KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup *undoGroup, const QString &profileName, QMap <QString, QString> properties, QMap <QString, QString> metadata, const QPoint &tracks, Render *render, KTextEdit *notes, bool *openBackup, MainWindow *parent, KProgressDialog *progressDialog) :
QObject(parent),
m_autosave(NULL),
m_url(url),
{
Q_OBJECT public:
- KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup *undoGroup, QString profileName, QMap <QString, QString> properties, QMap <QString, QString> metadata, const QPoint &tracks, Render *render, KTextEdit *notes, bool *openBackup, MainWindow *parent = 0, KProgressDialog *progressDialog = 0);
+ KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup *undoGroup, const QString &profileName, QMap <QString, QString> properties, QMap <QString, QString> metadata, const QPoint &tracks, Render *render, KTextEdit *notes, bool *openBackup, MainWindow *parent = 0, KProgressDialog *progressDialog = 0);
~KdenliveDoc();
QDomNodeList producersList();
double fps() const;
#ifdef USE_V4L
// Video 4 Linux device detection
- for (int i = 0; i < 10; i++) {
+ for (int i = 0; i < 10; ++i) {
QString path = "/dev/video" + QString::number(i);
if (QFile::exists(path)) {
QStringList deviceInfo = V4lCaptureHandler::getDeviceName(path);
#include <QHeaderView>
-KeyframeEdit::KeyframeEdit(QDomElement e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent) :
+KeyframeEdit::KeyframeEdit(const QDomElement &e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent) :
QWidget(parent),
m_min(minFrame),
m_max(maxFrame),
{
Q_OBJECT
public:
- explicit KeyframeEdit(QDomElement e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent = 0);
+ explicit KeyframeEdit(const QDomElement &e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent = 0);
virtual ~KeyframeEdit();
virtual void addParameter(QDomElement e, int activeKeyframe = -1);
const QString getValue(const QString &name);
#include <QTimer>
-ManageCapturesDialog::ManageCapturesDialog(KUrl::List files, QWidget * parent) :
+ManageCapturesDialog::ManageCapturesDialog(const KUrl::List &files, QWidget * parent) :
QDialog(parent)
{
setFont(KGlobalSettings::toolBarFont());
Q_OBJECT
public:
- explicit ManageCapturesDialog(KUrl::List files, QWidget * parent = 0);
+ explicit ManageCapturesDialog(const KUrl::List &files, QWidget * parent = 0);
~ManageCapturesDialog();
KUrl::List importFiles();
-/***************************************************************************
+ /***************************************************************************
* Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
* *
* This program is free software; you can redistribute it and/or modify *
-/***************************************************************************
+ /***************************************************************************
mltdevicecapture.h - description
-------------------
begin : Sun May 21 2011
bool sendFrameForAnalysis;
/** @brief Someone needs us to send again a frame. */
- void sendFrameUpdate() {};
+ void sendFrameUpdate() {}
void emitFrameUpdated(Mlt::Frame&);
void emitFrameNumber(double position);
Q_OBJECT
public:
- NotesWidget(QWidget * parent = 0);
+ explicit NotesWidget(QWidget * parent = 0);
~NotesWidget();
protected:
#include <QSlider>
#include <QHBoxLayout>
-PositionEdit::PositionEdit(const QString name, int pos, int min, int max, const Timecode tc, QWidget* parent) :
+PositionEdit::PositionEdit(const QString &name, int pos, int min, int max, const Timecode tc, QWidget* parent) :
QWidget(parent)
{
QHBoxLayout *layout = new QHBoxLayout(this);
{
Q_OBJECT
public:
- explicit PositionEdit(const QString name, int pos, int min, int max, const Timecode tc, QWidget* parent = 0);
+ explicit PositionEdit(const QString &name, int pos, int min, int max, const Timecode tc, QWidget* parent = 0);
virtual ~PositionEdit();
int getPosition() const;
void setPosition(int pos);