X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fsignal.h;h=72d42cc2fd094098a634eea00b77a7cce606e77e;hb=491536836d878a3abf7959800f56641ac093bd11;hp=8adee96f9ae765b07d296d7b8b504e260df59578;hpb=8d634081d8b0cc741dd34d8c646474ff6754aea8;p=pulseview.git diff --git a/pv/view/signal.h b/pv/view/signal.h index 8adee96f..72d42cc2 100644 --- a/pv/view/signal.h +++ b/pv/view/signal.h @@ -31,14 +31,16 @@ #include namespace pv { -namespace view { class SignalData; +namespace view { + class Signal { private: static const int LabelHitPadding; + static const int LabelHighlightRadius; protected: Signal(QString name); @@ -64,6 +66,26 @@ public: */ void set_colour(QColor colour); + /** + * Gets the vertical layout offset of this signal. + */ + int get_v_offset() const; + + /** + * Sets the vertical layout offset of this signal. + */ + void set_v_offset(int v_offset); + + /** + * Returns true if the signal has been selected by the user. + */ + bool selected() const; + + /** + * Selects or deselects the signal. + */ + void select(bool select = true); + /** * Paints the signal with a QPainter * @param p the QPainter to paint into. @@ -117,6 +139,9 @@ protected: protected: QString _name; QColor _colour; + int _v_offset; + + bool _selected; QSizeF _text_size; };