projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make member variable underscores a suffix instead of a prefix
[pulseview.git]
/
pv
/
view
/
cursorpair.h
diff --git
a/pv/view/cursorpair.h
b/pv/view/cursorpair.h
index 42e6e51fa32ca3c764ac521b1d16318983e56825..f7eb51cacaabe9a79cf2d715c487eed94f5ab222 100644
(file)
--- a/
pv/view/cursorpair.h
+++ b/
pv/view/cursorpair.h
@@
-23,6
+23,8
@@
#include "cursor.h"
#include "cursor.h"
+#include <memory>
+
#include <QPainter>
class QPainter;
#include <QPainter>
class QPainter;
@@
-40,27
+42,17
@@
public:
* Constructor.
* @param view A reference to the view that owns this cursor pair.
*/
* Constructor.
* @param view A reference to the view that owns this cursor pair.
*/
- CursorPair(const View &view);
-
- /**
- * Returns a reference to the first cursor.
- */
- Cursor& first();
-
- /**
- * Returns a reference to the first cursor.
- */
- const Cursor& first() const;
+ CursorPair(View &view);
/**
/**
- * Returns a
reference to the second
cursor.
+ * Returns a
pointer to the first
cursor.
*/
*/
-
Cursor& second()
;
+
std::shared_ptr<Cursor> first() const
;
/**
/**
- * Returns a
reference
to the second cursor.
+ * Returns a
pointer
to the second cursor.
*/
*/
-
const Cursor&
second() const;
+
std::shared_ptr<Cursor>
second() const;
public:
QRectF get_label_rect(const QRect &rect) const;
public:
QRectF get_label_rect(const QRect &rect) const;
@@
-77,10
+69,10
@@
public:
std::pair<float, float> get_cursor_offsets() const;
private:
std::pair<float, float> get_cursor_offsets() const;
private:
-
Cursor _first, _second
;
- const View &
_view
;
+
std::shared_ptr<Cursor> first_, second_
;
+ const View &
view_
;
- QSizeF
_text_size
;
+ QSizeF
text_size_
;
};
} // namespace view
};
} // namespace view