diff --git a/src/plasma/corona.cpp b/src/plasma/corona.cpp index 0db7fe486..a5962d877 100644 --- a/src/plasma/corona.cpp +++ b/src/plasma/corona.cpp @@ -219,6 +219,11 @@ QRegion Corona::availableScreenRegion(int id) const return QRegion(screenGeometry(id)); } +QRect Corona::availableScreenRect(int id) const +{ + return screenGeometry(id); +} + void Corona::loadDefaultLayout() { //Default implementation does nothing diff --git a/src/plasma/corona.h b/src/plasma/corona.h index c5016da0a..8b8918efc 100644 --- a/src/plasma/corona.h +++ b/src/plasma/corona.h @@ -124,6 +124,19 @@ public: */ virtual QRegion availableScreenRegion(int id) const; + /** + * Returns the available rect for a given screen. + * The difference between this and availableScreenRegion() + * is that this method returns only a rectangular + * available space (it doesn't care if your panel is not 100% width). + * The available rect excludes panels and similar windows. + * Valid screen ids are 0 to numScreens()-1. + * By default this method returns a rectangular region + * equal to screenGeometry(id); subclasses that need another + * behavior should override this method. + */ + virtual QRect availableScreenRect(int id) const; + /** * This method is useful in order to retrieve the list of available * screen edges for panel type containments. @@ -231,6 +244,11 @@ Q_SIGNALS: */ void availableScreenRegionChanged(); + /** + * This signal indicates that a change in available screen gemetry occurred. + */ + void availableScreenRectChanged(); + /** * emitted when immutability changes. * this is for use by things that don't get constraints events, like plasmaapp.