X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fviewitem.hpp;h=8421d8614914078fc61b7c3a26a3a647f57f99c4;hp=39cf034562fb0e11cb500e949a424d9265b47fad;hb=cbd9ec7f751a5403d1465e966ccecd31b7086e8a;hpb=a3d5a7c7682ebb991718b49ae916c5840b3b6b51 diff --git a/pv/views/trace/viewitem.hpp b/pv/views/trace/viewitem.hpp index 39cf0345..8421d861 100644 --- a/pv/views/trace/viewitem.hpp +++ b/pv/views/trace/viewitem.hpp @@ -23,6 +23,7 @@ #include #include +#include #include "viewitempaintparams.hpp" @@ -58,6 +59,11 @@ public: */ virtual bool enabled() const = 0; + /** + * Returns true if the item may be selected. + */ + virtual bool is_selectable(QPoint pos) const; + /** * Returns true if the item has been selected by the user. */ @@ -147,15 +153,17 @@ public: public: /** - * Gets the text colour. - * @remarks This colour is computed by comparing the lightness - * of the trace colour against a threshold to determine whether + * Gets the text color. + * @remarks This color is computed by comparing the lightness + * of the trace color against a threshold to determine whether * white or black would be more visible. */ - static QColor select_text_colour(QColor background); + static QColor select_text_color(QColor background); public: - virtual QMenu* create_context_menu(QWidget *parent); + virtual QMenu* create_header_context_menu(QWidget *parent); + + virtual QMenu* create_view_context_menu(QWidget *parent, QPoint &click_pos); virtual pv::widgets::Popup* create_popup(QWidget *parent);