emit geometry on size/pos changes correctly; we now hae calendars with multiple clocks again

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=842639
This commit is contained in:
Aaron J. Seigo 2008-08-05 17:28:58 +00:00
parent 0183db7d30
commit 7f35d2e3e6
2 changed files with 26 additions and 2 deletions

View File

@ -130,6 +130,22 @@ void Extender::saveState()
}
}
QVariant Extender::itemChange(GraphicsItemChange change, const QVariant &value)
{
if (change == QGraphicsItem::ItemPositionHasChanged) {
emit geometryChanged();
}
return QGraphicsWidget::itemChange(change, value);
}
void Extender::resizeEvent(QGraphicsSceneResizeEvent *event)
{
QGraphicsWidget::resizeEvent(event);
emit geometryChanged();
}
void Extender::itemAddedEvent(ExtenderItem *item, const QPointF &pos)
{
kDebug() << "Adding item to layout.";
@ -271,8 +287,6 @@ void ExtenderPrivate::adjustSizeHints()
q->setMaximumSize(q->layout()->maximumSize());
q->updateGeometry();
emit q->geometryChanged();
}
int ExtenderPrivate::insertIndexFromPos(const QPointF &pos) const

View File

@ -148,6 +148,16 @@ class PLASMA_EXPORT Extender : public QGraphicsWidget
*/
virtual void saveState();
/**
* @reimplemented from QGraphicsWidget
*/
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
/**
* @reimplemented from QGraphicsWidget
*/
void resizeEvent(QGraphicsSceneResizeEvent *event);
Q_SIGNALS:
/**
* Fires when an extender item is added to this extender.