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 129b70cbe54520d0ccebb2b829a91f3b7211e496..dc4e7bb73139530cf870dacb5f06010e7c432050 100644
(file)
--- a/
pv/view/ruler.h
+++ b/
pv/view/ruler.h
@@
-21,7
+21,9
@@
#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 {
@@
-29,11
+31,12
@@
namespace view {
class TimeMarker;
class View;
class TimeMarker;
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];
@@
-45,6
+48,14
@@
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);
@@
-53,8
+64,6
@@
private:
void mouseReleaseEvent(QMouseEvent *);
private:
void mouseReleaseEvent(QMouseEvent *);
private:
- void draw_cursors(QPainter &p);
-
/**
* Draw a hover arrow under the cursor position.
*/
/**
* Draw a hover arrow under the cursor position.
*/
@@
-64,9
+73,9
@@
private slots:
void hover_point_changed();
private:
void hover_point_changed();
private:
-
View &_view
;
-
-
TimeMarker *_grabbed_marker
;
+
boost::weak_ptr<TimeMarker> _grabbed_marker
;
+ QPoint _mouse_down_point;
+
bool _dragging
;
};
} // namespace view
};
} // namespace view