Commit f1efc088 authored by Thorsten Zachmann's avatar Thorsten Zachmann

o merge notifyShapeChanged(KoShape * shape, ChangeType type) and

  shapeChanged(ChangeType type) to
  shapeChanged(ChangeType type, KoShape * shape = 0)


svn path=/trunk/koffice/; revision=978458
parent 7a7be964
......@@ -484,7 +484,7 @@ void KoConnectionShape::shapeChanged(ChangeType type)
}
}
void KoConnectionShape::notifyShapeChanged(KoShape * shape, ChangeType type)
void KoConnectionShape::shapeChanged(ChangeType type, KoShape * shape)
{
if (type == KoShape::Deleted) {
if (shape == d->shape1)
......
......@@ -81,8 +81,8 @@ public:
/// 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 @@ protected:
/// 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);
......
......@@ -112,7 +112,7 @@ public:
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 @@ bool KoShape::hasDependee(KoShape * shape) const
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 @@ void KoShape::notifyChangedShape(ChangeType type)
d->shapeChanged(type);
}
KoSnapData KoShape::snapData() const
{
return KoSnapData();
......
......@@ -877,12 +877,7 @@ protected:
* 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);
}
/// This is called whenever a shape this shape depends on has changed
virtual void notifyShapeChanged(KoShape * shape, ChangeType type);
virtual void shapeChanged(ChangeType type, KoShape *shape = 0);
/**
* Set the property collision detection.
......
......@@ -602,9 +602,9 @@ void ArtisticTextShape::cacheGlyphOutlines()
}
}
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 )
{
......
......@@ -130,10 +130,10 @@ public:
/// 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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment