Esempio n. 1
0
void TimeMarker::paint_fore(QPainter &p, ViewItemPaintParams &pp)
{
	if (!enabled())
		return;

	const float x = get_x();
	p.setPen(color_.darker());
	p.drawLine(QPointF(x, pp.top()), QPointF(x, pp.bottom()));
}
Esempio n. 2
0
void TriggerMarker::paint_fore(QPainter &p, ViewItemPaintParams &pp)
{
	if (!enabled())
		return;

	QPen pen(Color);
	pen.setStyle(Qt::DashLine);

	const float x = get_x();
	p.setPen(pen);
	p.drawLine(QPointF(x, pp.top()), QPointF(x, pp.bottom()));
}
Esempio n. 3
0
QRectF TimeMarker::hit_box_rect(const ViewItemPaintParams &pp) const
{
	const float x = get_x();
	const float h = QFontMetrics(QApplication::font()).height();
	return QRectF(x - h / 2.0f, pp.top(), h, pp.height());
}