projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
View/Ruler: Calculate and use tick precision
[pulseview.git]
/
pv
/
view
/
tracegroup.cpp
diff --git
a/pv/view/tracegroup.cpp
b/pv/view/tracegroup.cpp
index 665b4ad186c1403cb3a888f9f73e4e94851c37df..74221d440a15331a0ac657cadab0b3cf88b8399d 100644
(file)
--- a/
pv/view/tracegroup.cpp
+++ b/
pv/view/tracegroup.cpp
@@
-52,13
+52,13
@@
bool TraceGroup::enabled() const
[](const shared_ptr<RowItem> &r) { return r->enabled(); });
}
[](const shared_ptr<RowItem> &r) { return r->enabled(); });
}
-pv::S
igS
ession& TraceGroup::session()
+pv::Session& TraceGroup::session()
{
assert(owner_);
return owner_->session();
}
{
assert(owner_);
return owner_->session();
}
-const pv::S
igS
ession& TraceGroup::session() const
+const pv::Session& TraceGroup::session() const
{
assert(owner_);
return owner_->session();
{
assert(owner_);
return owner_->session();
@@
-81,9
+81,9
@@
pair<int, int> TraceGroup::v_extents() const
return RowItemOwner::v_extents();
}
return RowItemOwner::v_extents();
}
-void TraceGroup::paint_label(QPainter &p,
int righ
t, bool hover)
+void TraceGroup::paint_label(QPainter &p,
const QRect &rec
t, bool hover)
{
{
- const QRectF r = label_rect(r
igh
t).adjusted(
+ const QRectF r = label_rect(r
ec
t).adjusted(
LineThickness / 2, LineThickness / 2,
-LineThickness / 2, -LineThickness / 2);
LineThickness / 2, LineThickness / 2,
-LineThickness / 2, -LineThickness / 2);
@@
-112,15
+112,15
@@
void TraceGroup::paint_label(QPainter &p, int right, bool hover)
p.drawPolyline(points, countof(points));
}
p.drawPolyline(points, countof(points));
}
-QRectF TraceGroup::label_rect(
int righ
t) const
+QRectF TraceGroup::label_rect(
const QRectF &rec
t) const
{
{
- QRectF rect;
+ QRectF
child_
rect;
for (const shared_ptr<RowItem> r : child_items())
if (r && r->enabled())
for (const shared_ptr<RowItem> r : child_items())
if (r && r->enabled())
-
rect = rect.united(r->label_rect(righ
t));
+
child_rect = child_rect.united(r->label_rect(rec
t));
- return QRectF(
rect.x() - Width - Padding,
rect.y(),
- Width, rect.height());
+ return QRectF(
child_rect.x() - Width - Padding, child_
rect.y(),
+ Width,
child_
rect.height());
}
bool TraceGroup::pt_in_label_rect(int left, int right, const QPoint &point)
}
bool TraceGroup::pt_in_label_rect(int left, int right, const QPoint &point)
@@
-147,7
+147,7
@@
QMenu* TraceGroup::create_context_menu(QWidget *parent)
pv::widgets::Popup* TraceGroup::create_popup(QWidget *parent)
{
(void)parent;
pv::widgets::Popup* TraceGroup::create_popup(QWidget *parent)
{
(void)parent;
- return
NULL
;
+ return
nullptr
;
}
int TraceGroup::owner_visual_v_offset() const
}
int TraceGroup::owner_visual_v_offset() const
@@
-212,10
+212,10
@@
void TraceGroup::on_ungroup()
ungroup();
}
ungroup();
}
-void TraceGroup::appearance_changed(bool label, bool content)
+void TraceGroup::
row_item_
appearance_changed(bool label, bool content)
{
if (owner_)
{
if (owner_)
- owner_->appearance_changed(label, content);
+ owner_->
row_item_
appearance_changed(label, content);
}
void TraceGroup::extents_changed(bool horz, bool vert)
}
void TraceGroup::extents_changed(bool horz, bool vert)