1 /***************************************************************************
2 geomeytrval.cpp - description
5 copyright : (C) 2008 by Marco Gittler
6 email : g.marco@freenet.de
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
18 #include "keyframeedit.h"
19 #include "kdenlivesettings.h"
24 KeyframeEdit::KeyframeEdit(Timecode tc, QWidget* parent) :
29 m_ui.keyframe_list->setHeaderLabels(QStringList() << i18n("Position") << i18n("Value"));
30 m_ui.button_add->setIcon(KIcon("document-new"));
31 m_ui.button_delete->setIcon(KIcon("edit-delete"));
35 void KeyframeEdit::setupParam(int maxFrame, int minValue, int maxValue, QString keyframes)
37 m_maxFrame = maxFrame;
40 m_ui.keyframe_list->clear();
41 QStringList frames = keyframes.split(";");
42 for (int i = 0; i < frames.count(); i++) {
43 QString framePos = m_timecode.getTimecodeFromFrames(frames.at(i).section(':', 0, 0).toInt());
44 m_ui.keyframe_list->addTopLevelItem(new QTreeWidgetItem(QStringList() << framePos << frames.at(i).section(':', 1, 1)));