X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fviewwidget.hpp;h=cfcbda43ff3b68db0679d6f4a44fd5e50017adf5;hp=e6d2aa60125db71cba6fcb07b79403d4af90d4a7;hb=f4e57597347e47a4ea58fbdc7b0a22e07f1c0ede;hpb=90d77e35b43fb7fdffc800945761bf95ba9faf02 diff --git a/pv/view/viewwidget.hpp b/pv/view/viewwidget.hpp index e6d2aa6..cfcbda4 100644 --- a/pv/view/viewwidget.hpp +++ b/pv/view/viewwidget.hpp @@ -28,12 +28,8 @@ class QTouchEvent; namespace pv { -namespace view { - -enum ViewType { - TraceView, - TabularDecodeView -}; +namespace views { +namespace TraceView { class View; class ViewItem; @@ -52,7 +48,7 @@ protected: * @remarks the default implementation does nothing. */ virtual void item_hover( - const std::shared_ptr &item); + const std::shared_ptr &item); /** * Indicates the event an a view item has been clicked. @@ -60,7 +56,7 @@ protected: * @remarks the default implementation does nothing. */ virtual void item_clicked( - const std::shared_ptr &item); + const std::shared_ptr &item); /** * Returns true if the selection of row items allows dragging. @@ -99,7 +95,7 @@ protected: /** * Gets the items in the view widget. */ - virtual std::vector< std::shared_ptr > items() = 0; + virtual std::vector< std::shared_ptr > items() = 0; /** * Gets the first view item which has a hit-box that contains @c pt . @@ -107,7 +103,7 @@ protected: * @return the view item that has been found, or and empty * @c shared_ptr if no item was found. */ - virtual std::shared_ptr get_mouse_over_item( + virtual std::shared_ptr get_mouse_over_item( const QPoint &pt) = 0; /** @@ -144,14 +140,15 @@ Q_SIGNALS: void selection_changed(); protected: - pv::view::View &view_; + pv::views::TraceView::View &view_; QPoint mouse_point_; QPoint mouse_down_point_; std::shared_ptr mouse_down_item_; bool item_dragging_; }; -} // namespace view +} // namespace TraceView +} // namespace views } // namespace pv #endif // PULSEVIEW_PV_VIEWWIDGET_HPP