X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fheader.hpp;h=34f851b67a26af234a85c956b47bcd8df0314a09;hb=5a6a4ce3e32a250cd586f4755573ed3bed530d7b;hp=10335cf5b6faf0cafbfe96f09fcd5ef8bddf4425;hpb=859eed5994e0395cc7b69442f961b23ec0b19eed;p=pulseview.git diff --git a/pv/view/header.hpp b/pv/view/header.hpp index 10335cf..34f851b 100644 --- a/pv/view/header.hpp +++ b/pv/view/header.hpp @@ -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 get_mouse_over_item( - const QPoint &pt); - - void clear_selection(); + /** + * Gets the row items. + */ + std::vector< std::shared_ptr > items(); - void show_popup(const std::shared_ptr &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 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 mouse_down_item_; }; } // namespace view