PulseView
0.3.0
A Qt-based sigrok GUI
|
#include <cursorpair.hpp>
Public Member Functions | |
CursorPair (View &view) | |
bool | enabled () const |
std::shared_ptr< Cursor > | first () const |
std::shared_ptr< Cursor > | second () const |
void | set_time (const pv::util::Timestamp &time) override |
float | get_x () const |
QPoint | point (const QRect &rect) const |
pv::widgets::Popup * | create_popup (QWidget *parent) |
QRectF | label_rect (const QRectF &rect) const |
void | paint_label (QPainter &p, const QRect &rect, bool hover) |
void | paint_back (QPainter &p, const ViewItemPaintParams &pp) |
QString | format_string () |
void | compute_text_size (QPainter &p) |
std::pair< float, float > | get_cursor_offsets () const |
Public Member Functions inherited from pv::view::TimeItem | |
void | drag_by (const QPoint &delta) |
Public Member Functions inherited from pv::view::ViewItem | |
ViewItem () | |
bool | selected () const |
virtual void | select (bool select=true) |
virtual bool | is_draggable () const |
bool | dragging () const |
void | drag () |
virtual void | drag_release () |
virtual QRectF | hit_box_rect (const ViewItemPaintParams &pp) const |
virtual void | paint_mid (QPainter &p, const ViewItemPaintParams &pp) |
virtual void | paint_fore (QPainter &p, const ViewItemPaintParams &pp) |
virtual QMenu * | create_context_menu (QWidget *parent) |
virtual void | delete_pressed () |
Private Attributes | |
std::shared_ptr< Cursor > | first_ |
std::shared_ptr< Cursor > | second_ |
QSizeF | text_size_ |
Static Private Attributes | |
static const int | DeltaPadding = 8 |
static const QColor | ViewportFillColour |
Additional Inherited Members | |
Static Public Member Functions inherited from pv::view::ViewItem | |
static QColor | select_text_colour (QColor background) |
Static Public Attributes inherited from pv::view::ViewItem | |
static const QSizeF | LabelPadding |
static const int | HighlightRadius = 3 |
Protected Member Functions inherited from pv::view::TimeItem | |
TimeItem (View &view) | |
Static Protected Member Functions inherited from pv::view::ViewItem | |
static QPen | highlight_pen () |
Protected Attributes inherited from pv::view::TimeItem | |
View & | view_ |
Protected Attributes inherited from pv::view::ViewItem | |
QWidget * | context_parent_ |
QPoint | drag_point_ |
Definition at line 35 of file cursorpair.hpp.
pv::view::CursorPair::CursorPair | ( | View & | view | ) |
Constructor.
view | A reference to the view that owns this cursor pair. |
Definition at line 42 of file cursorpair.cpp.
void pv::view::CursorPair::compute_text_size | ( | QPainter & | p | ) |
Definition at line 177 of file cursorpair.cpp.
|
virtual |
Reimplemented from pv::view::ViewItem.
Definition at line 81 of file cursorpair.cpp.
|
virtual |
Returns true if the item is visible and enabled.
Implements pv::view::ViewItem.
Definition at line 49 of file cursorpair.cpp.
shared_ptr< Cursor > pv::view::CursorPair::first | ( | ) | const |
Returns a pointer to the first cursor.
Definition at line 54 of file cursorpair.cpp.
QString pv::view::CursorPair::format_string | ( | ) |
Constructs the string to display.
Definition at line 164 of file cursorpair.cpp.
pair< float, float > pv::view::CursorPair::get_cursor_offsets | ( | ) | const |
Definition at line 185 of file cursorpair.cpp.
|
virtual |
Implements pv::view::TimeItem.
Definition at line 71 of file cursorpair.cpp.
|
virtual |
Computes the outline rectangle of a label.
rect | the rectangle of the header area. |
Reimplemented from pv::view::ViewItem.
Definition at line 87 of file cursorpair.cpp.
|
virtual |
Paints the background 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 147 of file cursorpair.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 cursorpair.cpp.
|
virtual |
Get the drag point.
rect | the rectangle of the widget area. |
Implements pv::view::ViewItem.
Definition at line 76 of file cursorpair.cpp.
shared_ptr< Cursor > pv::view::CursorPair::second | ( | ) | const |
Returns a pointer to the second cursor.
Definition at line 59 of file cursorpair.cpp.
|
overridevirtual |
Sets the time of the marker.
Implements pv::view::TimeItem.
Definition at line 64 of file cursorpair.cpp.
|
staticprivate |
Definition at line 38 of file cursorpair.hpp.
|
private |
Definition at line 103 of file cursorpair.hpp.
|
private |
Definition at line 103 of file cursorpair.hpp.
|
private |
Definition at line 105 of file cursorpair.hpp.
|
staticprivate |
Definition at line 39 of file cursorpair.hpp.