X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fcursor.hpp;h=03b97a17789e948e4062dc44f484274d238fdcc7;hp=8679a2866c3b986e33532b71a660abc651dba031;hb=1f1edc092680e9182be07a760ad03d00b8c5ca06;hpb=2acdb232d6bb452cfdfaea3ef5218fb4da592329 diff --git a/pv/view/cursor.hpp b/pv/view/cursor.hpp index 8679a286..03b97a17 100644 --- a/pv/view/cursor.hpp +++ b/pv/view/cursor.hpp @@ -37,14 +37,7 @@ class Cursor : public TimeMarker Q_OBJECT public: - static const QColor LineColour; static const QColor FillColour; - static const QColor HighlightColour; - static const QColor TextColour; - - static const int Offset; - - static const int ArrowSize; public: /** @@ -56,28 +49,24 @@ public: public: /** - * Gets the marker label rectangle. - * @param rect The rectangle of the ruler client area. - * @return Returns the label rectangle. + * Returns true if the item is visible and enabled. */ - QRectF get_label_rect(const QRect &rect) const; + bool enabled() const; /** - * Paints the cursor's label to the ruler. - * @param p The painter to draw with. + * 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. - * @param prefix The index of the SI prefix to use. + * @return Returns the label rectangle. */ - void paint_label(QPainter &p, const QRect &rect, - unsigned int prefix); + QRectF label_rect(const QRectF &rect) const; private: - void compute_text_size(QPainter &p, unsigned int prefix); - std::shared_ptr get_other_cursor() const; - -private: - QSizeF text_size_; }; } // namespace view