PulseView  unreleased development snapshot
A Qt-based sigrok GUI
pv::views::trace::ViewWidget Class Referenceabstract

#include <viewwidget.hpp>

Inheritance diagram for pv::views::trace::ViewWidget:
Collaboration diagram for pv::views::trace::ViewWidget:

Public Slots

void clear_selection ()
 

Signals

void selection_changed ()
 

Protected Member Functions

 ViewWidget (View &parent)
 
virtual void item_hover (const shared_ptr< ViewItem > &item, QPoint pos)
 
virtual void item_clicked (const shared_ptr< ViewItem > &item)
 
bool accept_drag () const
 
bool mouse_down () const
 
void drag_items (const QPoint &delta)
 
virtual void drag ()
 
virtual void drag_by (const QPoint &delta)
 
virtual void drag_release ()
 
virtual vector< shared_ptr< ViewItem > > items ()=0
 
virtual shared_ptr< ViewItemget_mouse_over_item (const QPoint &pt)=0
 
void mouse_left_press_event (QMouseEvent *event)
 
void mouse_left_release_event (QMouseEvent *event)
 
virtual bool touch_event (QTouchEvent *event)
 
bool event (QEvent *event)
 
void mousePressEvent (QMouseEvent *event)
 
void mouseReleaseEvent (QMouseEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 
void keyPressEvent (QKeyEvent *event)
 
void keyReleaseEvent (QKeyEvent *event)
 
void leaveEvent (QEvent *event)
 

Protected Attributes

pv::views::trace::Viewview_
 
QPoint mouse_point_
 
QPoint mouse_down_point_
 
pv::util::Timestamp mouse_down_offset_
 
shared_ptr< ViewItemmouse_down_item_
 
Qt::KeyboardModifiers mouse_modifiers_
 Keyboard modifiers that were active when mouse was last moved or clicked. More...
 
bool item_dragging_
 

Detailed Description

Definition at line 42 of file viewwidget.hpp.

Constructor & Destructor Documentation

pv::views::trace::ViewWidget::ViewWidget ( View parent)
protected

Definition at line 36 of file viewwidget.cpp.

Member Function Documentation

bool pv::views::trace::ViewWidget::accept_drag ( ) const
protected

Returns true if the selection of row items allows dragging.

Returns
Returns true if the drag is acceptable.

Definition at line 64 of file viewwidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::ViewWidget::clear_selection ( )
slot

Definition at line 46 of file viewwidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::ViewWidget::drag ( )
protectedvirtual

Sets this item into the dragged state.

Reimplemented in pv::views::trace::Viewport.

Definition at line 147 of file viewwidget.cpp.

Here is the caller graph for this function:

void pv::views::trace::ViewWidget::drag_by ( const QPoint &  delta)
protectedvirtual

Drag the background by the delta offset.

Parameters
deltathe drag offset in pixels.
Remarks
The default implementation does nothing.

Reimplemented in pv::views::trace::Viewport.

Definition at line 151 of file viewwidget.cpp.

Here is the caller graph for this function:

void pv::views::trace::ViewWidget::drag_items ( const QPoint &  delta)
protected

Drag the dragging items by the delta offset.

Parameters
deltathe drag offset in pixels.

Definition at line 103 of file viewwidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::ViewWidget::drag_release ( )
protectedvirtual

Sets this item into the un-dragged state.

Reimplemented in pv::views::trace::Viewport.

Definition at line 156 of file viewwidget.cpp.

bool pv::views::trace::ViewWidget::event ( QEvent *  event)
protected

Definition at line 234 of file viewwidget.cpp.

Here is the call graph for this function:

virtual shared_ptr<ViewItem> pv::views::trace::ViewWidget::get_mouse_over_item ( const QPoint &  pt)
protectedpure virtual

Gets the first view item which has a hit-box that contains pt .

Parameters
ptthe point to search with.
Returns
the view item that has been found, or and empty shared_ptr if no item was found.

Implemented in pv::views::trace::Ruler, pv::views::trace::Header, and pv::views::trace::Viewport.

Here is the caller graph for this function:

void pv::views::trace::ViewWidget::item_clicked ( const shared_ptr< ViewItem > &  item)
protectedvirtual

Indicates the event an a view item has been clicked.

Parameters
itemthe view item that has been clicked.
Remarks
the default implementation does nothing.

Reimplemented in pv::views::trace::MarginWidget.

Definition at line 59 of file viewwidget.cpp.

Here is the caller graph for this function:

void pv::views::trace::ViewWidget::item_hover ( const shared_ptr< ViewItem > &  item,
QPoint  pos 
)
protectedvirtual

Indicates when a view item is being hovered over.

Parameters
itemThe item that is being hovered over, or nullptr if no view item is being hovered over.
Remarks
the default implementation does nothing.

Reimplemented in pv::views::trace::Ruler, and pv::views::trace::Viewport.

Definition at line 53 of file viewwidget.cpp.

Here is the caller graph for this function:

virtual vector< shared_ptr<ViewItem> > pv::views::trace::ViewWidget::items ( )
protectedpure virtual

Gets the items in the view widget.

Implemented in pv::views::trace::Ruler, pv::views::trace::Viewport, and pv::views::trace::Header.

Here is the caller graph for this function:

void pv::views::trace::ViewWidget::keyPressEvent ( QKeyEvent *  event)
protected

Definition at line 295 of file viewwidget.cpp.

Here is the caller graph for this function:

void pv::views::trace::ViewWidget::keyReleaseEvent ( QKeyEvent *  event)
protected

Definition at line 287 of file viewwidget.cpp.

void pv::views::trace::ViewWidget::leaveEvent ( QEvent *  event)
protected

Definition at line 347 of file viewwidget.cpp.

Here is the call graph for this function:

bool pv::views::trace::ViewWidget::mouse_down ( ) const
protected

Returns true if the mouse button is down.

Definition at line 97 of file viewwidget.cpp.

void pv::views::trace::ViewWidget::mouse_left_press_event ( QMouseEvent *  event)
protected

Handles left mouse button press events.

Parameters
eventthe mouse event that triggered this handler.

Definition at line 160 of file viewwidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::ViewWidget::mouse_left_release_event ( QMouseEvent *  event)
protected

Handles left mouse button release events.

Parameters
eventthe mouse event that triggered this handler.

Definition at line 196 of file viewwidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::ViewWidget::mouseMoveEvent ( QMouseEvent *  event)
protected

Definition at line 303 of file viewwidget.cpp.

Here is the call graph for this function:

void pv::views::trace::ViewWidget::mousePressEvent ( QMouseEvent *  event)
protected

Definition at line 251 of file viewwidget.cpp.

Here is the call graph for this function:

void pv::views::trace::ViewWidget::mouseReleaseEvent ( QMouseEvent *  event)
protected

Definition at line 276 of file viewwidget.cpp.

Here is the call graph for this function:

void pv::views::trace::ViewWidget::selection_changed ( )
signal

Definition at line 131 of file moc_viewwidget.cpp.

Here is the caller graph for this function:

bool pv::views::trace::ViewWidget::touch_event ( QTouchEvent *  event)
protectedvirtual

Handles touch begin update and end events.

Parameters
ethe event that triggered this handler.

Reimplemented in pv::views::trace::Viewport.

Definition at line 227 of file viewwidget.cpp.

Here is the caller graph for this function:

Member Data Documentation

bool pv::views::trace::ViewWidget::item_dragging_
protected

Definition at line 157 of file viewwidget.hpp.

shared_ptr<ViewItem> pv::views::trace::ViewWidget::mouse_down_item_
protected

Definition at line 152 of file viewwidget.hpp.

pv::util::Timestamp pv::views::trace::ViewWidget::mouse_down_offset_
protected

Definition at line 151 of file viewwidget.hpp.

QPoint pv::views::trace::ViewWidget::mouse_down_point_
protected

Definition at line 150 of file viewwidget.hpp.

Qt::KeyboardModifiers pv::views::trace::ViewWidget::mouse_modifiers_
protected

Keyboard modifiers that were active when mouse was last moved or clicked.

Definition at line 155 of file viewwidget.hpp.

QPoint pv::views::trace::ViewWidget::mouse_point_
protected

Definition at line 149 of file viewwidget.hpp.

pv::views::trace::View& pv::views::trace::ViewWidget::view_
protected

Definition at line 148 of file viewwidget.hpp.


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