ViewWidget: Moved in unified accept_drag
[pulseview.git] / pv / view / marginwidget.hpp
index 54ace028fcda121bd79588c20a1b32d6af159c67..2178003f00969584c309d7832c6a09b2dab756c0 100644 (file)
 #include <memory>
 
 #include <QPoint>
-#include <QWidget>
+
+#include "viewwidget.hpp"
 
 namespace pv {
 namespace view {
 
-class View;
 class ViewItem;
 
-class MarginWidget : public QWidget
+class MarginWidget : public ViewWidget
 {
        Q_OBJECT
 
@@ -67,12 +67,6 @@ protected:
         */
        void show_popup(const std::shared_ptr<ViewItem> &item);
 
-       /**
-        * Returns true if the selection of row items allows dragging.
-        * @return Returns true if the drag is acceptable.
-        */
-       virtual bool accept_drag() const = 0;
-
        /**
         * Drag the dragging items by the delta offset.
         * @param delta the drag offset in pixels.
@@ -109,7 +103,6 @@ Q_SIGNALS:
        void selection_changed();
 
 protected:
-       pv::view::View &view_;
        QPoint mouse_point_;
        QPoint mouse_down_point_;
        std::shared_ptr<ViewItem> mouse_down_item_;