]> git.sesse.net Git - kdenlive/blobdiff - src/jogaction.cpp
Integrate with the required MLT hooks for getting Movit to work.
[kdenlive] / src / jogaction.cpp
index 646cc9ffc99dba40101bffa5336b8bec7fe18327..0fb5862296724148f25fb468d6d98f2d21a18c73 100644 (file)
@@ -24,7 +24,8 @@
 #include <klocalizedstring.h>
 
 // TODO(fleury): this should probably be a user configuration parameter (at least the max speed).
-const double SPEEDS[] = {0.0, 0.5, 1.0, 2.0, 4.0, 8.0, 16.0, 32.0};
+//const double SPEEDS[] = {0.0, 0.5, 1.0, 2.0, 4.0, 8.0, 16.0, 32.0};
+const double SPEEDS[] = {0.0, 1.0, 2.0, 4.0, 5.0, 8.0, 16.0, 60.0};
 const size_t SPEEDS_SIZE = sizeof(SPEEDS) / sizeof(double);
 
 JogShuttleAction::JogShuttleAction (const JogShuttle* jogShuttle, const QStringList& actionMap, QObject * parent)
@@ -34,19 +35,19 @@ JogShuttleAction::JogShuttleAction (const JogShuttle* jogShuttle, const QStringL
     if (m_actionMap.size() == 0)
       m_actionMap.append("monitor_pause");
     
-    connect(m_jogShuttle, SIGNAL( jogBack() ), this, SLOT( slotJogBack() ));
-    connect(m_jogShuttle, SIGNAL( jogForward() ), this, SLOT( slotJogForward() ));
-    connect(m_jogShuttle, SIGNAL( shuttlePos ( int ) ), this, SLOT( slotShuttlePos ( int ) ));
-    connect(m_jogShuttle, SIGNAL( button ( int ) ), this, SLOT( slotButton ( int ) ));
-    //for (int i = 0; i < actionMap.size(); i++) fprintf(stderr, "button #%d -> action '%s'\n", i, actionMap[i].toAscii().constData());  //DBG
+    connect(m_jogShuttle, SIGNAL(jogBack()), this, SLOT(slotJogBack()));
+    connect(m_jogShuttle, SIGNAL(jogForward()), this, SLOT(slotJogForward()));
+    connect(m_jogShuttle, SIGNAL(shuttlePos(int)), this, SLOT(slotShuttlePos(int)));
+    connect(m_jogShuttle, SIGNAL(button(int)), this, SLOT(slotButton(int)));
+    //for (int i = 0; i < actionMap.size(); ++i) fprintf(stderr, "button #%d -> action '%s'\n", i, actionMap[i].toAscii().constData());  //DBG
 }
 
 JogShuttleAction::~JogShuttleAction()
 {
-    disconnect(m_jogShuttle, SIGNAL( jogBack() ), this, SLOT( slotJogBack() ));
-    disconnect(m_jogShuttle, SIGNAL( jogForward() ), this, SLOT( slotJogForward() ));
-    disconnect(m_jogShuttle, SIGNAL( shuttlePos ( int ) ), this, SLOT( slotShuttlePos ( int ) ));
-    disconnect(m_jogShuttle, SIGNAL( button ( int ) ), this, SLOT( slotButton ( int ) ));
+    disconnect(m_jogShuttle, SIGNAL(jogBack()), this, SLOT(slotJogBack()));
+    disconnect(m_jogShuttle, SIGNAL(jogForward()), this, SLOT(slotJogForward()));
+    disconnect(m_jogShuttle, SIGNAL(shuttlePos(int)), this, SLOT(slotShuttlePos(int)));
+    disconnect(m_jogShuttle, SIGNAL(button(int)), this, SLOT(slotButton(int)));
 }
 
 void JogShuttleAction::slotJogBack()
@@ -74,7 +75,7 @@ void JogShuttleAction::slotShuttlePos(int shuttle_pos)
 
 void JogShuttleAction::slotButton(int button_id)
 {
-    if (button_id >= m_actionMap.size() || m_actionMap[button_id] == "") {
+    if (button_id >= m_actionMap.size() || m_actionMap[button_id].isEmpty()) {
         // TODO(fleury): Shoudl this go to the status bar to inform the user ?
         fprintf(stderr, "Button %d has no action\n", button_id);
         return;
@@ -82,3 +83,5 @@ void JogShuttleAction::slotButton(int button_id)
     //fprintf(stderr, "Button #%d maps to action '%s'\n", button_id, m_actionMap[button_id].toAscii().constData()); //DBG
     emit action(m_actionMap[button_id]);
 }
+
+#include "jogaction.moc"