20 #ifndef PULSEVIEW_PV_VIEWS_TRACE_TRACE_HPP 21 #define PULSEVIEW_PV_VIEWS_TRACE_TRACE_HPP 36 using std::shared_ptr;
81 ShowLastSegmentOnly = 1,
85 ShowAccumulatedIntensity
97 Trace(shared_ptr<data::SignalBase> signal);
104 shared_ptr<data::SignalBase> base()
const;
109 virtual bool is_selectable(QPoint pos)
const;
114 virtual bool is_draggable(QPoint pos)
const;
121 virtual void on_setting_changed(
const QString &key,
const QVariant &
value);
129 virtual void paint_label(QPainter &p,
const QRect &rect,
bool hover);
138 virtual QMenu* create_header_context_menu(QWidget *parent);
140 virtual QMenu* create_view_context_menu(QWidget *parent, QPoint &click_pos);
149 QRectF label_rect(
const QRectF &rect)
const;
159 void set_current_segment(
const int segment);
161 int get_current_segment()
const;
163 virtual void hover_point_changed(
const QPoint &hp);
185 void paint_hover_marker(QPainter &p);
187 void add_color_option(QWidget *parent, QFormLayout *form);
189 void create_popup_form();
191 virtual void populate_popup_form(QWidget *parent, QFormLayout *form);
194 virtual void on_name_changed(
const QString &text);
195 virtual void on_color_changed(
const QColor &color);
196 virtual void on_error_message_changed(
const QString &msg);
198 void on_popup_closed();
201 void on_nameedit_changed(
const QString &name);
203 void on_coloredit_changed(
const QColor &color);
205 void on_create_marker_here()
const;
228 #endif // PULSEVIEW_PV_VIEWS_TRACE_TRACE_HPP
static const QColor BrightGrayBGColor
static const QColor DarkGrayBGColor
QFormLayout * popup_form_
uint32_t context_menu_x_pos_
T value(details::expression_node< T > *n)
int current_segment_
The ID of the currently displayed segment.
shared_ptr< data::SignalBase > base_
static const int LabelHitPadding
static const QPen AxisPen
pv::widgets::Popup * popup_
SegmentDisplayMode segment_display_mode_
static const QColor ErrorBgColor