Qt 4.8
|
#include <QtGui/qwidget.h>
#include <QtGui/qapplication.h>
#include <QtCore/qlinkedlist.h>
#include <QtCore/qstack.h>
#include <QtCore/qfile.h>
#include "qgraphicsanchorlayout_p.h"
Go to the source code of this file.
Enumerations | |
enum | slackType { Grower = -1, Shrinker = 1 } |
Functions | |
static void | applySizePolicy (QSizePolicy::Policy policy, qreal minSizeHint, qreal prefSizeHint, qreal maxSizeHint, qreal *minSize, qreal *prefSize, qreal *maxSize) |
static qreal | checkAdd (qreal a, qreal b) |
static AnchorData * | createSequence (Graph< AnchorVertex, AnchorData > *graph, AnchorVertex *before, const QVector< AnchorVertex *> &vertices, AnchorVertex *after) |
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. More... | |
static QPair< QSimplexVariable *, QSimplexConstraint * > | createSlack (QSimplexConstraint *sizeConstraint, qreal interval, slackType type) |
static QPair< QGraphicsAnchorLayoutPrivate::Interval, qreal > | getFactor (qreal value, qreal min, qreal minPref, qreal pref, qreal maxPref, qreal max) |
QList< AnchorData * > | getVariables (QList< QSimplexConstraint *> constraints) |
static qreal | interpolate (const QPair< QGraphicsAnchorLayoutPrivate::Interval, qreal > &factor, qreal min, qreal minPref, qreal pref, qreal maxPref, qreal max) |
static AnchorVertex * | replaceVertex_helper (AnchorData *data, AnchorVertex *oldV, AnchorVertex *newV) |
static void | shiftConstraints (const QList< QSimplexConstraint *> &constraints, qreal amount) |
Shift all the constraints by a certain amount. More... | |
Variables | |
const qreal | g_offset = (sizeof(qreal) == sizeof(double)) ? QWIDGETSIZE_MAX : QWIDGETSIZE_MAX / 32 |
enum slackType |
Enumerator | |
---|---|
Grower | |
Shrinker |
Definition at line 2916 of file qgraphicsanchorlayout_p.cpp.
|
static |
Definition at line 131 of file qgraphicsanchorlayout_p.cpp.
Referenced by AnchorData::refreshSizeHints().
helper function in order to avoid overflowing anchor sizes the returned size will never be larger than FLT_MAX
Definition at line 670 of file qgraphicsanchorlayout_p.cpp.
|
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 766 of file qgraphicsanchorlayout_p.cpp.
Referenced by QGraphicsAnchorLayoutPrivate::simplifyGraphIteration().
|
static |
Definition at line 2917 of file qgraphicsanchorlayout_p.cpp.
Referenced by QGraphicsAnchorLayoutPrivate::solvePreferred().
|
static |
Definition at line 415 of file qgraphicsanchorlayout_p.cpp.
Referenced by QGraphicsAnchorLayoutPrivate::setupEdgesInterpolation(), and SequentialAnchorData::updateChildrenSizes().
QList<AnchorData *> getVariables | ( | QList< QSimplexConstraint *> | constraints | ) |
Definition at line 2098 of file qgraphicsanchorlayout_p.cpp.
Referenced by QGraphicsAnchorLayoutPrivate::calculateGraphs(), and QGraphicsAnchorLayoutPrivate::solveMinMax().
|
static |
Definition at line 451 of file qgraphicsanchorlayout_p.cpp.
Referenced by QGraphicsAnchorLayoutPrivate::interpolateEdge(), and SequentialAnchorData::updateChildrenSizes().
|
static |
Definition at line 891 of file qgraphicsanchorlayout_p.cpp.
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 2228 of file qgraphicsanchorlayout_p.cpp.
Referenced by QGraphicsAnchorLayoutPrivate::calculateNonTrunk(), and QGraphicsAnchorLayoutPrivate::calculateTrunk().
const qreal g_offset = (sizeof(qreal) == sizeof(double)) ? QWIDGETSIZE_MAX : QWIDGETSIZE_MAX / 32 |
Definition at line 62 of file qgraphicsanchorlayout_p.cpp.
Referenced by QGraphicsAnchorLayoutPrivate::calculateNonTrunk(), QGraphicsAnchorLayoutPrivate::calculateTrunk(), QGraphicsAnchorLayoutPrivate::constraintsFromSizeHints(), QGraphicsAnchorLayoutPrivate::solveMinMax(), and QGraphicsAnchorLayoutPrivate::solvePreferred().