X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fheader.hpp;h=9bca88cee73bf83c35510b8afd4c30bad2ebfca5;hb=f15bb3bc4f964eaafdd4c46f29f69ef74572baee;hp=10335cf5b6faf0cafbfe96f09fcd5ef8bddf4425;hpb=859eed5994e0395cc7b69442f961b23ec0b19eed;p=pulseview.git diff --git a/pv/view/header.hpp b/pv/view/header.hpp index 10335cf5..9bca88ce 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,43 +60,38 @@ public: static const int BaselineOffset; private: - std::shared_ptr get_mouse_over_item( - const QPoint &pt); + /** + * Gets the row items. + */ + std::vector< std::shared_ptr > items(); - void clear_selection(); + /** + * 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); - void show_popup(const std::shared_ptr &item); + /** + * Drag the dragging items by the delta offset. + * @param delta the drag offset in pixels. + */ + void drag_items(const QPoint &delta); private: void paintEvent(QPaintEvent *event); private: - void mouseLeftPressEvent(QMouseEvent *event); - void mousePressEvent(QMouseEvent * event); - - void mouseLeftReleaseEvent(QMouseEvent *event); - void mouseReleaseEvent(QMouseEvent *event); - - void mouseMoveEvent(QMouseEvent *event); - - void leaveEvent(QEvent *event); - void contextMenuEvent(QContextMenuEvent *event); void keyPressEvent(QKeyEvent *e); private Q_SLOTS: - void on_signals_moved(); - void on_group(); void on_ungroup(); - -Q_SIGNALS: - void signals_moved(); - -private: - std::shared_ptr mouse_down_item_; }; } // namespace view