projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added clear_selection to Ruler and Header
[pulseview.git]
/
pv
/
view
/
signal.cpp
diff --git
a/pv/view/signal.cpp
b/pv/view/signal.cpp
index cdbb65b1638e5ac145c1aaa66cf6c3d99bf12971..ae180e19a47a228a35f8d1151658b3f1b14973c2 100644
(file)
--- a/
pv/view/signal.cpp
+++ b/
pv/view/signal.cpp
@@
-32,15
+32,13
@@
namespace pv {
namespace view {
const int Signal::LabelHitPadding = 2;
namespace view {
const int Signal::LabelHitPadding = 2;
-const int Signal::LabelHighlightRadius = 6;
const QPen Signal::SignalAxisPen(QColor(128, 128, 128, 64));
Signal::Signal(const sr_probe *const probe) :
_probe(probe),
_name(probe->name),
const QPen Signal::SignalAxisPen(QColor(128, 128, 128, 64));
Signal::Signal(const sr_probe *const probe) :
_probe(probe),
_name(probe->name),
- _v_offset(0),
- _selected(false)
+ _v_offset(0)
{
assert(_probe);
}
{
assert(_probe);
}
@@
-75,16
+73,6
@@
void Signal::set_v_offset(int v_offset)
_v_offset = v_offset;
}
_v_offset = v_offset;
}
-bool Signal::selected() const
-{
- return _selected;
-}
-
-void Signal::select(bool select)
-{
- _selected = select;
-}
-
void Signal::paint_label(QPainter &p, int y, int right, bool hover)
{
p.setBrush(_colour);
void Signal::paint_label(QPainter &p, int y, int right, bool hover)
{
p.setBrush(_colour);
@@
-114,10
+102,8
@@
void Signal::paint_label(QPainter &p, int y, int right, bool hover)
QPointF(label_rect.left() + 1, label_rect.bottom() - 1)
};
QPointF(label_rect.left() + 1, label_rect.bottom() - 1)
};
- if (_selected) {
- p.setPen(QPen(QApplication::palette().brush(
- QPalette::Highlight), LabelHighlightRadius,
- Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+ if (selected()) {
+ p.setPen(highlight_pen());
p.setBrush(Qt::transparent);
p.drawPolygon(points, countof(points));
}
p.setBrush(Qt::transparent);
p.drawPolygon(points, countof(points));
}