Implemented qt port + e2e

This commit is contained in:
Martino Ferrari
2026-06-26 09:11:10 +02:00
parent 0d7d8f396b
commit 4702d0a217
146 changed files with 57272 additions and 128 deletions
+36
View File
@@ -0,0 +1,36 @@
/**
* @file main.cpp
* @brief Entry point for the Qt StreamHub oscilloscope client.
*
* Usage: StreamHubQtClient [-host HOST] [-port PORT]
* Defaults: host 127.0.0.1, port 8090.
*/
#include "MainWindow.h"
#include "Theme.h"
#include <QApplication>
#include <QCommandLineParser>
int main(int argc, char** argv) {
QApplication app(argc, argv);
app.setApplicationName("StreamHubQtClient");
QCommandLineParser parser;
parser.setApplicationDescription("StreamHub oscilloscope client (Qt)");
parser.addHelpOption();
QCommandLineOption hostOpt({"H", "host"}, "Hub host", "host", "127.0.0.1");
QCommandLineOption portOpt({"p", "port"}, "Hub WS port", "port", "8090");
parser.addOption(hostOpt);
parser.addOption(portOpt);
parser.process(app);
const QString host = parser.value(hostOpt);
const uint16_t port = static_cast<uint16_t>(parser.value(portOpt).toUInt());
shq::applyTheme(app);
shq::MainWindow win(host, port ? port : 8090);
win.show();
return app.exec();
}