[vlmc-devel] commit: UndoStack: HACKING ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Mon Oct 11 00:07:23 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sun Oct 10 21:16:45 2010 +0200| [aced69ce9372fa06e631e3735ce62018bd3ba02e] | committer: Hugo Beauzée-Luyssen 

UndoStack: HACKING

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=aced69ce9372fa06e631e3735ce62018bd3ba02e
---

 src/Gui/UndoStack.cpp |   37 ++++++++++++++++++++++---------------
 src/Gui/UndoStack.h   |    6 +++---
 2 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/src/Gui/UndoStack.cpp b/src/Gui/UndoStack.cpp
index 7a6ea88..4c15b42 100644
--- a/src/Gui/UndoStack.cpp
+++ b/src/Gui/UndoStack.cpp
@@ -21,15 +21,14 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#include <QUndoStack>
-#include <QUndoCommand>
-
 #include "UndoStack.h"
 #include "project/GuiProjectManager.h"
 #include "SettingsManager.h"
-#include "KeyboardShortcutHelper.h"
 
-UndoStack::UndoStack( QWidget* parent ) : QUndoView( parent )
+#include <QUndoStack>
+#include <QUndoCommand>
+
+UndoStack::UndoStack( QWidget *parent ) : QUndoView( parent )
 {
     setEmptyLabel( tr( "Nothing to undo" ) );
 
@@ -40,48 +39,56 @@ UndoStack::UndoStack( QWidget* parent ) : QUndoView( parent )
     connect( GUIProjectManager::getInstance(), SIGNAL( projectSaved() ),
              m_undoStack, SLOT( setClean() ) );
 
-    connect( m_undoStack, SIGNAL( canRedoChanged(bool) ), this, SIGNAL( canRedoChanged(bool) ) );
-    connect( m_undoStack, SIGNAL( canUndoChanged(bool) ), this, SIGNAL( canUndoChanged(bool) ) );
+    connect( m_undoStack, SIGNAL( canRedoChanged( bool ) ), this, SIGNAL( canRedoChanged( bool ) ) );
+    connect( m_undoStack, SIGNAL( canUndoChanged( bool ) ), this, SIGNAL( canUndoChanged( bool ) ) );
 
     connect( GUIProjectManager::getInstance(), SIGNAL( projectClosed() ), this, SLOT( clear() ) );
 }
 
-void    UndoStack::push( QUndoCommand* command )
+void
+UndoStack::push( QUndoCommand *command )
 {
     m_undoStack->push( command );
 }
 
-void    UndoStack::beginMacro( const QString& text )
+void
+UndoStack::beginMacro( const QString& text )
 {
     m_undoStack->beginMacro( text );
 }
 
-void    UndoStack::endMacro()
+void
+UndoStack::endMacro()
 {
     m_undoStack->endMacro();
 }
 
-bool    UndoStack::canUndo()
+bool
+UndoStack::canUndo()
 {
     return m_undoStack->canUndo();
 }
 
-bool    UndoStack::canRedo()
+bool
+UndoStack::canRedo()
 {
     return m_undoStack->canRedo();
 }
 
-void    UndoStack::clear()
+void
+UndoStack::clear()
 {
     m_undoStack->clear();
 }
 
-void    UndoStack::undo()
+void
+UndoStack::undo()
 {
     m_undoStack->undo();
 }
 
-void    UndoStack::redo()
+void
+UndoStack::redo()
 {
     m_undoStack->redo();
 }
diff --git a/src/Gui/UndoStack.h b/src/Gui/UndoStack.h
index e473f0c..865be30 100644
--- a/src/Gui/UndoStack.h
+++ b/src/Gui/UndoStack.h
@@ -37,8 +37,8 @@ class UndoStack : public QUndoView, public QSingleton<UndoStack>
     Q_DISABLE_COPY( UndoStack );
 
     public:
-        void        push( QUndoCommand* command );
-        void        beginMacro( const QString& text );
+        void        push( QUndoCommand *command );
+        void        beginMacro( const QString &text );
         void        endMacro();
         bool        canUndo();
         bool        canRedo();
@@ -46,7 +46,7 @@ class UndoStack : public QUndoView, public QSingleton<UndoStack>
     private:
         UndoStack( QWidget* parent );
 
-        QUndoStack*                 m_undoStack;
+        QUndoStack*     m_undoStack;
 
     public slots:
         void            clear();



More information about the Vlmc-devel mailing list