PulseView
0.3.0
A Qt-based sigrok GUI
|
#include <viewitem.hpp>
Public Member Functions | |
ViewItem () | |
virtual bool | enabled () const =0 |
bool | selected () const |
virtual void | select (bool select=true) |
virtual bool | is_draggable () const |
bool | dragging () const |
void | drag () |
virtual void | drag_release () |
virtual void | drag_by (const QPoint &delta)=0 |
virtual QPoint | point (const QRect &rect) const =0 |
virtual QRectF | label_rect (const QRectF &rect) const |
virtual QRectF | hit_box_rect (const ViewItemPaintParams &pp) const |
virtual void | paint_label (QPainter &p, const QRect &rect, bool hover) |
virtual void | paint_back (QPainter &p, const ViewItemPaintParams &pp) |
virtual void | paint_mid (QPainter &p, const ViewItemPaintParams &pp) |
virtual void | paint_fore (QPainter &p, const ViewItemPaintParams &pp) |
virtual QMenu * | create_context_menu (QWidget *parent) |
virtual pv::widgets::Popup * | create_popup (QWidget *parent) |
virtual void | delete_pressed () |
Static Public Member Functions | |
static QColor | select_text_colour (QColor background) |
Static Public Attributes | |
static const QSizeF | LabelPadding |
static const int | HighlightRadius = 3 |
Static Protected Member Functions | |
static QPen | highlight_pen () |
Protected Attributes | |
QWidget * | context_parent_ |
QPoint | drag_point_ |
Private Attributes | |
bool | selected_ |
Definition at line 44 of file viewitem.hpp.
pv::view::ViewItem::ViewItem | ( | ) |
Definition at line 35 of file viewitem.cpp.
|
virtual |
Reimplemented in pv::view::DecodeTrace, pv::view::TraceGroup, pv::view::Trace, pv::view::Signal, and pv::view::Flag.
Definition at line 85 of file viewitem.cpp.
|
virtual |
Reimplemented in pv::view::TimeMarker, pv::view::TraceGroup, pv::view::Trace, pv::view::CursorPair, and pv::view::Flag.
Definition at line 91 of file viewitem.cpp.
|
virtual |
Reimplemented in pv::view::DecodeTrace, pv::view::Signal, and pv::view::Flag.
Definition at line 97 of file viewitem.cpp.
void pv::view::ViewItem::drag | ( | ) |
Sets this item into the dragged state.
Definition at line 62 of file viewitem.cpp.
|
pure virtual |
Drags the item to a delta relative to the drag point.
delta | the offset from the drag point. |
Implemented in pv::view::TraceTreeItem, pv::view::SignalScaleHandle, and pv::view::TimeItem.
|
virtual |
Sets this item into the un-dragged state.
Reimplemented in pv::view::SignalScaleHandle.
Definition at line 68 of file viewitem.cpp.
bool pv::view::ViewItem::dragging | ( | ) | const |
Returns true if the item is being dragged.
Definition at line 57 of file viewitem.cpp.
|
pure virtual |
Returns true if the item is visible and enabled.
Implemented in pv::view::DecodeTrace, pv::view::Signal, pv::view::Flag, pv::view::Cursor, pv::view::CursorPair, pv::view::TriggerMarker, pv::view::TraceGroup, and pv::view::SignalScaleHandle.
|
staticprotected |
|
virtual |
Computes the outline rectangle of the viewport hit-box.
rect | the rectangle of the viewport area. |
Reimplemented in pv::view::TimeMarker, and pv::view::SignalScaleHandle.
Definition at line 79 of file viewitem.cpp.
|
virtual |
Returns true if the item may be dragged/moved.
Reimplemented in pv::view::TriggerMarker.
Definition at line 52 of file viewitem.cpp.
|
virtual |
Computes the outline rectangle of a label.
rect | the rectangle of the header area. |
Reimplemented in pv::view::Trace, pv::view::TraceGroup, pv::view::TimeMarker, pv::view::CursorPair, and pv::view::Cursor.
Definition at line 73 of file viewitem.cpp.
|
virtual |
Paints the background layer of the item with a QPainter
p | the QPainter to paint into. |
pp | the painting parameters object to paint with. |
Reimplemented in pv::view::Trace, pv::view::DecodeTrace, pv::view::CursorPair, pv::view::AnalogSignal, and pv::view::Signal.
Definition at line 115 of file viewitem.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 in pv::view::DecodeTrace, pv::view::TimeMarker, pv::view::LogicSignal, pv::view::SignalScaleHandle, and pv::view::TriggerMarker.
Definition at line 127 of file viewitem.cpp.
|
virtual |
Paints the signal label.
p | the QPainter to paint into. |
rect | the rectangle of the header area. |
hover | true if the label is being hovered over by the mouse. |
Reimplemented in pv::view::TimeMarker, pv::view::Trace, pv::view::CursorPair, and pv::view::TraceGroup.
Definition at line 108 of file viewitem.cpp.
|
virtual |
Paints the mid-layer of the item with a QPainter
p | the QPainter to paint into. |
pp | the painting parameters object to paint with. |
Reimplemented in pv::view::DecodeTrace, pv::view::LogicSignal, and pv::view::AnalogSignal.
Definition at line 121 of file viewitem.cpp.
|
pure virtual |
Get the drag point.
rect | the rectangle of the widget area. |
Implemented in pv::view::TraceTreeItem, pv::view::TimeMarker, pv::view::CursorPair, pv::view::SignalScaleHandle, and pv::view::TriggerMarker.
|
virtual |
Selects or deselects the signal.
Reimplemented in pv::view::TraceTreeItem, and pv::view::SignalScaleHandle.
Definition at line 47 of file viewitem.cpp.
|
static |
Gets the text colour.
Definition at line 133 of file viewitem.cpp.
bool pv::view::ViewItem::selected | ( | ) | const |
Returns true if the item has been selected by the user.
Definition at line 42 of file viewitem.cpp.
|
protected |
Definition at line 168 of file viewitem.hpp.
|
protected |
Definition at line 169 of file viewitem.hpp.
|
static |
Definition at line 50 of file viewitem.hpp.
|
static |
Definition at line 49 of file viewitem.hpp.
|
private |
Definition at line 172 of file viewitem.hpp.