projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3b84fd6
)
SelectableItem: Moved in enabled(), and added to TriggerMarkers
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sat, 6 Dec 2014 23:11:29 +0000
(23:11 +0000)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Wed, 10 Dec 2014 17:06:15 +0000
(18:06 +0100)
pv/view/cursor.cpp
patch
|
blob
|
history
pv/view/cursor.hpp
patch
|
blob
|
history
pv/view/rowitem.hpp
patch
|
blob
|
history
pv/view/selectableitem.hpp
patch
|
blob
|
history
pv/view/timemarker.cpp
patch
|
blob
|
history
diff --git
a/pv/view/cursor.cpp
b/pv/view/cursor.cpp
index 6a4733112fbb6882edf3d281aed570cd5f19f538..f4a5df6f10f4b2e5321b97be12d3d1d825e0a116 100644
(file)
--- a/
pv/view/cursor.cpp
+++ b/
pv/view/cursor.cpp
@@
-45,6
+45,11
@@
Cursor::Cursor(View &view, double time) :
{
}
{
}
+bool Cursor::enabled() const
+{
+ return view_.cursors_shown();
+}
+
QString Cursor::get_text() const
{
return pv::util::format_time(time_, view_.tick_prefix(), 2);
QString Cursor::get_text() const
{
return pv::util::format_time(time_, view_.tick_prefix(), 2);
diff --git
a/pv/view/cursor.hpp
b/pv/view/cursor.hpp
index fab7497e18830c53128277be14a801742105afb4..b23bd642b47130446a21b8fcf7b67c812acb7dc5 100644
(file)
--- a/
pv/view/cursor.hpp
+++ b/
pv/view/cursor.hpp
@@
-48,6
+48,11
@@
public:
Cursor(View &view, double time);
public:
Cursor(View &view, double time);
public:
+ /**
+ * Returns true if the item is visible and enabled.
+ */
+ bool enabled() const;
+
/**
* Gets the text to show in the marker.
*/
/**
* Gets the text to show in the marker.
*/
diff --git
a/pv/view/rowitem.hpp
b/pv/view/rowitem.hpp
index 39c6f04030d1d214b688aa7ffedbbb0a8530f023..4f973e3fc218647d355fcede1492d45fe0a3725c 100644
(file)
--- a/
pv/view/rowitem.hpp
+++ b/
pv/view/rowitem.hpp
@@
-47,11
+47,6
@@
public:
*/
RowItem();
*/
RowItem();
- /**
- * Returns true if the item is visible and enabled.
- */
- virtual bool enabled() const = 0;
-
/**
* Gets the vertical layout offset of this signal.
*/
/**
* Gets the vertical layout offset of this signal.
*/
diff --git
a/pv/view/selectableitem.hpp
b/pv/view/selectableitem.hpp
index 1f5944900bafa8d5ed9adafb482c3f77b32c8395..29a5c9557973b852504e4a1ff7d7ca7bdcdad80e 100644
(file)
--- a/
pv/view/selectableitem.hpp
+++ b/
pv/view/selectableitem.hpp
@@
-48,6
+48,11
@@
public:
SelectableItem();
public:
SelectableItem();
public:
+ /**
+ * Returns true if the item is visible and enabled.
+ */
+ virtual bool enabled() const = 0;
+
/**
* Returns true if the item has been selected by the user.
*/
/**
* Returns true if the item has been selected by the user.
*/
diff --git
a/pv/view/timemarker.cpp
b/pv/view/timemarker.cpp
index 7e23806896d5ed010d090412b03cd9fc877daac8..2f129a3297f985bd7222b4c302d98db6e2fe9c4c 100644
(file)
--- a/
pv/view/timemarker.cpp
+++ b/
pv/view/timemarker.cpp
@@
-107,6
+107,9
@@
QRectF TimeMarker::get_label_rect(const QRect &rect) const
void TimeMarker::paint_label(QPainter &p, const QRect &rect)
{
void TimeMarker::paint_label(QPainter &p, const QRect &rect)
{
+ if (!enabled())
+ return;
+
const qreal x = (time_ - view_.offset()) / view_.scale();
const QRectF r(get_label_rect(rect));
const qreal x = (time_ - view_.offset()) / view_.scale();
const QRectF r(get_label_rect(rect));