src/gui/graphicsview/qgridlayoutengine.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
    49 #include "qgridlayoutengine_p.h"
    49 #include "qgridlayoutengine_p.h"
    50 #include "qstyleoption.h"
    50 #include "qstyleoption.h"
    51 #include "qvarlengtharray.h"
    51 #include "qvarlengtharray.h"
    52 
    52 
    53 #include <QtDebug>
    53 #include <QtDebug>
       
    54 #include <QtCore/qmath.h>
    54 
    55 
    55 QT_BEGIN_NAMESPACE
    56 QT_BEGIN_NAMESPACE
    56 
    57 
    57 template <typename T>
    58 template <typename T>
    58 static void insertOrRemoveItems(QVector<T> &items, int index, int delta)
    59 static void insertOrRemoveItems(QVector<T> &items, int index, int delta)
    68 }
    69 }
    69 
    70 
    70 static qreal growthFactorBelowPreferredSize(qreal desired, qreal sumAvailable, qreal sumDesired)
    71 static qreal growthFactorBelowPreferredSize(qreal desired, qreal sumAvailable, qreal sumDesired)
    71 {
    72 {
    72     Q_ASSERT(sumDesired != 0.0);
    73     Q_ASSERT(sumDesired != 0.0);
    73     return desired * ::pow(sumAvailable / sumDesired, desired / sumDesired);
    74     return desired * qPow(sumAvailable / sumDesired, desired / sumDesired);
    74 }
    75 }
    75 
    76 
    76 static qreal fixedDescent(qreal descent, qreal ascent, qreal targetSize)
    77 static qreal fixedDescent(qreal descent, qreal ascent, qreal targetSize)
    77 {
    78 {
    78     if (descent < 0.0)
    79     if (descent < 0.0)