#include "docclipbase.h"
#include "projectlist.h"
#include "kthumb.h"
-#include "monitoreditwidget.h"
+#include "widgets/monitoreditwidget.h"
#include "monitorscene.h"
#include "kdenlivesettings.h"
#include "collapsibleeffect.h"
#include "collapsiblegroup.h"
#include <KDebug>
-#include <KLocale>
+#include <KLocalizedString>
#include <KMessageBox>
#include <KStandardDirs>
#include <KFileDialog>
if (m_monitorSceneWanted) slotCheckMonitorPosition(pos);
if (!m_effectMetaInfo.trackMode && m_clipref) pos = pos - m_clipref->startPos().frames(KdenliveSettings::project_fps());
- for (int i = 0; i< m_effects.count(); i++)
+ for (int i = 0; i< m_effects.count(); ++i)
m_effects.at(i)->slotSyncEffectsPos(pos);
}
{
int inPoint = m_clipref->cropStart().frames(KdenliveSettings::project_fps());
int outPoint = m_clipref->cropDuration().frames(KdenliveSettings::project_fps()) + inPoint;
- for (int i = 0; i < m_effects.count(); i++) {
+ for (int i = 0; i < m_effects.count(); ++i) {
m_effects.at(i)->setRange(inPoint, outPoint);
}
}
setupListView();
}
-void EffectStackView2::slotTrackItemSelected(int ix, const TrackInfo info)
+void EffectStackView2::slotTrackItemSelected(int ix, const TrackInfo &info)
{
m_clipref = NULL;
m_effectMetaInfo.trackMode = true;
else if (selectedEffect > effectsCount) m_clipref->setSelectedEffect(effectsCount);
}
- for (int i = 0; i < effectsCount; i++) {
+ for (int i = 0; i < effectsCount; ++i) {
QDomElement d = m_currentEffectList.at(i).cloneNode().toElement();
if (d.isNull()) {
kDebug() << " . . . . WARNING, NULL EFFECT IN STACK!!!!!!!!!";
else {
// Adjust group effects (up / down buttons)
QList<CollapsibleGroup *> allGroups = m_ui.container->widget()->findChildren<CollapsibleGroup *>();
- for (int i = 0; i < allGroups.count(); i++) {
+ for (int i = 0; i < allGroups.count(); ++i) {
allGroups.at(i)->adjustEffects();
}
connect(m_effectMetaInfo.monitor, SIGNAL(renderPosition(int)), this, SLOT(slotRenderPos(int)));
// widget has scroll bar,
filterWheelEvent = true;
}
- for (int i = 0; i < m_effects.count(); i++) {
+ for (int i = 0; i < m_effects.count(); ++i) {
m_effects.at(i)->filterWheelEvent = filterWheelEvent;
}
}
bool disabled = state == Qt::Unchecked;
// Disable all effects
QList <int> indexes;
- for (int i = 0; i < m_effects.count(); i++) {
+ for (int i = 0; i < m_effects.count(); ++i) {
m_effects.at(i)->slotDisable(disabled, false);
indexes << m_effects.at(i)->effectIndex();
}
// Take care of groups
QList<CollapsibleGroup *> allGroups = m_ui.container->widget()->findChildren<CollapsibleGroup *>();
- for (int i = 0; i < allGroups.count(); i++) {
+ for (int i = 0; i < allGroups.count(); ++i) {
allGroups.at(i)->slotEnable(disabled, false);
}
bool hasEnabled = false;
bool hasDisabled = false;
- for (int i = 0; i < m_effects.count(); i++) {
+ for (int i = 0; i < m_effects.count(); ++i) {
if (!m_effects.at(i)->enabledButton->isChecked()) hasEnabled = true;
else hasDisabled = true;
}
void EffectStackView2::deleteCurrentEffect()
{
- for (int i = 0; i < m_effects.count(); i++) {
+ for (int i = 0; i < m_effects.count(); ++i) {
if (m_effects.at(i)->isActive()) {
slotDeleteEffect(m_effects.at(i)->effect());
break;
}
}
-void EffectStackView2::updateProjectFormat(MltVideoProfile profile, Timecode t)
+void EffectStackView2::updateProjectFormat(const MltVideoProfile &profile, const Timecode &t)
{
m_effectMetaInfo.profile = profile;
m_effectMetaInfo.timecode = t;
void EffectStackView2::updateTimecodeFormat()
{
- for (int i = 0; i< m_effects.count(); i++)
+ for (int i = 0; i< m_effects.count(); ++i)
m_effects.at(i)->updateTimecodeFormat();
}
CollapsibleEffect *EffectStackView2::getEffectByIndex(int ix)
{
- for (int i = 0; i< m_effects.count(); i++) {
+ for (int i = 0; i< m_effects.count(); ++i) {
if (m_effects.at(i)->effectIndex() == ix) {
return m_effects.at(i);
}
return NULL;
}
-void EffectStackView2::slotUpdateEffectParams(const QDomElement old, const QDomElement e, int ix)
+void EffectStackView2::slotUpdateEffectParams(const QDomElement &old, const QDomElement &e, int ix)
{
if (m_effectMetaInfo.trackMode)
emit updateEffect(NULL, m_trackindex, old, e, ix,false);
{
if (m_clipref && ix != m_clipref->selectedEffectIndex()) {
m_clipref->setSelectedEffect(ix);
- for (int i = 0; i < m_effects.count(); i++) {
+ for (int i = 0; i < m_effects.count(); ++i) {
if (m_effects.at(i)->effectIndex() == ix) {
if (m_effects.at(i)->isActive()) return;
m_effects.at(i)->setActive(true);
ix = -1;
}
- for (int i = 0; i < effects.count(); i++)
+ for (int i = 0; i < effects.count(); ++i)
emit removeEffect(clip, ix, effects.at(i).toElement());
}
-void EffectStackView2::slotDeleteEffect(const QDomElement effect)
+void EffectStackView2::slotDeleteEffect(const QDomElement &effect)
{
if (m_effectMetaInfo.trackMode)
emit removeEffect(NULL, m_trackindex, effect);
emit removeEffect(m_clipref, -1, effect);
}
-void EffectStackView2::slotAddEffect(QDomElement effect)
+void EffectStackView2::slotAddEffect(const QDomElement &effect)
{
emit addEffect(m_clipref, effect);
}
-void EffectStackView2::slotMoveEffectUp(QList <int> indexes, bool up)
+void EffectStackView2::slotMoveEffectUp(const QList<int> &indexes, bool up)
{
if (up && indexes.first() <= 1) return;
if (!up && indexes.last() >= m_currentEffectList.count()) return;
info.cropStart = GenTime(0);
info.startPos = GenTime(-1);
info.track = 0;
- for (int i = 0; i < m_effects.count(); i++) {
+ for (int i = 0; i < m_effects.count(); ++i) {
if (m_effects.at(i)->effectIndex() == ix) {
m_effects.at(i)->updateWidget(info, dom, &m_effectMetaInfo);
break;
emit updateEffect(NULL, m_trackindex, old, dom, ix,false);
} else {
m_clipref->initEffect(dom);
- for (int i = 0; i < m_effects.count(); i++) {
+ 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);
break;
QVBoxLayout *l = static_cast<QVBoxLayout *>(m_ui.container->widget()->layout());
int groupPos = 0;
CollapsibleEffect *effectToMove = NULL;
- for (int i = 0; i < m_effects.count(); i++) {
+ for (int i = 0; i < m_effects.count(); ++i) {
if (m_effects.at(i)->effectIndex() == ix) {
effectToMove = m_effects.at(i);
groupPos = l->indexOf(effectToMove);
void EffectStackView2::slotRenameGroup(CollapsibleGroup *group)
{
QList <CollapsibleEffect*> effects = group->effects();
- for (int i = 0; i < effects.count(); i++) {
+ for (int i = 0; i < effects.count(); ++i) {
QDomElement origin = effects.at(i)->effect();
QDomElement changed = origin.cloneNode().toElement();
changed.setAttribute("kdenlive_info", effects.at(i)->infoString());
}
// Moving group: delete all effects and re-add them
QList <int> indexes;
- for (int i = 0; i < effects.count(); i++) {
+ for (int i = 0; i < effects.count(); ++i) {
QDomElement effect = effects.at(i).cloneNode().toElement();
indexes << effect.attribute("kdenlive_ix").toInt();
}
void EffectStackView2::setKeyframes(const QString &data, int maximum)
{
- for (int i = 0; i < m_effects.count(); i++) {
+ for (int i = 0; i < m_effects.count(); ++i) {
if (m_effects.at(i)->isActive()) {
m_effects.at(i)->setKeyframes(data, maximum);
break;