Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ControlWidget Class Referenceabstract

This abstract class is inherited by all those containing a Qt widget intended to show the controller's behaviour (current and aimed velocities). More...

#include <ctrlWdgt.hpp>

Inheritance diagram for ControlWidget:
Inheritance graph
[legend]

Public Member Functions

void keyPressed (QKeyEvent *event)
 Handles Quit/eXit shortcuts. More...
 
void keyReleased (QKeyEvent *)
 Key release can be handled by inheritors. More...
 
virtual void updateCommands (const double &trans_vel, const double &rot_vel)=0
 Update the display of the ROS node. More...
 
virtual void updateState (const State &state)=0
 Update the display of the odometry. More...
 
virtual QWidget & widget ()=0
 Returns the widget used to display the behaviour. More...
 
virtual ~ControlWidget ()
 The destructor needs to be defined as virtual. More...
 

Protected Member Functions

 ControlWidget (Controller &controller, const MotionModel &motion_model)
 The constructor is used by inheritors. More...
 

Protected Attributes

Controllerctrl
 This widget is the GUI of a controller. More...
 
const MotionModelmodel
 The motion model and its limits values. More...
 

Detailed Description

This abstract class is inherited by all those containing a Qt widget intended to show the controller's behaviour (current and aimed velocities).

Since
0.3.0

Definition at line 24 of file ctrlWdgt.hpp.

Constructor & Destructor Documentation

ControlWidget::ControlWidget ( Controller controller,
const MotionModel motion_model 
)
inlineprotected

The constructor is used by inheritors.

Parameters
controllerThe controller whose behaviour is shown,
motion_modelits motion model (with its limits values).

Definition at line 36 of file ctrlWdgt.hpp.

virtual ControlWidget::~ControlWidget ( )
inlinevirtual

The destructor needs to be defined as virtual.

Definition at line 42 of file ctrlWdgt.hpp.

Member Function Documentation

void ControlWidget::keyPressed ( QKeyEvent *  event)
inline

Handles Quit/eXit shortcuts.

Parameters
eventThe event associated to a key pression.

The application can be stopped either by pressing 'q' (Quit) or 'x' (eXit).

See QKeyEvent.

Definition at line 69 of file ctrlWdgt.hpp.

void ControlWidget::keyReleased ( QKeyEvent *  )
inline

Key release can be handled by inheritors.

Definition at line 75 of file ctrlWdgt.hpp.

virtual void ControlWidget::updateCommands ( const double &  trans_vel,
const double &  rot_vel 
)
pure virtual

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

Implemented in ViewCtrlWdgt, and TeleopWidget.

virtual void ControlWidget::updateState ( const State state)
pure virtual

Update the display of the odometry.

Parameters
stateThe state of the robot.
Since
0.3.1

Implemented in ViewCtrlWdgt, and TeleopWidget.

virtual QWidget& ControlWidget::widget ( )
pure virtual

Returns the widget used to display the behaviour.

Since
0.3.0

See Qt widget.

Implemented in ViewCtrlWdgt, and TeleopWidget.

Member Data Documentation

Controller& ControlWidget::ctrl
protected

This widget is the GUI of a controller.

Since
0.2.1

Definition at line 29 of file ctrlWdgt.hpp.

const MotionModel& ControlWidget::model
protected

The motion model and its limits values.

Since
0.2.1

Definition at line 31 of file ctrlWdgt.hpp.


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


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