PulseView
0.3.0
A Qt-based sigrok GUI
|
#include <logicsignal.hpp>
Public Member Functions | |
LogicSignal (pv::Session &session, std::shared_ptr< devices::Device > device, std::shared_ptr< sigrok::Channel > channel, std::shared_ptr< pv::data::Logic > data) | |
virtual | ~LogicSignal () |
std::shared_ptr< pv::data::SignalData > | data () const |
std::shared_ptr< pv::data::Logic > | logic_data () const |
void | set_logic_data (std::shared_ptr< pv::data::Logic > data) |
std::pair< int, int > | v_extents () const |
int | scale_handle_offset () const |
void | scale_handle_dragged (int offset) |
void | paint_mid (QPainter &p, const ViewItemPaintParams &pp) |
virtual void | paint_fore (QPainter &p, const ViewItemPaintParams &pp) |
Public Member Functions inherited from pv::view::Signal | |
void | set_name (QString name) |
bool | enabled () const |
void | enable (bool enable=true) |
std::shared_ptr< sigrok::Channel > | channel () const |
const item_list & | child_items () const |
void | paint_back (QPainter &p, const ViewItemPaintParams &pp) |
QMenu * | create_context_menu (QWidget *parent) |
void | delete_pressed () |
virtual void | scale_handle_released () |
Public Member Functions inherited from pv::view::Trace | |
QString | name () const |
QColor | colour () const |
void | set_colour (QColor colour) |
void | set_coloured_bg (bool state) |
virtual void | paint_label (QPainter &p, const QRect &rect, bool hover) |
pv::widgets::Popup * | create_popup (QWidget *parent) |
QRectF | label_rect (const QRectF &rect) const |
Public Member Functions inherited from pv::view::TraceTreeItem | |
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 () |
void | set_owner (pv::view::TraceTreeItemOwner *owner) |
int | get_visual_y () const |
void | drag_by (const QPoint &delta) |
QPoint | point (const QRect &rect) const |
void | set_bgcolour_state (bool state) |
Public Member Functions inherited from pv::view::RowItem | |
virtual void | hover_point_changed () |
Public Member Functions inherited from pv::view::ViewItem | |
ViewItem () | |
bool | selected () const |
virtual bool | is_draggable () const |
bool | dragging () const |
void | drag () |
virtual void | drag_release () |
virtual QRectF | hit_box_rect (const ViewItemPaintParams &pp) const |
Public Member Functions inherited from pv::view::ViewItemOwner | |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
template<class T > | |
std::vector< std::shared_ptr< T > > | list_by_type () |
Private Slots | |
void | on_trigger () |
Private Member Functions | |
void | paint_caps (QPainter &p, QLineF *const lines, std::vector< std::pair< int64_t, bool > > &edges, bool level, double samples_per_pixel, double pixels_offset, float x_offset, float y_offset) |
void | init_trigger_actions (QWidget *parent) |
const std::vector< int32_t > | get_trigger_types () const |
QAction * | action_from_trigger_type (const sigrok::TriggerMatchType *match) |
const sigrok::TriggerMatchType * | trigger_type_from_action (QAction *action) |
void | populate_popup_form (QWidget *parent, QFormLayout *form) |
void | modify_trigger () |
Static Private Member Functions | |
static const QIcon * | get_icon (const char *path) |
static const QPixmap * | get_pixmap (const char *path) |
Private Attributes | |
int | signal_height_ |
std::shared_ptr< pv::devices::Device > | device_ |
std::shared_ptr< pv::data::Logic > | data_ |
const sigrok::TriggerMatchType * | trigger_match_ |
QToolBar * | trigger_bar_ |
QAction * | trigger_none_ |
QAction * | trigger_rising_ |
QAction * | trigger_high_ |
QAction * | trigger_falling_ |
QAction * | trigger_low_ |
QAction * | trigger_change_ |
Static Private Attributes | |
static const float | Oversampling = 2.0f |
static const QColor | EdgeColour |
static const QColor | HighColour |
static const QColor | LowColour |
static const QColor | SignalColours [10] |
static QColor | TriggerMarkerBackgroundColour = QColor(0xED, 0xD4, 0x00) |
static const int | TriggerMarkerPadding = 2 |
static const char * | TriggerMarkerIcons [8] |
static QCache< QString, const QIcon > | icon_cache_ |
static QCache< QString, const QPixmap > | pixmap_cache_ |
Additional Inherited Members | |
Public Types inherited from pv::view::ViewItemOwner | |
typedef std::vector< std::shared_ptr< ViewItem > > | item_list |
typedef ViewItemIterator< ViewItemOwner, ViewItem > | iterator |
typedef ViewItemIterator< const ViewItemOwner, ViewItem > | const_iterator |
Static Public Member Functions inherited from pv::view::ViewItem | |
static QColor | select_text_colour (QColor background) |
Static Public Attributes inherited from pv::view::ViewItem | |
static const QSizeF | LabelPadding |
static const int | HighlightRadius = 3 |
Protected Member Functions inherited from pv::view::Signal | |
Signal (pv::Session &session, std::shared_ptr< sigrok::Channel > channel) | |
Protected Member Functions inherited from pv::view::Trace | |
Trace (QString name) | |
void | paint_axis (QPainter &p, const ViewItemPaintParams &pp, int y) |
void | add_colour_option (QWidget *parent, QFormLayout *form) |
void | create_popup_form () |
Static Protected Member Functions inherited from pv::view::ViewItem | |
static QPen | highlight_pen () |
Protected Attributes inherited from pv::view::Signal | |
pv::Session & | session_ |
std::shared_ptr< sigrok::Channel > | channel_ |
const std::shared_ptr< SignalScaleHandle > | scale_handle_ |
const item_list | items_ |
QComboBox * | name_widget_ |
Protected Attributes inherited from pv::view::Trace | |
QString | name_ |
QColor | colour_ |
QColor | bgcolour_ |
bool | coloured_bg_ |
bool | coloured_bg_state_ |
Protected Attributes inherited from pv::view::TraceTreeItem | |
TraceTreeItemOwner * | owner_ |
int | layout_v_offset_ |
int | visual_v_offset_ |
bool | bgcolour_state_ |
Protected Attributes inherited from pv::view::ViewItem | |
QWidget * | context_parent_ |
QPoint | drag_point_ |
Protected Attributes inherited from pv::view::ViewItemOwner | |
item_list | items_ |
Properties inherited from pv::view::TraceTreeItem | |
int | visual_v_offset |
Definition at line 49 of file logicsignal.hpp.
pv::view::LogicSignal::LogicSignal | ( | pv::Session & | session, |
std::shared_ptr< devices::Device > | device, | ||
std::shared_ptr< sigrok::Channel > | channel, | ||
std::shared_ptr< pv::data::Logic > | data | ||
) |
|
virtual |
Definition at line 129 of file logicsignal.cpp.
|
private |
|
virtual |
Implements pv::view::Signal.
Definition at line 133 of file logicsignal.cpp.
|
staticprivate |
|
staticprivate |
|
private |
|
private |
Definition at line 300 of file logicsignal.cpp.
shared_ptr< pv::data::Logic > pv::view::LogicSignal::logic_data | ( | ) | const |
Definition at line 138 of file logicsignal.cpp.
|
private |
Definition at line 415 of file logicsignal.cpp.
|
privateslot |
Definition at line 476 of file logicsignal.cpp.
|
private |
|
virtual |
Paints the foreground layer of the signal with a QPainter
p | the QPainter to paint into. |
pp | the painting parameters object to paint with. |
Reimplemented from pv::view::ViewItem.
Definition at line 244 of file logicsignal.cpp.
|
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::view::ViewItem.
Definition at line 167 of file logicsignal.cpp.
|
privatevirtual |
Reimplemented from pv::view::Signal.
Definition at line 392 of file logicsignal.cpp.
|
virtual |
Handles the scale handle being dragged to an offset.
offset | the offset the scale handle was dragged to. |
Implements pv::view::Signal.
Definition at line 160 of file logicsignal.cpp.
|
virtual |
Returns the offset to show the drag handle.
Implements pv::view::Signal.
Definition at line 155 of file logicsignal.cpp.
void pv::view::LogicSignal::set_logic_data | ( | std::shared_ptr< pv::data::Logic > | data | ) |
Definition at line 143 of file logicsignal.cpp.
|
private |
|
virtual |
Computes the vertical extents of the contents of this row item.
Implements pv::view::TraceTreeItem.
Definition at line 148 of file logicsignal.cpp.
|
private |
Definition at line 137 of file logicsignal.hpp.
|
private |
Definition at line 136 of file logicsignal.hpp.
|
staticprivate |
Definition at line 56 of file logicsignal.hpp.
|
staticprivate |
Definition at line 57 of file logicsignal.hpp.
|
staticprivate |
Definition at line 148 of file logicsignal.hpp.
|
staticprivate |
Definition at line 58 of file logicsignal.hpp.
|
staticprivate |
Definition at line 54 of file logicsignal.hpp.
|
staticprivate |
Definition at line 149 of file logicsignal.hpp.
|
private |
Definition at line 134 of file logicsignal.hpp.
|
staticprivate |
Definition at line 60 of file logicsignal.hpp.
|
private |
Definition at line 140 of file logicsignal.hpp.
|
private |
Definition at line 146 of file logicsignal.hpp.
|
private |
Definition at line 144 of file logicsignal.hpp.
|
private |
Definition at line 143 of file logicsignal.hpp.
|
private |
Definition at line 145 of file logicsignal.hpp.
|
private |
Definition at line 139 of file logicsignal.hpp.
|
private |
Definition at line 141 of file logicsignal.hpp.
|
private |
Definition at line 142 of file logicsignal.hpp.
|
staticprivate |
Definition at line 62 of file logicsignal.hpp.
|
staticprivate |
Definition at line 64 of file logicsignal.hpp.
|
staticprivate |
Definition at line 63 of file logicsignal.hpp.