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

#include <timemarker.hpp>

Inheritance diagram for pv::view::TimeMarker:
Collaboration diagram for pv::view::TimeMarker:

Public Member Functions

const pv::util::Timestamptime () const
 
void set_time (const pv::util::Timestamp &time) override
 
float get_x () const
 
QPoint point (const QRect &rect) const
 
QRectF label_rect (const QRectF &rect) const
 
QRectF hit_box_rect (const ViewItemPaintParams &pp) const
 
virtual QString get_text () const =0
 
void paint_label (QPainter &p, const QRect &rect, bool hover)
 
void paint_fore (QPainter &p, const ViewItemPaintParams &pp)
 
virtual pv::widgets::Popupcreate_popup (QWidget *parent)
 
- Public Member Functions inherited from pv::view::TimeItem
void drag_by (const QPoint &delta)
 
- Public Member Functions inherited from pv::view::ViewItem
 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 paint_back (QPainter &p, const ViewItemPaintParams &pp)
 
virtual void paint_mid (QPainter &p, const ViewItemPaintParams &pp)
 
virtual QMenu * create_context_menu (QWidget *parent)
 
virtual void delete_pressed ()
 

Static Public Attributes

static const int ArrowSize = 4
 
- Static Public Attributes inherited from pv::view::ViewItem
static const QSizeF LabelPadding
 
static const int HighlightRadius = 3
 

Protected Member Functions

 TimeMarker (View &view, const QColor &colour, const pv::util::Timestamp &time)
 
- Protected Member Functions inherited from pv::view::TimeItem
 TimeItem (View &view)
 

Protected Attributes

const QColor & colour_
 
pv::util::Timestamp time_
 
QSizeF text_size_
 
QWidgetAction * value_action_
 
pv::widgets::TimestampSpinBoxvalue_widget_
 
bool updating_value_widget_
 
- Protected Attributes inherited from pv::view::TimeItem
Viewview_
 
- Protected Attributes inherited from pv::view::ViewItem
QWidget * context_parent_
 
QPoint drag_point_
 

Private Slots

void on_value_changed (const pv::util::Timestamp &value)
 

Additional Inherited Members

- Static Public Member Functions inherited from pv::view::ViewItem
static QColor select_text_colour (QColor background)
 
- Static Protected Member Functions inherited from pv::view::ViewItem
static QPen highlight_pen ()
 

Detailed Description

Definition at line 44 of file timemarker.hpp.

Constructor & Destructor Documentation

pv::view::TimeMarker::TimeMarker ( View view,
const QColor &  colour,
const pv::util::Timestamp time 
)
protected

Constructor.

Parameters
viewA reference to the view that owns this marker.
colourA reference to the colour of this cursor.
timeThe time to set the flag to.

Definition at line 45 of file timemarker.cpp.

Member Function Documentation

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

Reimplemented from pv::view::ViewItem.

Reimplemented in pv::view::Flag.

Definition at line 166 of file timemarker.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual QString pv::view::TimeMarker::get_text ( ) const
pure virtual

Gets the text to show in the marker.

Implemented in pv::view::Flag, and pv::view::Cursor.

Here is the caller graph for this function:

float pv::view::TimeMarker::get_x ( ) const
virtual

Implements pv::view::TimeItem.

Definition at line 74 of file timemarker.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QRectF pv::view::TimeMarker::hit_box_rect ( const ViewItemPaintParams pp) const
virtual

Computes the outline rectangle of the viewport hit-box.

Parameters
rectthe rectangle of the viewport area.
Returns
Returns the rectangle of the hit-box.

Reimplemented from pv::view::ViewItem.

Definition at line 98 of file timemarker.cpp.

Here is the call graph for this function:

QRectF pv::view::TimeMarker::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 84 of file timemarker.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::view::TimeMarker::on_value_changed ( const pv::util::Timestamp value)
privateslot

Definition at line 188 of file timemarker.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::view::TimeMarker::paint_fore ( QPainter &  p,
const ViewItemPaintParams pp 
)
virtual

Paints the foreground layer of the item with a QPainter

Parameters
pthe QPainter to paint into.
ppthe painting parameters object to paint with.

Reimplemented from pv::view::ViewItem.

Definition at line 156 of file timemarker.cpp.

Here is the call graph for this function:

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

Paints the marker's label to the ruler.

Parameters
pThe painter to draw with.
rectThe rectangle of the ruler client area.
hovertrue if the label is being hovered over by the mouse.

Reimplemented from pv::view::ViewItem.

Definition at line 105 of file timemarker.cpp.

Here is the call graph for this function:

QPoint pv::view::TimeMarker::point ( const QRect &  rect) const
virtual

Gets the arrow-tip point of the time marker.

Parameters
rectthe rectangle of the ruler area.

Implements pv::view::ViewItem.

Definition at line 79 of file timemarker.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::view::TimeMarker::set_time ( const pv::util::Timestamp time)
overridevirtual

Sets the time of the marker.

Implements pv::view::TimeItem.

Definition at line 61 of file timemarker.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const pv::util::Timestamp & pv::view::TimeMarker::time ( ) const

Gets the time of the marker.

Definition at line 56 of file timemarker.cpp.

Here is the caller graph for this function:

Member Data Documentation

const int pv::view::TimeMarker::ArrowSize = 4
static

Definition at line 49 of file timemarker.hpp.

const QColor& pv::view::TimeMarker::colour_
protected

Definition at line 119 of file timemarker.hpp.

QSizeF pv::view::TimeMarker::text_size_
protected

Definition at line 123 of file timemarker.hpp.

pv::util::Timestamp pv::view::TimeMarker::time_
protected

Definition at line 121 of file timemarker.hpp.

bool pv::view::TimeMarker::updating_value_widget_
protected

Definition at line 127 of file timemarker.hpp.

QWidgetAction* pv::view::TimeMarker::value_action_
protected

Definition at line 125 of file timemarker.hpp.

pv::widgets::TimestampSpinBox* pv::view::TimeMarker::value_widget_
protected

Definition at line 126 of file timemarker.hpp.


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