X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fsignal.h;h=5732e19d5f45e632630d382ddcc5b36ef581f8fe;hb=9e40e83daf6a2851f4883468a4237849f984b336;hp=b53d05393e814e28e1212a0862c0309823ae992c;hpb=cec48d1618edd0f28f21d5351f53692876222e16;p=pulseview.git diff --git a/pv/view/signal.h b/pv/view/signal.h index b53d053..5732e19 100644 --- a/pv/view/signal.h +++ b/pv/view/signal.h @@ -24,15 +24,19 @@ #include #include +#include #include #include #include #include +#include #include #include +#include "selectableitem.h" + namespace pv { namespace data { @@ -41,11 +45,12 @@ 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; @@ -83,16 +88,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. @@ -157,6 +152,12 @@ private: */ QRectF get_label_rect(int y, int right); +private slots: + void on_text_changed(const QString &text); + +signals: + void text_changed(); + protected: const sr_probe *const _probe; @@ -164,9 +165,11 @@ protected: QColor _colour; int _v_offset; - bool _selected; - QSizeF _text_size; + + QWidgetAction _name_action; + QComboBox _name_widget; + bool _updating_name_widget; }; } // namespace view