PulseView  unreleased development snapshot
A Qt-based sigrok GUI
pv::views::trace::TimeItem Class Referenceabstract

#include <timeitem.hpp>

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

Public Member Functions

virtual void set_time (const pv::util::Timestamp &time)=0
 
virtual const pv::util::Timestamp time () const =0
 
virtual float get_x () const =0
 
virtual const pv::util::Timestamp delta (const pv::util::Timestamp &other) const
 
void drag_by (const QPoint &delta)
 
bool is_snapping_disabled () const
 
- Public Member Functions inherited from pv::views::trace::ViewItem
 ViewItem ()
 
virtual bool enabled () const =0
 
virtual bool is_selectable (QPoint pos) const
 
bool selected () const
 
virtual void select (bool select=true)
 
virtual bool is_draggable (QPoint pos) const
 
bool dragging () const
 
void drag ()
 
virtual void drag_release ()
 
virtual QPoint drag_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, ViewItemPaintParams &pp)
 
virtual void paint_mid (QPainter &p, ViewItemPaintParams &pp)
 
virtual void paint_fore (QPainter &p, ViewItemPaintParams &pp)
 
virtual QMenu * create_header_context_menu (QWidget *parent)
 
virtual QMenu * create_view_context_menu (QWidget *parent, QPoint &click_pos)
 
virtual pv::widgets::Popupcreate_popup (QWidget *parent)
 
virtual void delete_pressed ()
 
virtual void hover_point_changed (const QPoint &hp)
 
virtual void mouse_left_press_event (const QMouseEvent *event)
 

Protected Member Functions

 TimeItem (View &view)
 

Protected Attributes

bool snapping_disabled_ = false
 
Viewview_
 
- Protected Attributes inherited from pv::views::trace::ViewItem
QWidget * context_parent_
 
QPoint drag_point_
 

Additional Inherited Members

- 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::ViewItem
static const QSizeF LabelPadding
 
static const int HighlightRadius = 3
 
- Static Protected Member Functions inherited from pv::views::trace::ViewItem
static QPen highlight_pen ()
 

Detailed Description

The TimeItem class represents items on the Ruler. It is generic in nature, not making assumptions about the kind of item shown.

Definition at line 35 of file timeitem.hpp.

Constructor & Destructor Documentation

pv::views::trace::TimeItem::TimeItem ( View view)
protected

Constructor.

Parameters
viewA reference to the view that owns this marker.

Definition at line 28 of file timeitem.cpp.

Member Function Documentation

const pv::util::Timestamp pv::views::trace::TimeItem::delta ( const pv::util::Timestamp other) const
virtual

Reimplemented in pv::views::trace::CursorPair.

Definition at line 47 of file timeitem.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::TimeItem::drag_by ( const QPoint &  delta)
virtual

Drags the item to a delta relative to the drag point.

Parameters
deltathe offset from the drag point.

Implements pv::views::trace::ViewItem.

Definition at line 32 of file timeitem.cpp.

Here is the call graph for this function:

virtual float pv::views::trace::TimeItem::get_x ( ) const
pure virtual
bool pv::views::trace::TimeItem::is_snapping_disabled ( ) const

Definition at line 53 of file timeitem.cpp.

virtual void pv::views::trace::TimeItem::set_time ( const pv::util::Timestamp time)
pure virtual

Sets the time of the marker.

Implemented in pv::views::trace::CursorPair, pv::views::trace::TimeMarker, and pv::views::trace::TriggerMarker.

Here is the caller graph for this function:

virtual const pv::util::Timestamp pv::views::trace::TimeItem::time ( ) const
pure virtual

Returns the time this time item is set to.

Returns
0 in case there is no valid time (e.g. for a cursor pair)

Implemented in pv::views::trace::CursorPair, pv::views::trace::TriggerMarker, and pv::views::trace::TimeMarker.

Here is the caller graph for this function:

Member Data Documentation

bool pv::views::trace::TimeItem::snapping_disabled_ = false
protected

Definition at line 46 of file timeitem.hpp.

View& pv::views::trace::TimeItem::view_
protected

Definition at line 73 of file timeitem.hpp.


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