PulseView  0.3.0
A Qt-based sigrok GUI
pv::view::Trace Class Reference

#include <trace.hpp>

Inheritance diagram for pv::view::Trace:
Collaboration diagram for pv::view::Trace:

Public Member Functions

QString name () const
 
virtual void set_name (QString name)
 
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)
 
virtual QMenu * create_context_menu (QWidget *parent)
 
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 ()
 
virtual bool enabled () const =0
 
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)
 
virtual void delete_pressed ()
 

Protected Member Functions

 Trace (QString name)
 
virtual void paint_back (QPainter &p, const ViewItemPaintParams &pp)
 
void paint_axis (QPainter &p, const ViewItemPaintParams &pp, int y)
 
void add_colour_option (QWidget *parent, QFormLayout *form)
 
void create_popup_form ()
 
virtual void populate_popup_form (QWidget *parent, QFormLayout *form)
 

Protected Attributes

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_
 

Private Slots

void on_text_changed (const QString &text)
 
void on_colour_changed (const QColor &colour)
 
void on_popup_closed ()
 

Private Attributes

pv::widgets::Popuppopup_
 
QFormLayout * popup_form_
 

Static Private Attributes

static const QPen AxisPen
 
static const int LabelHitPadding = 2
 
static const QColor BrightBGColour
 
static const QColor DarkBGColour
 

Additional Inherited Members

- 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 44 of file trace.hpp.

Constructor & Destructor Documentation

pv::view::Trace::Trace ( QString  name)
protected

Definition at line 47 of file trace.cpp.

Member Function Documentation

void pv::view::Trace::add_colour_option ( QWidget *  parent,
QFormLayout *  form 
)
protected

Definition at line 203 of file trace.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QColor pv::view::Trace::colour ( ) const

Get the colour of the signal.

Definition at line 65 of file trace.cpp.

Here is the caller graph for this function:

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

Reimplemented from pv::view::ViewItem.

Reimplemented in pv::view::DecodeTrace, and pv::view::Signal.

Definition at line 137 of file trace.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

pv::widgets::Popup * pv::view::Trace::create_popup ( QWidget *  parent)
virtual

Reimplemented from pv::view::ViewItem.

Definition at line 144 of file trace.cpp.

Here is the call graph for this function:

void pv::view::Trace::create_popup_form ( )
protected

Definition at line 217 of file trace.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QRectF pv::view::Trace::label_rect ( const QRectF &  rect) const
virtual

Computes the outline rectangle of a label.

Parameters
rectthe rectangle of the header area.
Returns
Returns the rectangle of the signal label.

Reimplemented from pv::view::ViewItem.

Definition at line 160 of file trace.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString pv::view::Trace::name ( ) const

Gets the name of this signal.

Definition at line 55 of file trace.cpp.

Here is the caller graph for this function:

void pv::view::Trace::on_colour_changed ( const QColor &  colour)
privateslot

Definition at line 258 of file trace.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::view::Trace::on_popup_closed ( )
privateslot

Definition at line 244 of file trace.cpp.

Here is the caller graph for this function:

void pv::view::Trace::on_text_changed ( const QString &  text)
privateslot

Definition at line 250 of file trace.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::view::Trace::paint_axis ( QPainter &  p,
const ViewItemPaintParams pp,
int  y 
)
protected

Paints a zero axis across the viewport.

Parameters
pthe QPainter to paint into.
ppthe painting parameters object to paint with.
ythe y-offset of the axis.

Definition at line 197 of file trace.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::view::Trace::paint_back ( QPainter &  p,
const ViewItemPaintParams pp 
)
protectedvirtual

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::ViewItem.

Reimplemented in pv::view::DecodeTrace, pv::view::AnalogSignal, and pv::view::Signal.

Definition at line 178 of file trace.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::view::Trace::paint_label ( QPainter &  p,
const QRect &  rect,
bool  hover 
)
virtual

Paints the signal label.

Parameters
pthe QPainter to paint into.
rectthe rectangle of the header area.
hovertrue if the label is being hovered over by the mouse.

Reimplemented from pv::view::ViewItem.

Definition at line 83 of file trace.cpp.

Here is the call graph for this function:

void pv::view::Trace::populate_popup_form ( QWidget *  parent,
QFormLayout *  form 
)
protectedvirtual

Reimplemented in pv::view::LogicSignal, pv::view::DecodeTrace, and pv::view::Signal.

Definition at line 233 of file trace.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::view::Trace::set_colour ( QColor  colour)

Set the colour of the signal.

Definition at line 70 of file trace.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::view::Trace::set_coloured_bg ( bool  state)

Enables or disables the coloured background for this trace.

Definition at line 78 of file trace.cpp.

Here is the caller graph for this function:

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

Sets the name of the signal.

Reimplemented in pv::view::Signal.

Definition at line 60 of file trace.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

const QPen pv::view::Trace::AxisPen
staticprivate

Definition at line 49 of file trace.hpp.

QColor pv::view::Trace::bgcolour_
protected

Definition at line 134 of file trace.hpp.

const QColor pv::view::Trace::BrightBGColour
staticprivate

Definition at line 52 of file trace.hpp.

QColor pv::view::Trace::colour_
protected

Definition at line 134 of file trace.hpp.

bool pv::view::Trace::coloured_bg_
protected

Definition at line 135 of file trace.hpp.

bool pv::view::Trace::coloured_bg_state_
protected

Definition at line 135 of file trace.hpp.

const QColor pv::view::Trace::DarkBGColour
staticprivate

Definition at line 53 of file trace.hpp.

const int pv::view::Trace::LabelHitPadding = 2
staticprivate

Definition at line 50 of file trace.hpp.

QString pv::view::Trace::name_
protected

Definition at line 133 of file trace.hpp.

pv::widgets::Popup* pv::view::Trace::popup_
private

Definition at line 138 of file trace.hpp.

QFormLayout* pv::view::Trace::popup_form_
private

Definition at line 139 of file trace.hpp.


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