projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
97430d7
)
ViewItem: Added rect parameter to point()
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sat, 20 Dec 2014 22:39:18 +0000
(22:39 +0000)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Mon, 29 Dec 2014 11:56:00 +0000
(11:56 +0000)
pv/view/cursorpair.cpp
patch
|
blob
|
history
pv/view/cursorpair.hpp
patch
|
blob
|
history
pv/view/rowitem.cpp
patch
|
blob
|
history
pv/view/rowitem.hpp
patch
|
blob
|
history
pv/view/timemarker.cpp
patch
|
blob
|
history
pv/view/timemarker.hpp
patch
|
blob
|
history
pv/view/viewitem.cpp
patch
|
blob
|
history
pv/view/viewitem.hpp
patch
|
blob
|
history
diff --git
a/pv/view/cursorpair.cpp
b/pv/view/cursorpair.cpp
index 5df658dbf31cdff74cc9f789552634d75db50dc0..ea60b6ce1191415f6c6ef449c19846e4145193f3 100644
(file)
--- a/
pv/view/cursorpair.cpp
+++ b/
pv/view/cursorpair.cpp
@@
-71,9
+71,9
@@
float CursorPair::get_x() const
return (first_->get_x() + second_->get_x()) / 2.0f;
}
return (first_->get_x() + second_->get_x()) / 2.0f;
}
-QPoint CursorPair::point() const
+QPoint CursorPair::point(
const QRect &rect
) const
{
{
- return first_->point();
+ return first_->point(
rect
);
}
pv::widgets::Popup* CursorPair::create_popup(QWidget *parent)
}
pv::widgets::Popup* CursorPair::create_popup(QWidget *parent)
diff --git
a/pv/view/cursorpair.hpp
b/pv/view/cursorpair.hpp
index 7e089083f0d34ecb426c8b2de3977cc799a01934..4361784a7a0a3d43e4e730add4217269bcb23b67 100644
(file)
--- a/
pv/view/cursorpair.hpp
+++ b/
pv/view/cursorpair.hpp
@@
-68,7
+68,7
@@
public:
float get_x() const;
float get_x() const;
- QPoint point() const;
+ QPoint point(
const QRect &rect
) const;
pv::widgets::Popup* create_popup(QWidget *parent);
pv::widgets::Popup* create_popup(QWidget *parent);
diff --git
a/pv/view/rowitem.cpp
b/pv/view/rowitem.cpp
index be694a970503e98b7d4fa718ecb27944235a1bd2..eeb727ccc966cffa86eccbedcf00dc076ade7136 100644
(file)
--- a/
pv/view/rowitem.cpp
+++ b/
pv/view/rowitem.cpp
@@
-115,9
+115,9
@@
int RowItem::get_visual_y() const
return visual_v_offset_ + owner_->owner_visual_v_offset();
}
return visual_v_offset_ + owner_->owner_visual_v_offset();
}
-QPoint RowItem::point() const
+QPoint RowItem::point(
const QRect &rect
) const
{
{
- return QPoint(
0
, visual_v_offset());
+ return QPoint(
rect.right()
, visual_v_offset());
}
void RowItem::hover_point_changed()
}
void RowItem::hover_point_changed()
diff --git
a/pv/view/rowitem.hpp
b/pv/view/rowitem.hpp
index d30227830e73782c4427dad7df1e19f76380297e..3f2afbc3821c9598b04f3d8bf5dbc04e81d72143 100644
(file)
--- a/
pv/view/rowitem.hpp
+++ b/
pv/view/rowitem.hpp
@@
-94,9
+94,10
@@
public:
int get_visual_y() const;
/**
int get_visual_y() const;
/**
- * Gets the drag point of the row item.
+ * Gets the arrow-tip point of the row item marker.
+ * @param rect the rectangle of the header area.
*/
*/
- QPoint point() const;
+ QPoint point(
const QRect &rect
) const;
/**
* Computes the vertical extents of the contents of this row item.
/**
* Computes the vertical extents of the contents of this row item.
diff --git
a/pv/view/timemarker.cpp
b/pv/view/timemarker.cpp
index 614275cf98e04d1d559d211cae6bf9740f595b15..5b21bfd84b7012025abe59cdca5f5877491be552 100644
(file)
--- a/
pv/view/timemarker.cpp
+++ b/
pv/view/timemarker.cpp
@@
-74,9
+74,9
@@
float TimeMarker::get_x() const
return (time_ - view_.offset()) / view_.scale();
}
return (time_ - view_.offset()) / view_.scale();
}
-QPoint TimeMarker::point() const
+QPoint TimeMarker::point(
const QRect &rect
) const
{
{
- return QPoint(get_x(),
0
);
+ return QPoint(get_x(),
rect.right()
);
}
QRectF TimeMarker::label_rect(const QRectF &rect) const
}
QRectF TimeMarker::label_rect(const QRectF &rect) const
diff --git
a/pv/view/timemarker.hpp
b/pv/view/timemarker.hpp
index 4e5d92e6c6a75efee20a0283b36676c6d8d4cb86..4f7361bd13acb5a9e119e30183c8f82a5a0a92d0 100644
(file)
--- a/
pv/view/timemarker.hpp
+++ b/
pv/view/timemarker.hpp
@@
-67,9
+67,10
@@
public:
float get_x() const;
/**
float get_x() const;
/**
- * Gets the drag point of the row item.
+ * Gets the arrow-tip point of the time marker.
+ * @param rect the rectangle of the ruler area.
*/
*/
- QPoint point() const;
+ QPoint point(
const QRect &rect
) const;
/**
* Computes the outline rectangle of a label.
/**
* Computes the outline rectangle of a label.
diff --git
a/pv/view/viewitem.cpp
b/pv/view/viewitem.cpp
index ae5c427aff426acae5db7baa319567f5e13cda41..6917190a46dbd8e60554cc241219a2fc62de4743 100644
(file)
--- a/
pv/view/viewitem.cpp
+++ b/
pv/view/viewitem.cpp
@@
-61,7
+61,7
@@
QPoint ViewItem::drag_point() const
void ViewItem::drag()
{
void ViewItem::drag()
{
- drag_point_ = point();
+ drag_point_ = point(
QRect()
);
}
void ViewItem::drag_release()
}
void ViewItem::drag_release()
diff --git
a/pv/view/viewitem.hpp
b/pv/view/viewitem.hpp
index 1e02ffde289514bac8bf816aef3532ea46630e5f..11efbc0cdd1f7bd79855b7fe4c77cc67583f8922 100644
(file)
--- a/
pv/view/viewitem.hpp
+++ b/
pv/view/viewitem.hpp
@@
-88,8
+88,9
@@
public:
/**
* Get the drag point.
/**
* Get the drag point.
+ * @param rect the rectangle of the widget area.
*/
*/
- virtual QPoint point() const = 0;
+ virtual QPoint point(
const QRect &rect
) const = 0;
/**
* Computes the outline rectangle of a label.
/**
* Computes the outline rectangle of a label.