projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace View ownership of traces with RowItemOwner
[pulseview.git]
/
pv
/
view
/
rowitem.cpp
diff --git
a/pv/view/rowitem.cpp
b/pv/view/rowitem.cpp
index fe194bf72ea3b8e9be963dba40dd2beb5d7f8929..38a6d43703883697c8ce838238ec1ab4377a334f 100644
(file)
--- a/
pv/view/rowitem.cpp
+++ b/
pv/view/rowitem.cpp
@@
-28,12
+28,12
@@
namespace pv {
namespace view {
RowItem::RowItem() :
namespace view {
RowItem::RowItem() :
- _
view
(NULL),
+ _
owner
(NULL),
_v_offset(0)
{
}
_v_offset(0)
{
}
-int RowItem::
get_
v_offset() const
+int RowItem::v_offset() const
{
return _v_offset;
}
{
return _v_offset;
}
@@
-43,24
+43,16
@@
void RowItem::set_v_offset(int v_offset)
_v_offset = v_offset;
}
_v_offset = v_offset;
}
-void RowItem::set_
view(View *view
)
+void RowItem::set_
owner(RowItemOwner *owner
)
{
{
- assert(view);
-
- if (_view)
- disconnect(_view, SIGNAL(hover_point_changed()),
- this, SLOT(on_hover_point_changed()));
-
- _view = view;
-
- connect(view, SIGNAL(hover_point_changed()),
- this, SLOT(on_hover_point_changed()));
+ assert((_owner && !owner) || (!_owner && owner));
+ _owner = owner;
}
int RowItem::get_y() const
{
}
int RowItem::get_y() const
{
- assert(_
view
);
- return _v_offset + _
view->
v_offset();
+ assert(_
owner
);
+ return _v_offset + _
owner->owner_
v_offset();
}
void RowItem::paint_back(QPainter &p, int left, int right)
}
void RowItem::paint_back(QPainter &p, int left, int right)