bool isItemLocked() const;
void closeAnimation();
- virtual OPERATIONTYPE operationMode(QPointF pos) = 0;
+ virtual OPERATIONTYPE operationMode(const QPointF &pos) = 0;
virtual GenTime startPos() const ;
virtual void setTrack(int track);
virtual GenTime endPos() const ;
// Add project file
bool result = false;
if (m_temp) {
- archive.addLocalFile(m_temp->fileName(), m_name + ".kdenlive");
- result = archive.close();
- delete m_temp;
+ archive.addLocalFile(m_temp->fileName(), m_name + ".kdenlive");
+ result = archive.close();
+ delete m_temp;
+ m_temp = 0;
}
emit archivingFinished(result);
}
blockSignals(true);
m_endThumbTimer.stop();
m_startThumbTimer.stop();
- if (scene()) scene()->removeItem(this);
+ if (scene())
+ scene()->removeItem(this);
if (m_clipType == VIDEO || m_clipType == AV || m_clipType == SLIDESHOW || m_clipType == PLAYLIST) {
//disconnect(m_clip->thumbProducer(), SIGNAL(thumbReady(int,QImage)), this, SLOT(slotThumbReady(int,QImage)));
//disconnect(m_clip, SIGNAL(gotAudioData()), this, SLOT(slotGotAudioData()));
}
}
-const QString ClipItem::adjustKeyframes(QString keyframes, int offset)
+const QString ClipItem::adjustKeyframes(const QString &keyframes, int offset)
{
QStringList result;
// Simple keyframes
const QStringList list = keyframes.split(';', QString::SkipEmptyParts);
foreach(const QString &keyframe, list) {
- int pos = keyframe.section(':', 0, 0).toInt() - offset;
- QString newKey = QString::number(pos) + ":" + keyframe.section(':', 1);
- result.append(newKey);
+ int pos = keyframe.section(':', 0, 0).toInt() - offset;
+ QString newKey = QString::number(pos) + ":" + keyframe.section(':', 1);
+ result.append(newKey);
}
return result.join(";");
}
return clipEffectsModified;
}
-void ClipItem::setKeyframes(const int ix, const QStringList keyframes)
+void ClipItem::setKeyframes(const int ix, const QStringList &keyframes)
{
QDomElement effect = m_effectList.at(ix);
if (effect.attribute("disable") == "1") return;
}
}
-void ClipItem::slotThumbReady(int frame, QImage img)
+void ClipItem::slotThumbReady(int frame, const QImage &img)
{
if (scene() == NULL) return;
QRectF r = boundingRect();
}
if (m_isMainSelectedClip) {
- framePen.setColor(Qt::red);
- textBgColor = Qt::red;
+ framePen.setColor(Qt::red);
+ textBgColor = Qt::red;
}
// only paint details if clip is big enough
}
-OPERATIONTYPE ClipItem::operationMode(QPointF pos)
+OPERATIONTYPE ClipItem::operationMode(const QPointF &pos)
{
if (isItemLocked()) return NONE;
const double scale = projectScene()->scale().x();
virtual int type() const;
void resizeStart(int posx, bool size = true, bool emitChange = true);
void resizeEnd(int posx, bool emitChange = true);
- OPERATIONTYPE operationMode(QPointF pos);
+ OPERATIONTYPE operationMode(const QPointF &pos);
static int itemHeight();
const QString clipProducer() const;
int clipType() const;
/** @brief Sets params with keyframes and updates the visible keyframes.
* @param ix Number of the effect
* @param keyframes a list of strings of keyframes (one string per param), which should be used */
- void setKeyframes(const int ix, const QStringList keyframes);
+ void setKeyframes(const int ix, const QStringList &keyframes);
void setEffectList(const EffectsList effectList);
void setSpeed(const double speed, int strobe);
double speed() const;
int hasEffect(const QString &tag, const QString &id) const;
/** @brief Adjust keyframes to the new clip. */
- const QString adjustKeyframes(QString keyframes, int offset);
+ const QString adjustKeyframes(const QString &keyframes, int offset);
/** @brief Makes sure all keyframes are in the clip's cropped duration.
* @param cutPos the frame number where the new clip starts
* @return Whether or not changes were made */
void animate(qreal value);
void slotSetStartThumb(const QImage &img);
void slotSetEndThumb(const QImage &img);
- void slotThumbReady(int frame, QImage img);
+ void slotThumbReady(int frame, const QImage &img);
/** @brief The thumbnailer has finished to cache all required thumbs. */
void slotGotThumbsCache();
if (!found) addParam(name, value);
}
- QString paramValue(const QString &name, QString defaultValue = QString()) const {
+ QString paramValue(const QString &name, const QString &defaultValue = QString()) const {
for (int i = 0; i < size(); ++i) {
if (at(i).name() == name) return at(i).value();
}
GenTime time() const {
return t;
}
- void setComment(QString comm) {
+ void setComment(const QString &comm) {
c = comm;
}
void setMarkerType(int t) {
return Qt::cyan;
break;
}
- };
+ }
/* Implementation of > operator; Works identically as with basic types. */
bool operator>(CommentedTime op) const {
GenTime t;
QString c;
int type;
-
-
-
};
QDebug operator << (QDebug qd, const ItemInfo &info);
}
if (!m_view.background_image->isHidden()) {
- // Make sure user selected a valid image / video file
+ // Make sure user selected a valid image / video file
if (!QFile::exists(m_view.background_image->url().path())) {
#if KDE_IS_VERSION(4,7,0)
m_menuMessage->setText(i18n("Missing background image"));
}
-void DvdWizardMenu::loadXml(DVDFORMAT format, QDomElement xml)
+void DvdWizardMenu::loadXml(DVDFORMAT format, const QDomElement &xml)
{
kDebug() << "// LOADING MENU";
if (xml.isNull()) return;
int menuMovieLength() const;
void changeProfile(DVDFORMAT format);
QDomElement toXml() const;
- void loadXml(DVDFORMAT format, QDomElement xml);
+ void loadXml(DVDFORMAT format, const QDomElement &xml);
void prepareUnderLines();
void resetUnderLines();
void setImage(const QImage &img);
protected:
- virtual void paintEvent(QPaintEvent* event);
- virtual void wheelEvent(QWheelEvent* event);
- virtual void mousePressEvent(QMouseEvent*);
+ void paintEvent(QPaintEvent* event);
+ void wheelEvent(QWheelEvent* event);
+ void mousePressEvent(QMouseEvent*);
private:
QImage m_img;
/** @brief Ask to add sequence to current project. */
void addOrUpdateSequence(const QString &);
- void doCreateThumbs(QImage, int);
- void gotFrame(QImage);
+ void doCreateThumbs(const QImage&, int);
+ void gotFrame(const QImage&);
};
#endif
}
-OPERATIONTYPE Transition::operationMode(QPointF pos)
+OPERATIONTYPE Transition::operationMode(const QPointF &pos)
{
if (isItemLocked()) return NONE;
int transitionEndTrack() const;
QString transitionTag() const;
QStringList transitionInfo() const;
- OPERATIONTYPE operationMode(QPointF pos);
+ OPERATIONTYPE operationMode(const QPointF &pos);
static int itemHeight();
static int itemOffset();
//const QMap < QString, QString > transitionParameters() const;