X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fkeyframeedit.cpp;h=ac367215b7b24a7cbb69165db0642431fc45f708;hb=2f9294f5de103de1a1a081375470da3571302d06;hp=ed8e1e97e432b0d883364f10bedf065eed619f12;hpb=713bfab11bdce6e24f3b05fd9e160dc10bf31c96;p=kdenlive diff --git a/src/keyframeedit.cpp b/src/keyframeedit.cpp index ed8e1e97..ac367215 100644 --- a/src/keyframeedit.cpp +++ b/src/keyframeedit.cpp @@ -25,11 +25,11 @@ #include -KeyframeEdit::KeyframeEdit(const QDomElement &e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent) : - QWidget(parent), - m_min(minFrame), - m_max(maxFrame), - m_timecode(tc) +KeyframeEdit::KeyframeEdit(const QDomElement &e, int minFrame, int maxFrame, const Timecode &tc, int activeKeyframe, QWidget* parent) : + QWidget(parent), + m_min(minFrame), + m_max(maxFrame), + m_timecode(tc) { setupUi(this); if (m_max == -1) { @@ -99,7 +99,7 @@ KeyframeEdit::~KeyframeEdit() } } -void KeyframeEdit::addParameter(QDomElement e, int activeKeyframe) +void KeyframeEdit::addParameter(const QDomElement &e, int activeKeyframe) { keyframe_list->blockSignals(true); m_params.append(e.cloneNode().toElement()); @@ -116,8 +116,8 @@ void KeyframeEdit::addParameter(QDomElement e, int activeKeyframe) keyframe_list->setHorizontalHeaderItem(columnId, new QTableWidgetItem(paramName)); DoubleParameterWidget *doubleparam = new DoubleParameterWidget(paramName, 0, - m_params.at(columnId).attribute("min").toDouble(), m_params.at(columnId).attribute("max").toDouble(), - m_params.at(columnId).attribute("default").toDouble(), comment, columnId, m_params.at(columnId).attribute("suffix"), m_params.at(columnId).attribute("decimals").toInt(), this); + m_params.at(columnId).attribute("min").toDouble(), m_params.at(columnId).attribute("max").toDouble(), + m_params.at(columnId).attribute("default").toDouble(), comment, columnId, m_params.at(columnId).attribute("suffix"), m_params.at(columnId).attribute("decimals").toInt(), this); connect(doubleparam, SIGNAL(valueChanged(double)), this, SLOT(slotAdjustKeyframeValue(double))); connect(this, SIGNAL(showComments(bool)), doubleparam, SLOT(slotShowComment(bool))); connect(doubleparam, SIGNAL(setInTimeline(int)), this, SLOT(slotUpdateVisibleParameter(int))); @@ -242,7 +242,7 @@ void KeyframeEdit::slotGenerateParams(int row, int column) for (int col = 0; col < keyframe_list->horizontalHeader()->count(); col++) { item = keyframe_list->item(row, col); - if (!item) continue; + if (!item) continue; int v = item->text().toInt(); if (v >= m_params.at(col).attribute("max").toInt()) item->setText(m_params.at(col).attribute("max")); @@ -384,7 +384,7 @@ void KeyframeEdit::slotAdjustKeyframeValue(double value) int KeyframeEdit::getPos(int row) { if (!keyframe_list->verticalHeaderItem(row)) - return 0; + return 0; if (KdenliveSettings::frametimecode()) return keyframe_list->verticalHeaderItem(row)->text().toInt(); else @@ -436,7 +436,7 @@ void KeyframeEdit::slotResetKeyframe() void KeyframeEdit::slotUpdateVisibleParameter(int id, bool update) { for (int i = 0; i < m_params.count(); ++i) { - m_params[i].setAttribute("intimeline", (i == id ? "1" : "0")); + m_params[i].setAttribute("intimeline", (i == id ? "1" : "0")); } for (int col = 0; col < keyframe_list->columnCount(); col++) { DoubleParameterWidget *doubleparam = static_cast (m_slidersLayout->itemAtPosition(col, 0)->widget());