![]() |
Limb Range Analyzer
Cross-platform application for human limb range analysis.
|
Represents the main class for user interface components. More...
#include <mainwindow.hpp>
Public Member Functions | |
| MainWindow (QWidget *parent=nullptr) | |
| Parametric default class constructor. More... | |
| ~MainWindow () | |
| Default class destructor. More... | |
| void | resizeEvent (QResizeEvent *event) |
| Overrided function responding to window size changes. More... | |
| void | MainWindow_InitializeUIProperties () |
| Initially called function for UI content settings. More... | |
| void | MainWindow_InitializeUIStrings () |
| This function updates user interface strings. More... | |
| void | MainWindow_ClientResizeTable () |
| Serves as a client table item ratio updater. More... | |
| void | MainWindow_HistoryResizeTable () |
| Manages history table visual updating. More... | |
| void | MainWindow_ClientDrawTable () |
| Manages client table filling. More... | |
| QString | MainWindow_ClientCheck (QStringList newEntry) |
| Provides user defined client entry check. More... | |
| void | MainWindow_Create3DScene () |
| Initialization function for 3D vizualization content. More... | |
| void | MainWindow_Set3DScene (bool blueCoinOnly, bool clearResults) |
| Manages body and BlueCoin device repositioning within 3D scene. More... | |
| void | MainWindow_Reset3DScene () |
| Restores initial position setting of 3D scene. More... | |
| void | MainWindow_ReportResults () |
| Manages measurement results reporting. More... | |
| void | MainWindow_ClearResults () |
| Manages measurement results clearing. More... | |
Protected Attributes | |
| QTranslator * | mTranslator |
This QTranslator pointer holds reference to application translation object. | |
Private Slots | |
| void | MainWindow_DevicesStartScanning () |
| Slot describing Bluetooth devices analysis beginning. More... | |
| void | MainWindow_DevicesUpdateStatus () |
| Slot used for Bluetooth discovery progress visualization. More... | |
| void | MainWindow_DevicesDoneScanning () |
| Slot defined for Bluetooth devices discovery finish. More... | |
| void | MainWindow_DevicesSelectionChanged () |
| Slot responding to Bluetooth devices selection change. More... | |
| void | MainWindow_DevicesConnect () |
| This slot is used for Bluetooth connection triggering. More... | |
| void | MainWindow_DeviceSwitchBodyPart () |
| Slot updates BodyPart selection status. More... | |
| void | MainWindow_DeviceFilterExercises () |
| Slot function is responding to exercise selection changes. More... | |
| void | MainWindow_DeviceMeasure () |
| Slot defined for measurement beginning or stopping. More... | |
| void | MainWindow_DeviceNoConnectionReport (const QString &error) |
| Slot function that serves for no connection reporting. More... | |
| void | MainWindow_DeviceConnectedReport () |
| Slot that informs about Bluetooth device connection. More... | |
| void | MainWindow_DeviceIncompatibleReport () |
| Slot defined for device incompatibility reporting. More... | |
| void | MainWindow_DeviceUnreachableReport () |
| This slot informs users about device unreachability. More... | |
| void | MainWindow_DeviceBeyondLimitReport () |
| Slot function defined for connection limit reaching information. More... | |
| void | MainWindow_MeasurementZoomIn () |
| Slot bound to one of 3D scene buttons for zooming in. More... | |
| void | MainWindow_MeasurementZoomOut () |
| Slot manages 3D scene zooming out. More... | |
| void | MainWindow_MeasurementRotateLeft () |
| Slot is used for 3D scene clockwise rotation. More... | |
| void | MainWindow_MeasurementRotateRight () |
| Slot manages 3D scene counter-clockwise rotation. More... | |
| void | MainWindow_MeasurementSaveRecord () |
| Slot is bound to saving process of client measurement record. More... | |
| void | MainWindow_MeasurementDisplayHistory () |
| Slot enables measurement history page for selected exercise and client. More... | |
| void | MainWindow_ClientAdd () |
| Slot is responsible for new client adding. More... | |
| void | MainWindow_ClientRemove () |
| Slot manages client removal. More... | |
| void | MainWindow_ClientSelect () |
| Slot has a purpose of client selection. More... | |
| void | MainWindow_HistoryRecalculateBars () |
| Slot manages range visualization on history page. More... | |
| void | MainWindow_AboutActivateAbout () |
| Slot is defined for primary About page activation. More... | |
| void | MainWindow_AboutActivateHowto () |
| Slot is used for About page description section activation. More... | |
| void | MainWindow_SettingsUpdate () |
| This slot updates application settings through user choices. More... | |
| void | MainWindow_SwitchTranslation (Language language) |
| Slot manages retranslation of UI according to selected language. More... | |
| void | MainWindow_EnableHomePage () |
| Slot displays Home Page of Limb Range Analyzer. More... | |
| void | MainWindow_EnableDevicesPage () |
| Slot serves for displaying the Devices Page. More... | |
| void | MainWindow_EnableMeasurementPage () |
| Slot shows the Measurement Page of LRA. More... | |
| void | MainWindow_EnableClientsPage () |
| Slot function that enables Clients Page. More... | |
| void | MainWindow_EnableAboutPage () |
| This slot makes the About Page visible. More... | |
| void | MainWindow_EnableSettingsPage () |
| Slot manages the visibility of Settings Page. More... | |
| void | MainWindow_CleanAndQuit () |
| Slot function for stopping and cleaning procedure. More... | |
Private Attributes | |
| Ui::MainWindow * | mUserInterface |
| MainWindow (namespace Ui) member variable depicting user interface content. | |
| Qt3DExtras::Qt3DWindow * | mGraphicsView |
| Qt3DWindow (namespace Qt3DExtras) member variable that holds graphics view used for 3D measurement content. | |
| Qt3DCore::QEntity * | mGraphicsRootEntity |
| QEntity (namespace Qt3DCore) member variable that represents the graphics root entity. | |
| QWidget * | mGraphicsContainer |
| QWidget member variable that serves as a container of graphics content. | |
| QPropertyAnimation * | mAnimation |
| QPropertyAnimation variable used for window resizing. | |
| Qt3DCore::QTransform * | mUpperLeftArmTransform |
| Qt3DCore::QTransform member variable kept for upper left arm transformations. | |
| Qt3DCore::QTransform * | mUpperRightArmTransform |
| Qt3DCore::QTransform member variable kept for upper right arm transformations. | |
| Qt3DCore::QTransform * | mLowerLeftArmTransform |
| Qt3DCore::QTransform member variable kept for lower left arm transformations. | |
| Qt3DCore::QTransform * | mLowerRightArmTransform |
| Qt3DCore::QTransform member variable kept for lower right arm transformations. | |
| Qt3DCore::QTransform * | mLeftThighTransform |
| Qt3DCore::QTransform member variable kept for upper left leg transformations. | |
| Qt3DCore::QTransform * | mRightThighTransform |
| Qt3DCore::QTransform member variable kept for upper right leg transformations. | |
| Qt3DCore::QTransform * | mLeftCalfTransform |
| Qt3DCore::QTransform member variable kept for lower left leg transformations. | |
| Qt3DCore::QTransform * | mRightCalfTransform |
| Qt3DCore::QTransform member variable kept for lower right leg transformations. | |
| Qt3DCore::QTransform * | mPrimaryBlueCoinTransform |
| Qt3DCore::QTransform member variable maintained for primary BlueCoin device transformations. | |
| Qt3DCore::QTransform * | mSecondaryBlueCoinTransform |
| Qt3DCore::QTransform member variable maintained for secondary BlueCoin device transformations. | |
| Qt3DCore::QTransform * | mMinRangeTransform |
| Qt3DCore::QTransform member variable used for minimum reached range orb transformations. | |
| Qt3DCore::QTransform * | mMaxRangeTransform |
| Qt3DCore::QTransform member variable used for maximum reached range orb transformations. | |
| QList< Qt3DCore::QTransform * > | mMovementOrbsTransform |
| QList<Qt3DCore::QTransform> member variable used for auxiliary small orbs transformations. | |
| Qt3DExtras::QPhongMaterial * | mRangeMaterial |
| Qt3DExtras::QPhongMaterial member variable used for keeping the movement orbs color information. | |
| Bluetooth * | mBluetooth |
| Bluetooth is a member object that manages Bluetooth connection and data retrieval. | |
| SensorModule * | mSensorModule |
| SensorModule is a member that serves as a filtration tool while processing BlueCoin measured values. | |
| XmlParser | mXmlParser |
| XmlParser depicts a member that introduces XML loading and saving possibilities. | |
| Hasher | mHasher |
| Hasher member object serves for unique hash calculation based on Client data. | |
| QSharedPointer< Settings > | mSettings |
| QSharedPointer<Settings> is a member object used across application for keeping application settings data. | |
| QList< QSharedPointer< Client > > | mClientList |
| QList<QSharedPointer<Client>> represents a list of pointers to Client data used across application. | |
| QList< QSharedPointer< Session > > | mSessionList |
| QList<QSharedPointer<Session>> represents a list of pointers to Session data used across application. | |
| QList< QSharedPointer< Exercise > > | mExerciseList |
| QList<QSharedPointer<Exercise>> represents a list of pointers to Exercise data used across application. | |
| QSharedPointer< Client > | mClient |
| QSharedPointer<Client> holds a pointer member attribute of a single Client. | |
| QStringList | mExerciseNameList |
| QStringList member variable serves for keeping exercise names in a list. | |
| QList< QPair< ProcessingSelection, ExerciseType > > | mExerciseTypeList |
| QList<QPair<ProcessingSelection, ExerciseType>> member variable represents a list of exercise types used for filtering. | |
| QList< qint32 > | mExerciseIndexList |
| QList<qint32> member variable is used for keeping exercise index values. | |
| qint32 | mSelectedExercise |
| qint32 numerical member variable that holds the index of selected exercise. | |
| qint32 | mDeviceSelectionLine |
| qint32 numerical member variable that holds the index of selected device. | |
| qint32 | mClientSelectionLine |
| qint32 numerical member variable that holds the index of selected client. | |
| qint32 | mMovementCounter |
| qint32 numerical member that holds current step of measurement used while positioning movement orbs. | |
| bool | mMeasurementRunning |
| bool member that holds information whether a measurement is in progress. | |
| bool | mEditingEnabled |
| bool member that holds information whether a new Client is currently being added. | |
| BodyPart | mBodyPart |
| BodyPart serves for recognition of human body part. | |
Represents the main class for user interface components.
MainWindow is QMainWindow derived class that implements member functions and variables. Those serve according to user interaction through user interface objects and use aggregated class instances for Bluetooth connection, measurement filtering and client-related services (among others).
| MainWindow::MainWindow | ( | QWidget * | parent = nullptr | ) |
Parametric default class constructor.
Manages initial instance creation and user interface preparation.
| parent | - depicts parental QWidget parameter. |
| MainWindow::~MainWindow | ( | ) |
Default class destructor.
Provides memory cleaning according to previous long-term heap allocation needs.
|
privateslot |
Slot is defined for primary About page activation.
Slot function toggles the primary part of About page while needed user interface content goes visible with this action.
|
privateslot |
Slot is used for About page description section activation.
Slot manages the visibility of required UI parts that contain application informations and hints.
|
privateslot |
Slot function for stopping and cleaning procedure.
The content of this slot involves Bluetooth measurement stopping and disconnection, if not previously handled manually, before it closes the main application window and frees allocated memory.
| void MainWindow::MainWindow_ClearResults | ( | ) |
Manages measurement results clearing.
MainWindow_ClearResults is triggered when limb range analysis measurement is stopped, thus user interface numerical text output goes empty again.
|
privateslot |
| QString MainWindow::MainWindow_ClientCheck | ( | QStringList | newEntry | ) |
Provides user defined client entry check.
MainWindow_ClientCheck uses provided client table row data and manages first name, last name and e-mail address checking. Note that the return value includes either "OK" string or respective error message, that would be shown to user.
| newEntry | - new table row entry for checking. |
| void MainWindow::MainWindow_ClientDrawTable | ( | ) |
|
privateslot |
| void MainWindow::MainWindow_ClientResizeTable | ( | ) |
Serves as a client table item ratio updater.
Due to possible window resizing, width of each column has to be updated, which is handled in this function.
|
privateslot |
Slot has a purpose of client selection.
Slot function is responsible for client selection from user interface QTableWidget while exactly one line has to be selected, user is otherwise informed through QMessageBox . Such line is also marked by a different background color. Note that this selection is needed for measurement records saving and history displaying functionality.
| void MainWindow::MainWindow_Create3DScene | ( | ) |
Initialization function for 3D vizualization content.
Function is responsible for graphics content memory allocation and member variables definition due to graphics scene needs. A body model is defined along with coloring and lights system, movable camera and item positioning. Execution of this function enables further body parts movement while measuring exercises.
|
privateslot |
Slot function defined for connection limit reaching information.
This slot uses QMessageBox to inform users about impossibility to connect more devices - up to two BlueCoin devices can be connected.
|
privateslot |
|
privateslot |
Slot function is responding to exercise selection changes.
Depending on the selected BodyPart , an exercise is selected from list of all exercises, which is then added to the QComboBox of possible measurement selections. Note that it depends on the number of actively connected devices. Necessary UI components are also updated.
|
privateslot |
Slot defined for device incompatibility reporting.
This slot informs the application user that selected device cannot be connected to due to incompatibility (meaning that the device is not BlueCoin, which is mandatory). Such device also gets painted by a different background color in the user interface device list widget.
|
privateslot |
Slot defined for measurement beginning or stopping.
This slot checks whether an active measurement is being processed, if not, then a new measurement of selected exercise is started, which allows further visualization and range analysis reporting. Running exercise processing gets stopped by this slot function and the scene would be reset.
|
privateslot |
Slot function that serves for no connection reporting.
Slot function uses QMessageBox to show information dialog describing the connection error.
| error | - text string of captured error |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
Slot updates BodyPart selection status.
According to selected BodyPart contained in QComboBox on the measurement page, a member variable mBodyPart gets updated. Exercises filtering is then processed via MainWindow_DeviceFilterExercises . Any measurement results are also cleared.
|
privateslot |
This slot informs users about device unreachability.
A QMessageBox is used along with a different background color of selected device in order to inform users about chosen device unreachability.
|
privateslot |
This slot makes the About Page visible.
Selection of a QAction from the main menu results in visibility of About Page.
|
privateslot |
Slot function that enables Clients Page.
The function depicting this slot enables the visibility of Clients Page content. This option is likewise selectable from the application main menu.
|
privateslot |
Slot serves for displaying the Devices Page.
Slot uses QAction selected from the application main menu and displays Devices Page with its related content.
|
privateslot |
Slot displays Home Page of Limb Range Analyzer.
This slot enables Home Page right after the application is started.
|
privateslot |
Slot shows the Measurement Page of LRA.
This slot activates the visibility of Measurement Page, which contains 3D visualisation elements and numerical output text fields (along with other active UI items).
|
privateslot |
Slot manages the visibility of Settings Page.
Slot enables QWidget that holds the necessary check boxes and dropdown menus of application settings.
|
privateslot |
Slot manages range visualization on history page.
This slot function updates the QProgressBar elements on history page according to selected QTableWidget row. This enhances user experience while observing historical records for selected exercise.
| void MainWindow::MainWindow_HistoryResizeTable | ( | ) |
Manages history table visual updating.
According to possible main window size changes, column width of measurement history table has to be updated. MainWindow_HistoryResizeTable manages this necessary operation.
| void MainWindow::MainWindow_InitializeUIProperties | ( | ) |
Initially called function for UI content settings.
Function manages initial user interface content properties such as item visibility, shortcuts setting and exercise related attributes.
| void MainWindow::MainWindow_InitializeUIStrings | ( | ) |
This function updates user interface strings.
Responds to initial UI creation and language selection changes that require fixed content retranslation.
|
privateslot |
Slot enables measurement history page for selected exercise and client.
Function (slot) collects selected client's measurement data for chosen exercise, then a new UI page is shown along with a QTableWidget area containing date, MIN, MAX and RANGE values of selected exercise captured in the past. Note that a client has to be previously selected and historical records of selected exercise must exist as well.
|
privateslot |
Slot is used for 3D scene clockwise rotation.
When a specific QPushButton is pressed, the scene rotates left.
|
privateslot |
Slot manages 3D scene counter-clockwise rotation.
Pressing a button in application UI results in 3D measurement scene rotation, namely rightwards.
|
privateslot |
Slot is bound to saving process of client measurement record.
This slot triggers capture of currently measured exercise results and checks whether a client is selected. If that is true, then a new exercise gets recorded for this client. This slot also manages XML data saving of client changes. Note that exercise measurement data must be ready before model updating is processed.
|
privateslot |
Slot bound to one of 3D scene buttons for zooming in.
Slot manages 3D measurement vizualization widget zooming, namely zooming in.
|
privateslot |
Slot manages 3D scene zooming out.
This slot manages selected camera attributes in order to allow zooming out.
| void MainWindow::MainWindow_ReportResults | ( | ) |
Manages measurement results reporting.
This function responds to SensorModule signal emitting that marks new results availability. Those values, namely MIN, MAX and RANGE, along with ROLL, PITCH and YAW angles are processed visually in 3D scene and with according numerical value output. Note that it depends on currently selected exercise.
| void MainWindow::MainWindow_Reset3DScene | ( | ) |
Restores initial position setting of 3D scene.
MainWindow_Reset3DScene uses values initially introduced in MainWindow_Create3DScene. Resetting is processed when measurement processing gets turned off.
| void MainWindow::MainWindow_Set3DScene | ( | bool | blueCoinOnly, |
| bool | clearResults | ||
| ) |
Manages body and BlueCoin device repositioning within 3D scene.
This function is used for exercise scene preparation. While blueCoinOnly parameter is TRUE , only BlueCoin graphics object is moved or rotated. Its FALSE value provides body parts movement while mSelectedExercise is evaluated. In case that clearResults is TRUE , lines containing the MIN, MAX and RANGE values are emptied.
| blueCoinOnly | - defines whether only BlueCoin is to be repositioned. |
| clearResults | - defines whether previous results are to be cleared. |
|
privateslot |
This slot updates application settings through user choices.
This slot function collects user defined preferences (including selected Language) and manages saving to XML file.
|
privateslot |
Slot manages retranslation of UI according to selected language.
Selected Language is applied through mTranslator object along with needed execution of MainWindow_InitializeUIStrings member function.
| language | - depicts selected language option |
| void MainWindow::resizeEvent | ( | QResizeEvent * | event | ) |
Overrided function responding to window size changes.
This function provides necessary user interface content size changes triggered by main window resizing.
| event | - event of window size changes with event parameters. |