14 :
QWidget(parent), mTransform(trans), mScrollbar(scroll), mPosition(100,400), mTimeValue(-1)
36 int y0 = mPosition.
y()-sLabHeight/2;
37 if (y0 < sLabHeight) y0 = sLabHeight;
38 if (y0 + sLabHeight + 1 >
height()) y0 =
height() - sLabHeight - 1;
39 mPosition.
setY(y0 + sLabHeight/2);
49 font.setPointSizeF(10);
52 if (mTimeValue < 0) mTimeValue = mScrollbar->
tPosI(mPosition.
x());
73 mPosition.
setX(mScrollbar->
xPosI(mTimeValue));
81 mTimeValue = mScrollbar->
tPosI(mPosition.
x());
89 mTimeValue = mScrollbar->
tPosI(mPosition.
x());
void setCursorPosition(const QPoint &pos)
void paintEvent(QPaintEvent *event) override
void setCursorToTime(u64 t)
void setViewportHeight(int height)
WaveCursor(const WaveTransform *trans, const WaveScrollbar *scroll, QWidget *parent=nullptr)
void setCursorPosition(double tCursor, int xpos)
QObject * parent() const const
void drawLine(const QLineF &line)
void drawRoundedRect(const QRectF &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode)
void drawText(const QPointF &position, const QString &text)
const QFont & font() const const
void setBrush(const QBrush &brush)
void setFont(const QFont &font)
void setPen(const QColor &color)
void setRenderHint(QPainter::RenderHint hint, bool on)
QString number(int n, int base)