X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fheader.h;h=eed1d1e17b0e49d2d71908f29fae7f576b1afee9;hb=bb3030b34e44733036acdfe5b4d4ec0705146831;hp=35d5d20f49f7b5bcf89f1ca1c91a127188d07abb;hpb=9b6378f147671e62f57887d51d01864d20e01475;p=pulseview.git diff --git a/pv/view/header.h b/pv/view/header.h index 35d5d20f..eed1d1e1 100644 --- a/pv/view/header.h +++ b/pv/view/header.h @@ -21,10 +21,8 @@ #ifndef PULSEVIEW_PV_VIEW_HEADER_H #define PULSEVIEW_PV_VIEW_HEADER_H -#include -#include - #include +#include #include #include "marginwidget.h" @@ -39,11 +37,22 @@ class Header : public MarginWidget { Q_OBJECT +private: + static const int Padding; + public: Header(View &parent); + QSize sizeHint() const; + + /** + * The horizontal offset, relative to the left edge of the widget, + * where the arrows of the trace labels end. + */ + static const int BaselineOffset; + private: - boost::shared_ptr get_mouse_over_trace( + std::shared_ptr get_mouse_over_trace( const QPoint &pt); void clear_selection(); @@ -62,19 +71,24 @@ private: void contextMenuEvent(QContextMenuEvent *event); + void keyPressEvent(QKeyEvent *e); + private slots: void on_signals_changed(); void on_signals_moved(); + void on_trace_changed(); + signals: void signals_moved(); private: QPoint _mouse_point; QPoint _mouse_down_point; + bool _dragging; - std::list, int> > + std::list, int> > _drag_traces; };