![]() |
PulseView
unreleased development snapshot
A Qt-based sigrok GUI
|
#include <analogsignal.hpp>
Public Member Functions | |
AnalogSignal (pv::Session &session, shared_ptr< data::SignalBase > base) | |
virtual std::map< QString, QVariant > | save_settings () const |
virtual void | restore_settings (std::map< QString, QVariant > settings) |
virtual pair< int, int > | v_extents () const |
virtual void | paint_back (QPainter &p, ViewItemPaintParams &pp) |
virtual void | paint_mid (QPainter &p, ViewItemPaintParams &pp) |
virtual void | paint_fore (QPainter &p, ViewItemPaintParams &pp) |
![]() | |
LogicSignal (pv::Session &session, shared_ptr< data::SignalBase > base) | |
virtual | ~LogicSignal ()=default |
![]() | |
virtual void | set_name (QString name) |
bool | enabled () const |
shared_ptr< data::SignalBase > | base () const |
virtual void | save_settings (QSettings &settings) const |
virtual void | restore_settings (QSettings &settings) |
void | paint_back (QPainter &p, ViewItemPaintParams &pp) |
QMenu * | create_header_context_menu (QWidget *parent) |
void | delete_pressed () |
![]() | |
shared_ptr< data::SignalBase > | base () const |
virtual bool | is_selectable (QPoint pos) const |
virtual bool | is_draggable (QPoint pos) const |
virtual void | set_segment_display_mode (SegmentDisplayMode mode) |
virtual void | on_setting_changed (const QString &key, const QVariant &value) |
virtual void | paint_label (QPainter &p, const QRect &rect, bool hover) |
virtual void | paint_error (QPainter &p, const ViewItemPaintParams &pp) |
virtual QMenu * | create_view_context_menu (QWidget *parent, QPoint &click_pos) |
pv::widgets::Popup * | create_popup (QWidget *parent) |
QRectF | label_rect (const QRectF &rect) const |
virtual QRectF | hit_box_rect (const ViewItemPaintParams &pp) const |
void | set_current_segment (const int segment) |
int | get_current_segment () const |
![]() | |
TraceTreeItem () | |
TraceTreeItemOwner * | owner () const |
void | select (bool select=true) |
int | layout_v_offset () const |
void | set_layout_v_offset (int v_offset) |
int | visual_v_offset () const |
void | set_visual_v_offset (int v_offset) |
void | force_to_v_offset (int v_offset) |
void | animate_to_layout_v_offset () |
virtual void | set_owner (TraceTreeItemOwner *owner) |
int | get_visual_y () const |
void | drag_by (const QPoint &delta) |
QPoint | drag_point (const QRect &rect) const |
![]() | |
ViewItem () | |
bool | selected () const |
bool | dragging () const |
void | drag () |
virtual void | drag_release () |
virtual void | mouse_left_press_event (const QMouseEvent *event) |
![]() | |
virtual const item_list & | child_items () const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
template<class T > | |
vector< shared_ptr< T > > | list_by_type () |
Protected Member Functions | |
void | populate_popup_form (QWidget *parent, QFormLayout *form) |
virtual void | hover_point_changed (const QPoint &hp) |
![]() | |
void | paint_caps (QPainter &p, QLineF *const lines, vector< pair< int64_t, bool > > &edges, bool level, double samples_per_pixel, double pixels_offset, float x_offset, float y_offset) |
shared_ptr< pv::data::LogicSegment > | get_logic_segment_to_paint () const |
void | init_trigger_actions (QWidget *parent) |
const vector< int32_t > | get_trigger_types () const |
QAction * | action_from_trigger_type (const sigrok::TriggerMatchType *type) |
const sigrok::TriggerMatchType * | trigger_type_from_action (QAction *action) |
void | populate_popup_form (QWidget *parent, QFormLayout *form) |
void | modify_trigger () |
![]() | |
Signal (pv::Session &session, shared_ptr< data::SignalBase > signal) | |
![]() | |
Trace (shared_ptr< data::SignalBase > signal) | |
~Trace () | |
void | paint_axis (QPainter &p, ViewItemPaintParams &pp, int y) |
void | paint_hover_marker (QPainter &p) |
void | add_color_option (QWidget *parent, QFormLayout *form) |
void | create_popup_form () |
Private Types | |
enum | DisplayType { DisplayAnalog = 0, DisplayConverted = 1, DisplayBoth = 2 } |
Private Slots | |
virtual void | on_setting_changed (const QString &key, const QVariant &value) |
void | on_min_max_changed (float min, float max) |
void | on_pos_vdivs_changed (int vdivs) |
void | on_neg_vdivs_changed (int vdivs) |
void | on_div_height_changed (int height) |
void | on_resolution_changed (int index) |
void | on_autoranging_changed (int state) |
void | on_conversion_changed (int index) |
void | on_conv_threshold_changed (int index=-1) |
void | on_delayed_conversion_starter () |
void | on_display_type_changed (int index) |
Private Member Functions | |
void | paint_grid (QPainter &p, int y, int left, int right) |
void | paint_trace (QPainter &p, const shared_ptr< pv::data::AnalogSegment > &segment, int y, int left, const int64_t start, const int64_t end, const double pixels_offset, const double samples_per_pixel) |
void | paint_envelope (QPainter &p, const shared_ptr< pv::data::AnalogSegment > &segment, int y, int left, const int64_t start, const int64_t end, const double pixels_offset, const double samples_per_pixel) |
shared_ptr< pv::data::AnalogSegment > | get_analog_segment_to_paint () const |
float | get_resolution (int scale_index) |
void | update_scale () |
virtual void | update_logic_level_offsets () |
void | update_conversion_widgets () |
virtual vector< data::LogicSegment::EdgePair > | get_nearest_level_changes (uint64_t sample_pos) |
void | perform_autoranging (bool keep_divs, bool force_update) |
void | reset_pixel_values () |
void | process_next_sample_value (float x, float value) |
Private Attributes | |
QComboBox * | resolution_cb_ |
QComboBox * | conversion_cb_ |
QComboBox * | conv_threshold_cb_ |
QComboBox * | display_type_cb_ |
QSpinBox * | pvdiv_sb_ |
QSpinBox * | nvdiv_sb_ |
QSpinBox * | div_height_sb_ |
double | signal_min_ |
double | signal_max_ |
bool | show_analog_minor_grid_ |
QColor | high_fill_color_ |
bool | show_sampling_points_ |
bool | fill_high_areas_ |
int | conversion_threshold_disp_mode_ |
vector< float > | value_at_pixel_pos_ |
float | value_at_hover_pos_ |
float | prev_value_at_pixel_ |
float | min_value_at_pixel_ |
float | max_value_at_pixel_ |
int | current_pixel_pos_ |
float | scale_ |
int | scale_index_ |
int | div_height_ |
int | pos_vdivs_ |
int | neg_vdivs_ |
float | resolution_ |
DisplayType | display_type_ |
bool | autoranging_ |
Static Private Attributes | |
static const QPen | AxisPen |
static const QColor | GridMajorColor = QColor(0, 0, 0, 40 * 256 / 100) |
static const QColor | GridMinorColor = QColor(0, 0, 0, 20 * 256 / 100) |
static const QColor | SamplingPointColorLo = QColor(200, 0, 0, 80 * 256 / 100) |
static const QColor | SamplingPointColorNe = QColor(0, 0, 0, 80 * 256 / 100) |
static const QColor | SamplingPointColorHi = QColor(0, 200, 0, 80 * 256 / 100) |
static const QColor | ThresholdColor = QColor(0, 0, 0, 30 * 256 / 100) |
static const QColor | ThresholdColorLo = QColor(255, 0, 0, 8 * 256 / 100) |
static const QColor | ThresholdColorNe = QColor(0, 0, 0, 10 * 256 / 100) |
static const QColor | ThresholdColorHi = QColor(0, 255, 0, 8 * 256 / 100) |
static const int64_t | TracePaintBlockSize = 1024 * 1024 |
static const float | EnvelopeThreshold = 64.0f |
static const int | MaximumVDivs = 10 |
static const int | MaxScaleIndex = 10 |
static const int | MinScaleIndex = -6 |
static const int | InfoTextMarginRight = 20 |
static const int | InfoTextMarginBottom = 5 |
Additional Inherited Members | |
![]() | |
enum | SegmentDisplayMode { ShowLastSegmentOnly = 1, ShowLastCompleteSegmentOnly, ShowSingleSegmentOnly, ShowAllSegments, ShowAccumulatedIntensity } |
![]() | |
typedef vector< shared_ptr< ViewItem > > | item_list |
typedef ViewItemIterator< ViewItemOwner, ViewItem > | iterator |
typedef ViewItemIterator< const ViewItemOwner, ViewItem > | const_iterator |
![]() | |
static QColor | select_text_color (QColor background) |
![]() | |
static const float | Oversampling = 2.0f |
static const QColor | EdgeColor |
static const QColor | HighColor |
static const QColor | LowColor |
static const QColor | SamplingPointColor |
static QColor | TriggerMarkerBackgroundColor = QColor(0xED, 0xD4, 0x00) |
static const int | TriggerMarkerPadding = 2 |
static const char * | TriggerMarkerIcons [8] |
![]() | |
static const QSizeF | LabelPadding |
static const int | HighlightRadius = 3 |
![]() | |
void | on_setting_changed (const QString &key, const QVariant &value) |
void | on_trigger () |
void | on_signal_height_changed (int height) |
![]() | |
virtual void | on_name_changed (const QString &text) |
void | on_disable () |
void | on_enabled_changed (bool enabled) |
![]() | |
virtual void | on_name_changed (const QString &text) |
virtual void | on_color_changed (const QColor &color) |
virtual void | on_error_message_changed (const QString &msg) |
void | on_popup_closed () |
![]() | |
static const QIcon * | get_icon (const char *path) |
static const QPixmap * | get_pixmap (const char *path) |
![]() | |
static QPen | highlight_pen () |
![]() | |
QColor | high_fill_color_ |
bool | show_sampling_points_ |
bool | fill_high_areas_ |
float | high_level_offset_ |
float | low_level_offset_ |
QSpinBox * | signal_height_sb_ |
const sigrok::TriggerMatchType * | trigger_match_ |
const vector< int32_t > | trigger_types_ |
QToolBar * | trigger_bar_ |
QAction * | trigger_none_ |
QAction * | trigger_rising_ |
QAction * | trigger_high_ |
QAction * | trigger_falling_ |
QAction * | trigger_low_ |
QAction * | trigger_change_ |
int | signal_height_ |
![]() | |
pv::Session & | session_ |
QComboBox * | name_widget_ |
![]() | |
shared_ptr< data::SignalBase > | base_ |
QPen | axis_pen_ |
SegmentDisplayMode | segment_display_mode_ |
bool | show_hover_marker_ |
uint32_t | context_menu_x_pos_ |
int | current_segment_ |
The ID of the currently displayed segment. More... | |
![]() | |
TraceTreeItemOwner * | owner_ |
int | layout_v_offset_ |
int | visual_v_offset_ |
![]() | |
QWidget * | context_parent_ |
QPoint | drag_point_ |
![]() | |
item_list | items_ |
![]() | |
static QCache< QString, const QIcon > | icon_cache_ |
static QCache< QString, const QPixmap > | pixmap_cache_ |
![]() | |
int | visual_v_offset |
Definition at line 46 of file analogsignal.hpp.
|
private |
Enumerator | |
---|---|
DisplayAnalog | |
DisplayConverted | |
DisplayBoth |
Definition at line 68 of file analogsignal.hpp.
pv::views::trace::AnalogSignal::AnalogSignal | ( | pv::Session & | session, |
shared_ptr< data::SignalBase > | base | ||
) |
|
private |
|
privatevirtual |
Determines the closest level change (i.e. edge) to a given sample, which is useful for e.g. the "snap to edge" functionality.
sample_pos | Sample to use |
Reimplemented from pv::views::trace::LogicSignal.
Definition at line 631 of file analogsignal.cpp.
|
private |
Computes the scale factor from the scale index and vdiv settings.
Definition at line 559 of file analogsignal.cpp.
|
protectedvirtual |
Reimplemented from pv::views::trace::Trace.
Definition at line 901 of file analogsignal.cpp.
|
privateslot |
Definition at line 1040 of file analogsignal.cpp.
|
privateslot |
|
privateslot |
Definition at line 1061 of file analogsignal.cpp.
|
privateslot |
Definition at line 1176 of file analogsignal.cpp.
|
privateslot |
Definition at line 1181 of file analogsignal.cpp.
|
privateslot |
Definition at line 1018 of file analogsignal.cpp.
|
privateslot |
Definition at line 942 of file analogsignal.cpp.
|
privateslot |
Definition at line 985 of file analogsignal.cpp.
|
privateslot |
Definition at line 952 of file analogsignal.cpp.
|
privateslot |
Definition at line 1031 of file analogsignal.cpp.
|
privatevirtualslot |
|
virtual |
Paints the background layer of the signal with a QPainter
p | the QPainter to paint into. |
pp | the painting parameters object to paint with.. |
Reimplemented from pv::views::trace::Trace.
Definition at line 198 of file analogsignal.cpp.
|
private |
Definition at line 486 of file analogsignal.cpp.
|
virtual |
Paints the foreground layer of the item with a QPainter
p | the QPainter to paint into. |
pp | the painting parameters object to paint with. |
Reimplemented from pv::views::trace::LogicSignal.
Definition at line 294 of file analogsignal.cpp.
|
private |
|
virtual |
Paints the mid-layer of the signal with a QPainter
p | the QPainter to paint into. |
pp | the painting parameters object to paint with.. |
Reimplemented from pv::views::trace::LogicSignal.
Definition at line 247 of file analogsignal.cpp.
|
private |
Definition at line 388 of file analogsignal.cpp.
|
private |
Definition at line 662 of file analogsignal.cpp.
|
protectedvirtual |
Reimplemented from pv::views::trace::Signal.
Reimplemented in pv::views::trace::MathSignal.
Definition at line 791 of file analogsignal.cpp.
|
private |
Definition at line 740 of file analogsignal.cpp.
|
private |
|
virtual |
Reimplemented from pv::views::trace::LogicSignal.
Definition at line 148 of file analogsignal.cpp.
|
virtual |
Reimplemented from pv::views::trace::LogicSignal.
Definition at line 132 of file analogsignal.cpp.
|
private |
|
privatevirtual |
Reimplemented from pv::views::trace::LogicSignal.
Definition at line 576 of file analogsignal.cpp.
|
private |
Definition at line 570 of file analogsignal.cpp.
|
virtual |
Computes the vertical extents of the contents of this row item.
Reimplemented from pv::views::trace::LogicSignal.
Definition at line 190 of file analogsignal.cpp.
|
private |
Definition at line 200 of file analogsignal.hpp.
|
staticprivate |
Definition at line 51 of file analogsignal.hpp.
|
private |
Definition at line 171 of file analogsignal.hpp.
|
private |
Definition at line 171 of file analogsignal.hpp.
|
private |
Definition at line 181 of file analogsignal.hpp.
|
private |
Definition at line 187 of file analogsignal.hpp.
|
private |
Definition at line 199 of file analogsignal.hpp.
|
private |
Definition at line 171 of file analogsignal.hpp.
|
private |
Definition at line 195 of file analogsignal.hpp.
|
private |
Definition at line 173 of file analogsignal.hpp.
|
staticprivate |
Definition at line 62 of file analogsignal.hpp.
|
private |
Definition at line 179 of file analogsignal.hpp.
|
staticprivate |
Definition at line 52 of file analogsignal.hpp.
|
staticprivate |
Definition at line 52 of file analogsignal.hpp.
|
private |
Definition at line 178 of file analogsignal.hpp.
|
staticprivate |
Definition at line 66 of file analogsignal.hpp.
|
staticprivate |
Definition at line 66 of file analogsignal.hpp.
|
private |
Definition at line 186 of file analogsignal.hpp.
|
staticprivate |
Definition at line 64 of file analogsignal.hpp.
|
staticprivate |
Definition at line 65 of file analogsignal.hpp.
|
private |
Definition at line 186 of file analogsignal.hpp.
|
staticprivate |
Definition at line 65 of file analogsignal.hpp.
|
private |
Definition at line 196 of file analogsignal.hpp.
|
private |
Definition at line 173 of file analogsignal.hpp.
|
private |
Definition at line 196 of file analogsignal.hpp.
|
private |
Definition at line 185 of file analogsignal.hpp.
|
private |
Definition at line 173 of file analogsignal.hpp.
|
private |
Definition at line 197 of file analogsignal.hpp.
|
private |
Definition at line 171 of file analogsignal.hpp.
|
staticprivate |
Definition at line 55 of file analogsignal.hpp.
|
staticprivate |
Definition at line 53 of file analogsignal.hpp.
|
staticprivate |
Definition at line 54 of file analogsignal.hpp.
|
private |
Definition at line 192 of file analogsignal.hpp.
|
private |
Definition at line 193 of file analogsignal.hpp.
|
private |
Definition at line 177 of file analogsignal.hpp.
|
private |
Definition at line 179 of file analogsignal.hpp.
|
private |
Definition at line 175 of file analogsignal.hpp.
|
private |
Definition at line 175 of file analogsignal.hpp.
|
staticprivate |
Definition at line 56 of file analogsignal.hpp.
|
staticprivate |
Definition at line 59 of file analogsignal.hpp.
|
staticprivate |
Definition at line 57 of file analogsignal.hpp.
|
staticprivate |
Definition at line 58 of file analogsignal.hpp.
|
staticprivate |
Definition at line 61 of file analogsignal.hpp.
|
private |
Definition at line 184 of file analogsignal.hpp.
|
private |
Definition at line 183 of file analogsignal.hpp.