public:
Ruler(View &parent);
-public:
- void clear_selection();
-
public:
QSize sizeHint() const;
QSize extended_size_hint() const;
private:
+ /**
+ * Gets the time items.
+ */
+ std::vector< std::shared_ptr<pv::view::ViewItem> > items();
+
/**
* Gets the first view item which has a label that contains @c pt .
* @param pt the point to search with.
std::shared_ptr<pv::view::ViewItem> get_mouse_over_item(
const QPoint &pt);
+ /**
+ * Returns true if the selection of time items allows dragging.
+ * @return Returns true if the drag is acceptable.
+ */
+ bool accept_drag() const;
+
+ /**
+ * 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);
- void mouseMoveEvent(QMouseEvent *e);
- void mousePressEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *);
-
void mouseDoubleClickEvent(QMouseEvent *e);
- void contextMenuEvent(QContextMenuEvent *event);
-
- void keyPressEvent(QKeyEvent *e);
-
private:
/**
* Draw a hover arrow under the cursor position.