* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef PULSEVIEW_PV_VIEWITEM_H
-#define PULSEVIEW_PV_VIEWITEM_H
+#ifndef PULSEVIEW_PV_VIEWITEM_HPP
+#define PULSEVIEW_PV_VIEWITEM_HPP
#include <list>
namespace view {
+class ViewItemOwner;
+
class ViewItem : public QObject
{
Q_OBJECT
*/
virtual QRectF label_rect(const QRectF &rect) const = 0;
+ /**
+ * 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 QRectF &rect) const;
+
/**
* Paints the signal label.
* @param p the QPainter to paint into.
public:
virtual QMenu* create_context_menu(QWidget *parent);
- virtual pv::widgets::Popup* create_popup(QWidget *parent) = 0;
+ virtual pv::widgets::Popup* create_popup(QWidget *parent);
virtual void delete_pressed();
} // namespace view
} // namespace pv
-#endif // PULSEVIEW_PV_VIEWITEM_H
+#endif // PULSEVIEW_PV_VIEWITEM_HPP