Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include "qgraphicsanchorlayout_p.h"
#include <QtWidgets/qwidget.h>
#include <QtWidgets/qapplication.h>
#include <QtCore/qstack.h>
#include <numeric>
Go to the source code of this file.
Enumerations | |
enum | slackType { Grower = -1 , Shrinker = 1 } |
Variables | |
const qreal | g_offset = (sizeof(qreal) == sizeof(double)) ? QWIDGETSIZE_MAX : QWIDGETSIZE_MAX / 32 |
enum slackType |
Enumerator | |
---|---|
Grower | |
Shrinker |
Definition at line 2763 of file qgraphicsanchorlayout_p.cpp.
|
static |
Definition at line 95 of file qgraphicsanchorlayout_p.cpp.
References QSizePolicy::GrowFlag, QSizePolicy::IgnoreFlag, policy, and QSizePolicy::ShrinkFlag.
Referenced by QtGraphicsAnchorLayout::AnchorData::refreshSizeHints().
|
static |
Takes the sequence of vertices described by (before, vertices, after) and removes all anchors connected to the vertices in vertices, returning one simplified anchor between before and after.
Note that this function doesn't add the created anchor to the graph. This should be done by the caller.
Definition at line 695 of file qgraphicsanchorlayout_p.cpp.
References QtGraphicsAnchorLayout::SequentialAnchorData::calculateSizeHints(), QtGraphicsAnchorLayout::AnchorData::from, QString::fromLatin1(), i, next, Q_ASSERT, qDebug, qPrintable, and QtGraphicsAnchorLayout::AnchorData::to.
Referenced by QV4::ExecutionEngine::fromData(), and QGraphicsAnchorLayoutPrivate::simplifyGraphIteration().
|
static |
Definition at line 2764 of file qgraphicsanchorlayout_p.cpp.
References QHash< Key, T >::insert(), QSimplexConstraint::LessOrEqual, qMakePair(), and QSimplexConstraint::variables.
Referenced by QGraphicsAnchorLayoutPrivate::solvePreferred().
|
static |
returns the factor in the interval [-1, 1]. -1 is at Minimum 0 is at Preferred 1 is at Maximum
Definition at line 381 of file qgraphicsanchorlayout_p.cpp.
References QGraphicsAnchorLayoutPrivate::MaxPreferredToMaximum, QGraphicsAnchorLayoutPrivate::MinimumToMinPreferred, QGraphicsAnchorLayoutPrivate::MinPreferredToPreferred, QGraphicsAnchorLayoutPrivate::PreferredToMaxPreferred, and qMakePair().
Referenced by QGraphicsAnchorLayoutPrivate::setupEdgesInterpolation(), and QtGraphicsAnchorLayout::SequentialAnchorData::updateChildrenSizes().
QList< AnchorData * > getVariables | ( | const QList< QSimplexConstraint * > & | constraints | ) |
Definition at line 2008 of file qgraphicsanchorlayout_p.cpp.
References QSet< T >::cbegin(), i, and it.
Referenced by QGraphicsAnchorLayoutPrivate::calculateGraphs(), and QGraphicsAnchorLayoutPrivate::solveMinMax().
|
static |
Definition at line 417 of file qgraphicsanchorlayout_p.cpp.
References QGraphicsAnchorLayoutPrivate::MaxPreferredToMaximum, QGraphicsAnchorLayoutPrivate::MinimumToMinPreferred, QGraphicsAnchorLayoutPrivate::MinPreferredToPreferred, and QGraphicsAnchorLayoutPrivate::PreferredToMaxPreferred.
Referenced by QGraphicsAnchorLayoutPrivate::interpolateEdge(), and QtGraphicsAnchorLayout::SequentialAnchorData::updateChildrenSizes().
|
static |
Definition at line 818 of file qgraphicsanchorlayout_p.cpp.
References other().
Referenced by QGraphicsAnchorLayoutPrivate::replaceVertex(), and QGraphicsAnchorLayoutPrivate::restoreVertices().
|
static |
Shift all the constraints by a certain amount. This allows us to deal with negative values in the linear program if they are bounded by a certain limit. Functions should be careful to call it again with a negative amount, to shift the constraints back.
Definition at line 2124 of file qgraphicsanchorlayout_p.cpp.
References i.
Referenced by QGraphicsAnchorLayoutPrivate::calculateNonTrunk(), and QGraphicsAnchorLayoutPrivate::calculateTrunk().
const qreal g_offset = (sizeof(qreal) == sizeof(double)) ? QWIDGETSIZE_MAX : QWIDGETSIZE_MAX / 32 |
Definition at line 26 of file qgraphicsanchorlayout_p.cpp.
Referenced by QGraphicsAnchorLayoutPrivate::calculateNonTrunk(), QGraphicsAnchorLayoutPrivate::calculateTrunk(), QGraphicsAnchorLayoutPrivate::constraintsFromSizeHints(), QGraphicsAnchorLayoutPrivate::solveMinMax(), and QGraphicsAnchorLayoutPrivate::solvePreferred().