YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
QtYARPScope Class Reference

The plugin Core class. More...

#include </home/runner/work/yarp-documentation/yarp-documentation/yarp/src/guis/yarpscope/plugin/qtyarpscope.h>

+ Inheritance diagram for QtYARPScope:

Signals

void setWindowTitle (QString title)
 
void setWindowPosition (int x, int y)
 
void setWindowSize (int w, int h)
 
void intervalLoaded (int interval)
 

Public Member Functions

 QtYARPScope (QQuickItem *parent=0)
 
Q_INVOKABLE bool parseParameters (QStringList params)
 parse the parameters received from the main container in QstringList form
 
Q_INVOKABLE void clear ()
 clears the data in the current window
 
Q_INVOKABLE void rescale ()
 rescales the graphs in order to contains the maximum and minimum value visible in the window
 
Q_INVOKABLE void changeInterval (int interval)
 changes the refresh interval
 
Q_INVOKABLE void playPressed (int check)
 plays or pauses the data flow
 
 ~QtYARPScope ()
 
void usage ()
 Prints the help menu.
 
void paint (QPainter *painter) override
 paint method.
 

Protected Member Functions

void routeMouseEvents (QMouseEvent *event)
 this function is used to route the mouse events on the core plugin to the relative QCustomPlot.
 
void routeMouseEvents (QWheelEvent *event)
 this function is used to route the wheel mouse events on the core plugin to the relative QCustomPlot.
 
void mousePressEvent (QMouseEvent *event) override
 the mouse press event
 
void mouseReleaseEvent (QMouseEvent *event) override
 the mouse release event
 
void mouseMoveEvent (QMouseEvent *event) override
 the mouse move event
 
void mouseDoubleClickEvent (QMouseEvent *event) override
 the mouse double click event
 
void wheelEvent (QWheelEvent *event) override
 the wheel mouse event
 

Detailed Description

The plugin Core class.

this is the plugin core class which acts as bridge between the QML and c++. in the C++ code is implemented the backend logic, instead in the QML is implemented the Visual part. This Core plugin derived from QQuickPaintedItem and has the flag ItemHasContents set to true, so it can paint itself what it needs.

Definition at line 26 of file qtyarpscope.h.

Constructor & Destructor Documentation

◆ QtYARPScope()

QtYARPScope::QtYARPScope ( QQuickItem *  parent = 0)

Definition at line 16 of file qtyarpscope.cpp.

◆ ~QtYARPScope()

QtYARPScope::~QtYARPScope ( )

Definition at line 36 of file qtyarpscope.cpp.

Member Function Documentation

◆ changeInterval()

void QtYARPScope::changeInterval ( int  interval)

changes the refresh interval

Parameters
intervalthe interval

Definition at line 193 of file qtyarpscope.cpp.

◆ clear()

void QtYARPScope::clear ( )

clears the data in the current window

Definition at line 185 of file qtyarpscope.cpp.

◆ intervalLoaded

void QtYARPScope::intervalLoaded ( int  interval)
signal

◆ mouseDoubleClickEvent()

void QtYARPScope::mouseDoubleClickEvent ( QMouseEvent *  event)
overrideprotected

the mouse double click event

Parameters
eventthe event

Definition at line 342 of file qtyarpscope.cpp.

◆ mouseMoveEvent()

void QtYARPScope::mouseMoveEvent ( QMouseEvent *  event)
overrideprotected

the mouse move event

Parameters
eventthe event

Definition at line 334 of file qtyarpscope.cpp.

◆ mousePressEvent()

void QtYARPScope::mousePressEvent ( QMouseEvent *  event)
overrideprotected

the mouse press event

Parameters
eventthe event

Definition at line 318 of file qtyarpscope.cpp.

◆ mouseReleaseEvent()

void QtYARPScope::mouseReleaseEvent ( QMouseEvent *  event)
overrideprotected

the mouse release event

Parameters
eventthe event

Definition at line 326 of file qtyarpscope.cpp.

◆ paint()

void QtYARPScope::paint ( QPainter *  painter)
override

paint method.

In this method each Plotter is grabbed from its own QCustomPlot Widget to a Pixmap and then drawed with the QPainter primitive drawPixmap

Definition at line 268 of file qtyarpscope.cpp.

◆ parseParameters()

bool QtYARPScope::parseParameters ( QStringList  params)

parse the parameters received from the main container in QstringList form

Parameters
paramsthe parameter list

Definition at line 63 of file qtyarpscope.cpp.

◆ playPressed()

void QtYARPScope::playPressed ( int  check)

plays or pauses the data flow

Parameters
check

Definition at line 179 of file qtyarpscope.cpp.

◆ rescale()

void QtYARPScope::rescale ( )

rescales the graphs in order to contains the maximum and minimum value visible in the window

Definition at line 201 of file qtyarpscope.cpp.

◆ routeMouseEvents() [1/2]

void QtYARPScope::routeMouseEvents ( QMouseEvent *  event)
protected

this function is used to route the mouse events on the core plugin to the relative QCustomPlot.

This method works fairly well but has some limitations on dragging

Parameters
eventthe event

Definition at line 357 of file qtyarpscope.cpp.

◆ routeMouseEvents() [2/2]

void QtYARPScope::routeMouseEvents ( QWheelEvent *  event)
protected

this function is used to route the wheel mouse events on the core plugin to the relative QCustomPlot.

Parameters
eventthe event

Definition at line 381 of file qtyarpscope.cpp.

◆ setWindowPosition

void QtYARPScope::setWindowPosition ( int  x,
int  y 
)
signal

◆ setWindowSize

void QtYARPScope::setWindowSize ( int  w,
int  h 
)
signal

◆ setWindowTitle

void QtYARPScope::setWindowTitle ( QString  title)
signal

◆ usage()

void QtYARPScope::usage ( )

Prints the help menu.

Definition at line 207 of file qtyarpscope.cpp.

◆ wheelEvent()

void QtYARPScope::wheelEvent ( QWheelEvent *  event)
overrideprotected

the wheel mouse event

Parameters
eventthe event

Definition at line 310 of file qtyarpscope.cpp.


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