6 #include <QFontMetrics>
13 int y = 14 * (1-mValue) + y0;
28 const int px[5] = { 0, 3, 0, -3, 0 } ;
29 const int py[5] = { 3, 6, 0, 6, 3 } ;
30 for (
int i=0; i<5; i++)
41 float y = 14 * 0.5 + y0;
53 memset(mAccumTime, 0,
sizeof(mAccumTime));
54 if (0 <= val && val <= 1)
55 mAccumTime[val] =
x1-
x0;
60 for (
int i=0; i<2; i++)
61 mAccumTime[i] += other.mAccumTime[i];
68 double sum = mAccumTime[0] + mAccumTime[1];
71 if (mAccumTime[1] > mAccumTime[0])
74 fillCol.
setAlpha(floor(55 + 400 * mAccumTime[0] /
sum));
79 fillCol.
setAlpha(floor(55 + 400 * mAccumTime[1] /
sum));
125 if (r.
width()+6 > wMax)
return;
127 float xText =
mX0 + (wMax - r.
width())/2.;
128 if (xText<0) xText = 0;
static SimulationSettings * sSimulationSettings
static QString stringValue(int val, int bits, int base)
void setBold(bool enable)
void setPixelSize(int pixelSize)
QRect boundingRect(QChar ch) const const
const QBrush & brush() const const
void drawLine(const QLineF &line)
void drawPolygon(const QPointF *points, int pointCount, Qt::FillRule fillRule)
void drawRect(const QRectF &rectangle)
void drawText(const QPointF &position, const QString &text)
const QFont & font() const const
const QPen & pen() const const
void setBrush(const QBrush &brush)
void setPen(const QColor &color)
QColor color() const const
void setStyle(Qt::PenStyle style)
QPolygonF translated(qreal dx, qreal dy) const const
void moveTo(qreal x, qreal y)
void setHeight(qreal height)
void setWidth(qreal width)
qreal width() const const
void append(const T &value)