20 #ifndef PULSEVIEW_PV_VIEWS_TRACE_RULER_HPP 21 #define PULSEVIEW_PV_VIEWS_TRACE_RULER_HPP 26 #include <boost/optional.hpp> 33 using std::shared_ptr;
37 struct tick_position_test_0;
38 struct tick_position_test_1;
39 struct tick_position_test_2;
51 vector<pair<double, QString>>
major;
64 friend struct RulerTest::tick_position_test_0;
65 friend struct RulerTest::tick_position_test_1;
66 friend struct RulerTest::tick_position_test_2;
78 QSize sizeHint()
const override;
85 QSize extended_size_hint()
const override;
112 static QString format_time_with_distance(
117 unsigned precision = 0,
126 shared_ptr<TimeItem> get_reference_item()
const;
129 virtual void contextMenuEvent(QContextMenuEvent *event)
override;
130 void resizeEvent(QResizeEvent*)
override;
131 virtual void item_hover(
const shared_ptr<ViewItem> &item, QPoint pos)
override;
137 vector< shared_ptr<ViewItem> > items()
override;
145 shared_ptr<ViewItem> get_mouse_over_item(
const QPoint &pt)
override;
147 void mouseDoubleClickEvent(QMouseEvent *event)
override;
149 void paintEvent(QPaintEvent *event)
override;
156 void draw_hover_mark(QPainter &p,
int text_height);
158 int calculate_text_height()
const;
177 const unsigned int minor_tick_count,
181 void on_hover_point_changed(
const QWidget* widget,
const QPoint &hp);
183 void invalidate_tick_position_cache();
185 void on_createMarker();
186 void on_setZeroPosition();
187 void on_resetZeroPosition();
188 void on_toggleHoverMarker();
206 #endif // PULSEVIEW_PV_VIEWS_TRACE_RULER_HPP
x y t t *t x y t t t x y t t t x *y t *t t x *y t *t t x y t t t x y t t t t(t+t)") define_sfop3(16
static const float RulerHeight
Height of the ruler in multipes of the text height.
uint32_t context_menu_x_pos_
shared_ptr< TimeItem > hover_item_
x y t t *t x y t t t x y t t t x *y t *t t x *y t *t t x y t t t x y t t t x(y+z)
vector< pair< double, QString > > major
boost::multiprecision::number< boost::multiprecision::cpp_dec_float< 24 >, boost::multiprecision::et_off > Timestamp
Timestamp type providing yoctosecond resolution.
static const float HoverArrowSize
Height of the hover arrow in multiples of the text height.
boost::optional< TickPositions > tick_position_cache_