Skip to content

Commit 0066d85

Browse files
mich-wMich
authored andcommitted
Full 1.0 code upload.
1 parent 5e88638 commit 0066d85

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+43396
-1
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,24 @@
11
# QtSerialMonitor
2-
Universal serial / network terminal with data plotting capabilities, designed for Arduino based projects and more...
2+
Universal serial / network terminal with data plotting capabilities, based on [Qt](https://www.qt.io/).
3+
4+
![mainwindow](/screenshots/mainwindow.png?raw=true "mainwindow")
5+
6+
Features:
7+
- In/out serial data terminal with command history,
8+
- UDP network protocol support,
9+
- Advanced data plotter with multible graphs support and basic data filtering - uses [QCustomPlot](https://www.qcustomplot.com/),
10+
- Printer support, ability to save graph as image,
11+
- Read/write .txt data logs,
12+
- many more...
13+
14+
<a href="https://github.com/mich-w/QtSerialMonitor/releases/download/v1.0/QtSerialMonitor_1.0_win_x64.zip" download>Download QtSerialMonitor_v1.0_win_x64</a>
15+
16+
The app uses a custom-written parser, which searches the incoming message for plottable data in form of label-value set. At the moment all labels and values **must be seperated with a whitespace** for the process to work properly. Its possible to use seperators like "=", ":" and "," - parser will be replace them with whitespace before processing. If no label is found, a generic name will be used i.e. "Graph 0".
17+
18+
Examples of supported formats:
19+
20+
- "label_1 = 1.23 label_2 = 4.56"
21+
- "label_1 1.23 (tabulator) label_2 4.56"
22+
- "1.23 4.56" (Graph_0 and Graph_1)
23+
24+

screenshots/mainwindow.png

116 KB
Loading

src/3dres.qrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<RCC>
2+
<qresource prefix="/">
3+
<file>presentation/3DOrientationV2.uia</file>
4+
<file>presentation/presentations/3DOrientationV2.uip</file>
5+
<file>presentation/materials/circle-stroke-01p.materialdef</file>
6+
<file>presentation/materials/Material.materialdef</file>
7+
<file>presentation/materials/Material2.materialdef</file>
8+
<file>presentation/materials/Material4.materialdef</file>
9+
<file>presentation/materials/Material5.materialdef</file>
10+
<file>presentation/materials/Material32.materialdef</file>
11+
<file>presentation/materials/materialCube1.materialdef</file>
12+
<file>presentation/materials/materialCube2.materialdef</file>
13+
</qresource>
14+
</RCC>

src/3dres2.qrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<RCC>
2+
<qresource prefix="/">
3+
<file>presentation2/SampleProject.uia</file>
4+
<file>presentation2/SampleProject.uip</file>
5+
<file>presentation2/models/Speedometer/Speedometer.import</file>
6+
<file>presentation2/maps/materials/shadow.png</file>
7+
<file>presentation2/maps/materials/spherical_checker.png</file>
8+
<file>presentation2/materials/simple_glass.material</file>
9+
<file>presentation2/models/Speedometer/maps/Speed.png</file>
10+
<file>presentation2/models/Speedometer/meshes/NeedleSpeed.mesh</file>
11+
<file>presentation2/models/Speedometer/meshes/Speedometer.mesh</file>
12+
</qresource>
13+
</RCC>

src/3dview.qrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<RCC>
2+
<qresource prefix="/">
3+
<file>presentation/materials/circle-stroke-01p.materialdef</file>
4+
<file>presentation/materials/Material.materialdef</file>
5+
<file>presentation/materials/Material2.materialdef</file>
6+
<file>presentation/materials/Material4.materialdef</file>
7+
<file>presentation/materials/Material5.materialdef</file>
8+
<file>presentation/materials/Material32.materialdef</file>
9+
<file>presentation/materials/materialCube1.materialdef</file>
10+
<file>presentation/materials/materialCube2.materialdef</file>
11+
<file>presentation/maps/circle-stroke-01p.png</file>
12+
<file>presentation/3DOrientationV2.uia</file>
13+
<file>presentation/presentations/3DOrientationV2.uip</file>
14+
</qresource>
15+
</RCC>

LICENSE renamed to src/LICENSE

File renamed without changes.

src/QtSM.ico

18.5 KB
Binary file not shown.

src/QtSerialMonitor.pro

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#-------------------------------------------------
2+
#
3+
# Project created by QtCreator 2019-07-18T13:46:19
4+
#
5+
#-------------------------------------------------
6+
7+
QT += core gui
8+
QT += serialport
9+
QT += printsupport
10+
QT += network
11+
#QT += 3dstudioruntime2
12+
13+
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
14+
15+
TARGET = QtSerialMonitor
16+
TEMPLATE = app
17+
18+
# The following define makes your compiler emit warnings if you use
19+
# any feature of Qt which has been marked as deprecated (the exact warnings
20+
# depend on your compiler). Please consult the documentation of the
21+
# deprecated API in order to know how to port your code away from it.
22+
DEFINES += QT_DEPRECATED_WARNINGS
23+
#DEFINES += QCUSTOMPLOT_USE_OPENGL
24+
25+
# You can also make your code fail to compile if you use deprecated APIs.
26+
# In order to do so, uncomment the following line.
27+
# You can also select to disable deprecated APIs only up to a certain version of Qt.
28+
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
29+
30+
CONFIG += c++11
31+
32+
SOURCES += \
33+
dataratechart.cpp \
34+
filereader.cpp \
35+
logger.cpp \
36+
main.cpp \
37+
mainwindow.cpp \
38+
networkudp.cpp \
39+
parser.cpp \
40+
qcustomplot.cpp \
41+
serial.cpp
42+
43+
HEADERS += \
44+
../../../../../../Downloads/QCustomPlot.tar/qcustomplot/qcustomplot.h \
45+
config.h \
46+
dataratechart.h \
47+
filereader.h \
48+
logger.h \
49+
mainwindow.h \
50+
networkudp.h \
51+
parser.h \
52+
qcustomplot.h \
53+
serial.h
54+
55+
FORMS += \
56+
mainwindow.ui
57+
58+
win32:RC_ICONS += QtSM.ico
59+
60+
# Default rules for deployment.
61+
qnx: target.path = /tmp/$${TARGET}/bin
62+
else: unix:!android: target.path = /opt/$${TARGET}/bin
63+
!isEmpty(target.path): INSTALLS += target
64+
65+
DISTFILES += \
66+
QtSM.ico
67+
68+
RESOURCES += \
69+
3dres.qrc
70+

src/advancedgraphmenu.cpp

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
#include "advancedgraphmenu.h"
2+
#include "ui_advancedgraphmenu.h"
3+
4+
AdvancedGraphMenu::AdvancedGraphMenu(QWidget *parent) :
5+
QDialog(parent),
6+
ui(new Ui::AdvancedGraphMenu)
7+
{
8+
ui->setupUi(this);
9+
10+
QObject::connect(ui->listWidgetLabels, SIGNAL(itemChanged(QListWidgetItem*)),
11+
this, SLOT(highlightChecked(QListWidgetItem*)));
12+
}
13+
14+
AdvancedGraphMenu::~AdvancedGraphMenu()
15+
{
16+
delete ui;
17+
}
18+
19+
void AdvancedGraphMenu::createConnections()
20+
{
21+
for(int i = 0; i < ui->listWidgetLabels->count(); ++i)
22+
{
23+
ui->listWidgetLabels->item(i)->setFlags(ui->listWidgetLabels->item(i)->flags() | Qt::ItemIsUserCheckable);
24+
}
25+
}
26+
27+
void AdvancedGraphMenu::addLabelToList(QString label)
28+
{
29+
ui->listWidgetLabels->addItem(label);
30+
ui->listWidgetLabels->item(ui->listWidgetLabels->count() - 1)->setFlags(ui->listWidgetLabels->item(ui->listWidgetLabels->count() - 1)->flags() | Qt::ItemIsUserCheckable);
31+
ui->listWidgetLabels->item(ui->listWidgetLabels->count() - 1)->setCheckState(Qt::Unchecked);
32+
}
33+
34+
void AdvancedGraphMenu::highlightChecked(QListWidgetItem* item)
35+
{
36+
qDebug() << item->text();
37+
}
38+
39+
bool AdvancedGraphMenu::searchForItem(QString label)
40+
{
41+
for (auto i = 0; i < ui->listWidgetLabels->count(); ++i)
42+
{
43+
if (ui->listWidgetLabels->item(i)->text().compare(label) == 0)
44+
return true;
45+
}
46+
47+
return false;
48+
}
49+
50+
void AdvancedGraphMenu::clearLabelList()
51+
{
52+
ui->listWidgetLabels->clear();
53+
}
54+
55+
void AdvancedGraphMenu::removeLabelAt(int index)
56+
{
57+
ui->listWidgetLabels->takeItem(index);
58+
}
59+
60+
void AdvancedGraphMenu::on_pushButtonApply_clicked()
61+
{
62+
QList<QString> labels;
63+
64+
for (auto i = 0; i < ui->listWidgetLabels->count(); ++i)
65+
{
66+
if (ui->listWidgetLabels->item(i)->checkState())
67+
labels.append(ui->listWidgetLabels->item(i)->text());
68+
}
69+
70+
emit readyToSyncLabelList(&labels);
71+
}
72+
73+
void AdvancedGraphMenu::on_pushButtonCheckAll_clicked()
74+
{
75+
for (auto i = 0; i < ui->listWidgetLabels->count(); ++i)
76+
{
77+
ui->listWidgetLabels->item(i)->setCheckState(Qt::CheckState::Checked);
78+
}
79+
}
80+
81+
void AdvancedGraphMenu::on_pushButtonUncheckAll_clicked()
82+
{
83+
for (auto i = 0; i < ui->listWidgetLabels->count(); ++i)
84+
{
85+
ui->listWidgetLabels->item(i)->setCheckState(Qt::CheckState::Unchecked);
86+
}
87+
}
88+
89+
void AdvancedGraphMenu::on_pushButtonClear_clicked()
90+
{
91+
ui->listWidgetLabels->clear();
92+
}

src/config.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#ifndef CONFIG_H
2+
#define CONFIG_H
3+
4+
#define VERSION "1.0"
5+
#define CHANGELOG_TEXT ""
6+
7+
#endif // CONFIG_H

0 commit comments

Comments
 (0)