PulseView
0.3.0
A Qt-based sigrok GUI
|
#include <timemarker.hpp>
Public Member Functions | |
const pv::util::Timestamp & | time () 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::Popup * | create_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::TimestampSpinBox * | value_widget_ |
bool | updating_value_widget_ |
Protected Attributes inherited from pv::view::TimeItem | |
View & | view_ |
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 () |
Definition at line 44 of file timemarker.hpp.
|
protected |
Constructor.
view | A reference to the view that owns this marker. |
colour | A reference to the colour of this cursor. |
time | The time to set the flag to. |
Definition at line 45 of file timemarker.cpp.
|
virtual |
Reimplemented from pv::view::ViewItem.
Reimplemented in pv::view::Flag.
Definition at line 166 of file timemarker.cpp.
|
pure virtual |
Gets the text to show in the marker.
Implemented in pv::view::Flag, and pv::view::Cursor.
|
virtual |
Implements pv::view::TimeItem.
Definition at line 74 of file timemarker.cpp.
|
virtual |
Computes the outline rectangle of the viewport hit-box.
rect | the rectangle of the viewport area. |
Reimplemented from pv::view::ViewItem.
Definition at line 98 of file timemarker.cpp.
|
virtual |
Computes the outline rectangle of a label.
rect | the rectangle of the header area. |
Reimplemented from pv::view::ViewItem.
Definition at line 84 of file timemarker.cpp.
|
privateslot |
Definition at line 188 of file timemarker.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 from pv::view::ViewItem.
Definition at line 156 of file timemarker.cpp.
|
virtual |
Paints the marker's label to the ruler.
p | The painter to draw with. |
rect | The rectangle of the ruler client area. |
hover | true if the label is being hovered over by the mouse. |
Reimplemented from pv::view::ViewItem.
Definition at line 105 of file timemarker.cpp.
|
virtual |
Gets the arrow-tip point of the time marker.
rect | the rectangle of the ruler area. |
Implements pv::view::ViewItem.
Definition at line 79 of file timemarker.cpp.
|
overridevirtual |
Sets the time of the marker.
Implements pv::view::TimeItem.
Definition at line 61 of file timemarker.cpp.
const pv::util::Timestamp & pv::view::TimeMarker::time | ( | ) | const |
Gets the time of the marker.
Definition at line 56 of file timemarker.cpp.
|
static |
Definition at line 49 of file timemarker.hpp.
|
protected |
Definition at line 119 of file timemarker.hpp.
|
protected |
Definition at line 123 of file timemarker.hpp.
|
protected |
Definition at line 121 of file timemarker.hpp.
|
protected |
Definition at line 127 of file timemarker.hpp.
|
protected |
Definition at line 125 of file timemarker.hpp.
|
protected |
Definition at line 126 of file timemarker.hpp.