#include "Positioning.h"
|
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.
|
|
static bool | centerWidgetOnParent (const QWidgetInterface *_parentWidget, QWidgetInterface *_childWidget) |
| Gets the widgets from the provided interfaces and calls centerWidgetOnParent(const QWidget*, QWidget*). centerWidgetOnParent(const QWidget*, QWidget*)
|
|
static bool | centerWidgetOnParent (const QWidget *_parentWidget, QWidget *_childWidget) |
| Centers this widget on the parent. If no parent is provided the widget will center on the primay screen. The size of the child won't be affected.
|
|
static QRect | getCenterWidgetOnParentRect (const QWidgetInterface *_parentWidget, QWidgetInterface *_childWidget) |
| Gets the widgets from the provided interfaces and calls getCenterWidgetOnParentRect(const QWidget*, QWidget*). getCenterWidgetOnParentRect(const QWidget*, QWidget*)
|
|
static QRect | getCenterWidgetOnParentRect (const QWidget *_parentWidget, QWidget *_childWidget) |
| Calculates the top left corner of this widget centered on the parent widget. If no parent is provided the widget will center on the screen.
|
|
◆ calculateChildRect() [1/2]
QRect ot::Positioning::calculateChildRect |
( |
const QRect & | _parentRect, |
|
|
const QSize & | _childSize, |
|
|
ot::Alignment | _childAlignment ) |
|
static |
Calculates the child rect.
- Parameters
-
_parentRect | Parent rectangle. |
_childSize | Child size. |
_childAlignment | Child alignment. |
◆ calculateChildRect() [2/2]
QRectF ot::Positioning::calculateChildRect |
( |
const QRectF & | _parentRect, |
|
|
const QSizeF & | _childSize, |
|
|
ot::Alignment | _childAlignment ) |
|
static |
Calculates the child rect.
- Parameters
-
_parentRect | Parent rectangle. |
_childSize | Child size. |
_childAlignment | Child alignment. |
◆ centerWidgetOnParent() [1/2]
bool ot::Positioning::centerWidgetOnParent |
( |
const QWidget * | _parentWidget, |
|
|
QWidget * | _childWidget ) |
|
static |
Centers this widget on the parent. If no parent is provided the widget will center on the primay screen. The size of the child won't be affected.
◆ centerWidgetOnParent() [2/2]
◆ 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
-
_sourceRect | Initial rect. |
_primaryScreenOnly | If true the source rect will be fitted onto the primary screen only, otherwise on any screen. |
◆ getCenterWidgetOnParentRect() [1/2]
QRect ot::Positioning::getCenterWidgetOnParentRect |
( |
const QWidget * | _parentWidget, |
|
|
QWidget * | _childWidget ) |
|
static |
Calculates the top left corner of this widget centered on the parent widget. If no parent is provided the widget will center on the screen.
◆ getCenterWidgetOnParentRect() [2/2]
The documentation for this class was generated from the following files: