X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fviewwidget.hpp;h=fade3d289ab1e687ce511afd9c960337b9e75ef3;hp=6fd1ecefd1f853a2403fc880cacb36c1c699a108;hb=d9ea96280ab1128427143660ae375c30b19aa0cb;hpb=282905348863fe871a48c680bd12bc1dee364a43 diff --git a/pv/view/viewwidget.hpp b/pv/view/viewwidget.hpp index 6fd1ecef..fade3d28 100644 --- a/pv/view/viewwidget.hpp +++ b/pv/view/viewwidget.hpp @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PULSEVIEW_PV_VIEWWIDGET_H -#define PULSEVIEW_PV_VIEWWIDGET_H +#ifndef PULSEVIEW_PV_VIEWWIDGET_HPP +#define PULSEVIEW_PV_VIEWWIDGET_HPP #include @@ -40,6 +40,15 @@ class ViewWidget : public QWidget protected: ViewWidget(View &parent); + /** + * Indicates when a view item is being hovered over. + * @param item The item that is being hovered over, or @c nullptr + * if no view item is being hovered over. + * @remarks the default implementation does nothing. + */ + virtual void item_hover( + const std::shared_ptr &item); + /** * Indicates the event an a view item has been clicked. * @param item the view item that has been clicked. @@ -112,12 +121,12 @@ protected: * Handles touch begin update and end events. * @param e the event that triggered this handler. */ - virtual bool touch_event(QTouchEvent *e); + virtual bool touch_event(QTouchEvent *event); protected: bool event(QEvent *event); - void mousePressEvent(QMouseEvent * event); + void mousePressEvent(QMouseEvent *event); void mouseReleaseEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent *event); @@ -140,4 +149,4 @@ protected: } // namespace view } // namespace pv -#endif // PULSEVIEW_PV_VIEWWIDGET_H +#endif // PULSEVIEW_PV_VIEWWIDGET_HPP