X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Ftracetreeitem.hpp;h=cc329121ffcebdf842348c1903ad2b3e190b5f8e;hp=c41b67d75d1d2ab1a2dc503048d80d7c4241b63b;hb=efdec55aec1a137460fa362a381ed1904182bfed;hpb=75663e3ab6656ed9fc39050d8ac6752450b6a4ad diff --git a/pv/view/tracetreeitem.hpp b/pv/view/tracetreeitem.hpp index c41b67d..cc32912 100644 --- a/pv/view/tracetreeitem.hpp +++ b/pv/view/tracetreeitem.hpp @@ -14,12 +14,11 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * along with this program; if not, see . */ -#ifndef PULSEVIEW_PV_VIEW_TRACETREEITEM_HPP -#define PULSEVIEW_PV_VIEW_TRACETREEITEM_HPP +#ifndef PULSEVIEW_PV_VIEWS_TRACEVIEW_TRACETREEITEM_HPP +#define PULSEVIEW_PV_VIEWS_TRACEVIEW_TRACETREEITEM_HPP #include @@ -28,12 +27,13 @@ #include "rowitem.hpp" namespace pv { -namespace view { +namespace views { +namespace TraceView { class TraceTreeItemOwner; class TraceTreeItem : public RowItem, - public std::enable_shared_from_this + public std::enable_shared_from_this { Q_OBJECT Q_PROPERTY(int visual_v_offset @@ -47,7 +47,7 @@ public: TraceTreeItem(); /** - * Gets the owner this item in the view item hierachy. + * Gets the owner of this item in the view item hierachy. */ TraceTreeItemOwner* owner() const; @@ -91,7 +91,7 @@ public: * Sets the owner this trace in the view trace hierachy. * @param The new owner of the trace. */ - void set_owner(pv::view::TraceTreeItemOwner *owner); + void set_owner(TraceTreeItemOwner *owner); /** * Gets the visual y-offset of the axis. @@ -110,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. @@ -122,11 +130,14 @@ protected: int layout_v_offset_; int visual_v_offset_; + bool bgcolour_state_; + private: QPropertyAnimation v_offset_animation_; }; -} // namespace view +} // namespace TraceView +} // namespace views } // namespace pv -#endif // PULSEVIEW_PV_VIEW_TRACETREEITEM_HPP +#endif // PULSEVIEW_PV_VIEWS_TRACEVIEW_TRACETREEITEM_HPP