+ keyframe_list->blockSignals(true);
+ keyframe_list->clear();
+ int col = keyframe_list->columnCount();
+ QDomNode na = m_params.at(0).firstChildElement("name");
+ QString paramName = i18n(na.toElement().text().toUtf8().data());
+ kDebug() << " INSERT COL: " << col << ", " << paramName;
+ keyframe_list->insertColumn(col);
+ keyframe_list->setHorizontalHeaderItem(col, new QTableWidgetItem(paramName));
+ m_slidersLayout = new QGridLayout(param_sliders);
+
+ DoubleParameterWidget *doubleparam = new DoubleParameterWidget(paramName, 0,
+ m_params.at(0).attribute("min").toInt(), m_params.at(0).attribute("max").toInt(),
+ m_params.at(0).attribute("default").toInt(), m_params.at(0).attribute("suffix"), this);
+ connect(doubleparam, SIGNAL(valueChanged(int)), this, SLOT(slotAdjustKeyframeValue(int)));
+ m_slidersLayout->addWidget(doubleparam, 0, 0);
+
+ keyframe_list->setSelectionBehavior(QAbstractItemView::SelectRows);
+ keyframe_list->setSelectionMode(QAbstractItemView::SingleSelection);
+
+ QStringList frames = m_params.at(0).attribute("keyframes").split(";", QString::SkipEmptyParts);
+ setEnabled(frames.count() > 0);
+ for (int i = 0; i < frames.count(); i++) {
+ keyframe_list->insertRow(i);
+ int currentpos = frames.at(i).section(':', 0, 0).toInt();
+ keyframe_list->setVerticalHeaderItem(i, new QTableWidgetItem(getPosString(currentpos)));
+ keyframe_list->setItem(i, col, new QTableWidgetItem(frames.at(i).section(':', 1, 1)));
+ if ((m_active_keyframe > -1) && (m_active_keyframe == currentpos)) {
+ keyframe_list->setCurrentCell(i, 0);
+ keyframe_list->selectRow(i);
+ }
+ //item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled);