X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fsignal.h;h=ece2e5a446218591f066a435454004a550b267f3;hp=250d3ff36bf04c90ba542629e062f3aba8d99cd2;hb=d09674d4529828b6bd2cbaa027949b953d6bd96a;hpb=3ef6182a4cb1d50262f019e5d78bd5c00fc08ca5 diff --git a/pv/view/signal.h b/pv/view/signal.h index 250d3ff3..ece2e5a4 100644 --- a/pv/view/signal.h +++ b/pv/view/signal.h @@ -31,6 +31,10 @@ #include +#include + +#include "selectableitem.h" + namespace pv { namespace data { @@ -39,16 +43,17 @@ class SignalData; namespace view { -class Signal +class Signal : public SelectableItem { + Q_OBJECT + private: static const int LabelHitPadding; - static const int LabelHighlightRadius; static const QPen SignalAxisPen; protected: - Signal(QString name); + Signal(const sr_probe *const probe); public: /** @@ -81,16 +86,6 @@ public: */ 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. @@ -156,12 +151,12 @@ private: QRectF get_label_rect(int y, int right); protected: + const sr_probe *const _probe; + QString _name; QColor _colour; int _v_offset; - bool _selected; - QSizeF _text_size; };