[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/libs/flake
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2007-01-06 5:18:24
Message-ID: 1168060704.517658.27312.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 620457 by zachmann:

o make it possible to give a QUndoCommand as parent


 M  +7 -8      KoShapeController.cpp  
 M  +3 -3      KoShapeController.h  


--- trunk/koffice/libs/flake/KoShapeController.cpp #620456:620457
@@ -42,7 +42,7 @@
 {
 }
 
-QUndoCommand* KoShapeController::addShape( KoShape *shape )
+QUndoCommand* KoShapeController::addShape( KoShape *shape, QUndoCommand \
*parent )  {
     Q_ASSERT(m_canvas->shapeManager());
 
@@ -99,16 +99,15 @@
         shape->setParent( \
m_canvas->shapeManager()->selection()->activeLayer() );  }
 
-    KoShapeCreateCommand *cmd = new KoShapeCreateCommand( \
                m_shapeController, shape );
-    return cmd;
+    return new KoShapeCreateCommand( m_shapeController, shape, parent );
 }
 
-QUndoCommand* KoShapeController::removeShape( KoShape *shape )
+QUndoCommand* KoShapeController::removeShape( KoShape *shape, QUndoCommand \
*parent  )  {
-    KoShapeDeleteCommand *cmd = new KoShapeDeleteCommand( \
                m_shapeController, shape );
-    return cmd;
+    return new KoShapeDeleteCommand( m_shapeController, shape, parent );
 }
 
-QUndoCommand* KoShapeController::removeShapes( const QList<KoShape*> \
                &shapes) {
-    return new KoShapeDeleteCommand( m_shapeController, shapes );
+QUndoCommand* KoShapeController::removeShapes( const QList<KoShape*> \
&shapes, QUndoCommand *parent ) +{
+    return new KoShapeDeleteCommand( m_shapeController, shapes, parent );
 }
--- trunk/koffice/libs/flake/KoShapeController.h #620456:620457
@@ -60,7 +60,7 @@
      * @return command which will insert the shape into the document or 0 \
                if the 
      *         insertion was canceled. The command is not yet executed.
      */
-    QUndoCommand* addShape( KoShape *shape );
+    QUndoCommand* addShape( KoShape *shape, QUndoCommand *parent = 0 );
 
     /**
      * @brief Remove a shape from the document.
@@ -70,7 +70,7 @@
      * @return command which will remove the shape from the document.
      *         The command is not yet executed.
      */
-    QUndoCommand* removeShape( KoShape *shape );
+    QUndoCommand* removeShape( KoShape *shape, QUndoCommand *parent = 0 );
 
     /**
      * Remove a shape from the document.
@@ -80,7 +80,7 @@
      * @return command which will remove the shape from the document.
      *         The command is not yet executed.
      */
-    QUndoCommand* removeShapes( const QList<KoShape*> &shapes );
+    QUndoCommand* removeShapes( const QList<KoShape*> &shapes, \
QUndoCommand *parent = 0 );  
     /**
      * @brief Set the KoShapeControllerBase used to add/remove shapes


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic