Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
ViewCtrlWdgt Class Reference

This class is a Qt widget which allows to show the controller's behaviour (current and aimed velocities). More...

#include <viewCtrl.hpp>

Inheritance diagram for ViewCtrlWdgt:
Inheritance graph
[legend]

Public Member Functions

void updateCommands (const double &trans_vel, const double &rot_vel)
 Update the display of the ROS node. More...
 
void updateState (const State &state)
 Update the display of the odometry. More...
 
 ViewCtrlWdgt (QWidget &parent, Controller &control, const MotionModel &motion_model)
 The constructor needs the containing graphical object, the motion model and the related controller. More...
 
QWidget & widget ()
 Returns the widget used to display the behaviour. More...
 
 ~ViewCtrlWdgt ()
 The destructor needs to be redefined. More...
 
- Public Member Functions inherited from ControlWidget
void keyPressed (QKeyEvent *event)
 Handles Quit/eXit shortcuts. More...
 
void keyReleased (QKeyEvent *)
 Key release can be handled by inheritors. More...
 
virtual ~ControlWidget ()
 The destructor needs to be defined as virtual. More...
 

Protected Slots

void paintEvent (QPaintEvent *event)
 Draws the controller's velocities and their evolution. More...
 

Protected Member Functions

void modify (QPointF &variable, const QPointF &value)
 Memorizes a new value in a variable and redraw. More...
 
QPoint plot (const QPointF &velocities) const
 Returns the graphical point corresponding to a couple of velocities. More...
 
QRect region (const QPointF &vel) const
 Returns the graphical region drawn around velocities. More...
 
- Protected Member Functions inherited from ControlWidget
 ControlWidget (Controller &controller, const MotionModel &motion_model)
 The constructor is used by inheritors. More...
 

Protected Attributes

QPointF commands
 The velocities sent as commands. More...
 
QPointF velocities
 The velocities from the odometry. More...
 
- Protected Attributes inherited from ControlWidget
Controllerctrl
 This widget is the GUI of a controller. More...
 
const MotionModelmodel
 The motion model and its limits values. More...
 

Detailed Description

This class is a Qt widget which allows to show the controller's behaviour (current and aimed velocities).

This widget takes the code of the teleoperation widget which can be useful to other control widgets.

Since
0.3.0

Definition at line 24 of file viewCtrl.hpp.

Constructor & Destructor Documentation

ViewCtrlWdgt::ViewCtrlWdgt ( QWidget &  parent,
Controller control,
const MotionModel motion_model 
)

The constructor needs the containing graphical object, the motion model and the related controller.

Parameters
parentThe containing graphical object,
controlthe controller whose behaviour is shown,
motion_modelthe motion model.

See QWidget.

Definition at line 66 of file viewCtrl.cpp.

ViewCtrlWdgt::~ViewCtrlWdgt ( )
inline

The destructor needs to be redefined.

Definition at line 76 of file viewCtrl.hpp.

Member Function Documentation

void ViewCtrlWdgt::modify ( QPointF &  variable,
const QPointF &  value 
)
inlineprotected

Memorizes a new value in a variable and redraw.

Parameters
variableeither velocities or commands,
valuethe new value for this variable.

Definition at line 50 of file viewCtrl.hpp.

void ViewCtrlWdgt::paintEvent ( QPaintEvent *  event)
protectedslot

Draws the controller's velocities and their evolution.

Parameters
eventThe drawing event, giving the region which should be redrawn.

Definition at line 33 of file viewCtrl.cpp.

QPoint ViewCtrlWdgt::plot ( const QPointF &  velocities) const
protected

Returns the graphical point corresponding to a couple of velocities.

Parameters
velocitiesThe velocities, a couple of double.
Returns
The graphical point corresponding to the velocities.

Definition at line 17 of file viewCtrl.cpp.

QRect ViewCtrlWdgt::region ( const QPointF &  vel) const
inlineprotected

Returns the graphical region drawn around velocities.

Parameters
velThe velocities, a couple of double.
Returns
The graphical region drawn around the point.

Definition at line 40 of file viewCtrl.hpp.

void ViewCtrlWdgt::updateCommands ( const double &  trans_vel,
const double &  rot_vel 
)
inlinevirtual

Update the display of the ROS node.

Parameters
trans_velthe translation velocity sent to ROS,
rot_velthe rotation velocity sent to ROS.
Since
0.3.1

Implements ControlWidget.

Definition at line 90 of file viewCtrl.hpp.

void ViewCtrlWdgt::updateState ( const State state)
inlinevirtual

Update the display of the odometry.

Parameters
stateThe state of the robot.
Since
0.3.1

Implements ControlWidget.

Definition at line 85 of file viewCtrl.hpp.

QWidget& ViewCtrlWdgt::widget ( )
inlinevirtual

Returns the widget used to display the behaviour.

Since
0.3.0

See Qt widget.

Implements ControlWidget.

Definition at line 82 of file viewCtrl.hpp.

Member Data Documentation

QPointF ViewCtrlWdgt::commands
protected

The velocities sent as commands.

Definition at line 29 of file viewCtrl.hpp.

QPointF ViewCtrlWdgt::velocities
protected

The velocities from the odometry.

Definition at line 28 of file viewCtrl.hpp.


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


qt_ctrl
Author(s): Alexis Scheuer
autogenerated on Wed Dec 16 2020 15:51:32