![]() |
PulseView
unreleased development snapshot
A Qt-based sigrok GUI
|
#include <flag.hpp>
Public Member Functions | |
Flag (View &view, const pv::util::Timestamp &time, const QString &text) | |
Flag (const Flag &flag) | |
virtual bool | enabled () const override |
virtual QString | get_display_text () const override |
virtual QString | get_text () const override |
virtual void | set_text (const QString &text) override |
virtual pv::widgets::Popup * | create_popup (QWidget *parent) override |
virtual QMenu * | create_header_context_menu (QWidget *parent) override |
virtual void | delete_pressed () override |
QRectF | label_rect (const QRectF &rect) const override |
![]() | |
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 |
void | paint_label (QPainter &p, const QRect &rect, bool hover) override |
void | paint_fore (QPainter &p, ViewItemPaintParams &pp) 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 | 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 | hover_point_changed (const QPoint &hp) |
virtual void | mouse_left_press_event (const QMouseEvent *event) |
Static Public Attributes | |
static const QColor | FillColor |
![]() | |
static const int | ArrowSize = 4 |
![]() | |
static const QSizeF | LabelPadding |
static const int | HighlightRadius = 3 |
Private Slots | |
void | on_delete () |
void | on_text_changed (const QString &text) |
Private Attributes | |
QString | text_ |
Additional Inherited Members | |
![]() | |
static QColor | select_text_color (QColor background) |
![]() | |
TimeMarker (View &view, const QColor &color, const pv::util::Timestamp &time) | |
![]() | |
TimeItem (View &view) | |
![]() | |
static QPen | highlight_pen () |
![]() | |
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_ |
The Flag class represents items on the Ruler that mark important events on the timeline to the user. They are editable and thus non-static.
pv::views::trace::Flag::Flag | ( | View & | view, |
const pv::util::Timestamp & | time, | ||
const QString & | text | ||
) |
pv::views::trace::Flag::Flag | ( | const Flag & | flag | ) |
|
overridevirtual |
Reimplemented from pv::views::trace::ViewItem.
Definition at line 149 of file flag.cpp.
|
overridevirtual |
Reimplemented from pv::views::trace::TimeMarker.
Definition at line 128 of file flag.cpp.
|
overridevirtual |
Reimplemented from pv::views::trace::ViewItem.
Definition at line 167 of file flag.cpp.
|
overridevirtual |
Returns true if the item is visible and enabled.
Implements pv::views::trace::ViewItem.
|
overridevirtual |
Gets the current text to show in the marker - this may be dynamic.
Returns the text used to display this flag item. This is not necessarily the name that the user has given it.
Reimplemented from pv::views::trace::TimeMarker.
Definition at line 64 of file flag.cpp.
|
overridevirtual |
Gets the default text used to show the marker - e.g. the user-editable name.
Returns the text of this flag item, i.e. the user-editable name.
Implements pv::views::trace::TimeMarker.
|
overridevirtual |
Computes the outline rectangle of a label.
rect | the rectangle of the header area. |
Reimplemented from pv::views::trace::ViewItem.
Definition at line 94 of file flag.cpp.
|
privateslot |
|
privateslot |
|
overridevirtual |
Sets the text to show in the marker.
Reimplemented from pv::views::trace::TimeMarker.
Definition at line 88 of file flag.cpp.