Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qgraphicswidget_p.cpp File Reference
#include "qglobal.h"
#include <QtCore/qdebug.h>
#include <QtCore/qnumeric.h>
#include "qgraphicswidget_p.h"
#include "qgraphicslayoutitem_p.h"
#include "qgraphicslayout.h"
#include "qgraphicsscene_p.h"
#include <QtWidgets/qapplication.h>
#include <QtWidgets/qgraphicsscene.h>
#include <QtWidgets/qstyleoption.h>
#include <QtWidgets/QStyleOptionTitleBar>
#include <QtWidgets/QGraphicsSceneMouseEvent>
+ Include dependency graph for qgraphicswidget_p.cpp:

Go to the source code of this file.

Functions

static qreal minimumHeightForWidth (qreal width, qreal minh, qreal maxh, const QGraphicsWidget *widget, bool heightForWidth=true)
 
static qreal minimumWidthForHeight (qreal height, qreal minw, qreal maxw, const QGraphicsWidget *widget)
 
static QSizeF closestAcceptableSize (const QSizeF &proposed, const QGraphicsWidget *widget)
 
static void _q_boundGeometryToSizeConstraints (const QRectF &startGeometry, QRectF *rect, Qt::WindowFrameSection section, const QSizeF &min, const QSizeF &max, const QGraphicsWidget *widget)
 

Function Documentation

◆ _q_boundGeometryToSizeConstraints()

static void _q_boundGeometryToSizeConstraints ( const QRectF startGeometry,
QRectF rect,
Qt::WindowFrameSection  section,
const QSizeF min,
const QSizeF max,
const QGraphicsWidget widget 
)
static

Definition at line 457 of file qgraphicswidget_p.cpp.

References QRectF::bottom(), Qt::BottomLeftSection, Qt::BottomRightSection, Qt::BottomSection, closestAcceptableSize(), QGraphicsLayoutItemPrivate::get(), QGraphicsLayoutItemPrivate::hasHeightForWidth(), QGraphicsLayoutItemPrivate::hasWidthForHeight(), QRectF::height(), QSize::height(), QSizeF::height(), QRectF::left(), Qt::LeftSection, minimumHeightForWidth(), qBound(), qRound(), rect, QRectF::right(), Qt::RightSection, QWidget::size, QRectF::top(), Qt::TopLeftSection, Qt::TopRightSection, Qt::TopSection, widget, QRectF::width(), QSize::width(), and QSizeF::width().

Referenced by QGraphicsWidgetPrivate::windowFrameMouseMoveEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ closestAcceptableSize()

static QSizeF closestAcceptableSize ( const QSizeF proposed,
const QGraphicsWidget widget 
)
static

Definition at line 410 of file qgraphicswidget_p.cpp.

References QSizeF::height(), minimumHeightForWidth(), minimumWidthForHeight(), QWidget::size, widget, and QSizeF::width().

Referenced by _q_boundGeometryToSizeConstraints().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ minimumHeightForWidth()

static qreal minimumHeightForWidth ( qreal  width,
qreal  minh,
qreal  maxh,
const QGraphicsWidget widget,
bool  heightForWidth = true 
)
static

Definition at line 372 of file qgraphicswidget_p.cpp.

References QGraphicsLayoutItemPrivate::get(), QGraphicsLayoutItemPrivate::hasHeightForWidth(), QWidget::height, minimumHeightForWidth(), Qt::MinimumSize, widget, and QWidget::width.

Referenced by _q_boundGeometryToSizeConstraints(), closestAcceptableSize(), minimumHeightForWidth(), and minimumWidthForHeight().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ minimumWidthForHeight()

static qreal minimumWidthForHeight ( qreal  height,
qreal  minw,
qreal  maxw,
const QGraphicsWidget widget 
)
static

Definition at line 404 of file qgraphicswidget_p.cpp.

References minimumHeightForWidth(), and widget.

Referenced by closestAcceptableSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: