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:
parent
0183db7d30
commit
7f35d2e3e6
18
extender.cpp
18
extender.cpp
@ -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)
|
void Extender::itemAddedEvent(ExtenderItem *item, const QPointF &pos)
|
||||||
{
|
{
|
||||||
kDebug() << "Adding item to layout.";
|
kDebug() << "Adding item to layout.";
|
||||||
@ -271,8 +287,6 @@ void ExtenderPrivate::adjustSizeHints()
|
|||||||
q->setMaximumSize(q->layout()->maximumSize());
|
q->setMaximumSize(q->layout()->maximumSize());
|
||||||
|
|
||||||
q->updateGeometry();
|
q->updateGeometry();
|
||||||
|
|
||||||
emit q->geometryChanged();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ExtenderPrivate::insertIndexFromPos(const QPointF &pos) const
|
int ExtenderPrivate::insertIndexFromPos(const QPointF &pos) const
|
||||||
|
10
extender.h
10
extender.h
@ -148,6 +148,16 @@ class PLASMA_EXPORT Extender : public QGraphicsWidget
|
|||||||
*/
|
*/
|
||||||
virtual void saveState();
|
virtual void saveState();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @reimplemented from QGraphicsWidget
|
||||||
|
*/
|
||||||
|
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @reimplemented from QGraphicsWidget
|
||||||
|
*/
|
||||||
|
void resizeEvent(QGraphicsSceneResizeEvent *event);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
/**
|
/**
|
||||||
* Fires when an extender item is added to this extender.
|
* Fires when an extender item is added to this extender.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user