layout->addWidget(m_commentLabel, 1, 0, 1, -1);
}
m_dragVal->setValue(value);
- connect(m_dragVal, SIGNAL(valueChanged(int, bool)), this, SLOT(slotSetValue(int, bool)));
+ connect(m_dragVal, SIGNAL(valueChanged(double, bool)), this, SLOT(slotSetValue(double, bool)));
connect(m_dragVal, SIGNAL(inTimeline(int)), this, SIGNAL(setInTimeline(int)));
}
m_dragVal->setSpinSize(width);
}
-void DoubleParameterWidget::setValue(int value)
+void DoubleParameterWidget::setValue(double value)
{
m_dragVal->blockSignals(true);
m_dragVal->setValue(value);
m_dragVal->blockSignals(false);
}
-void DoubleParameterWidget::slotSetValue(int value, bool final)
+void DoubleParameterWidget::slotSetValue(double value, bool final)
{
+ kDebug()<<"VALUE CHANGED: "<<value;
if (final) {
emit valueChanged(value);
}
}
-int DoubleParameterWidget::getValue()
+double DoubleParameterWidget::getValue()
{
return m_dragVal->value();
}
DoubleParameterWidget(const QString &name, double value, double min, double max, double defaultValue, const QString &comment, int id, const QString suffix = QString(), int decimals = 0, QWidget* parent = 0);
/** @brief Gets the parameter's value. */
- int getValue();
+ double getValue();
/** @brief Set the inTimeline property to paint widget with other colors. */
void setInTimelineProperty(bool intimeline);
/** @brief Returns minimum size for QSpinBox, used to set all spinboxes to the same width. */
public slots:
/** @brief Sets the value to @param value. */
- void setValue(int value);
+ void setValue(double value);
/** @brief Sets value to m_default. */
void slotReset();
/** @brief Shows/Hides the comment label. */
void slotShowComment(bool show);
- void slotSetValue(int value, bool final);
+ void slotSetValue(double value, bool final);
private:
QLabel *m_name;
QLabel *m_commentLabel;
signals:
- void valueChanged(int);
+ void valueChanged(double);
/** @brief User wants to see this parameter in timeline. */
void setInTimeline(int);
};
void slotReset();
signals:
- void valueChanged(int value, bool final = true);
void valueChanged(double value, bool final = true);
void inTimeline(int);
pa.attribute("default").toDouble(), comment, -1, pa.attribute("suffix"), pa.attribute("decimals").toInt(), this);
m_vbox->addWidget(doubleparam);
m_valueItems[paramName] = doubleparam;
- connect(doubleparam, SIGNAL(valueChanged(int)), this, SLOT(collectAllParameters()));
+ connect(doubleparam, SIGNAL(valueChanged(double)), this, SLOT(collectAllParameters()));
connect(this, SIGNAL(showComments(bool)), doubleparam, SLOT(slotShowComment(bool)));
} else if (type == "list") {
Listval *lsval = new Listval;
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);
- connect(doubleparam, SIGNAL(valueChanged(int)), this, SLOT(slotAdjustKeyframeValue(int)));
+ 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)));
m_slidersLayout->addWidget(doubleparam, columnId, 0);
continue;
doubleparam->blockSignals(true);
if (keyframe_list->item(item->row(), col)) {
- doubleparam->setValue(keyframe_list->item(item->row(), col)->text().toInt());
+ doubleparam->setValue(keyframe_list->item(item->row(), col)->text().toDouble());
} else {
kDebug() << "Null pointer exception caught: http://www.kdenlive.org/mantis/view.php?id=1771";
}
emit seekToPos(value - m_min);
}
-void KeyframeEdit::slotAdjustKeyframeValue(int value)
+void KeyframeEdit::slotAdjustKeyframeValue(double value)
{
Q_UNUSED(value)
DoubleParameterWidget *doubleparam = static_cast <DoubleParameterWidget*>(m_slidersLayout->itemAtPosition(col, 0)->widget());
if (!doubleparam)
continue;
- int val = doubleparam->getValue();
+ double val = doubleparam->getValue();
QTableWidgetItem *nitem = keyframe_list->item(item->row(), col);
- if (nitem && nitem->text().toInt() != val)
+ if (nitem && nitem->text().toDouble() != val)
nitem->setText(QString::number(val));
}
//keyframe_list->item(item->row() - 1, item->column());
void slotAddKeyframe();
void slotGenerateParams(int row, int column);
void slotAdjustKeyframePos(int value);
- void slotAdjustKeyframeValue(int value);
+ void slotAdjustKeyframeValue(double value);
/** @brief Turns the seek to keyframe position setting on/off.
* @param seek true = seeking on */
void slotSetSeeking(bool seek);
// create filter
QString tag = params.paramValue("tag");
kDebug() << " / / INSERTING EFFECT: " << tag << ", REGI: " << region;
- if (tag.startsWith("ladspa")) tag = "ladspa";
char *filterTag = qstrdup(tag.toUtf8().constData());
char *filterId = qstrdup(params.paramValue("id").toUtf8().constData());
QHash<QString, QString>::Iterator it;