X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fselectableitem.h;h=467da0f2cbf0b7140edf87fb9e3be0b34b3c79e6;hp=d54491370bd769a588c82ff544f58d13fb1112cd;hb=ef8311a4296a2dc85c82b063de61efa4eb7a8404;hpb=2a2512b21581ea346fea7d96bd3deeb37f1cfed4 diff --git a/pv/view/selectableitem.h b/pv/view/selectableitem.h index d5449137..467da0f2 100644 --- a/pv/view/selectableitem.h +++ b/pv/view/selectableitem.h @@ -23,7 +23,7 @@ #include -#include +#include class QAction; @@ -34,6 +34,33 @@ class SelectableItem : public QObject { Q_OBJECT +private: + static const int HighlightRadius; + +public: + SelectableItem(); + +public: + /** + * Returns true if the signal has been selected by the user. + */ + bool selected() const; + + /** + * Selects or deselects the signal. + */ + void select(bool select = true); + +public: + virtual void init_context_bar_actions(QWidget *parent) = 0; + + virtual const std::list get_context_bar_actions() = 0; + +protected: + static QPen highlight_pen(); + +private: + bool _selected; }; } // namespace view