X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fselectableitem.h;h=323c87e18743ff894255137af83cbc86c6fce5c3;hb=6e3f046e779b939efebdfa4d9e68fe28d9beee59;hp=69204b29478b901ec703ee858ab3ba457ad318ec;hpb=f1283456ae0859990ccd914f8c147064345df13f;p=pulseview.git diff --git a/pv/view/selectableitem.h b/pv/view/selectableitem.h index 69204b29..323c87e1 100644 --- a/pv/view/selectableitem.h +++ b/pv/view/selectableitem.h @@ -23,9 +23,11 @@ #include -#include +#include class QAction; +class QMenu; +class QWidget; namespace pv { namespace view { @@ -34,6 +36,9 @@ class SelectableItem : public QObject { Q_OBJECT +private: + static const int HighlightRadius; + public: SelectableItem(); @@ -48,6 +53,19 @@ public: */ void select(bool select = true); +public: + virtual void init_context_bar_actions(QWidget *parent) = 0; + + virtual const std::list get_context_bar_actions() = 0; + + virtual QMenu* create_context_menu(QWidget *parent); + +protected: + static QPen highlight_pen(); + +protected: + QWidget *_context_parent; + private: bool _selected; };