projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LogicSignal: Don't paint hover marker if channel is disabled
[pulseview.git]
/
pv
/
views
/
trace
/
timemarker.cpp
diff --git
a/pv/views/trace/timemarker.cpp
b/pv/views/trace/timemarker.cpp
index 487496d9fd102d1c8c3f72295b0669259fbdf702..65b9481d12ff8261d321143d01b2add95c38ae5a 100644
(file)
--- a/
pv/views/trace/timemarker.cpp
+++ b/
pv/views/trace/timemarker.cpp
@@
-44,9
+44,9
@@
namespace trace {
const int TimeMarker::ArrowSize = 4;
TimeMarker::TimeMarker(
const int TimeMarker::ArrowSize = 4;
TimeMarker::TimeMarker(
- View &view, const QColor &colo
u
r, const pv::util::Timestamp& time) :
+ View &view, const QColor &color, const pv::util::Timestamp& time) :
TimeItem(view),
TimeItem(view),
- colo
ur_(colou
r),
+ colo
r_(colo
r),
time_(time),
value_action_(nullptr),
value_widget_(nullptr),
time_(time),
value_action_(nullptr),
value_widget_(nullptr),
@@
-78,7
+78,7
@@
float TimeMarker::get_x() const
return roundf(((time_ - view_.offset()) / view_.scale()).convert_to<float>()) + 0.5f;
}
return roundf(((time_ - view_.offset()) / view_.scale()).convert_to<float>()) + 0.5f;
}
-QPoint TimeMarker::point(const QRect &rect) const
+QPoint TimeMarker::
drag_
point(const QRect &rect) const
{
return QPoint(get_x(), rect.bottom());
}
{
return QPoint(get_x(), rect.bottom());
}
@@
-140,18
+140,18
@@
void TimeMarker::paint_label(QPainter &p, const QRect &rect, bool hover)
}
p.setPen(Qt::transparent);
}
p.setPen(Qt::transparent);
- p.setBrush(hover ? colo
ur_.lighter() : colou
r_);
+ p.setBrush(hover ? colo
r_.lighter() : colo
r_);
p.drawPolygon(points, countof(points));
p.drawPolygon(points, countof(points));
- p.setPen(colo
u
r_.lighter());
+ p.setPen(color_.lighter());
p.setBrush(Qt::transparent);
p.drawPolygon(highlight_points, countof(highlight_points));
p.setBrush(Qt::transparent);
p.drawPolygon(highlight_points, countof(highlight_points));
- p.setPen(colo
u
r_.darker());
+ p.setPen(color_.darker());
p.setBrush(Qt::transparent);
p.drawPolygon(points, countof(points));
p.setBrush(Qt::transparent);
p.drawPolygon(points, countof(points));
- p.setPen(select_text_colo
ur(colou
r_));
+ p.setPen(select_text_colo
r(colo
r_));
p.drawText(r, Qt::AlignCenter | Qt::AlignVCenter, get_text());
}
p.drawText(r, Qt::AlignCenter | Qt::AlignVCenter, get_text());
}
@@
-161,7
+161,7
@@
void TimeMarker::paint_fore(QPainter &p, ViewItemPaintParams &pp)
return;
const float x = get_x();
return;
const float x = get_x();
- p.setPen(colo
u
r_.darker());
+ p.setPen(color_.darker());
p.drawLine(QPointF(x, pp.top()), QPointF(x, pp.bottom()));
}
p.drawLine(QPointF(x, pp.top()), QPointF(x, pp.bottom()));
}
@@
-171,7
+171,7
@@
pv::widgets::Popup* TimeMarker::create_popup(QWidget *parent)
Popup *const popup = new Popup(parent);
popup->set_position(parent->mapToGlobal(
Popup *const popup = new Popup(parent);
popup->set_position(parent->mapToGlobal(
- point(parent->rect())), Popup::Bottom);
+
drag_
point(parent->rect())), Popup::Bottom);
QFormLayout *const form = new QFormLayout(popup);
popup->setLayout(form);
QFormLayout *const form = new QFormLayout(popup);
popup->setLayout(form);