utils#

Some utility functions to arrang windows and screens.

class RedCross(coords=None, size=[10, 10], parent=None)[source]#

Bases: GraphicsObject

boundingRect(self) QRectF[source]#
paint(self, painter: Optional[QPainter], option: Optional[QStyleOptionGraphicsItem], widget: Optional[QWidget] = None)[source]#
set_coords(coords)[source]#
screen_geometry(screen=None)[source]#

Return the geometry of the current screen.

Arguments

screenint or None

The screen for which to return the geometry.

Returns

geometrytuple

(Left, Top, width, Height)

tiled_layout(n_windows, origin=None, shape=None, percent=None, screen=None)[source]#

Generate tiled geometry for windows on a screen.

Arguments

n_windowsint

Number number of windows.

origintuple or None

Optional lower left corner.

shapetuple or None

The shape for all windows. If None use full screen.

percentfloat or None

Percentage of the given shape o use.

screenint or None

The screen for which to return the geometry.

Returns

geometrylist of tuples

[(Left, Top, width, Height), …] for each window.