X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Ftrace.hpp;h=0b4ecce49484af09e8b60938afc5c3069cb3d936;hp=758b2e97c46e0142238b842e8b3d42c013fda747;hb=119c5c232ef47e92ef6a5cc9f8b7c4c31dc2f387;hpb=1931b5f932cf068d073bc798f11dd21ede5389a2 diff --git a/pv/views/trace/trace.hpp b/pv/views/trace/trace.hpp index 758b2e97..0b4ecce4 100644 --- a/pv/views/trace/trace.hpp +++ b/pv/views/trace/trace.hpp @@ -94,6 +94,7 @@ private: protected: Trace(shared_ptr channel); + ~Trace(); public: /** @@ -101,6 +102,16 @@ public: */ shared_ptr base() const; + /** + * Returns true if the item may be selected. + */ + virtual bool is_selectable(QPoint pos) const; + + /** + * Returns true if the item may be dragged/moved. + */ + virtual bool is_draggable(QPoint pos) const; + /** * Configures the segment display mode to use. */ @@ -116,7 +127,7 @@ public: */ virtual void paint_label(QPainter &p, const QRect &rect, bool hover); - virtual QMenu* create_context_menu(QWidget *parent); + virtual QMenu* create_header_context_menu(QWidget *parent); pv::widgets::Popup* create_popup(QWidget *parent); @@ -127,6 +138,14 @@ public: */ QRectF label_rect(const QRectF &rect) const; + /** + * Computes the outline rectangle of the viewport hit-box. + * @param rect the rectangle of the viewport area. + * @return Returns the rectangle of the hit-box. + * @remarks The default implementation returns an empty hit-box. + */ + virtual QRectF hit_box_rect(const ViewItemPaintParams &pp) const; + void set_current_segment(const int segment); int get_current_segment() const;