X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fcursor.hpp;h=319d3a746aaae4f74c254cfb294891bd3025efae;hp=fab7497e18830c53128277be14a801742105afb4;hb=f4e57597347e47a4ea58fbdc7b0a22e07f1c0ede;hpb=3b84fd6d59b10053d5ffba90f8e66324f49841a3 diff --git a/pv/view/cursor.hpp b/pv/view/cursor.hpp index fab7497e..319d3a74 100644 --- a/pv/view/cursor.hpp +++ b/pv/view/cursor.hpp @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PULSEVIEW_PV_VIEW_CURSOR_H -#define PULSEVIEW_PV_VIEW_CURSOR_H +#ifndef PULSEVIEW_PV_VIEWS_TRACEVIEW_CURSOR_HPP +#define PULSEVIEW_PV_VIEWS_TRACEVIEW_CURSOR_HPP #include "timemarker.hpp" @@ -30,7 +30,8 @@ class QPainter; namespace pv { -namespace view { +namespace views { +namespace TraceView { class Cursor : public TimeMarker { @@ -48,6 +49,11 @@ 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. */ @@ -58,13 +64,14 @@ public: * @param rect The rectangle of the ruler client area. * @return Returns the label rectangle. */ - QRectF get_label_rect(const QRect &rect) const; + QRectF label_rect(const QRectF &rect) const; private: std::shared_ptr get_other_cursor() const; }; -} // namespace view +} // namespace TraceView +} // namespace views } // namespace pv -#endif // PULSEVIEW_PV_VIEW_CURSOR_H +#endif // PULSEVIEW_PV_VIEWS_TRACEVIEW_CURSOR_HPP