trikRuntime
trikGui::SensorsWidget Class Reference

Widget that shows current readings of selected sensors. More...

#include <sensorsWidget.h>

Inheritance diagram for trikGui::SensorsWidget:
Collaboration diagram for trikGui::SensorsWidget:

Public Types

enum  SensorType { SensorType::analogOrDigitalSensor, SensorType::encoder, SensorType::gyroscope, SensorType::accelerometer }
 
- Public Types inherited from trikGui::TrikGuiDialog
enum  Result { normalExit, goHomeExit }
 
- Public Types inherited from trikGui::MainWidget
enum  FileManagerRootType { FileManagerRootType::scriptsDir, FileManagerRootType::allFS }
 

Public Member Functions

 SensorsWidget (trikControl::BrickInterface &brick, const QStringList &ports, SensorType sensorType, QWidget *parent=0)
 Constructor. More...
 
 ~SensorsWidget () override
 
int exec () override
 Show widget and wait until it will be closed. More...
 
void renewFocus () override
 Set focus properly on this widget or one of its children. More...
 
- Public Member Functions inherited from trikGui::TrikGuiDialog
 TrikGuiDialog (QWidget *parent=0)
 Constructor. More...
 
virtual ~TrikGuiDialog ()
 
- Public Member Functions inherited from trikGui::MainWidget
 MainWidget (QWidget *parent)
 Constructor. More...
 

Protected Member Functions

void exit () override
 
void goHome () override
 
- Protected Member Functions inherited from trikGui::TrikGuiDialog
virtual void keyPressEvent (QKeyEvent *event)
 

Additional Inherited Members

- Signals inherited from trikGui::MainWidget
void newWidget (trikGui::MainWidget &widget)
 Emitted when the widget created a new one and wants it to be shown. More...
 

Detailed Description

Widget that shows current readings of selected sensors.

Member Enumeration Documentation

Enumerator
analogOrDigitalSensor 
encoder 
gyroscope 
accelerometer 

Constructor & Destructor Documentation

SensorsWidget::SensorsWidget ( trikControl::BrickInterface brick,
const QStringList &  ports,
SensorType  sensorType,
QWidget *  parent = 0 
)
explicit

Constructor.

SensorsWidget::~SensorsWidget ( )
override

Member Function Documentation

int SensorsWidget::exec ( )
overridevirtual

Show widget and wait until it will be closed.

Returns
TrikGuiDialog::goHomeExit if the user wants to go to the home screen, and TrikGuiDialog::normalExit otherwise.

Reimplemented from trikGui::TrikGuiDialog.

void SensorsWidget::exit ( )
overrideprotectedvirtual

Reimplemented from trikGui::TrikGuiDialog.

void SensorsWidget::goHome ( )
overrideprotectedvirtual

Reimplemented from trikGui::TrikGuiDialog.

void SensorsWidget::renewFocus ( )
overridevirtual

Set focus properly on this widget or one of its children.

Implements trikGui::MainWidget.


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