first commit
commit
c118b28235
|
@ -0,0 +1,74 @@
|
||||||
|
# This file is used to ignore files which are generated
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
*~
|
||||||
|
*.autosave
|
||||||
|
*.a
|
||||||
|
*.core
|
||||||
|
*.moc
|
||||||
|
*.o
|
||||||
|
*.obj
|
||||||
|
*.orig
|
||||||
|
*.rej
|
||||||
|
*.so
|
||||||
|
*.so.*
|
||||||
|
*_pch.h.cpp
|
||||||
|
*_resource.rc
|
||||||
|
*.qm
|
||||||
|
.#*
|
||||||
|
*.*#
|
||||||
|
core
|
||||||
|
!core/
|
||||||
|
tags
|
||||||
|
.DS_Store
|
||||||
|
.directory
|
||||||
|
*.debug
|
||||||
|
Makefile*
|
||||||
|
*.prl
|
||||||
|
*.app
|
||||||
|
moc_*.cpp
|
||||||
|
ui_*.h
|
||||||
|
qrc_*.cpp
|
||||||
|
Thumbs.db
|
||||||
|
*.res
|
||||||
|
*.rc
|
||||||
|
/.qmake.cache
|
||||||
|
/.qmake.stash
|
||||||
|
|
||||||
|
# qtcreator generated files
|
||||||
|
*.pro.user*
|
||||||
|
CMakeLists.txt.user*
|
||||||
|
|
||||||
|
# xemacs temporary files
|
||||||
|
*.flc
|
||||||
|
|
||||||
|
# Vim temporary files
|
||||||
|
.*.swp
|
||||||
|
|
||||||
|
# Visual Studio generated files
|
||||||
|
*.ib_pdb_index
|
||||||
|
*.idb
|
||||||
|
*.ilk
|
||||||
|
*.pdb
|
||||||
|
*.sln
|
||||||
|
*.suo
|
||||||
|
*.vcproj
|
||||||
|
*vcproj.*.*.user
|
||||||
|
*.ncb
|
||||||
|
*.sdf
|
||||||
|
*.opensdf
|
||||||
|
*.vcxproj
|
||||||
|
*vcxproj.*
|
||||||
|
|
||||||
|
# MinGW generated files
|
||||||
|
*.Debug
|
||||||
|
*.Release
|
||||||
|
|
||||||
|
# Python byte code
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
# Binaries
|
||||||
|
# --------
|
||||||
|
*.dll
|
||||||
|
*.exe
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
QT += core gui
|
||||||
|
QT += bluetooth
|
||||||
|
QT += charts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
|
||||||
|
|
||||||
|
CONFIG += c++17
|
||||||
|
|
||||||
|
# You can make your code fail to compile if it uses deprecated APIs.
|
||||||
|
# In order to do so, uncomment the following line.
|
||||||
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
bluetooth1d801.cpp \
|
||||||
|
main.cpp \
|
||||||
|
mainwindow.cpp
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
bluetooth1d801.h \
|
||||||
|
mainwindow.h
|
||||||
|
|
||||||
|
FORMS += \
|
||||||
|
mainwindow.ui
|
||||||
|
|
||||||
|
TRANSLATIONS += \
|
||||||
|
1D801Desktop_ru_RU.ts
|
||||||
|
CONFIG += lrelease
|
||||||
|
CONFIG += embed_translations
|
||||||
|
|
||||||
|
# Default rules for deployment.
|
||||||
|
qnx: target.path = /tmp/$${TARGET}/bin
|
||||||
|
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||||
|
!isEmpty(target.path): INSTALLS += target
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="ru_RU"></TS>
|
|
@ -0,0 +1,128 @@
|
||||||
|
#include "bluetooth1d801.h"
|
||||||
|
|
||||||
|
using namespace Qt::StringLiterals;
|
||||||
|
|
||||||
|
Bluetooth1d801::Bluetooth1d801(QObject *parent):QObject(parent) {
|
||||||
|
|
||||||
|
|
||||||
|
if (localDevice.isValid()) { //при создании экземпляра класса он подключается к свистку
|
||||||
|
localDevice.powerOn();
|
||||||
|
localDeviceName = localDevice.name();
|
||||||
|
qDebug() <<localDeviceName; // пишет "dongle"
|
||||||
|
localDevice.setHostMode(QBluetoothLocalDevice::HostDiscoverable);
|
||||||
|
QList<QBluetoothAddress> remotes;
|
||||||
|
remotes = localDevice.connectedDevices(); // если например наушники подключены и готовы выплевывает их адрес
|
||||||
|
// с другими, например сопряженными не работает
|
||||||
|
qDebug() <<"Подключенные устройства:"<<remotes;
|
||||||
|
qDebug() <<"если среди них есть 1D801, то что то пошло иначе, чем у разработчика. Попробуйте продолжить работы"<<remotes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Bluetooth1d801::~Bluetooth1d801()
|
||||||
|
{
|
||||||
|
//отключится от устройства или почикать всё созданное
|
||||||
|
}
|
||||||
|
|
||||||
|
void Bluetooth1d801::startDiscovery()
|
||||||
|
{
|
||||||
|
discoveryAgent = new QBluetoothServiceDiscoveryAgent();
|
||||||
|
|
||||||
|
|
||||||
|
connect(discoveryAgent, &QBluetoothServiceDiscoveryAgent::serviceDiscovered,
|
||||||
|
this, &Bluetooth1d801::serviceDiscovered);
|
||||||
|
connect(discoveryAgent, &QBluetoothServiceDiscoveryAgent::finished,
|
||||||
|
this, &Bluetooth1d801::discoveryFinished);
|
||||||
|
connect(discoveryAgent, &QBluetoothServiceDiscoveryAgent::canceled,
|
||||||
|
this, &Bluetooth1d801::discoveryFinished); //странный коннект - слизал с бтчата (всмысле с указателями. Наверное это норм для динамических штук)
|
||||||
|
// начинаем поиск устройств
|
||||||
|
discoveryAgent->start();
|
||||||
|
|
||||||
|
if (discoveryAgent->isActive())
|
||||||
|
discoveryAgent->stop();
|
||||||
|
discoveredServices.clear();
|
||||||
|
// m_discoveryAgent->setUuidFilter(uuid); // можно отфильтровать конкретный сервис
|
||||||
|
discoveryAgent->start(QBluetoothServiceDiscoveryAgent::FullDiscovery);
|
||||||
|
qDebug()<<"Сейчас, я тебе что-нибудь найду";
|
||||||
|
}
|
||||||
|
|
||||||
|
void Bluetooth1d801::stopDiscovery()
|
||||||
|
{
|
||||||
|
if (discoveryAgent->isActive()) discoveryAgent->stop();
|
||||||
|
else {
|
||||||
|
qDebug()<<"Нечего останавливать";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Bluetooth1d801::connectTo(const QBluetoothServiceInfo &service)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Bluetooth1d801::GetParam()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Bluetooth1d801::SetParam()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Bluetooth1d801::GetMeas()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Bluetooth1d801::GetWave()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Bluetooth1d801::GetSpectrum()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Bluetooth1d801::GetStatus()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Bluetooth1d801::SetTime()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Bluetooth1d801::GetSpectrumEnv()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Bluetooth1d801::GetWaveEnv()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Bluetooth1d801::serviceDiscovered(const QBluetoothServiceInfo &serviceInfo)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Bluetooth1d801::readSocket()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Bluetooth1d801::connected()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Bluetooth1d801::onSocketErrorOccurred(QBluetoothSocket::SocketError error)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
#ifndef BLUETOOTH1D801_H
|
||||||
|
#define BLUETOOTH1D801_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QListWidget>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
#include <QBluetoothDeviceDiscoveryAgent>
|
||||||
|
#include <QBluetoothServiceDiscoveryAgent>
|
||||||
|
#include <QBluetoothDeviceInfo>
|
||||||
|
#include <QBluetoothSocket>
|
||||||
|
#include <QBluetoothLocalDevice>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class Bluetooth1d801 : public QObject
|
||||||
|
{
|
||||||
|
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit Bluetooth1d801(QObject *parent = nullptr); // туду сюда вкорячить из конструктора мэйна
|
||||||
|
~Bluetooth1d801(); // туду сделать деструктор. Мы же не быдлокодеры!!!
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void startDiscovery(); //запускаем bluetooth поиск
|
||||||
|
void stopDiscovery(); //прерываем его
|
||||||
|
void connectTo(QBluetoothServiceInfo); // подключится к сервису
|
||||||
|
|
||||||
|
//команды для модуля в первородном виде
|
||||||
|
void GetParam(); //получить параметры измерения
|
||||||
|
void SetParam(); // запись параметров измерения
|
||||||
|
|
||||||
|
void GetMeas(); //Чтение измеренных значений
|
||||||
|
void GetWave(); //Чтение временного сигнала виброускорения /виброскорости /виброперемещения
|
||||||
|
void GetSpectrum();//Чтение спектра виброускорения /виброскорости /виброперемещения
|
||||||
|
void GetStatus();//Cтатус прибора
|
||||||
|
void SetTime();//Синхронизация часов
|
||||||
|
void GetSpectrumEnv(); //Чтение спектра огибающей виброускорения
|
||||||
|
void GetWaveEnv();//Чтение сигнала огибающей виброускорения
|
||||||
|
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void serviceDiscovered(const QBluetoothServiceInfo &serviceInfo); //отрабатываю сигнал обнаруженного сервиса
|
||||||
|
void readSocket(); //отработка сигнала прибывших данных
|
||||||
|
void connected(); // отработка подключения
|
||||||
|
void onSocketErrorOccurred(QBluetoothSocket::SocketError error);//отработка ошибки
|
||||||
|
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void discoveryFinished(QMap<QListWidgetItem *, QBluetoothServiceInfo>); //возвращаем обнаруженные сервисы
|
||||||
|
void rawDataRecived(QByteArray); // прилетели какие то данные!
|
||||||
|
|
||||||
|
private:
|
||||||
|
QBluetoothSocket *socket = nullptr; // объект сокета для порта
|
||||||
|
QBluetoothLocalDevice localDevice; // обьект локального устройства
|
||||||
|
QString localDeviceName; // имя свистка
|
||||||
|
QMap<QListWidgetItem *, QBluetoothServiceInfo> discoveredServices; // обнаруженные сервисы
|
||||||
|
QBluetoothServiceDiscoveryAgent *discoveryAgent;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // BLUETOOTH1D801_H
|
|
@ -0,0 +1,23 @@
|
||||||
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QLocale>
|
||||||
|
#include <QTranslator>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
QApplication a(argc, argv);
|
||||||
|
|
||||||
|
QTranslator translator;
|
||||||
|
const QStringList uiLanguages = QLocale::system().uiLanguages();
|
||||||
|
for (const QString &locale : uiLanguages) {
|
||||||
|
const QString baseName = "1D801Desktop_" + QLocale(locale).name();
|
||||||
|
if (translator.load(":/i18n/" + baseName)) {
|
||||||
|
a.installTranslator(&translator);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MainWindow w;
|
||||||
|
w.show();
|
||||||
|
return a.exec();
|
||||||
|
}
|
|
@ -0,0 +1,179 @@
|
||||||
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
#include "ui_mainwindow.h"
|
||||||
|
|
||||||
|
|
||||||
|
#include <QtCore/qmetaobject.h>
|
||||||
|
#include <QLatin1StringView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
MainWindow::MainWindow(QWidget *parent)
|
||||||
|
: QMainWindow(parent)
|
||||||
|
, ui(new Ui::MainWindow)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
/*
|
||||||
|
if (localDevice.isValid()) { //при создании экземпляра класса он подключается к сввистку
|
||||||
|
localDevice.powerOn();
|
||||||
|
localDeviceName = localDevice.name();
|
||||||
|
qDebug() <<localDeviceName; // пишет "dongle"
|
||||||
|
localDevice.setHostMode(QBluetoothLocalDevice::HostDiscoverable);
|
||||||
|
QList<QBluetoothAddress> remotes;
|
||||||
|
remotes = localDevice.connectedDevices(); // если например наушники подключены и готовы выплевывает их адрес
|
||||||
|
// с другими, например сопряженными не работает
|
||||||
|
qDebug() <<remotes;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
MainWindow::~MainWindow()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_pushButton_clicked()
|
||||||
|
{
|
||||||
|
QBluetoothServiceDiscoveryAgent *discoveryAgent = new QBluetoothServiceDiscoveryAgent(this);
|
||||||
|
|
||||||
|
connect(discoveryAgent, &QBluetoothServiceDiscoveryAgent::serviceDiscovered,
|
||||||
|
this, &MainWindow::serviceDiscovered);
|
||||||
|
connect(discoveryAgent, &QBluetoothServiceDiscoveryAgent::finished,
|
||||||
|
this, &MainWindow::discoveryFinished);
|
||||||
|
connect(discoveryAgent, &QBluetoothServiceDiscoveryAgent::canceled,
|
||||||
|
this, &MainWindow::discoveryFinished); //странный коннект - слизал с бтчата (всмысле с указателями. Наверное это норм для динамических штук)
|
||||||
|
// начинаем поиск устройств
|
||||||
|
discoveryAgent->start();
|
||||||
|
|
||||||
|
if (discoveryAgent->isActive())
|
||||||
|
discoveryAgent->stop();
|
||||||
|
ui->listWidgetDevice->clear();
|
||||||
|
// m_discoveryAgent->setUuidFilter(uuid); // подумай? может стоит впиздячить его на релизе
|
||||||
|
discoveryAgent->start(QBluetoothServiceDiscoveryAgent::FullDiscovery);
|
||||||
|
ui->labelConnect->setText("Сейчас, я тебе что-нибудь найду");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::stopDiscovery()
|
||||||
|
{/*
|
||||||
|
if (m_discoveryAgent){
|
||||||
|
m_discoveryAgent->stop();
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::serviceDiscovered(const QBluetoothServiceInfo &serviceInfo)
|
||||||
|
{
|
||||||
|
|
||||||
|
qDebug() << "Discovered service on"
|
||||||
|
<< serviceInfo.device().name() << serviceInfo.device().address().toString();
|
||||||
|
qDebug() << "\tService name:" << serviceInfo.serviceName();
|
||||||
|
qDebug() << "\tDescription:"
|
||||||
|
<< serviceInfo.attribute(QBluetoothServiceInfo::ServiceDescription).toString();
|
||||||
|
qDebug() << "\tProvider:"
|
||||||
|
<< serviceInfo.attribute(QBluetoothServiceInfo::ServiceProvider).toString();
|
||||||
|
qDebug() << "\tL2CAP protocol service multiplexer:"
|
||||||
|
<< serviceInfo.protocolServiceMultiplexer();
|
||||||
|
qDebug() << "\tRFCOMM server channel:" << serviceInfo.serverChannel();
|
||||||
|
|
||||||
|
|
||||||
|
const QBluetoothAddress address = serviceInfo.device().address();
|
||||||
|
/* // если находятся много сервисов в одной железке, то названия не дублируются
|
||||||
|
for (const QBluetoothServiceInfo &info : std::as_const(m_discoveredServices)) {
|
||||||
|
if (info.device().address() == address)
|
||||||
|
return; //
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
//! [serviceDiscovered]
|
||||||
|
QString remoteName;
|
||||||
|
if (serviceInfo.device().name().isEmpty())
|
||||||
|
remoteName = address.toString();
|
||||||
|
else
|
||||||
|
remoteName = serviceInfo.device().name();
|
||||||
|
QListWidgetItem *item =new QListWidgetItem(QString::fromLatin1("%1 %2").arg(remoteName, serviceInfo.serviceName()));
|
||||||
|
discoveredServices.insert(item, serviceInfo);
|
||||||
|
ui->listWidgetDevice->addItem(item);
|
||||||
|
//! [serviceDiscovered]
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::discoveryFinished()
|
||||||
|
{
|
||||||
|
ui->labelConnect->setText("Я сделал всё, что мог");
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::deviceDiscovered(const QBluetoothDeviceInfo &device)
|
||||||
|
{
|
||||||
|
ui->listWidgetDevice->addItem(device.name());
|
||||||
|
qDebug() << "Found new device:" << device.name() << '(' << device.address().toString() << ')';
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_pushButton_2_clicked()
|
||||||
|
{
|
||||||
|
auto items = ui->listWidgetDevice->selectedItems();
|
||||||
|
if (items.size()) {
|
||||||
|
QListWidgetItem *item = items[0];
|
||||||
|
QBluetoothServiceInfo service = discoveredServices.value(item);
|
||||||
|
qDebug() << "Connecting to service" << service.serviceName() //валим инфу в дебаг
|
||||||
|
<< "on" << service.device().name();
|
||||||
|
socket = new QBluetoothSocket(QBluetoothServiceInfo::RfcommProtocol); //создание сокета
|
||||||
|
qDebug() << "Create socket";
|
||||||
|
socket->connectToService(service);
|
||||||
|
connect(socket, &QBluetoothSocket::readyRead, this, &MainWindow::readSocket);
|
||||||
|
connect(socket, &QBluetoothSocket::connected, this, QOverload<>::of(&MainWindow::connected));
|
||||||
|
connect(socket, &QBluetoothSocket::disconnected, this, &MainWindow::disconnected);
|
||||||
|
connect(socket, &QBluetoothSocket::errorOccurred, this, &MainWindow::onSocketErrorOccurred);
|
||||||
|
qDebug() << "ConnectToService done";
|
||||||
|
ui->labelConnect->setText("Похоже получилось подключится");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::readSocket()
|
||||||
|
{
|
||||||
|
if (!socket)
|
||||||
|
return;
|
||||||
|
|
||||||
|
while (socket->canReadLine()) {
|
||||||
|
QByteArray line = socket->readLine().trimmed();
|
||||||
|
qDebug() << line;
|
||||||
|
ui->listWidgetResponse->addItem(line.toHex());
|
||||||
|
emit messageReceived(socket->peerName(),
|
||||||
|
QString::fromUtf8(line.constData(), line.length()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::onSocketErrorOccurred(QBluetoothSocket::SocketError error)
|
||||||
|
{
|
||||||
|
if (error == QBluetoothSocket::SocketError::NoSocketError)
|
||||||
|
return;
|
||||||
|
|
||||||
|
QMetaEnum metaEnum = QMetaEnum::fromType<QBluetoothSocket::SocketError>();
|
||||||
|
QString errorString = socket->peerName()// + ' '_L1
|
||||||
|
+ metaEnum.valueToKey(static_cast<int>(error)) + " occurred"; //_L1;
|
||||||
|
|
||||||
|
emit socketErrorOccurred(errorString);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::connected()
|
||||||
|
{
|
||||||
|
emit connected(socket->peerName());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_pushButtonGetParam_clicked()
|
||||||
|
{
|
||||||
|
if (!socket){
|
||||||
|
qDebug()<< "Ты не создал подходящий сокет!!! Я не буду работать!!!";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QString message = "Get_Param";
|
||||||
|
QByteArray text = message.toUtf8() + '\r' + '\n';
|
||||||
|
|
||||||
|
socket->write(text);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
#ifndef MAINWINDOW_H
|
||||||
|
#define MAINWINDOW_H
|
||||||
|
|
||||||
|
#include <QMainWindow>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QBluetoothDeviceDiscoveryAgent>
|
||||||
|
#include <QBluetoothServiceDiscoveryAgent>
|
||||||
|
#include <QBluetoothDeviceInfo>
|
||||||
|
#include <QBluetoothSocket>
|
||||||
|
#include <QBluetoothLocalDevice>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QListWidget>
|
||||||
|
|
||||||
|
|
||||||
|
#include <QtCharts>
|
||||||
|
#include <QLineSeries>
|
||||||
|
#include <QValueAxis>
|
||||||
|
#include <QChartView>
|
||||||
|
#include <QtMath>
|
||||||
|
|
||||||
|
#include <QtCore/qobject.h>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
// namespace QtCharts;
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class MainWindow;
|
||||||
|
}
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
class MainWindow : public QMainWindow
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
MainWindow(QWidget *parent = nullptr);
|
||||||
|
~MainWindow();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void on_pushButton_clicked();
|
||||||
|
void deviceDiscovered(const QBluetoothDeviceInfo &device);
|
||||||
|
void on_pushButton_2_clicked();
|
||||||
|
void stopDiscovery();
|
||||||
|
void serviceDiscovered(const QBluetoothServiceInfo &serviceInfo);
|
||||||
|
void discoveryFinished();
|
||||||
|
void readSocket();
|
||||||
|
void connected();
|
||||||
|
void onSocketErrorOccurred(QBluetoothSocket::SocketError error);
|
||||||
|
void on_pushButtonGetParam_clicked();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void messageReceived(const QString &sender, const QString &message);
|
||||||
|
void connected(const QString &name);
|
||||||
|
void disconnected();
|
||||||
|
void socketErrorOccurred(const QString &errorString);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::MainWindow *ui;
|
||||||
|
|
||||||
|
QBluetoothSocket *socket = nullptr;
|
||||||
|
QBluetoothLocalDevice localDevice;
|
||||||
|
QString localDeviceName;
|
||||||
|
QMap<QListWidgetItem *, QBluetoothServiceInfo> discoveredServices;
|
||||||
|
|
||||||
|
};
|
||||||
|
#endif // MAINWINDOW_H
|
|
@ -0,0 +1,700 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>MainWindow</class>
|
||||||
|
<widget class="QMainWindow" name="MainWindow">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>1300</width>
|
||||||
|
<height>793</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="palette">
|
||||||
|
<palette>
|
||||||
|
<active>
|
||||||
|
<colorrole role="WindowText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Button">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>229</red>
|
||||||
|
<green>133</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Light">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Midlight">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>242</red>
|
||||||
|
<green>194</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Dark">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>114</red>
|
||||||
|
<green>66</green>
|
||||||
|
<blue>127</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Mid">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>153</red>
|
||||||
|
<green>89</green>
|
||||||
|
<blue>170</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Text">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="BrightText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="ButtonText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Base">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Window">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>229</red>
|
||||||
|
<green>133</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Shadow">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="AlternateBase">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>242</red>
|
||||||
|
<green>194</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="ToolTipBase">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>220</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="ToolTipText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="PlaceholderText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="127">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Accent">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</active>
|
||||||
|
<inactive>
|
||||||
|
<colorrole role="WindowText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Button">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>229</red>
|
||||||
|
<green>133</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Light">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Midlight">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>242</red>
|
||||||
|
<green>194</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Dark">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>114</red>
|
||||||
|
<green>66</green>
|
||||||
|
<blue>127</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Mid">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>153</red>
|
||||||
|
<green>89</green>
|
||||||
|
<blue>170</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Text">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="BrightText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="ButtonText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Base">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Window">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>229</red>
|
||||||
|
<green>133</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Shadow">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="AlternateBase">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>242</red>
|
||||||
|
<green>194</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="ToolTipBase">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>220</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="ToolTipText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="PlaceholderText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="127">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Accent">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</inactive>
|
||||||
|
<disabled>
|
||||||
|
<colorrole role="WindowText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>114</red>
|
||||||
|
<green>66</green>
|
||||||
|
<blue>127</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Button">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>229</red>
|
||||||
|
<green>133</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Light">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Midlight">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>242</red>
|
||||||
|
<green>194</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Dark">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>114</red>
|
||||||
|
<green>66</green>
|
||||||
|
<blue>127</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Mid">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>153</red>
|
||||||
|
<green>89</green>
|
||||||
|
<blue>170</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Text">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>114</red>
|
||||||
|
<green>66</green>
|
||||||
|
<blue>127</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="BrightText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="ButtonText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>114</red>
|
||||||
|
<green>66</green>
|
||||||
|
<blue>127</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Base">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>229</red>
|
||||||
|
<green>133</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Window">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>229</red>
|
||||||
|
<green>133</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Shadow">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="AlternateBase">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>229</red>
|
||||||
|
<green>133</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="ToolTipBase">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>220</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="ToolTipText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="PlaceholderText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="127">
|
||||||
|
<red>114</red>
|
||||||
|
<green>66</green>
|
||||||
|
<blue>127</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Accent">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>245</red>
|
||||||
|
<green>209</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</disabled>
|
||||||
|
</palette>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>9</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>MainWindow</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="centralwidget">
|
||||||
|
<widget class="QPushButton" name="pushButton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>131</width>
|
||||||
|
<height>24</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Поиск устройств</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButton_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>150</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>111</width>
|
||||||
|
<height>24</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Подключение</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QListWidget" name="listWidgetDevice">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>67</y>
|
||||||
|
<width>251</width>
|
||||||
|
<height>111</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="labelConnect">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>23</x>
|
||||||
|
<y>46</y>
|
||||||
|
<width>251</width>
|
||||||
|
<height>16</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Ну может начнем??</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButtonGetParam">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>190</y>
|
||||||
|
<width>201</width>
|
||||||
|
<height>24</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>1) Чтение параметров измерения</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButtonSetParam">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>220</y>
|
||||||
|
<width>201</width>
|
||||||
|
<height>24</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>2) Запись параметров измерения</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButtonGetMeas">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>250</y>
|
||||||
|
<width>201</width>
|
||||||
|
<height>24</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>3) Чтение измеренных значений </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButtonGetWave">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>280</y>
|
||||||
|
<width>491</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>4) Чтение временного сигнала виброускорения/виброскорости /виброперемещения</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButtonGetSpectrum">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>315</y>
|
||||||
|
<width>491</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>5)Чтение спектра виброускорения/виброскорости/виброперемещения</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButtonGetStatus">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>350</y>
|
||||||
|
<width>281</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>6) Cтатус прибора</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButtonSetTime">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>380</y>
|
||||||
|
<width>281</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>7) Синхронизация часов</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButtonGetSpectrumEnv">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>410</y>
|
||||||
|
<width>281</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>8) Чтение спектра огибающей виброускорения</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButtonGetWaveEnv">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>440</y>
|
||||||
|
<width>281</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>9) Чтение сигнала огибающей виброускорения</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QListWidget" name="listWidgetResponse">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>500</y>
|
||||||
|
<width>281</width>
|
||||||
|
<height>231</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>475</y>
|
||||||
|
<width>71</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>14</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Ответы</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenuBar" name="menubar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>1300</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
Loading…
Reference in New Issue