21 #ifndef SRC_GUI_MAINWINDOW_H_
22 #define SRC_GUI_MAINWINDOW_H_
24 #include <QApplication>
30 #include <QInputDialog>
32 #include <QMainWindow>
35 #include <QPushButton>
37 #include <QStackedWidget>
38 #include <QStandardItemModel>
43 #include <QVBoxLayout>
45 #include <QtCore/QVariant>
46 #include <opencv2/imgcodecs.hpp>
48 #include "../intermediate_structures.h"
49 #include "../pipeline.h"
50 #include "../posture_estimator.h"
51 #include "opencv2/opencv.hpp"
53 #define WIDGET_PADDING 5
76 void constructor(
const QString &title,
const QString &subtitle,
80 explicit Button(
const QString &title, QWidget *parent = 0);
82 explicit Button(
const QString &title,
const QString &subtitle,
85 void setText(
const QString &title);
87 void setText(
const QString &title,
const QString &subtitle);
104 void constructor(
const QString &title,
const QString &subtitle,
105 QWidget *parent = 0);
108 explicit Label(QWidget *parent = 0);
110 explicit Label(
const QString &title, QWidget *parent = 0);
112 Label(
const QString &title,
const QString &subtitle, QWidget *parent = 0);
114 void setText(
const QString &title);
116 void setText(
const QString &title,
const QString &subtitle);
143 QWidget *parent = 0);
268 Button *idealPostureButton =
269 new Button(
"Set Ideal Posture",
"Set current\nposture as my target");
271 QGridLayout *mainLayout =
new QGridLayout;
272 QWidget *central =
new QWidget;
273 QStandardItemModel *model =
new QStandardItemModel();
274 QLabel *frame =
new QLabel();
275 QStackedWidget *stackedWidget =
new QStackedWidget;
276 QComboBox *pageComboBox =
new QComboBox;
277 QGroupBox *groupDateTime =
new QGroupBox();
278 QVBoxLayout *dtBox =
new QVBoxLayout;
280 QWidget *firstPageWidget =
new QWidget;
281 QGridLayout *mainPageLayout =
new QGridLayout;
283 QWidget *secondPageWidget =
new QWidget;
284 QGridLayout *settingsPageLayout =
new QGridLayout;
286 QWidget *thirdPageWidget =
new QWidget;
287 QGridLayout *aboutPageLayout =
new QGridLayout;
Subclass of QLabel that allows having a title and subtitle within the label.
Definition: mainwindow.h:97
void paintEvent(QPaintEvent *p)
Definition: custom_widgets.cpp:115
void setText(const QString &title)
Definition: custom_widgets.cpp:107
Label(QWidget *parent=0)
Definition: custom_widgets.cpp:96
Allows for navigation around the application from the main page by letting the user navigate to the d...
Definition: mainwindow.h:133
void currentFrameSignal(cv::Mat currentFrame)
emit the newly captured frame
void createMainPage()
Creates the main page within the application.
Definition: mainwindow.cpp:138
void createAboutPage()
Definition: mainwindow.cpp:238
void openMainPage(void)
Switch to the main page with the video feed.
Definition: mainwindow.cpp:87
void setOutputFramerate()
Outputs the framerate to the GUI.
Definition: mainwindow.cpp:294
void createSettingsPage()
Creates the settings page within the application.
Definition: mainwindow.cpp:167
void updatePose(PostureEstimating::PoseStatus poseStatus)
Updates the current pose.
Definition: mainwindow.cpp:133
void openSettingsPage(void)
Switch to the settings page.
Definition: mainwindow.cpp:89
void setPoseChangeThresholdValue(int)
Updates the PostureEstimating::pose_change_threshold value.
Definition: mainwindow.cpp:306
void increaseVideoFramerate()
Increases the video frame rate.
Definition: mainwindow.cpp:289
MainWindow(Pipeline::Pipeline *Pipeline, QWidget *parent=0)
Initialises the main page.
Definition: mainwindow.cpp:30
void openAboutPage(void)
Switch to the help and about page.
Definition: mainwindow.cpp:93
void setIdealPosture()
sets the current pose to the ideal posture
Definition: mainwindow.cpp:278
void updateVideoFrame(cv::Mat currentFrame)
update the video ouput once a new frame has been captured
Definition: mainwindow.cpp:362
void currentGoodBadPosture(PostureEstimating::PostureState postureState)
emit the newly captured good posture value
void updatePostureNotification(PostureEstimating::PostureState postureState)
update the posture notification using the posture status "good" value
Definition: mainwindow.cpp:95
~MainWindow()
Definition: mainwindow.cpp:343
void emitNewFrame(cv::Mat currentFrame)
Refresh the video feed to the most recent frame.
Definition: mainwindow.cpp:358
void setThresholdValue(int)
Updates the threshold value.
Definition: mainwindow.cpp:284
void decreaseVideoFramerate()
Decreases the video frame rate.
Definition: mainwindow.cpp:301
Frame-by-frame pipeline to process video.
Definition: pipeline.h:494
#define WIDGET_PADDING
Definition: mainwindow.h:53
All code related to the graphical user interface for PosturePerfection.
Definition: custom_widgets.cpp:24
Components of the pipeline at the core of the system.
Definition: framerate_settings.cpp:22
PostureState
Potential states which the posture can be. Unset means that the ideal_pose has not been set by the us...
Definition: posture_estimator.h:90
Representation of user's pose for use by the pipeline processing.
Definition: posture_estimator.h:100