BioSignalPi  v2
homepagewidget.cpp
Go to the documentation of this file.
1 #include "homepagewidget.h"
2 #include <QtWidgets>
3 
5  QWidget( parent )
6 {
7  QLabel *headerLabel = new QLabel("<span style=\"font-size:24px; font-weight:bold;\">Biosignal PI</span>");
8  headerLabel->setTextFormat(Qt::RichText);
9 
10  QLabel *textLabel = new QLabel();
11  textLabel->setText("This is a 5 lead ECG system for the raspberry PI <br /><br />"
12  "How to record an ECG:"
13  "<ol>"
14  "<li>Click on the settings button, choose source and sampling rate. 1 kHz sampling rate is recommended in order to prevent frame drops.</li>"
15  "<li>Fill in the ECG capture settings (optional).</li>"
16  "<li>Connect the leads as show in the image.</li>"
17  "<li>Click on the ECG capture button and then on Start ECG capture.</li>"
18  "<li>To stop the capture, press the Stop ECG capture button, this will save the captured data to a file.</li>"
19  "</ol> <br />"
20  "How to view an ECG:"
21  "<ol>"
22  "<li>Click on the View ECG button.</li>"
23  "<li>Click on the Get ECG files button.</li>"
24  "<li>Double-click on the file with the ECG values.</li>"
25  "<li>The ECG will now be loaded and viewed at the right side of the screen.</li>"
26  "</ol>");
27  textLabel->setWordWrap(true);
28 
29 
30  QLabel *placementHeaderLabel = new QLabel("<b>Electrode placement</b>");
31  placementHeaderLabel->setAlignment(Qt::AlignHCenter);
32 
33  QLabel *placementLabel = new QLabel();
34  placementLabel->setPixmap(QPixmap(":/images/images/5-electrode-ECG.jpg"));
35 
36  QVBoxLayout *leftSideLayout = new QVBoxLayout;
37  leftSideLayout->addStretch();
38  leftSideLayout->addWidget(headerLabel);
39  leftSideLayout->addWidget(textLabel);
40  leftSideLayout->addStretch();
41 
42  QVBoxLayout *rightSideLayout = new QVBoxLayout;
43  rightSideLayout->addStretch();
44  rightSideLayout->addWidget(placementHeaderLabel);
45  rightSideLayout->addWidget(placementLabel);
46  rightSideLayout->addStretch();
47 
48  QHBoxLayout *mainLayout = new QHBoxLayout;
49  mainLayout->addStretch();
50  mainLayout->addLayout(leftSideLayout);
51  mainLayout->addStretch();
52  mainLayout->addLayout(rightSideLayout);
53  mainLayout->addStretch();
54 
55  setLayout(mainLayout);
56 }
HomePageWidget(QWidget *=NULL)