PulseView  0.3.0
A Qt-based sigrok GUI
pv::view::Signal Class Referenceabstract

#include <signal.hpp>

Inheritance diagram for pv::view::Signal:
Collaboration diagram for pv::view::Signal:

Public Member Functions

void set_name (QString name)
 
virtual std::shared_ptr< pv::data::SignalDatadata () const =0
 
bool enabled () const
 
void enable (bool enable=true)
 
std::shared_ptr< sigrok::Channel > channel () const
 
const item_listchild_items () const
 
void paint_back (QPainter &p, const ViewItemPaintParams &pp)
 
virtual void populate_popup_form (QWidget *parent, QFormLayout *form)
 
QMenu * create_context_menu (QWidget *parent)
 
void delete_pressed ()
 
virtual int scale_handle_offset () const =0
 
virtual void scale_handle_dragged (int offset)=0
 
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::Popupcreate_popup (QWidget *parent)
 
QRectF label_rect (const QRectF &rect) const
 
- Public Member Functions inherited from pv::view::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 ()
 
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)
 
virtual std::pair< int, int > v_extents () const =0
 
- 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
 
virtual void paint_mid (QPainter &p, const ViewItemPaintParams &pp)
 
virtual void paint_fore (QPainter &p, const ViewItemPaintParams &pp)
 
- 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 ()
 

Protected Member Functions

 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 ()
 

Protected Attributes

pv::Sessionsession_
 
std::shared_ptr< sigrok::Channel > channel_
 
const std::shared_ptr< SignalScaleHandlescale_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
TraceTreeItemOwnerowner_
 
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_
 

Private Slots

void on_disable ()
 

Additional Inherited Members

- Public Types inherited from pv::view::ViewItemOwner
typedef std::vector< std::shared_ptr< ViewItem > > item_list
 
typedef ViewItemIterator< ViewItemOwner, ViewItemiterator
 
typedef ViewItemIterator< const ViewItemOwner, ViewItemconst_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
 
- Static Protected Member Functions inherited from pv::view::ViewItem
static QPen highlight_pen ()
 
- Properties inherited from pv::view::TraceTreeItem
int visual_v_offset
 

Detailed Description

Definition at line 49 of file signal.hpp.

Constructor & Destructor Documentation

pv::view::Signal::Signal ( pv::Session session,
std::shared_ptr< sigrok::Channel >  channel 
)
protected

Definition at line 62 of file signal.cpp.

Member Function Documentation

shared_ptr< Channel > pv::view::Signal::channel ( ) const

Definition at line 99 of file signal.cpp.

const ViewItemOwner::item_list & pv::view::Signal::child_items ( ) const
virtual

Returns a list of row items owned by this object.

Implements pv::view::ViewItemOwner.

Definition at line 104 of file signal.cpp.

QMenu * pv::view::Signal::create_context_menu ( QWidget *  parent)
virtual

Reimplemented from pv::view::Trace.

Definition at line 141 of file signal.cpp.

Here is the call graph for this function:

virtual std::shared_ptr<pv::data::SignalData> pv::view::Signal::data ( ) const
pure virtual
void pv::view::Signal::delete_pressed ( )
virtual

Reimplemented from pv::view::ViewItem.

Definition at line 155 of file signal.cpp.

Here is the call graph for this function:

void pv::view::Signal::enable ( bool  enable = true)

Definition at line 91 of file signal.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool pv::view::Signal::enabled ( ) const
virtual

Returns true if the trace is visible and enabled.

Implements pv::view::ViewItem.

Definition at line 86 of file signal.cpp.

void pv::view::Signal::on_disable ( )
privateslot

Definition at line 160 of file signal.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::view::Signal::paint_back ( QPainter &  p,
const ViewItemPaintParams pp 
)
virtual

Paints the background layer of the signal with a QPainter.

Parameters
pThe QPainter to paint into.
ppThe painting parameters object to paint with.

Reimplemented from pv::view::Trace.

Definition at line 109 of file signal.cpp.

Here is the call graph for this function:

void pv::view::Signal::populate_popup_form ( QWidget *  parent,
QFormLayout *  form 
)
virtual

Reimplemented from pv::view::Trace.

Reimplemented in pv::view::LogicSignal.

Definition at line 115 of file signal.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void pv::view::Signal::scale_handle_dragged ( int  offset)
pure virtual

Handles the scale handle being dragged to an offset.

Parameters
offsetthe offset the scale handle was dragged to.

Implemented in pv::view::LogicSignal, and pv::view::AnalogSignal.

Here is the caller graph for this function:

virtual int pv::view::Signal::scale_handle_offset ( ) const
pure virtual

Returns the offset to show the drag handle.

Implemented in pv::view::LogicSignal, and pv::view::AnalogSignal.

Here is the caller graph for this function:

virtual void pv::view::Signal::scale_handle_released ( )
inlinevirtual

Handles the scale handle being being released.

Definition at line 101 of file signal.hpp.

Here is the caller graph for this function:

void pv::view::Signal::set_name ( QString  name)
virtual

Sets the name of the signal.

Reimplemented from pv::view::Trace.

Definition at line 74 of file signal.cpp.

Here is the call graph for this function:

Member Data Documentation

std::shared_ptr<sigrok::Channel> pv::view::Signal::channel_
protected

Definition at line 108 of file signal.hpp.

const item_list pv::view::Signal::items_
protected

Definition at line 111 of file signal.hpp.

QComboBox* pv::view::Signal::name_widget_
protected

Definition at line 113 of file signal.hpp.

const std::shared_ptr<SignalScaleHandle> pv::view::Signal::scale_handle_
protected

Definition at line 110 of file signal.hpp.

pv::Session& pv::view::Signal::session_
protected

Definition at line 107 of file signal.hpp.


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