![]() |
PulseView
unreleased development snapshot
A Qt-based sigrok GUI
|
#include <timemarker.hpp>
Public Member Functions | |
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 QString | get_text () const =0 |
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::Popup * | create_popup (QWidget *parent) override |
![]() | |
virtual const pv::util::Timestamp | delta (const pv::util::Timestamp &other) const |
void | drag_by (const QPoint &delta) |
bool | is_snapping_disabled () const |
![]() | |
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 void | paint_back (QPainter &p, ViewItemPaintParams &pp) |
virtual void | paint_mid (QPainter &p, ViewItemPaintParams &pp) |
virtual QMenu * | create_header_context_menu (QWidget *parent) |
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 int | ArrowSize = 4 |
![]() | |
static const QSizeF | LabelPadding |
static const int | HighlightRadius = 3 |
Protected Member Functions | |
TimeMarker (View &view, const QColor &color, const pv::util::Timestamp &time) | |
![]() | |
TimeItem (View &view) | |
Protected Attributes | |
const QColor & | color_ |
pv::util::Timestamp | time_ |
QSizeF | text_size_ |
QWidgetAction * | value_action_ |
pv::widgets::TimestampSpinBox * | value_widget_ |
![]() | |
bool | snapping_disabled_ = false |
View & | view_ |
![]() | |
QWidget * | context_parent_ |
QPoint | drag_point_ |
Private Slots | |
void | on_popup_closed () |
void | on_value_changed (const pv::util::Timestamp &value) |
Additional Inherited Members | |
![]() | |
static QColor | select_text_color (QColor background) |
![]() | |
static QPen | highlight_pen () |
The TimeMarker class represents items on the Ruler that highlight a single point in time to the user. Aside from this, it is generic in nature.
Definition at line 48 of file timemarker.hpp.
|
protected |
Constructor.
view | A reference to the view that owns this marker. |
color | A reference to the color of this cursor. |
time | The time to set the flag to. |
Definition at line 47 of file timemarker.cpp.
|
overridevirtual |
Reimplemented from pv::views::trace::ViewItem.
Reimplemented in pv::views::trace::Flag.
Definition at line 179 of file timemarker.cpp.
|
overridevirtual |
Gets the arrow-tip point of the time marker.
rect | the rectangle of the ruler area. |
Implements pv::views::trace::ViewItem.
Definition at line 80 of file timemarker.cpp.
|
virtual |
Gets the current text to show in the marker - this may be dynamic.
Reimplemented in pv::views::trace::Flag.
Definition at line 108 of file timemarker.cpp.
|
pure virtual |
Gets the default text used to show the marker - e.g. the user-editable name.
Implemented in pv::views::trace::Flag, and pv::views::trace::Cursor.
|
overridevirtual |
Implements pv::views::trace::TimeItem.
Definition at line 74 of file timemarker.cpp.
|
overridevirtual |
Computes the outline rectangle of the viewport hit-box.
rect | the rectangle of the viewport area. |
Reimplemented from pv::views::trace::ViewItem.
Definition at line 101 of file timemarker.cpp.
|
overridevirtual |
Computes the outline rectangle of a label.
rect | the rectangle of the header area. |
Reimplemented from pv::views::trace::ViewItem.
Definition at line 87 of file timemarker.cpp.
|
privateslot |
Definition at line 203 of file timemarker.cpp.
|
privateslot |
Definition at line 210 of file timemarker.cpp.
|
overridevirtual |
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::views::trace::ViewItem.
Definition at line 169 of file timemarker.cpp.
|
overridevirtual |
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::views::trace::ViewItem.
Definition at line 118 of file timemarker.cpp.
|
virtual |
Sets the text to show in the marker.
Reimplemented in pv::views::trace::Flag.
Definition at line 113 of file timemarker.cpp.
|
overridevirtual |
Sets the time of the marker.
Implements pv::views::trace::TimeItem.
Definition at line 62 of file timemarker.cpp.
|
overridevirtual |
Gets the time of the marker.
Implements pv::views::trace::TimeItem.
Definition at line 57 of file timemarker.cpp.
|
static |
Definition at line 53 of file timemarker.hpp.
|
protected |
Definition at line 136 of file timemarker.hpp.
|
protected |
Definition at line 140 of file timemarker.hpp.
|
protected |
Definition at line 138 of file timemarker.hpp.
|
protected |
Definition at line 142 of file timemarker.hpp.
|
protected |
Definition at line 143 of file timemarker.hpp.