OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::Positioning Class Reference

#include "Positioning.h"

Static Public Member Functions

static QRect calculateChildRect (const QRect &_parentRect, const QSize &_childSize, ot::Alignment _childAlignment)
 Calculates the child rect.
 
static QRectF calculateChildRect (const QRectF &_parentRect, const QSizeF &_childSize, ot::Alignment _childAlignment)
 Calculates the child rect.
 
static QRect fitOnScreen (const QRect &_sourceRect, bool _primaryScreenOnly=false)
 Fits the provided rect on the screen. If the source rect is bigger than the screen size the source rect will be returned.
 

Member Function Documentation

◆ calculateChildRect() [1/2]

QRect ot::Positioning::calculateChildRect ( const QRect & _parentRect,
const QSize & _childSize,
ot::Alignment _childAlignment )
static

Calculates the child rect.

Parameters
_parentRectParent rectangle.
_childSizeChild size.
_childAlignmentChild alignment.

◆ calculateChildRect() [2/2]

QRectF ot::Positioning::calculateChildRect ( const QRectF & _parentRect,
const QSizeF & _childSize,
ot::Alignment _childAlignment )
static

Calculates the child rect.

Parameters
_parentRectParent rectangle.
_childSizeChild size.
_childAlignmentChild alignment.

◆ fitOnScreen()

QRect ot::Positioning::fitOnScreen ( const QRect & _sourceRect,
bool _primaryScreenOnly = false )
static

Fits the provided rect on the screen. If the source rect is bigger than the screen size the source rect will be returned.

Parameters
_sourceRectInitial rect.
_primaryScreenOnlyIf true the source rect will be fitted onto the primary screen only, otherwise on any screen.

The documentation for this class was generated from the following files: