]> sigrok.org Git - pulseview.git/blobdiff - pv/view/header.hpp
MarginWidget: Moved in clear_selection
[pulseview.git] / pv / view / header.hpp
index c5c8ae7a323ced381a0d18048ef31cca2327d7f7..34f851b67a26af234a85c956b47bcd8df0314a09 100644 (file)
@@ -32,6 +32,7 @@ namespace view {
 
 class RowItem;
 class View;
+class ViewItem;
 
 class Header : public MarginWidget
 {
@@ -59,12 +60,19 @@ public:
        static const int BaselineOffset;
 
 private:
-       std::shared_ptr<pv::view::RowItem> get_mouse_over_row_item(
-               const QPoint &pt);
-
-       void clear_selection();
+       /**
+        * Gets the row items.
+        */
+       std::vector< std::shared_ptr<pv::view::ViewItem> > items();
 
-       void show_popup(const std::shared_ptr<RowItem> &item);
+       /**
+        * Gets the first view item which has a label that contains @c pt .
+        * @param pt the point to search with.
+        * @return the view item that has been found, or and empty
+        *   @c shared_ptr if no item was found.
+        */
+       std::shared_ptr<pv::view::ViewItem> get_mouse_over_item(
+               const QPoint &pt);
 
 private:
        void paintEvent(QPaintEvent *event);
@@ -78,8 +86,6 @@ private:
 
        void mouseMoveEvent(QMouseEvent *event);
 
-       void leaveEvent(QEvent *event);
-
        void contextMenuEvent(QContextMenuEvent *event);
 
        void keyPressEvent(QKeyEvent *e);
@@ -93,9 +99,6 @@ private Q_SLOTS:
 
 Q_SIGNALS:
        void signals_moved();
-
-private:
-       std::shared_ptr<RowItem> mouse_down_item_;
 };
 
 } // namespace view