]> git.sesse.net Git - kdenlive/commitdiff
Fix includes/remove not necessary virtual keyword. Fix indent
authorMontel Laurent <montel@kde.org>
Thu, 30 May 2013 07:21:57 +0000 (09:21 +0200)
committerMontel Laurent <montel@kde.org>
Thu, 30 May 2013 07:21:57 +0000 (09:21 +0200)
12 files changed:
src/commands/addtrackcommand.cpp
src/commands/addtrackcommand.h
src/commands/addtransitioncommand.cpp
src/commands/addtransitioncommand.h
src/commands/changecliptypecommand.cpp
src/commands/changecliptypecommand.h
src/commands/changeeffectstatecommand.cpp
src/commands/changeeffectstatecommand.h
src/commands/changespeedcommand.h
src/commands/configtrackscommand.h
src/commands/editclipcommand.cpp
src/commands/editclipcommand.h

index 135139f5ea463cfdaac44d89d3df087c0a78dafb..f36d220cf967c7623752505f3f2fd140cfb6e9b2 100644 (file)
@@ -22,7 +22,7 @@
 #include "customtrackview.h"
 
 #include <KLocale>
-
+#include <KDebug>
 AddTrackCommand::AddTrackCommand(CustomTrackView *view, int ix, const TrackInfo &info, bool addTrack, QUndoCommand * parent) :
         QUndoCommand(parent),
         m_view(view),
@@ -30,8 +30,10 @@ AddTrackCommand::AddTrackCommand(CustomTrackView *view, int ix, const TrackInfo
         m_addTrack(addTrack),
         m_info(info)
 {
-    if (addTrack) setText(i18n("Add track"));
-    else setText(i18n("Delete track"));
+    if (addTrack)
+        setText(i18n("Add track"));
+    else
+        setText(i18n("Delete track"));
 }
 
 
@@ -39,14 +41,18 @@ AddTrackCommand::AddTrackCommand(CustomTrackView *view, int ix, const TrackInfo
 void AddTrackCommand::undo()
 {
 // kDebug()<<"----  undoing action";
-    if (m_addTrack) m_view->removeTrack(m_ix);
-    else m_view->addTrack(m_info, m_ix);
+    if (m_addTrack)
+        m_view->removeTrack(m_ix);
+    else
+        m_view->addTrack(m_info, m_ix);
 }
 // virtual
 void AddTrackCommand::redo()
 {
     kDebug() << "----  redoing action";
-    if (m_addTrack) m_view->addTrack(m_info, m_ix);
-    else m_view->removeTrack(m_ix);
+    if (m_addTrack)
+        m_view->addTrack(m_info, m_ix);
+    else
+        m_view->removeTrack(m_ix);
 }
 
index acb4f4801bca063439a7824656114531088501c7..3e36dbd16183647163997954804c4ecbae4f8a01 100644 (file)
 #define ADDTRACKCOMMAND_H
 
 #include <QUndoCommand>
-#include <QGraphicsView>
-#include <QPointF>
-
-#include <KDebug>
 #include "definitions.h"
 
 class CustomTrackView;
@@ -34,8 +30,8 @@ class AddTrackCommand : public QUndoCommand
 {
 public:
     AddTrackCommand(CustomTrackView *view, int ix, const TrackInfo &info, bool addTrack, QUndoCommand * parent = 0);
-    virtual void undo();
-    virtual void redo();
+    void undo();
+    void redo();
 
 private:
     CustomTrackView *m_view;
index 6e372bb26af5c0b9c6eab00b0976e988afec6eca..8a8002f2b077bf2a9026bdcf26b75489ab5f517c 100644 (file)
@@ -30,27 +30,36 @@ AddTransitionCommand::AddTransitionCommand(CustomTrackView *view, const ItemInfo
         m_doIt(doIt),
         m_remove(remove)
 {
-    if (m_remove) setText(i18n("Delete transition from clip"));
-    else setText(i18n("Add transition to clip"));
+    if (m_remove)
+        setText(i18n("Delete transition from clip"));
+    else
+        setText(i18n("Add transition to clip"));
+
     if (parent) {
         // command has a parent, so there are several operations ongoing, do not refresh monitor
         m_refresh = false;
-    } else m_refresh = true;
+    } else {
+        m_refresh = true;
+    }
 }
 
 
 // virtual
 void AddTransitionCommand::undo()
 {
-    if (m_remove) m_view->addTransition(m_info, m_track, m_params, m_refresh);
-    else m_view->deleteTransition(m_info, m_track, m_params, m_refresh);
+    if (m_remove)
+        m_view->addTransition(m_info, m_track, m_params, m_refresh);
+    else
+        m_view->deleteTransition(m_info, m_track, m_params, m_refresh);
 }
 // virtual
 void AddTransitionCommand::redo()
 {
     if (m_doIt) {
-        if (m_remove) m_view->deleteTransition(m_info, m_track, m_params, m_refresh);
-        else m_view->addTransition(m_info, m_track, m_params, m_refresh);
+        if (m_remove)
+            m_view->deleteTransition(m_info, m_track, m_params, m_refresh);
+        else
+            m_view->addTransition(m_info, m_track, m_params, m_refresh);
     }
     m_doIt = true;
 }
index 5531b79cee6895585ab49a4d27260966adae0d15..b24da3b393e8bb234cb7d8fe6a3d3d143141f9f4 100644 (file)
 #define ADDTRANSITIONCOMMAND_H
 
 #include <QUndoCommand>
-#include <QGraphicsView>
-#include <QPointF>
 #include <QDomElement>
-#include <KDebug>
 
 #include "gentime.h"
 #include "definitions.h"
@@ -33,8 +30,8 @@ class AddTransitionCommand : public QUndoCommand
 {
 public:
     AddTransitionCommand(CustomTrackView *view, const ItemInfo &info, int transitiontrack, const QDomElement &params, bool remove, bool doIt, QUndoCommand * parent = 0);
-    virtual void undo();
-    virtual void redo();
+    void undo();
+    void redo();
 
 private:
     CustomTrackView *m_view;
index 5df821af5b401eb1b33c6342df45d2ad1008b7d5..61932cca9ad5103cd9bfb5fe25327b98d13b791c 100644 (file)
@@ -22,6 +22,7 @@
 #include "customtrackview.h"
 
 #include <KLocale>
+#include <KDebug>
 
 ChangeClipTypeCommand::ChangeClipTypeCommand(CustomTrackView *view, const int track, const GenTime &pos, bool videoOnly, bool audioOnly, bool originalVideo, bool originalAudio, QUndoCommand * parent) :
         QUndoCommand(parent),
index c9cc82cbe9afc7b7f38cc9b3d707da5a4c389eed..98eb484e0bc0f4eb425f78a426acc8aebdee76c6 100644 (file)
 #define CHANGECLIPTYPECOMMAND_H
 
 #include <QUndoCommand>
-#include <QGraphicsView>
-#include <QPointF>
-
-#include <KDebug>
 #include "definitions.h"
 
 class GenTime;
@@ -35,8 +31,8 @@ class ChangeClipTypeCommand : public QUndoCommand
 {
 public:
     ChangeClipTypeCommand(CustomTrackView *view, const int track, const GenTime &pos, bool videoOnly, bool audioOnly, bool originalVideo, bool originalAudio, QUndoCommand * parent = 0);
-    virtual void undo();
-    virtual void redo();
+    void undo();
+    void redo();
 
 private:
     CustomTrackView *m_view;
index 49269f84004084b33d40d134a957e3ff12ade2c4..adf7884aa4154a90e237c4573c157ea2e0a4c97e 100644 (file)
 #include <KLocale>
 
 ChangeEffectStateCommand::ChangeEffectStateCommand(CustomTrackView *view, const int track, const GenTime& pos, const QList <int>& effectIndexes, bool disable, bool refreshEffectStack, bool doIt, QUndoCommand *parent) :
-        QUndoCommand(parent),
-        m_view(view),
-        m_track(track),
-        m_effectIndexes(effectIndexes),
-        m_pos(pos),
-        m_disable(disable),
-        m_doIt(doIt),
-        m_refreshEffectStack(refreshEffectStack)
+    QUndoCommand(parent),
+    m_view(view),
+    m_track(track),
+    m_effectIndexes(effectIndexes),
+    m_pos(pos),
+    m_disable(disable),
+    m_doIt(doIt),
+    m_refreshEffectStack(refreshEffectStack)
 {
-    if (disable) 
-       setText(i18np("Disable effect", "Disable effects", effectIndexes.count()));
+    if (disable)
+        setText(i18np("Disable effect", "Disable effects", effectIndexes.count()));
     else
-       setText(i18np("Enable effect", "Enable effects", effectIndexes.count()));
+        setText(i18np("Enable effect", "Enable effects", effectIndexes.count()));
 }
 
 // virtual
@@ -47,7 +47,8 @@ void ChangeEffectStateCommand::undo()
 // virtual
 void ChangeEffectStateCommand::redo()
 {
-    if (m_doIt) m_view->updateEffectState(m_track, m_pos, m_effectIndexes, m_disable, m_refreshEffectStack);
+    if (m_doIt)
+        m_view->updateEffectState(m_track, m_pos, m_effectIndexes, m_disable, m_refreshEffectStack);
     m_doIt = true;
     m_refreshEffectStack = true;
 }
index f92517be4cca5ae02f18df02cc01eb2a967e053b..6dd60e2adc26b227c9f4def521ae0aa0beab3a7d 100644 (file)
@@ -22,9 +22,7 @@
 #define CHANGEEFFECTSTATECOMMAND_H
 
 #include <QUndoCommand>
-#include <KDebug>
 #include <gentime.h>
-#include <QDomElement>
 
 class CustomTrackView;
 
@@ -33,8 +31,8 @@ class ChangeEffectStateCommand : public QUndoCommand
 public:
     ChangeEffectStateCommand(CustomTrackView *view, const int track, const GenTime &pos, const QList <int>& effectIndexes, bool disable, bool refreshEffectStack, bool doIt, QUndoCommand *parent = 0);
 
-    virtual void undo();
-    virtual void redo();
+    void undo();
+    void redo();
 
 private:
     CustomTrackView *m_view;
index 4640f15f1ba4b4214d7231c19265485fb2af0bbf..e45f8a802cdaf59901cca0ef1d85cf8b95447315 100644 (file)
@@ -22,8 +22,6 @@
 #define CHANGESPEEDCOMMAND_H
 
 #include <QUndoCommand>
-#include <QGraphicsView>
-#include <KDebug>
 
 #include "gentime.h"
 #include "definitions.h"
@@ -34,8 +32,8 @@ class ChangeSpeedCommand : public QUndoCommand
 {
 public:
     ChangeSpeedCommand(CustomTrackView *view, const ItemInfo &info, const ItemInfo &speedIndependantInfo, double old_speed, double new_speed, int old_strobe, int new_strobe, const QString &clipId, QUndoCommand * parent = 0);
-    virtual void undo();
-    virtual void redo();
+    void undo();
+    void redo();
 
 private:
     CustomTrackView *m_view;
index 6dd0a2edadaddd56a37e9a4cb877c37d17257606..37b381eb4ed07a015b3ab1f6607df1b8024bf8b6 100644 (file)
@@ -21,8 +21,6 @@
 #define CONFIGTRACKSCOMMAND_H
 
 #include <QUndoCommand>
-#include <QGraphicsView>
-#include <QPointF>
 
 #include "definitions.h"
 
@@ -32,8 +30,8 @@ class ConfigTracksCommand : public QUndoCommand
 {
 public:
     ConfigTracksCommand(CustomTrackView *view, const QList <TrackInfo> &oldInfos, const QList <TrackInfo> &newInfos, QUndoCommand * parent = 0);
-    virtual void undo();
-    virtual void redo();
+    void undo();
+    void redo();
 
 private:
     CustomTrackView *m_view;
index 153cac3fbfd9584bc5c70c6bade2c24a8a3c2206..96c35b9ae704f83901370e7c80d86861fc69ec5b 100644 (file)
@@ -21,6 +21,7 @@
 #include "projectlist.h"
 
 #include <KLocale>
+#include <KDebug>
 
 EditClipCommand::EditClipCommand(ProjectList *list, const QString &id, const QMap <QString, QString> &oldparams, const QMap <QString, QString> &newparams, bool doIt, QUndoCommand * parent) :
         QUndoCommand(parent),
@@ -44,7 +45,8 @@ void EditClipCommand::undo()
 void EditClipCommand::redo()
 {
     kDebug() << "----  redoing action";
-    if (m_doIt) m_list->slotUpdateClipProperties(m_id, m_newparams);
+    if (m_doIt)
+        m_list->slotUpdateClipProperties(m_id, m_newparams);
     m_doIt = true;
 }
 
index 423f629884062b054946d0bf8038d573c7ffd7f2..3f751a170a642262f793ee27db8e67ae09554070 100644 (file)
@@ -22,8 +22,7 @@
 #define EDITCLIPCOMMAND_H
 
 #include <QUndoCommand>
-#include <KDebug>
-#include <QDomElement>
+#include <QMap>
 
 class ProjectList;
 
@@ -32,8 +31,8 @@ class EditClipCommand : public QUndoCommand
 public:
     EditClipCommand(ProjectList *list, const QString &id, const QMap <QString, QString> &oldparams, const QMap <QString, QString> &newparams, bool doIt, QUndoCommand * parent = 0);
 
-    virtual void undo();
-    virtual void redo();
+    void undo();
+    void redo();
 
 private:
     ProjectList *m_list;