PulseView  unreleased development snapshot
A Qt-based sigrok GUI
pv::views::trace::MathSignal Class Reference

#include <mathsignal.hpp>

Inheritance diagram for pv::views::trace::MathSignal:
Collaboration diagram for pv::views::trace::MathSignal:

Public Member Functions

 MathSignal (pv::Session &session, shared_ptr< data::SignalBase > base)
 
- Public Member Functions inherited from pv::views::trace::AnalogSignal
 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)
 
- Public Member Functions inherited from pv::views::trace::LogicSignal
 LogicSignal (pv::Session &session, shared_ptr< data::SignalBase > base)
 
virtual ~LogicSignal ()=default
 
- Public Member Functions inherited from pv::views::trace::Signal
virtual void set_name (QString name)
 
bool enabled () const
 
shared_ptr< data::SignalBasebase () 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 ()
 
- Public Member Functions inherited from pv::views::trace::Trace
shared_ptr< data::SignalBasebase () 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::Popupcreate_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
 
- Public Member Functions inherited from pv::views::trace::TraceTreeItem
 TraceTreeItem ()
 
TraceTreeItemOwnerowner () 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
 
- Public Member Functions inherited from pv::views::trace::ViewItem
 ViewItem ()
 
bool selected () const
 
bool dragging () const
 
void drag ()
 
virtual void drag_release ()
 
virtual void mouse_left_press_event (const QMouseEvent *event)
 
- Public Member Functions inherited from pv::views::trace::ViewItemOwner
virtual const item_listchild_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)
 
- Protected Member Functions inherited from pv::views::trace::AnalogSignal
virtual void hover_point_changed (const QPoint &hp)
 
- Protected Member Functions inherited from pv::views::trace::LogicSignal
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::LogicSegmentget_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 modify_trigger ()
 
- Protected Member Functions inherited from pv::views::trace::Signal
 Signal (pv::Session &session, shared_ptr< data::SignalBase > signal)
 
- Protected Member Functions inherited from pv::views::trace::Trace
 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 ()
 

Protected Attributes

shared_ptr< pv::data::MathSignalmath_signal_
 
- Protected Attributes inherited from pv::views::trace::LogicSignal
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_
 
QToolBartrigger_bar_
 
QAction * trigger_none_
 
QAction * trigger_rising_
 
QAction * trigger_high_
 
QAction * trigger_falling_
 
QAction * trigger_low_
 
QAction * trigger_change_
 
int signal_height_
 
- Protected Attributes inherited from pv::views::trace::Signal
pv::Sessionsession_
 
QComboBox * name_widget_
 
- Protected Attributes inherited from pv::views::trace::Trace
shared_ptr< data::SignalBasebase_
 
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...
 
- Protected Attributes inherited from pv::views::trace::TraceTreeItem
TraceTreeItemOwnerowner_
 
int layout_v_offset_
 
int visual_v_offset_
 
- Protected Attributes inherited from pv::views::trace::ViewItem
QWidget * context_parent_
 
QPoint drag_point_
 
- Protected Attributes inherited from pv::views::trace::ViewItemOwner
item_list items_
 

Private Slots

void on_expression_changed (const QString &text)
 
void on_sample_count_changed (const QString &text)
 
void on_edit_clicked ()
 

Private Attributes

QLineEdit * expression_edit_
 
QComboBox * sample_count_cb_
 
QComboBox * sample_rate_cb_
 
QString sample_count_text_
 
QString sample_rate_text_
 
QTimer delayed_expr_updater_
 
QTimer delayed_count_updater_
 
QTimer delayed_rate_updater_
 

Additional Inherited Members

- Public Types inherited from pv::views::trace::Trace
enum  SegmentDisplayMode {
  ShowLastSegmentOnly = 1, ShowLastCompleteSegmentOnly, ShowSingleSegmentOnly, ShowAllSegments,
  ShowAccumulatedIntensity
}
 
- Public Types inherited from pv::views::trace::ViewItemOwner
typedef vector< shared_ptr< ViewItem > > item_list
 
typedef ViewItemIterator< ViewItemOwner, ViewItemiterator
 
typedef ViewItemIterator< const ViewItemOwner, ViewItemconst_iterator
 
- Static Public Member Functions inherited from pv::views::trace::ViewItem
static QColor select_text_color (QColor background)
 
- Static Public Attributes inherited from pv::views::trace::LogicSignal
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 Public Attributes inherited from pv::views::trace::ViewItem
static const QSizeF LabelPadding
 
static const int HighlightRadius = 3
 
- Protected Slots inherited from pv::views::trace::LogicSignal
void on_setting_changed (const QString &key, const QVariant &value)
 
void on_trigger ()
 
void on_signal_height_changed (int height)
 
- Protected Slots inherited from pv::views::trace::Signal
virtual void on_name_changed (const QString &text)
 
void on_disable ()
 
void on_enabled_changed (bool enabled)
 
- Protected Slots inherited from pv::views::trace::Trace
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 Protected Member Functions inherited from pv::views::trace::LogicSignal
static const QIcon * get_icon (const char *path)
 
static const QPixmap * get_pixmap (const char *path)
 
- Static Protected Member Functions inherited from pv::views::trace::ViewItem
static QPen highlight_pen ()
 
- Static Protected Attributes inherited from pv::views::trace::LogicSignal
static QCache< QString, const QIcon > icon_cache_
 
static QCache< QString, const QPixmap > pixmap_cache_
 
- Properties inherited from pv::views::trace::TraceTreeItem
int visual_v_offset
 

Detailed Description

Definition at line 70 of file mathsignal.hpp.

Constructor & Destructor Documentation

pv::views::trace::MathSignal::MathSignal ( pv::Session session,
shared_ptr< data::SignalBase base 
)

Definition at line 290 of file mathsignal.cpp.

Member Function Documentation

void pv::views::trace::MathSignal::on_edit_clicked ( )
privateslot

Definition at line 351 of file mathsignal.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::MathSignal::on_expression_changed ( const QString &  text)
privateslot

Definition at line 338 of file mathsignal.cpp.

Here is the caller graph for this function:

void pv::views::trace::MathSignal::on_sample_count_changed ( const QString &  text)
privateslot

Definition at line 346 of file mathsignal.cpp.

Here is the caller graph for this function:

void pv::views::trace::MathSignal::populate_popup_form ( QWidget *  parent,
QFormLayout *  form 
)
protectedvirtual

Reimplemented from pv::views::trace::AnalogSignal.

Definition at line 302 of file mathsignal.cpp.

Here is the call graph for this function:

Member Data Documentation

QTimer pv::views::trace::MathSignal::delayed_count_updater_
private

Definition at line 92 of file mathsignal.hpp.

QTimer pv::views::trace::MathSignal::delayed_expr_updater_
private

Definition at line 92 of file mathsignal.hpp.

QTimer pv::views::trace::MathSignal::delayed_rate_updater_
private

Definition at line 92 of file mathsignal.hpp.

QLineEdit* pv::views::trace::MathSignal::expression_edit_
private

Definition at line 89 of file mathsignal.hpp.

shared_ptr<pv::data::MathSignal> pv::views::trace::MathSignal::math_signal_
protected

Definition at line 80 of file mathsignal.hpp.

QComboBox* pv::views::trace::MathSignal::sample_count_cb_
private

Definition at line 90 of file mathsignal.hpp.

QString pv::views::trace::MathSignal::sample_count_text_
private

Definition at line 91 of file mathsignal.hpp.

QComboBox * pv::views::trace::MathSignal::sample_rate_cb_
private

Definition at line 90 of file mathsignal.hpp.

QString pv::views::trace::MathSignal::sample_rate_text_
private

Definition at line 91 of file mathsignal.hpp.


The documentation for this class was generated from the following files: