2 * This file is part of the PulseView project.
4 * Copyright (C) 2013 Joel Holdsworth <joel@airwebreathe.org.uk>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef PULSEVIEW_PV_VIEW_HEADERITEM_H
22 #define PULSEVIEW_PV_VIEW_HEADERITEM_H
26 #include <QPropertyAnimation>
28 #include "viewitem.hpp"
35 class RowItem : public ViewItem,
36 public std::enable_shared_from_this<pv::view::RowItem>
39 Q_PROPERTY(int visual_v_offset
41 WRITE set_visual_v_offset)
50 * Gets the vertical layout offset of this signal.
52 int layout_v_offset() const;
55 * Sets the vertical layout offset of this signal.
57 void set_layout_v_offset(int v_offset);
60 * Gets the vertical visual offset of this signal.
62 int visual_v_offset() const;
65 * Sets the vertical visual offset of this signal.
67 void set_visual_v_offset(int v_offset);
70 * Sets the visual and layout offset of this signal.
72 void force_to_v_offset(int v_offset);
75 * Begins an animation that will animate the visual offset toward
78 void animate_to_layout_v_offset();
81 * Gets the owner this trace in the view trace hierachy.
83 pv::view::RowItemOwner* owner() const;
86 * Sets the owner this trace in the view trace hierachy.
87 * @param The new owner of the trace.
89 void set_owner(pv::view::RowItemOwner *owner);
92 * Gets the visual y-offset of the axis.
94 int get_visual_y() const;
97 * Gets the drag point of the row item.
102 * Computes the vertical extents of the contents of this row item.
103 * @return A pair containing the minimum and maximum y-values.
105 virtual std::pair<int, int> v_extents() const = 0;
108 virtual void hover_point_changed();
111 pv::view::RowItemOwner *owner_;
113 int layout_v_offset_;
114 int visual_v_offset_;
117 QPropertyAnimation v_offset_animation_;
123 #endif // PULSEVIEW_PV_VIEW_HEADERITEM_H