projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Set PopupToolButton::_popup to NULL at construction
[pulseview.git]
/
pv
/
view
/
ruler.h
diff --git
a/pv/view/ruler.h
b/pv/view/ruler.h
index 1bda06427d253787389d1c87ca59dda26ad9fe71..dc4e7bb73139530cf870dacb5f06010e7c432050 100644
(file)
--- a/
pv/view/ruler.h
+++ b/
pv/view/ruler.h
@@
-21,18
+21,22
@@
#ifndef PULSEVIEW_PV_VIEW_RULER_H
#define PULSEVIEW_PV_VIEW_RULER_H
#ifndef PULSEVIEW_PV_VIEW_RULER_H
#define PULSEVIEW_PV_VIEW_RULER_H
-#include <QWidget>
+#include <boost/weak_ptr.hpp>
+
+#include "marginwidget.h"
namespace pv {
namespace view {
namespace pv {
namespace view {
+class TimeMarker;
class View;
class View;
-class Ruler : public
Q
Widget
+class Ruler : public
Margin
Widget
{
Q_OBJECT
private:
{
Q_OBJECT
private:
+ static const int RulerHeight;
static const int MinorTickSubdivision;
static const int ScaleUnits[3];
static const int MinorTickSubdivision;
static const int ScaleUnits[3];
@@
-44,9
+48,21
@@
private:
public:
Ruler(View &parent);
public:
Ruler(View &parent);
+ void clear_selection();
+
+ static QString format_time(double t, unsigned int prefix,
+ unsigned precision = 0);
+
+public:
+ QSize sizeHint() const;
+
private:
void paintEvent(QPaintEvent *event);
private:
void paintEvent(QPaintEvent *event);
+ void mouseMoveEvent(QMouseEvent *e);
+ void mousePressEvent(QMouseEvent *e);
+ void mouseReleaseEvent(QMouseEvent *);
+
private:
/**
* Draw a hover arrow under the cursor position.
private:
/**
* Draw a hover arrow under the cursor position.
@@
-57,7
+73,9
@@
private slots:
void hover_point_changed();
private:
void hover_point_changed();
private:
- View &_view;
+ boost::weak_ptr<TimeMarker> _grabbed_marker;
+ QPoint _mouse_down_point;
+ bool _dragging;
};
} // namespace view
};
} // namespace view