X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fcursor.hpp;h=79a0c7f87167441df62456d1666a883afe3df694;hp=9f0adeddbd8eb0bdd20e16ded2fd16d6036533cc;hb=efdec55aec1a137460fa362a381ed1904182bfed;hpb=4fabd61a2676246265c12d614cde496bf0a79075 diff --git a/pv/view/cursor.hpp b/pv/view/cursor.hpp index 9f0aded..79a0c7f 100644 --- a/pv/view/cursor.hpp +++ b/pv/view/cursor.hpp @@ -14,12 +14,11 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * along with this program; if not, see . */ -#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 +29,8 @@ class QPainter; namespace pv { -namespace view { +namespace views { +namespace TraceView { class Cursor : public TimeMarker { @@ -48,18 +48,29 @@ 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. + */ + QString get_text() const; + /** * Gets the marker label rectangle. * @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