X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fviewwidget.hpp;h=e6d2aa60125db71cba6fcb07b79403d4af90d4a7;hb=7cd2b5f35bbc29136173acbc4c6d9b5f4e8f7606;hp=6fd1ecefd1f853a2403fc880cacb36c1c699a108;hpb=282905348863fe871a48c680bd12bc1dee364a43;p=pulseview.git diff --git a/pv/view/viewwidget.hpp b/pv/view/viewwidget.hpp index 6fd1ecef..e6d2aa60 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 @@ -30,6 +30,11 @@ class QTouchEvent; namespace pv { namespace view { +enum ViewType { + TraceView, + TabularDecodeView +}; + class View; class ViewItem; @@ -40,6 +45,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 +126,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 +154,4 @@ protected: } // namespace view } // namespace pv -#endif // PULSEVIEW_PV_VIEWWIDGET_H +#endif // PULSEVIEW_PV_VIEWWIDGET_HPP