projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TraceGroup: Implemented paint_label
[pulseview.git]
/
pv
/
view
/
rowitem.cpp
diff --git
a/pv/view/rowitem.cpp
b/pv/view/rowitem.cpp
index fe194bf72ea3b8e9be963dba40dd2beb5d7f8929..d850e321fe4fdcf0572065e268d6393fa3af8982 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,26
@@
void RowItem::set_v_offset(int v_offset)
_v_offset = v_offset;
}
_v_offset = v_offset;
}
-void RowItem::set_view(View *view)
+RowItemOwner* RowItem::owner() const
{
{
- assert(view);
-
- if (_view)
- disconnect(_view, SIGNAL(hover_point_changed()),
- this, SLOT(on_hover_point_changed()));
-
- _view = view;
+ return _owner;
+}
- connect(view, SIGNAL(hover_point_changed()),
- this, SLOT(on_hover_point_changed()));
+void RowItem::set_owner(RowItemOwner *owner)
+{
+ 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();
+}
+
+QPoint RowItem::point() const
+{
+ return QPoint(0, v_offset());
}
void RowItem::paint_back(QPainter &p, int left, int right)
}
void RowItem::paint_back(QPainter &p, int left, int right)