]> git.sesse.net Git - kdenlive/commitdiff
preliminary work for keyframe editor
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 22 Jun 2009 11:07:49 +0000 (11:07 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 22 Jun 2009 11:07:49 +0000 (11:07 +0000)
svn path=/trunk/kdenlive/; revision=3618

src/CMakeLists.txt
src/effectstackedit.cpp
src/keyframeedit.cpp [new file with mode: 0644]
src/keyframeedit.h [new file with mode: 0644]

index 8b47796dea251d5ef57b065dc13f870a4ce39e21..38734140481fb9759360b77ad92a0db5832be1c1 100644 (file)
@@ -76,6 +76,7 @@ kde4_add_ui_files(kdenlive_UI
   widgets/cliptranscode_ui.ui
   widgets/geometryposition_ui.ui
   widgets/templateclip_ui.ui
+  widgets/keyframeeditor_ui.ui
 )
 
 set(kdenlive_SRCS
@@ -166,6 +167,7 @@ set(kdenlive_SRCS
   dvdwizardchapters.cpp
   documentvalidator.cpp
   cliptranscode.cpp
+  keyframeedit.cpp
 )
 
 add_definitions( ${KDE4_DEFINITIONS} )
index 1aeb089da7129189f87f9ad767850261f4f731bf..8216c59957241b915b8338741a9c91d15a4617a4 100644 (file)
 #include "ui_colorval_ui.h"
 #include "ui_positionval_ui.h"
 #include "ui_wipeval_ui.h"
+#include "ui_keyframeeditor_ui.h"
 #include "complexparameter.h"
 #include "geometryval.h"
+#include "keyframeedit.h"
 #include "effectslist.h"
 #include "kdenlivesettings.h"
 
@@ -233,6 +235,15 @@ void EffectStackEdit::transferParamDesc(const QDomElement& d, int in, int out)
             m_vbox->addWidget(geo);
             m_valueItems[paramName+"geometry"] = geo;
             m_items.append(geo);
+        } else if (type == "keyframe") {
+            // keyframe editor widget
+            KeyframeEdit *geo = new KeyframeEdit(100, KdenliveSettings::project_fps(), 0, 100);
+            //connect(geo, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
+            //connect(geo, SIGNAL(seekToPos(int)), this, SLOT(slotSeekToPos(int)));
+            //geo->setupParam(pa, minFrame, maxFrame);
+            m_vbox->addWidget(geo);
+            m_valueItems[paramName+"geometry"] = geo;
+            m_items.append(geo);
         } else if (type == "color") {
             Colorval *cval = new Colorval;
             cval->setupUi(toFillin);
diff --git a/src/keyframeedit.cpp b/src/keyframeedit.cpp
new file mode 100644 (file)
index 0000000..153a190
--- /dev/null
@@ -0,0 +1,35 @@
+/***************************************************************************
+                          geomeytrval.cpp  -  description
+                             -------------------
+    begin                : 03 Aug 2008
+    copyright            : (C) 2008 by Marco Gittler
+    email                : g.marco@freenet.de
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ ***************************************************************************/
+
+#include "keyframeedit.h"
+#include "kdenlivesettings.h"
+
+#include <KDebug>
+
+
+KeyframeEdit::KeyframeEdit(int maxFrame, double fps, int minValue, int maxValue, QWidget* parent) :
+        QWidget(parent),
+        m_fps(fps)
+{
+    m_ui.setupUi(this);
+    m_ui.keyframe_list->setHeaderLabels(QStringList() << i18n("Position") << i18n("Value"));
+    m_ui.button_add->setIcon(KIcon("document-new"));
+    m_ui.button_delete->setIcon(KIcon("edit-delete"));
+    setEnabled(false);
+}
+
+
diff --git a/src/keyframeedit.h b/src/keyframeedit.h
new file mode 100644 (file)
index 0000000..354184d
--- /dev/null
@@ -0,0 +1,52 @@
+/***************************************************************************
+                          keyframeedit.h  -  description
+                             -------------------
+    begin                : 22 Jun 2009
+    copyright            : (C) 2008 by Jean-Baptiste Mardelle
+    email                : jb@kdenlive.org
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ ***************************************************************************/
+
+#ifndef KEYFRAMEEDIT_H
+#define KEYFRAMEEDIT_H
+
+
+#include <QWidget>
+#include <QDomElement>
+
+
+#include "ui_keyframeeditor_ui.h"
+#include "definitions.h"
+#include "keyframehelper.h"
+
+//class QGraphicsScene;
+
+class KeyframeEdit : public QWidget
+{
+    Q_OBJECT
+public:
+    explicit KeyframeEdit(int maxFrame, double fps, int minValue, int maxValue, QWidget* parent = 0);
+
+private:
+    Ui::KeyframeEditor_UI m_ui;
+    double m_fps;
+
+public slots:
+
+
+private slots:
+
+signals:
+    void parameterChanged();
+    void seekToPos(int);
+};
+
+#endif