{
}
+bool Cursor::enabled() const
+{
+ return view_.cursors_shown();
+}
+
QString Cursor::get_text() const
{
return pv::util::format_time(time_, view_.tick_prefix(), 2);
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.
*/
*/
RowItem();
- /**
- * Returns true if the item is visible and enabled.
- */
- virtual bool enabled() const = 0;
-
/**
* Gets the vertical layout offset of this signal.
*/
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.
*/
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));