PulseView  unreleased development snapshot
A Qt-based sigrok GUI
pv::views::trace::Viewport Class Reference

#include <viewport.hpp>

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

Public Member Functions

 Viewport (View &parent)
 
 ~Viewport ()
 
shared_ptr< ViewItemget_mouse_over_item (const QPoint &pt)
 

Private Member Functions

void item_hover (const shared_ptr< ViewItem > &item, QPoint pos)
 
void drag ()
 
void drag_by (const QPoint &delta)
 
void drag_release ()
 
vector< shared_ptr< ViewItem > > items ()
 
bool touch_event (QTouchEvent *event)
 
void paintEvent (QPaintEvent *event)
 
void mouseDoubleClickEvent (QMouseEvent *event)
 
void wheelEvent (QWheelEvent *event)
 
void on_setting_changed (const QString &key, const QVariant &value)
 

Private Attributes

boost::optional< pv::util::Timestampdrag_offset_
 
int drag_v_offset_
 
bool allow_vertical_dragging_
 
double pinch_offset0_
 
double pinch_offset1_
 
bool pinch_zoom_active_
 

Additional Inherited Members

- Public Slots inherited from pv::views::trace::ViewWidget
void clear_selection ()
 
- Signals inherited from pv::views::trace::ViewWidget
void selection_changed ()
 
- Protected Member Functions inherited from pv::views::trace::ViewWidget
 ViewWidget (View &parent)
 
virtual void item_clicked (const shared_ptr< ViewItem > &item)
 
bool accept_drag () const
 
bool mouse_down () const
 
void drag_items (const QPoint &delta)
 
void mouse_left_press_event (QMouseEvent *event)
 
void mouse_left_release_event (QMouseEvent *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 inherited from pv::views::trace::ViewWidget
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 47 of file viewport.hpp.

Constructor & Destructor Documentation

pv::views::trace::Viewport::Viewport ( View parent)
explicit

Definition at line 51 of file viewport.cpp.

Here is the call graph for this function:

pv::views::trace::Viewport::~Viewport ( )

Definition at line 65 of file viewport.cpp.

Here is the call graph for this function:

Member Function Documentation

void pv::views::trace::Viewport::drag ( )
privatevirtual

Sets this item into the dragged state.

Reimplemented from pv::views::trace::ViewWidget.

Definition at line 89 of file viewport.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::Viewport::drag_by ( const QPoint &  delta)
privatevirtual

Drag the background by the delta offset.

Parameters
deltathe drag offset in pixels.

Reimplemented from pv::views::trace::ViewWidget.

Definition at line 97 of file viewport.cpp.

Here is the call graph for this function:

void pv::views::trace::Viewport::drag_release ( )
privatevirtual

Sets this item into the un-dragged state.

Reimplemented from pv::views::trace::ViewWidget.

Definition at line 109 of file viewport.cpp.

Here is the caller graph for this function:

shared_ptr< ViewItem > pv::views::trace::Viewport::get_mouse_over_item ( const QPoint &  pt)
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.

Implements pv::views::trace::ViewWidget.

Definition at line 70 of file viewport.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

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.

Reimplemented from pv::views::trace::ViewWidget.

Definition at line 80 of file viewport.cpp.

vector< shared_ptr< ViewItem > > pv::views::trace::Viewport::items ( )
privatevirtual

Gets the items in the view widget.

Implements pv::views::trace::ViewWidget.

Definition at line 114 of file viewport.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::Viewport::mouseDoubleClickEvent ( QMouseEvent *  event)
private

Definition at line 247 of file viewport.cpp.

Here is the call graph for this function:

void pv::views::trace::Viewport::on_setting_changed ( const QString &  key,
const QVariant &  value 
)
privatevirtual

Implements pv::GlobalSettingsInterface.

Definition at line 309 of file viewport.cpp.

void pv::views::trace::Viewport::paintEvent ( QPaintEvent *  event)
private

Definition at line 206 of file viewport.cpp.

Here is the call graph for this function:

bool pv::views::trace::Viewport::touch_event ( QTouchEvent *  event)
privatevirtual

Handles touch begin update and end events.

Parameters
ethe event that triggered this handler.

Reimplemented from pv::views::trace::ViewWidget.

Definition at line 125 of file viewport.cpp.

Here is the call graph for this function:

void pv::views::trace::Viewport::wheelEvent ( QWheelEvent *  event)
private

Definition at line 264 of file viewport.cpp.

Here is the call graph for this function:

Member Data Documentation

bool pv::views::trace::Viewport::allow_vertical_dragging_
private

Definition at line 109 of file viewport.hpp.

boost::optional<pv::util::Timestamp> pv::views::trace::Viewport::drag_offset_
private

Definition at line 107 of file viewport.hpp.

int pv::views::trace::Viewport::drag_v_offset_
private

Definition at line 108 of file viewport.hpp.

double pv::views::trace::Viewport::pinch_offset0_
private

Definition at line 111 of file viewport.hpp.

double pv::views::trace::Viewport::pinch_offset1_
private

Definition at line 112 of file viewport.hpp.

bool pv::views::trace::Viewport::pinch_zoom_active_
private

Definition at line 113 of file viewport.hpp.


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