Add availableScreenRect(int id) to Corona base class
This is already implemented in ShellCorona and is quite handy too Reviewed-by: Marco Martin
This commit is contained in:
parent
5fe26c0da1
commit
6a1fa18986
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user