#define PULSEVIEW_PV_VIEW_HEADER_H
#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
-#include <map>
+#include <list>
+#include <utility>
-#include <QWidget>
+#include "marginwidget.h"
namespace pv {
namespace view {
class Signal;
class View;
-class Header : public QWidget
+class Header : public MarginWidget
{
Q_OBJECT
boost::shared_ptr<pv::view::Signal> get_mouse_over_signal(
const QPoint &pt);
+ void clear_selection();
+
private:
void paintEvent(QPaintEvent *event);
void on_action_set_colour_triggered();
+ void on_signals_moved();
+
signals:
void signals_moved();
private:
- View &_view;
-
QPoint _mouse_point;
QPoint _mouse_down_point;
- std::map<const Signal*, int> _mouse_down_signal_offsets;
+ std::list<std::pair<boost::weak_ptr<Signal>, int> >
+ _drag_sigs;
boost::shared_ptr<Signal> _context_signal;
QAction *_action_set_name;