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

List:       kde-commits
Subject:    koffice
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2009-06-07 9:35:27
Message-ID: 1244367327.741413.31456.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 978458 by zachmann:

o merge notifyShapeChanged(KoShape * shape, ChangeType type) and
  shapeChanged(ChangeType type) to
  shapeChanged(ChangeType type, KoShape * shape = 0)



 M  +1 -1      libs/flake/KoConnectionShape.cpp  
 M  +3 -4      libs/flake/KoConnectionShape.h  
 M  +3 -4      libs/flake/KoShape.cpp  
 M  +1 -6      libs/flake/KoShape.h  
 M  +2 -2      plugins/artistictextshape/ArtisticTextShape.cpp  
 M  +2 -2      plugins/artistictextshape/ArtisticTextShape.h  


--- trunk/koffice/libs/flake/KoConnectionShape.cpp #978457:978458
@@ -484,7 +484,7 @@
     }
 }
 
-void KoConnectionShape::notifyShapeChanged(KoShape * shape, ChangeType type)
+void KoConnectionShape::shapeChanged(ChangeType type, KoShape * shape)
 {
     if (type == KoShape::Deleted) {
         if (shape == d->shape1)
--- trunk/koffice/libs/flake/KoConnectionShape.h #978457:978458
@@ -81,8 +81,8 @@
 
     /// Sets the connection type
     void setConnectionType(Type connectionType);
-protected:
 
+protected:
     /// reimplemented
     void moveHandleAction(int handleId, const QPointF & point, Qt::KeyboardModifiers \
modifiers = Qt::NoModifier);  
@@ -104,11 +104,10 @@
     /// Returns perpendicular direction from given point p1 and direction d1 toward \
                point p2
     QPointF perpendicularDirection(const QPointF &p1, const QPointF &d1, const \
QPointF &p2);  
-private:
-
     // reimplemented
-    virtual void notifyShapeChanged(KoShape * shape, ChangeType type);
+    virtual void shapeChanged(ChangeType type, KoShape * shape);
 
+private:
     qreal scalarProd(const QPointF &v1, const QPointF &v2);
     qreal crossProd(const QPointF &v1, const QPointF &v2);
 
--- trunk/koffice/libs/flake/KoShape.cpp #978457:978458
@@ -112,7 +112,7 @@
             parent->model()->childChanged(me, type);
         me->shapeChanged(type);
         foreach(KoShape * shape, dependees)
-            shape->notifyShapeChanged(me, type);
+            shape->shapeChanged(type, me);
     }
 
     QSizeF size; // size in pt
@@ -1266,10 +1266,10 @@
     return d->dependees.contains(shape);
 }
 
-void KoShape::notifyShapeChanged(KoShape * shape, ChangeType type)
+void KoShape::shapeChanged(ChangeType type, KoShape *shape)
 {
-    Q_UNUSED(shape);
     Q_UNUSED(type);
+    Q_UNUSED(shape);
 }
 
 void KoShape::notifyChangedShape(ChangeType type)
@@ -1277,7 +1277,6 @@
     d->shapeChanged(type);
 }
 
-
 KoSnapData KoShape::snapData() const
 {
     return KoSnapData();
--- trunk/koffice/libs/flake/KoShape.h #978457:978458
@@ -877,13 +877,8 @@
      * This is called whenever the shape, position rotation or scale properties were \
                altered.
      * @param type an indicator which type was changed.
      */
-    virtual void shapeChanged(ChangeType type) {
-        Q_UNUSED(type);
-    }
+    virtual void shapeChanged(ChangeType type, KoShape *shape = 0);
 
-    /// This is called whenever a shape this shape depends on has changed
-    virtual void notifyShapeChanged(KoShape * shape, ChangeType type);
-
     /**
      * Set the property collision detection.
      * Setting this to true will result in calls to shapeChanged() with the \
                CollisionDetected
--- trunk/koffice/plugins/artistictextshape/ArtisticTextShape.cpp #978457:978458
@@ -602,9 +602,9 @@
     }
 }
 
-void ArtisticTextShape::notifyShapeChanged( KoShape * shape, ChangeType type )
+void ArtisticTextShape::shapeChanged(ChangeType type, KoShape * shape)
 {
-    if( shape == m_path )
+    if( m_path && shape == m_path )
     {
         if( type == KoShape::Deleted )
         {
--- trunk/koffice/plugins/artistictextshape/ArtisticTextShape.h #978457:978458
@@ -130,10 +130,10 @@
     /// Gets the extents of the char with the given index
     void getCharExtentsAt( unsigned int charNum, QRectF &extents ) const;
 
-private:
     /// reimplemented from KoShape
-    virtual void notifyShapeChanged( KoShape * shape, ChangeType type );
+    virtual void shapeChanged(ChangeType type, KoShape * shape);
 
+private:
     void updateSizeAndPosition( bool global = false );
     void cacheGlyphOutlines();
     bool pathHasChanged() const;


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

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