signal for geometry updates. used right now for xrandr updates, but may also be useful for layouts and such things ...

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=734485
This commit is contained in:
Aaron J. Seigo 2007-11-09 00:42:18 +00:00
parent a0d86c9ada
commit cc34fc3365
2 changed files with 7 additions and 3 deletions

View File

@ -1160,6 +1160,7 @@ void Applet::setGeometry(const QRectF& geometry)
} }
setPos(geometry.topLeft()); setPos(geometry.topLeft());
emit geometryChanged();
update(); update();
} }

View File

@ -467,9 +467,6 @@ class PLASMA_EXPORT Applet : public Widget
// or contentSizeHint() plus the size of the border otherwise. // or contentSizeHint() plus the size of the border otherwise.
virtual QSizeF sizeHint() const; virtual QSizeF sizeHint() const;
/**
* Sets the geometry of this Applet.
*/
/** /**
* Sets the geometry of this Plasma::Applet * Sets the geometry of this Plasma::Applet
* @param geometry the geometry to apply to this Plasma::Applet. * @param geometry the geometry to apply to this Plasma::Applet.
@ -492,6 +489,12 @@ class PLASMA_EXPORT Applet : public Widget
**/ **/
void requestFocus( bool focus ); void requestFocus( bool focus );
/**
* Emitted whenever the applet makes a geometry change, so that views
* can coordinate themselves with these changes if they desire.
*/
void geometryChanged();
public Q_SLOTS: public Q_SLOTS:
/** /**
* Destroys the applet; it will be deleted and configurations reset. * Destroys the applet; it will be deleted and configurations reset.