projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix #1222 by adding a tooltip for when there isn't enough space
[pulseview.git]
/
pv
/
views
/
trace
/
cursorpair.hpp
diff --git
a/pv/views/trace/cursorpair.hpp
b/pv/views/trace/cursorpair.hpp
index 5d53bacfd3ad839c825e6fbc90a33b21569a34cd..6728268039f5e718d7363f68b63a9b43fa55758c 100644
(file)
--- a/
pv/views/trace/cursorpair.hpp
+++ b/
pv/views/trace/cursorpair.hpp
@@
-25,6
+25,7
@@
#include <memory>
#include <QPainter>
#include <memory>
#include <QPainter>
+#include <QRect>
using std::pair;
using std::shared_ptr;
using std::pair;
using std::shared_ptr;
@@
-35,11
+36,15
@@
namespace pv {
namespace views {
namespace trace {
namespace views {
namespace trace {
+class View;
+
class CursorPair : public TimeItem
{
class CursorPair : public TimeItem
{
+ Q_OBJECT
+
private:
static const int DeltaPadding;
private:
static const int DeltaPadding;
- static const QColor ViewportFillColo
u
r;
+ static const QColor ViewportFillColor;
public:
/**
public:
/**
@@
-48,7
+53,6
@@
public:
*/
CursorPair(View &view);
*/
CursorPair(View &view);
-public:
/**
* Returns true if the item is visible and enabled.
*/
/**
* Returns true if the item is visible and enabled.
*/
@@
-98,14
+102,17
@@
public:
*/
QString format_string();
*/
QString format_string();
- void compute_text_size(QPainter &p);
-
pair<float, float> get_cursor_offsets() const;
pair<float, float> get_cursor_offsets() const;
+public Q_SLOTS:
+ void on_hover_point_changed(const QWidget* widget, const QPoint &hp);
+
private:
shared_ptr<Cursor> first_, second_;
QSizeF text_size_;
private:
shared_ptr<Cursor> first_, second_;
QSizeF text_size_;
+ QRectF label_area_;
+ bool label_incomplete_;
};
} // namespace trace
};
} // namespace trace