X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Ftracetreeitem.hpp;h=ed0e7e8d9cad521f915803d29ceaadd8184a2a14;hp=5e60ffcb2e568f959bff3f4ab7f6d5470b1799f7;hb=fcb97d775ddc37e59efc195666d612da9dba04d1;hpb=7c8b6ad299f4b4cfd5299953aff932316893a372 diff --git a/pv/view/tracetreeitem.hpp b/pv/view/tracetreeitem.hpp index 5e60ffcb..ed0e7e8d 100644 --- a/pv/view/tracetreeitem.hpp +++ b/pv/view/tracetreeitem.hpp @@ -46,6 +46,16 @@ public: */ TraceTreeItem(); + /** + * Gets the owner this item in the view item hierachy. + */ + TraceTreeItemOwner* owner() const; + + /** + * Selects or deselects the signal. + */ + void select(bool select = true); + /** * Gets the vertical layout offset of this signal. */ @@ -77,11 +87,6 @@ public: */ void animate_to_layout_v_offset(); - /** - * Gets the owner this trace in the view trace hierachy. - */ - pv::view::TraceTreeItemOwner* owner() const; - /** * Sets the owner this trace in the view trace hierachy. * @param The new owner of the trace. @@ -105,6 +110,14 @@ public: */ QPoint point(const QRect &rect) const; + /** + * Sets the new background colour state: false = dark, true = bright. + * This is to allow for alternating backgrounds but has no effect + * when coloured background colours are used. + * @param state New bg color state to use. + */ + void set_bgcolour_state(bool state); + /** * Computes the vertical extents of the contents of this row item. * @return A pair containing the minimum and maximum y-values. @@ -112,11 +125,13 @@ public: virtual std::pair v_extents() const = 0; protected: - pv::view::TraceTreeItemOwner *owner_; + TraceTreeItemOwner *owner_; int layout_v_offset_; int visual_v_offset_; + bool bgcolour_state_; + private: QPropertyAnimation v_offset_animation_; };