Roomba App
1.0
|
The class connecting all modules through the UI interface. More...
#include <mainwindow.hh>
Public Member Functions | |
MainWindow (QWidget *parent=nullptr) | |
Construct a new MainWindow object. More... | |
~MainWindow () | |
Destroy the MainWindow object. More... | |
Protected Member Functions | |
void | closeEvent (QCloseEvent *event) override |
Closing event function. More... | |
Private Slots | |
void | on_actionClose_triggered () |
Slot triggered when the closing signal was emitted. More... | |
void | on_actionDisconnect_triggered () |
Slot triggered when the disconnecting signal was emitted. More... | |
void | on_actionSearch_triggered () |
Slot triggered when the searching signal was emitted. More... | |
void | connectSerialDevice (const QString &actionName) |
Connect to the serial device. More... | |
void | serialTimeout () |
Update information read from the serial port. More... | |
void | showErrorMessage (const QString &message) |
Show error message as status bar message. More... | |
void | addMessageToLogs (const QString &message) |
Add a message to the logs widget. More... | |
void | addValueSpeedL (const QString &message) |
Set the value of the left motor speed. More... | |
void | addValueSpeedR (const QString &message) |
Set the value of the right motor speed. More... | |
void | addValueGSpeedL (const QString &message) |
Set the value of the left motor given speed. More... | |
void | addValueGSpeedR (const QString &message) |
Set the value of the right motor given speed. More... | |
void | addValueAccelerationL (const QString &message) |
Set the value of the left motor acceleration. More... | |
void | addValueAccelerationR (const QString &message) |
Set the value of the right motor acceleration. More... | |
void | addValueBattery (const int message) |
Set the battery voltage value. More... | |
void | setSerialStatus (const QString &message) |
Set the connection status with the serial port on the status bar. More... | |
void | setObstacleCloseStatus () |
Set the close distance status with the obstacle on the motor information widget. More... | |
void | resetObstacleCloseStatus () |
Set the normal distance status with the obstacle on the motor information widget. More... | |
void | on_actionPolish_triggered () |
Change UI language to Polish. More... | |
void | on_actionEnglish_US_triggered () |
Change UI language to English (US). More... | |
Private Member Functions | |
void | addDropShadow (QGroupBox *group, int xOffset, int yOffset, int radius) |
Add drop shadow under given GroupBox widget. More... | |
Private Attributes | |
Ui::MainWindow * | ui |
Pointer to all UI widgets. More... | |
Communication * | _communication |
Communication handle. More... | |
QTimer | _serialTimer |
Serial data updating timer. More... | |
FrameThread * | _frameThread |
Handle for communicating on different thread. More... | |
Parser * | _parser |
Serial data processor. More... | |
QTranslator | _translator |
Handle to translator object. More... | |
Definition at line 40 of file mainwindow.hh.
MainWindow::MainWindow | ( | QWidget * | parent = nullptr | ) |
[in,out] | parent | Pointer to the parent QWidget object. |
Definition at line 29 of file mainwindow.cpp.
MainWindow::~MainWindow | ( | ) |
Deallocate all dynamic memory.
Definition at line 89 of file mainwindow.cpp.
|
private |
[in] | group | The handle of the groupbox widget to which the effect is to be added. |
[in] | xOffset | Shadow offset on the x axis. |
[in] | yOffset | Shadow offset on the y axis. |
[in] | radius | Shadow radius. |
Definition at line 187 of file mainwindow.cpp.
|
privateslot |
[in] | message | Info message string. |
Definition at line 180 of file mainwindow.cpp.
|
privateslot |
Slot linked to the signal emitted when the values read from the serial port about the value of the left motor acceleration have been processed.
[in] | message | Value of the left motor acceleration. |
Definition at line 205 of file mainwindow.cpp.
|
privateslot |
Slot linked to the signal emitted when the values read from the serial port about the value of the right motor acceleration have been processed.
[in] | message | Value of the right motor acceleration. |
Definition at line 220 of file mainwindow.cpp.
|
privateslot |
Slot linked to the signal emitted when the values read from the serial port about the value of the battery voltage have been processed.
[in] | message | Value of the battery voltage. |
Definition at line 225 of file mainwindow.cpp.
|
privateslot |
Slot linked to the signal emitted when the values read from the serial port about the value of the left motor given speed have been processed.
[in] | message | Value of the left motor given speed. |
Definition at line 200 of file mainwindow.cpp.
|
privateslot |
Slot linked to the signal emitted when the values read from the serial port about the value of the right motor given speed have been processed.
[in] | message | Value of the right motor given speed. |
Definition at line 215 of file mainwindow.cpp.
|
privateslot |
Slot linked to the signal emitted when the values read from the serial port about the value of the left motor speed have been processed.
[in] | message | Value of the left motor speed. |
Definition at line 195 of file mainwindow.cpp.
|
privateslot |
Slot linked to the signal emitted when the values read from the serial port about the value of the right motor speed have been processed.
[in] | message | Value of the right motor speed. |
Definition at line 210 of file mainwindow.cpp.
|
overrideprotected |
Reimplemented to ensure that the serial port was properly closed.
[in] | event | Closing event. |
Definition at line 94 of file mainwindow.cpp.
|
privateslot |
Slot triggered when the connect signal was emmitted.
[in] | actionName | Name of the action that have been clicked (action name represents device name). |
Definition at line 136 of file mainwindow.cpp.
|
privateslot |
|
privateslot |
|
privateslot |
Definition at line 256 of file mainwindow.cpp.
|
privateslot |
Definition at line 247 of file mainwindow.cpp.
|
privateslot |
|
privateslot |
|
privateslot |
Slot triggered when the timer run out.
Definition at line 154 of file mainwindow.cpp.
|
privateslot |
|
privateslot |
[in] | message | Serial status message. |
Definition at line 230 of file mainwindow.cpp.
|
privateslot |
[in] | message | Error message string. |
Definition at line 175 of file mainwindow.cpp.
|
private |
Definition at line 219 of file mainwindow.hh.
|
private |
Definition at line 221 of file mainwindow.hh.
|
private |
Definition at line 222 of file mainwindow.hh.
|
private |
Definition at line 220 of file mainwindow.hh.
|
private |
Definition at line 223 of file mainwindow.hh.
|
private |
Definition at line 218 of file mainwindow.hh.