PulseView  unreleased development snapshot
A Qt-based sigrok GUI
pv::views::trace::Cursor Class Reference

#include <cursor.hpp>

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

Public Member Functions

 Cursor (View &view, double time)
 
virtual bool enabled () const override
 
virtual QString get_text () const override
 
virtual QRectF label_rect (const QRectF &rect) const override
 
virtual QMenu * create_header_context_menu (QWidget *parent) override
 
- Public Member Functions inherited from pv::views::trace::TimeMarker
virtual const pv::util::Timestamp time () const override
 
void set_time (const pv::util::Timestamp &time) override
 
float get_x () const override
 
QPoint drag_point (const QRect &rect) const override
 
QRectF label_rect (const QRectF &rect) const override
 
QRectF hit_box_rect (const ViewItemPaintParams &pp) const override
 
virtual QString get_display_text () const
 
virtual void set_text (const QString &text)
 
void paint_label (QPainter &p, const QRect &rect, bool hover) override
 
void paint_fore (QPainter &p, ViewItemPaintParams &pp) override
 
virtual pv::widgets::Popupcreate_popup (QWidget *parent) override
 
- Public Member Functions inherited from pv::views::trace::TimeItem
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 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 void paint_back (QPainter &p, ViewItemPaintParams &pp)
 
virtual void paint_mid (QPainter &p, ViewItemPaintParams &pp)
 
virtual QMenu * create_view_context_menu (QWidget *parent, QPoint &click_pos)
 
virtual void delete_pressed ()
 
virtual void hover_point_changed (const QPoint &hp)
 
virtual void mouse_left_press_event (const QMouseEvent *event)
 

Static Public Attributes

static const QColor FillColor
 
- Static Public Attributes inherited from pv::views::trace::TimeMarker
static const int ArrowSize = 4
 
- Static Public Attributes inherited from pv::views::trace::ViewItem
static const QSizeF LabelPadding
 
static const int HighlightRadius = 3
 

Private Member Functions

shared_ptr< Cursorget_other_cursor () const
 

Additional Inherited Members

- Static Public Member Functions inherited from pv::views::trace::ViewItem
static QColor select_text_color (QColor background)
 
- Protected Member Functions inherited from pv::views::trace::TimeMarker
 TimeMarker (View &view, const QColor &color, const pv::util::Timestamp &time)
 
- Protected Member Functions inherited from pv::views::trace::TimeItem
 TimeItem (View &view)
 
- Static Protected Member Functions inherited from pv::views::trace::ViewItem
static QPen highlight_pen ()
 
- Protected Attributes inherited from pv::views::trace::TimeMarker
const QColor & color_
 
pv::util::Timestamp time_
 
QSizeF text_size_
 
QWidgetAction * value_action_
 
pv::widgets::TimestampSpinBoxvalue_widget_
 
- Protected Attributes inherited from pv::views::trace::TimeItem
bool snapping_disabled_ = false
 
Viewview_
 
- Protected Attributes inherited from pv::views::trace::ViewItem
QWidget * context_parent_
 
QPoint drag_point_
 

Detailed Description

Definition at line 37 of file cursor.hpp.

Constructor & Destructor Documentation

pv::views::trace::Cursor::Cursor ( View view,
double  time 
)

Constructor.

Parameters
viewA reference to the view that owns this cursor pair.
timeThe time to set the flag to.

Definition at line 47 of file cursor.cpp.

Member Function Documentation

QMenu * pv::views::trace::Cursor::create_header_context_menu ( QWidget *  parent)
overridevirtual

Reimplemented from pv::views::trace::ViewItem.

Definition at line 93 of file cursor.cpp.

bool pv::views::trace::Cursor::enabled ( ) const
overridevirtual

Returns true if the item is visible and enabled.

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

Definition at line 52 of file cursor.cpp.

Here is the call graph for this function:

shared_ptr< Cursor > pv::views::trace::Cursor::get_other_cursor ( ) const
private

Definition at line 106 of file cursor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString pv::views::trace::Cursor::get_text ( ) const
overridevirtual

Gets the text to show in the marker.

Implements pv::views::trace::TimeMarker.

Definition at line 57 of file cursor.cpp.

Here is the call graph for this function:

QRectF pv::views::trace::Cursor::label_rect ( const QRectF &  rect) const
overridevirtual

Gets the marker label rectangle.

Parameters
rectThe rectangle of the ruler client area.
Returns
Returns the label rectangle.

Reimplemented from pv::views::trace::ViewItem.

Definition at line 67 of file cursor.cpp.

Here is the call graph for this function:

Member Data Documentation

const QColor pv::views::trace::Cursor::FillColor
static

Definition at line 42 of file cursor.hpp.


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