signals for when the view is about to adjust its scene rect in response to the containment changing so that geometry changes made in view subclasses can be properly coordinated
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=782388
This commit is contained in:
parent
56eda6927e
commit
9089d89b12
3
view.cpp
3
view.cpp
@ -160,7 +160,10 @@ bool View::drawWallpaper() const
|
||||
|
||||
void View::updateSceneRect()
|
||||
{
|
||||
//kDebug( )<< "!!!!!!!!!!!!!!!!! setting the scene rect to" << d->containment->sceneBoundingRect();
|
||||
emit sceneRectAboutToChange();
|
||||
setSceneRect(d->containment->sceneBoundingRect());
|
||||
emit sceneRectChanged();
|
||||
}
|
||||
|
||||
} // namespace Plasma
|
||||
|
21
view.h
21
view.h
@ -102,6 +102,27 @@ public:
|
||||
*/
|
||||
Containment* containment() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
/**
|
||||
* This signal is emitted whenever the containment being viewed has
|
||||
* changed its geometry, but before the View has shifted the viewd scene rect
|
||||
* to the new geometry. This is useful for Views which want to keep
|
||||
* their rect() in sync with the containment'sa
|
||||
*
|
||||
* @arg rect the new scene rect.
|
||||
*/
|
||||
void sceneRectAboutToChange();
|
||||
|
||||
/**
|
||||
* This signal is emitted whenever the containment being viewed has
|
||||
* changed its geometry, and after the View has shifted the viewd scene rect
|
||||
* to the new geometry. This is useful for Views which want to keep
|
||||
* their rect() in sync with the containment's.
|
||||
*
|
||||
* @arg rect the new scene rect.
|
||||
*/
|
||||
void sceneRectChanged();
|
||||
|
||||
protected Q_SLOTS:
|
||||
void updateSceneRect();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user