mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
add highgrade level code
This commit is contained in:
parent
ce03ba2365
commit
f3243f204d
5
QQt.pro
5
QQt.pro
@ -43,9 +43,12 @@ SUBDIRS += examples/qqtaudioexample
|
||||
#SUBDIRS += examples/tabwidgetexamples
|
||||
#need QZXing, default closed.
|
||||
#SUBDIRS += examples/qrcodeexample
|
||||
#必开
|
||||
#必开 客户端的 basic
|
||||
SUBDIRS += examples/qqtnetworkexample
|
||||
SUBDIRS += demo/QQtNetworkCreator
|
||||
#服务器的 highgrade
|
||||
SUBDIRS += examples/qqtserverexample
|
||||
SUBDIRS += demo/QQtServerCreator
|
||||
#greaterThan(QT_VERSION, 4.6.0):SUBDIRS += test/voicetest
|
||||
#mac:lessThan(QT_MAJOR_VERSION , 5):SUBDIRS -= test/voicetest
|
||||
|
||||
|
25
README.md
25
README.md
@ -23,12 +23,12 @@ LibQQt现进行正式发布版本v2.1.6.0,欢迎工程师们使用。
|
||||
# 详细介绍
|
||||
|
||||
1. 支持绘制图表
|
||||
- QQtChart (compatiable with QChart and QCustomPlot)
|
||||
- [QQtChart](src/charts/qqtchartview.h) (compatiable with QChart and QCustomPlot)
|
||||
2. 支持检测USB设备热插拔
|
||||
3. 自定义了一部分特殊需要的控件,用来解决Qt的嵌入式bug。
|
||||
- 包括完全使用图片的checkbox(switchbutton)
|
||||
- QQtTabWidget,解决QtTab不能竖排横显文字的问题
|
||||
- QQt进度条,解决Qt进度条在Dialog中导致系统死机的问题
|
||||
- QQt进度条,解决Qt进度条在Dialog中导致系统死机的问题(e-linux)
|
||||
1. 添加精美控件
|
||||
- 包括复杂的圆盘进度条, SpeedMeter
|
||||
- 包括有多种效果的Widget、Dialog
|
||||
@ -36,7 +36,7 @@ LibQQt现进行正式发布版本v2.1.6.0,欢迎工程师们使用。
|
||||
- 九宫格技术展示图片
|
||||
- Html解析器
|
||||
- 以及未列出的等20余种自定义widget。
|
||||
4. 有线和无线网络自动连接管理类
|
||||
4. 有线和无线网络自动连接管理器
|
||||
6. 解决Qt4.8.7在嵌入式屏幕上QGraphics系统不正常绘画的问题
|
||||
7. QQt输入法
|
||||
- 重写了UI,适配多种屏幕
|
||||
@ -47,36 +47,37 @@ LibQQt现进行正式发布版本v2.1.6.0,欢迎工程师们使用。
|
||||
4. QQtTreeView,添加Qt4内部没有TreeView
|
||||
- 包括QQtXmlTreeModel、QQtJsonTreeModel、QQtFileSystemTreeModel、QQtSqlTreeModel
|
||||
5. 支持工程的版本变更
|
||||
- 在qqt_version.pri里面是QQt的版本和源文件内版本宏定义
|
||||
- 在app_version.pri里面是App的版本和源文件内版本宏定义
|
||||
- 在[qqt_version.pri](src/qqt_version.pri)里面是QQt的版本和源文件内版本宏定义
|
||||
- 在[app_version.pri](app/app_version.pri)里面是App的版本和源文件内版本宏定义
|
||||
6. QQt通讯套件。
|
||||
- 通讯口类
|
||||
- QQtSerialPort 兼容QSerialPort and QextSerialPort
|
||||
- [QQtSocketTcpClient](src/network/qqtsockettcpclient.h)、QQtSocketTcpServer、QQtSocketUdpClient
|
||||
- [QQtTcpClient](src/network/qqttcpclient.h)、QQtTcpServer、QQtUdpClient
|
||||
- QQtBluetoothSocket +QQtBluetoothManager
|
||||
- QQtWebAccessManager,支持http、ftp等主流协议,高并发传输。
|
||||
- QQtWebSocket接口
|
||||
- [QQtWebSocket](src/network/qqtwebsocketclient.h) 接口
|
||||
- 协议虚类(接口类) [QQtProtocol](src/network/qqtprotocol.h) QQtWebSocketProtocol
|
||||
- 报文虚类(接口类) [QQtMessage](src/network/qqtmessage.h)
|
||||
- 报文虚类(接口类) [QQtMessage](src/network/qqtmessage.h)
|
||||
7. 添加应用中常用的form
|
||||
8. 支持多页TableWidget
|
||||
8. 支持多页表格 [QQtMPTableWidget](src/widgets/qqtmptablewidget.h)
|
||||
9. 添加 [QQtApplication](src/frame/qqtapplication.h),支持入门级、通用级、专用级嵌入式App所必须的初始化内容
|
||||
5. 支持Qt5.9.2
|
||||
0. 跨平台支持macOS、iOS、Android、Windows、Linux、MIPS、ARM等。
|
||||
1. 添加矢量图形widgets
|
||||
- 比如 QQtSvgProgressbar
|
||||
- QQtSvgCheckBox
|
||||
- [QQtSvgPushButton](src/exquisite/svgwidgets/qqtsvgpushbutton.h)
|
||||
2. 添加核心类之[QQtDictionary](src/core/qqtdictionary.h)
|
||||
- 化解C Plus Plus中没有字典类别的尴尬。
|
||||
3. 添加Multi Link工程管理pri组
|
||||
- Multi Link technology,既多链接工程管理技术。
|
||||
- [Multi Link technology](src/app_multi_link_technology.pri),既多链接工程管理技术。
|
||||
- 基于qmake,用户可以轻易的链接LibQQt和添加自定义library。
|
||||
4. 添加gif support Widgets
|
||||
- 可以方便的设置动态按钮等。
|
||||
- 有QQtGifWidget、QQtGifButton等。
|
||||
- 有[QQtGifWidget](src/exquisite/gifwidgets/qqtgifwidget.h)、QQtGifButton等。
|
||||
5. 升级多媒体音频
|
||||
- 添加内存服务器,处理内存和设备之间的数据交互。
|
||||
- QQtAudioManager、
|
||||
- [QQtAudioManager](src/multimedia/qqtaudiomanager.h)、
|
||||
- QQtWavAudioInput、QQtWavAudioOutput、QQtWavAudioManager、
|
||||
- QQtWavSoundEffect
|
||||
- 将AudioDevice、wav输入输出文件,当做一个设备进行读写,App处理获取到的声音。
|
||||
|
@ -9,5 +9,6 @@ APP_BUILD_VERSION = 0
|
||||
|
||||
APP_VERSION = $${APP_MAJOR_VERSION}.$${APP_MINOR_VERSION}.$${APP_PATCH_VERSION}
|
||||
APP_VERSION4 = $${APP_MAJOR_VERSION}.$${APP_MINOR_VERSION}.$${APP_PATCH_VERSION}.$${APP_BUILD_VERSION}
|
||||
DEFINES += APP_VERSION=$${APP_VERSION}
|
||||
message (Build $${TARGET} version: $$APP_VERSION4)
|
||||
unix:VERSION = $${APP_VERSION}
|
||||
|
@ -30,7 +30,7 @@
|
||||
6. QQt通讯套件。
|
||||
- 通讯口类
|
||||
- QQtSerialPort 兼容QSerialPort and QextSerialPort
|
||||
- [QQtSocketTcpClient](src/network/qqtsockettcpclient.h)、QQtSocketTcpServer、QQtSocketUdpClient
|
||||
- [QQtTcpClient](src/network/qqttcpclient.h)、QQtTcpServer、QQtUdpClient
|
||||
- QQtBluetoothSocket +QQtBluetoothManager
|
||||
- QQtWebAccessManager,支持http、ftp等主流协议,高并发传输。
|
||||
- QQtWebSocket接口
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const QQtUserMessage& msg )
|
||||
QQtUserProtocol* QQtUserConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static QQtUserProtocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new QQtUserProtocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class QQtUserMessage : public QQtMessage
|
||||
{
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "mainwindow.h"
|
||||
#include <QApplication>
|
||||
#include <QQtApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main ( int argc, char* argv[] )
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
QQtApplication a ( argc, argv );
|
||||
MainWindow w;
|
||||
w.show();
|
||||
|
||||
|
34
demo/QQtServerCreator/QQtServerCreator.pro
Normal file
34
demo/QQtServerCreator/QQtServerCreator.pro
Normal file
@ -0,0 +1,34 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2018-04-22T12:55:57
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = QQtServerCreator
|
||||
TEMPLATE = app
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
mainwindow.cpp
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h
|
||||
|
||||
FORMS += \
|
||||
mainwindow.ui
|
11
demo/QQtServerCreator/main.cpp
Normal file
11
demo/QQtServerCreator/main.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#include "mainwindow.h"
|
||||
#include <QApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
MainWindow w;
|
||||
w.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
14
demo/QQtServerCreator/mainwindow.cpp
Normal file
14
demo/QQtServerCreator/mainwindow.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
22
demo/QQtServerCreator/mainwindow.h
Normal file
22
demo/QQtServerCreator/mainwindow.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
24
demo/QQtServerCreator/mainwindow.ui
Normal file
24
demo/QQtServerCreator/mainwindow.ui
Normal file
@ -0,0 +1,24 @@
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QMenuBar" name="menuBar" />
|
||||
<widget class="QToolBar" name="mainToolBar" />
|
||||
<widget class="QWidget" name="centralWidget" />
|
||||
<widget class="QStatusBar" name="statusBar" />
|
||||
</widget>
|
||||
<layoutDefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -5,8 +5,8 @@
|
||||
#include "qqtinput.h"
|
||||
#include "qqtmsgbox.h"
|
||||
#include "qqtframe.h"
|
||||
#include "qqtsockettcpclient.h"
|
||||
#include "qqtsockettcpserver.h"
|
||||
#include "qqttcpclient.h"
|
||||
#include "qqttcpserver.h"
|
||||
#include "qqtserialport.h"
|
||||
#include "qqtpluginwatcher.h"
|
||||
#include "qqtversion.h"
|
||||
@ -16,7 +16,7 @@
|
||||
*/
|
||||
void QQTLanServer ( QObject* parent = 0 )
|
||||
{
|
||||
static QQtSocketTcpServer* s = new QQtSocketTcpServer ( parent );
|
||||
static QQtTcpServer* s = new QQtTcpServer ( parent );
|
||||
s->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
s->installedProtocol();
|
||||
@ -108,13 +108,13 @@ QQTApp::QQTApp ( int& argc, char** argv ) : QApplication ( argc, argv )
|
||||
QObject::connect ( QQtPluginWatcher::Instance(), SIGNAL ( storageChanged ( int ) ),
|
||||
this, SLOT ( slotUPanAutoRun ( int ) ) );
|
||||
#endif
|
||||
//QQtSocketTcpClient
|
||||
//QQtTcpClient
|
||||
//QQTCloudClientInstance(this);
|
||||
#ifdef __EMBEDDED_LINUX__
|
||||
//QQTEthManager
|
||||
QQtEthenetManager::Instance ( this );
|
||||
#endif
|
||||
//QQtSocketTcpServer
|
||||
//QQtTcpServer
|
||||
//QQTPeerPort
|
||||
|
||||
//QQTPeerPortInstance(this);
|
||||
|
@ -6,8 +6,8 @@
|
||||
#include "qqtinput.h"
|
||||
#include "qqtmsgbox.h"
|
||||
#include "qqtframe.h"
|
||||
#include "qqtsockettcpclient.h"
|
||||
#include "qqtsockettcpserver.h"
|
||||
#include "qqttcpclient.h"
|
||||
#include "qqttcpserver.h"
|
||||
#include "qqtserialport.h"
|
||||
#include "qqtpluginwatcher.h"
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
*/
|
||||
void QQTLanServer ( QObject* parent = 0 )
|
||||
{
|
||||
static QQtSocketTcpServer* s = new QQtSocketTcpServer ( parent );
|
||||
static QQtTcpServer* s = new QQtTcpServer ( parent );
|
||||
s->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
s->installedProtocol();
|
||||
@ -108,13 +108,13 @@ QQTApp::QQTApp ( int& argc, char** argv ) : QApplication ( argc, argv )
|
||||
QObject::connect ( QQtPluginWatcher::Instance(), SIGNAL ( storageChanged ( int ) ),
|
||||
this, SLOT ( slotUPanAutoRun ( int ) ) );
|
||||
#endif
|
||||
//QQtSocketTcpClient
|
||||
//QQtTcpClient
|
||||
//QQTCloudClientInstance(this);
|
||||
#ifdef __EMBEDDED_LINUX__
|
||||
//QQTEthManager
|
||||
QQtEthenetManager::Instance ( this );
|
||||
#endif
|
||||
//QQtSocketTcpServer
|
||||
//QQtTcpServer
|
||||
//QQTPeerPort
|
||||
|
||||
//QQTPeerPortInstance(this);
|
||||
|
@ -3,16 +3,16 @@
|
||||
#include "qqtcore.h"
|
||||
#include "qqt-qt.h"
|
||||
|
||||
QQtSocketTcpClient* QQTUpgradeClientInstance ( QObject* parent )
|
||||
QQtTcpClient* QQTUpgradeClientInstance ( QObject* parent )
|
||||
{
|
||||
static QQtSocketTcpClient* cli = NULL;
|
||||
static QQtTcpClient* cli = NULL;
|
||||
|
||||
if ( !cli )
|
||||
{
|
||||
QStringList ip;
|
||||
ip << "222.175.114.244" << "124.133.1.54";
|
||||
//"www.QQToo.com"
|
||||
cli = new QQtSocketTcpClient ( parent );
|
||||
cli = new QQtTcpClient ( parent );
|
||||
cli->SetServerIPAddress ( ip );
|
||||
cli->SetServerPort ( 8089 );
|
||||
}
|
||||
@ -20,15 +20,15 @@ QQtSocketTcpClient* QQTUpgradeClientInstance ( QObject* parent )
|
||||
return cli;
|
||||
}
|
||||
|
||||
QQtSocketTcpClient* QQTCloudClientInstance ( QObject* parent )
|
||||
QQtTcpClient* QQTCloudClientInstance ( QObject* parent )
|
||||
{
|
||||
static QQtSocketTcpClient* cli = NULL;
|
||||
static QQtTcpClient* cli = NULL;
|
||||
|
||||
if ( !cli )
|
||||
{
|
||||
QStringList ip;
|
||||
ip << "222.175.114.244" << "124.133.1.54";
|
||||
cli = new QQtSocketTcpClient ( parent );
|
||||
cli = new QQtTcpClient ( parent );
|
||||
cli->SetServerIPAddress ( ip );
|
||||
cli->SetServerPort ( 7079 );
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QTimer>
|
||||
#include "qqtprotocol.h"
|
||||
#include "qqtnetworkmessage.h"
|
||||
#include "qqtsockettcpclient.h"
|
||||
#include "qqttcpclient.h"
|
||||
|
||||
#define _TCPCMD_HEART 0x0010
|
||||
#define _TCPCMD_HEARTBEATRESP 0x8010
|
||||
@ -424,10 +424,10 @@ public:
|
||||
};
|
||||
|
||||
|
||||
QQtSocketTcpClient *QQTUpgradeClientInstance(QObject *parent);
|
||||
QQtTcpClient *QQTUpgradeClientInstance(QObject *parent);
|
||||
|
||||
|
||||
QQtSocketTcpClient *QQTCloudClientInstance(QObject *parent);
|
||||
QQtTcpClient *QQTCloudClientInstance(QObject *parent);
|
||||
|
||||
|
||||
#endif // QQTCLOUDPROTOCOL_H
|
||||
|
@ -28,9 +28,9 @@ bool QQTLanProtocol::dispatcher ( const QByteArray& m )
|
||||
}
|
||||
|
||||
|
||||
QQtSocketTcpServer* QQTSingleServer ( QObject* parent )
|
||||
QQtTcpServer* QQTSingleServer ( QObject* parent )
|
||||
{
|
||||
static QQtSocketTcpServer* s = new QQtSocketTcpServer ( parent );
|
||||
static QQtTcpServer* s = new QQtTcpServer ( parent );
|
||||
s->listen ( QHostAddress::Any, 8000 );
|
||||
return s;
|
||||
}
|
||||
@ -38,12 +38,12 @@ QQtSocketTcpServer* QQTSingleServer ( QObject* parent )
|
||||
QQTLanProtocol* QQtLanServer ( QObject* parent )
|
||||
{
|
||||
static QQTLanProtocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new QQTLanProtocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
s0->installProtocol ( p0 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "qqtprotocol.h"
|
||||
#include "qqtmessage.h"
|
||||
#include "qqtsockettcpserver.h"
|
||||
#include "qqttcpserver.h"
|
||||
|
||||
class QQtLanMessage : public QQtMessage
|
||||
{
|
||||
@ -58,7 +58,7 @@ public:
|
||||
bool dispatcher ( const QByteArray& m ) override;
|
||||
};
|
||||
|
||||
QQtSocketTcpServer* QQTSingleServer ( QObject* parent );
|
||||
QQtTcpServer* QQTSingleServer ( QObject* parent );
|
||||
//new
|
||||
QQTLanProtocol* QQtLanServer ( QObject* parent = 0 );
|
||||
#endif // QQTLANPROTOCOL_H
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const QQtUserMessage1& msg )
|
||||
QQtUserProtocol1* QQtUserConnectionInstance1 ( QObject* parent )
|
||||
{
|
||||
static QQtUserProtocol1* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new QQtUserProtocol1 ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class QQtUserMessage1 : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const QQtUserMessage2& msg )
|
||||
QQtUserProtocol2* QQtUserConnectionInstance2 ( QObject* parent )
|
||||
{
|
||||
static QQtUserProtocol2* p0 = NULL;
|
||||
static QQtSocketTcpClient* s0 = NULL;
|
||||
static QQtTcpClient* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new QQtUserProtocol2 ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpClient ( parent );
|
||||
s0 = new QQtTcpClient ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->connectToHost ( QHostAddress ( "192.168.0.100" ), 8000 );
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpclient.h>
|
||||
#include <qqttcpclient.h>
|
||||
|
||||
#include <QHostAddress>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "quserbluetoothprotocol.h"
|
||||
#include "qqtsocketbluetoothclient.h"
|
||||
#include "qqtbluetoothclient.h"
|
||||
#include "qqtbluetoothmanager.h"
|
||||
|
||||
QUserBluetoothProtocol::QUserBluetoothProtocol ( QObject* parent ) : QObject ( parent )
|
||||
@ -7,15 +7,15 @@ QUserBluetoothProtocol::QUserBluetoothProtocol ( QObject* parent ) : QObject ( p
|
||||
|
||||
}
|
||||
|
||||
QQtSocketBluetoothClient* QQtUserBluetoothClientInstance ( QObject* parent )
|
||||
QQtBluetoothClient* QQtUserBluetoothClientInstance ( QObject* parent )
|
||||
{
|
||||
static QQtSocketBluetoothClient* cli = nullptr;
|
||||
static QQtBluetoothClient* cli = nullptr;
|
||||
|
||||
if ( !cli )
|
||||
{
|
||||
QQtBluetoothManager* inst = QQtBluetoothManager::Instance ( parent );
|
||||
inst->getDeviceList().first().address();
|
||||
cli = new QQtSocketBluetoothClient ( QBluetoothServiceInfo::RfcommProtocol, parent );
|
||||
cli = new QQtBluetoothClient ( QBluetoothServiceInfo::RfcommProtocol, parent );
|
||||
cli->setServiceAddress ( inst->getDeviceList().first().address() );
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define QUSERBLUETOOTHPROTOCOL_H
|
||||
|
||||
#include <QObject>
|
||||
#include "qqtsocketbluetoothclient.h"
|
||||
#include "qqtbluetoothclient.h"
|
||||
|
||||
class QUserBluetoothProtocol : public QObject
|
||||
{
|
||||
@ -15,6 +15,6 @@ signals:
|
||||
public slots:
|
||||
};
|
||||
|
||||
QQtSocketBluetoothClient* QQtUserBluetoothClientInstance ( QObject* parent = 0 );
|
||||
QQtBluetoothClient* QQtUserBluetoothClientInstance ( QObject* parent = 0 );
|
||||
|
||||
#endif // QUSERBLUETOOTHPROTOCOL_H
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserNode0Message& msg )
|
||||
UserNode0Protocol* UserNode0ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserNode0Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserNode0Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserNode0Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserNode1Message& msg )
|
||||
UserNode1Protocol* UserNode1ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserNode1Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserNode1Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserNode1Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserNode2Message& msg )
|
||||
UserNode2Protocol* UserNode2ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserNode2Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserNode2Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserNode2Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserNode3Message& msg )
|
||||
UserNode3Protocol* UserNode3ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserNode3Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserNode3Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserNode3Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserNode4Message& msg )
|
||||
UserNode4Protocol* UserNode4ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserNode4Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserNode4Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserNode4Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserNode5Message& msg )
|
||||
UserNode5Protocol* UserNode5ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserNode5Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserNode5Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserNode5Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserNode6Message& msg )
|
||||
UserNode6Protocol* UserNode6ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserNode6Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserNode6Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserNode6Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserNode7Message& msg )
|
||||
UserNode7Protocol* UserNode7ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserNode7Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserNode7Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserNode7Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserNode8Message& msg )
|
||||
UserNode8Protocol* UserNode8ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserNode8Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserNode8Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserNode8Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserNode9Message& msg )
|
||||
UserNode9Protocol* UserNode9ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserNode9Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserNode9Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserNode9Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserTest0Message& msg )
|
||||
UserTest0Protocol* UserTest0ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserTest0Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserTest0Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserTest0Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserTest1Message& msg )
|
||||
UserTest1Protocol* UserTest1ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserTest1Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserTest1Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserTest1Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserTest2Message& msg )
|
||||
UserTest2Protocol* UserTest2ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserTest2Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserTest2Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserTest2Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserTest3Message& msg )
|
||||
UserTest3Protocol* UserTest3ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserTest3Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserTest3Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserTest3Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserTest4Message& msg )
|
||||
UserTest4Protocol* UserTest4ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserTest4Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserTest4Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserTest4Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserTest5Message& msg )
|
||||
UserTest5Protocol* UserTest5ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserTest5Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserTest5Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserTest5Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserTest6Message& msg )
|
||||
UserTest6Protocol* UserTest6ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserTest6Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserTest6Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserTest6Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserTest7Message& msg )
|
||||
UserTest7Protocol* UserTest7ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserTest7Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserTest7Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserTest7Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserTest8Message& msg )
|
||||
UserTest8Protocol* UserTest8ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserTest8Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserTest8Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserTest8Message : public QQtMessage
|
||||
{
|
||||
|
@ -12,12 +12,12 @@ QDebug& operator << ( QDebug& dbg, const UserTest9Message& msg )
|
||||
UserTest9Protocol* UserTest9ConnectionInstance ( QObject* parent )
|
||||
{
|
||||
static UserTest9Protocol* p0 = NULL;
|
||||
static QQtSocketTcpServer* s0 = NULL;
|
||||
static QQtTcpServer* s0 = NULL;
|
||||
if ( !p0 && !s0 )
|
||||
{
|
||||
p0 = new UserTest9Protocol ( parent );
|
||||
|
||||
s0 = new QQtSocketTcpServer ( parent );
|
||||
s0 = new QQtTcpServer ( parent );
|
||||
s0->installProtocol ( p0 );
|
||||
s0->listen ( QHostAddress::Any, 8000 );
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <qqtmessage.h>
|
||||
#include <qqtprotocol.h>
|
||||
#include <qqtsockettcpserver.h>
|
||||
#include <qqttcpserver.h>
|
||||
|
||||
class UserTest9Message : public QQtMessage
|
||||
{
|
||||
|
11
examples/qqtserverexample/main.cpp
Normal file
11
examples/qqtserverexample/main.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#include "mainwindow.h"
|
||||
#include <QApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
MainWindow w;
|
||||
w.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
14
examples/qqtserverexample/mainwindow.cpp
Normal file
14
examples/qqtserverexample/mainwindow.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
22
examples/qqtserverexample/mainwindow.h
Normal file
22
examples/qqtserverexample/mainwindow.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
24
examples/qqtserverexample/mainwindow.ui
Normal file
24
examples/qqtserverexample/mainwindow.ui
Normal file
@ -0,0 +1,24 @@
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QMenuBar" name="menuBar" />
|
||||
<widget class="QToolBar" name="mainToolBar" />
|
||||
<widget class="QWidget" name="centralWidget" />
|
||||
<widget class="QStatusBar" name="statusBar" />
|
||||
</widget>
|
||||
<layoutDefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
34
examples/qqtserverexample/qqtserverexample.pro
Normal file
34
examples/qqtserverexample/qqtserverexample.pro
Normal file
@ -0,0 +1,34 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2018-04-22T12:57:27
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = qqtserverexample
|
||||
TEMPLATE = app
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
mainwindow.cpp
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h
|
||||
|
||||
FORMS += \
|
||||
mainwindow.ui
|
@ -1,6 +1,6 @@
|
||||
#include "cedianudpserver.h"
|
||||
#include <QNetworkDatagram>
|
||||
|
||||
CedianUdpServer::CedianUdpServer ( QObject* parent ) : QQtSocketUdpClient ( parent )
|
||||
CedianUdpServer::CedianUdpServer ( QObject* parent ) : QQtUdpClient ( parent )
|
||||
{
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
#ifndef CEDIANUDPSERVER_H
|
||||
#define CEDIANUDPSERVER_H
|
||||
|
||||
#include <qqtsocketudpclient.h>
|
||||
#include <qqtudpclient.h>
|
||||
#include <qqtcore.h>
|
||||
|
||||
class CedianUdpServer : public QQtSocketUdpClient
|
||||
class CedianUdpServer : public QQtUdpClient
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -34,7 +34,7 @@ contains(CONFIG, administrator){
|
||||
################################################################
|
||||
##Multi-link technology
|
||||
################################################################
|
||||
include($$PWD/app_multi_link_config.pri)
|
||||
include($$PWD/app_multi_link_technology.pri)
|
||||
|
||||
################################################################
|
||||
##link QQt
|
||||
|
@ -1,5 +1,5 @@
|
||||
#--------------------------------------------------------------------------------
|
||||
#app_multi_link_configure.pri
|
||||
#app_multi_link_technology.pri
|
||||
|
||||
##Multi-link technology (Multi Link technology)
|
||||
##Multi-link 技术,支持多链接库增删的一门工程管理技术。
|
@ -1,33 +1,33 @@
|
||||
#include "qqtsocketbluetoothserver.h"
|
||||
#include "qqtbluetoothserver.h"
|
||||
#include "qqtnetwork.h"
|
||||
#include "qqtsocketbluetoothclient.h"
|
||||
#include "qqtbluetoothclient.h"
|
||||
|
||||
QQtSocketBluetoothServer::QQtSocketBluetoothServer ( QBluetoothServiceInfo::Protocol serverType,
|
||||
QObject* parent ) : QBluetoothServer ( serverType, parent )
|
||||
QQtBluetoothServer::QQtBluetoothServer ( QBluetoothServiceInfo::Protocol serverType,
|
||||
QObject* parent ) : QBluetoothServer ( serverType, parent )
|
||||
{
|
||||
connect ( this, SIGNAL ( newConnection() ),
|
||||
this, SLOT ( comingNewConnection() ) );
|
||||
}
|
||||
|
||||
QQtSocketBluetoothServer::~QQtSocketBluetoothServer()
|
||||
QQtBluetoothServer::~QQtBluetoothServer()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
|
||||
void QQtSocketBluetoothServer::comingNewConnection()
|
||||
void QQtBluetoothServer::comingNewConnection()
|
||||
{
|
||||
if ( !hasPendingConnections() )
|
||||
return;
|
||||
|
||||
QBluetoothSocket* comingSocket = nextPendingConnection();
|
||||
QQtSocketBluetoothClient* clientSocket = new QQtSocketBluetoothClient ( this );
|
||||
QQtBluetoothClient* clientSocket = new QQtBluetoothClient ( this );
|
||||
connect ( clientSocket, SIGNAL ( disconnected() ), clientSocket, SLOT ( deleteLater() ) );
|
||||
clientSocket->installProtocol ( m_protocol );
|
||||
clientSocket->setSocketDescriptor ( comingSocket->socketDescriptor(), QBluetoothServiceInfo::RfcommProtocol );
|
||||
}
|
||||
|
||||
void QQtSocketBluetoothServer::installProtocol ( QQtProtocol* stack )
|
||||
void QQtBluetoothServer::installProtocol ( QQtProtocol* stack )
|
||||
{
|
||||
if ( m_protocol )
|
||||
return;
|
||||
@ -35,7 +35,7 @@ void QQtSocketBluetoothServer::installProtocol ( QQtProtocol* stack )
|
||||
m_protocol = stack;
|
||||
}
|
||||
|
||||
void QQtSocketBluetoothServer::uninstallProtocol ( QQtProtocol* stack )
|
||||
void QQtBluetoothServer::uninstallProtocol ( QQtProtocol* stack )
|
||||
{
|
||||
Q_UNUSED ( stack )
|
||||
|
||||
@ -45,7 +45,7 @@ void QQtSocketBluetoothServer::uninstallProtocol ( QQtProtocol* stack )
|
||||
m_protocol = NULL;
|
||||
}
|
||||
|
||||
QQtProtocol* QQtSocketBluetoothServer::installedProtocol()
|
||||
QQtProtocol* QQtBluetoothServer::installedProtocol()
|
||||
{
|
||||
return m_protocol;
|
||||
}
|
@ -5,12 +5,12 @@
|
||||
#include "qqtprotocol.h"
|
||||
#include <qqt-local.h>
|
||||
|
||||
class QQTSHARED_EXPORT QQtSocketBluetoothServer : public QBluetoothServer
|
||||
class QQTSHARED_EXPORT QQtBluetoothServer : public QBluetoothServer
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QQtSocketBluetoothServer ( QBluetoothServiceInfo::Protocol serverType, QObject* parent = nullptr );
|
||||
~QQtSocketBluetoothServer();
|
||||
explicit QQtBluetoothServer ( QBluetoothServiceInfo::Protocol serverType, QObject* parent = nullptr );
|
||||
~QQtBluetoothServer();
|
||||
|
||||
void installProtocol ( QQtProtocol* stack );
|
||||
void uninstallProtocol ( QQtProtocol* stack );
|
70
src/highgrade/qqtprotocolmanager.cpp
Normal file
70
src/highgrade/qqtprotocolmanager.cpp
Normal file
@ -0,0 +1,70 @@
|
||||
#include "qqtprotocolmanager.h"
|
||||
|
||||
QQtProtocolManager::QQtProtocolManager ( QObject* parent ) : QObject ( parent )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QQtProtocolManager::~QQtProtocolManager()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#define pline2() pline() << metaObject()->className()
|
||||
|
||||
void QQtProtocolManager::translator ( const QByteArray& bytes )
|
||||
{
|
||||
// queued conn and queued package;
|
||||
// direct conn and direct package;
|
||||
|
||||
static QByteArray sqbaBlockOnNet;
|
||||
sqbaBlockOnNet += bytes;
|
||||
//qint64 aaa = bytesAvailable();
|
||||
//pline() << aaa;
|
||||
|
||||
do
|
||||
{
|
||||
quint16 nBlockLen = this->splitter ( sqbaBlockOnNet );
|
||||
|
||||
pline2() << sqbaBlockOnNet.size() << "..." << nBlockLen;
|
||||
|
||||
if ( sqbaBlockOnNet.length() < nBlockLen || nBlockLen < minlength() )
|
||||
{
|
||||
/*
|
||||
* 收到数据不足或者解析包长小于最小包长
|
||||
*/
|
||||
return;
|
||||
}
|
||||
else if ( nBlockLen > maxlength() )
|
||||
{
|
||||
/*
|
||||
* 数据包长超过了最大长度
|
||||
*/
|
||||
sqbaBlockOnNet.clear();
|
||||
pline2() << "forbidden package" << sqbaBlockOnNet.length() << nBlockLen;
|
||||
return;
|
||||
}
|
||||
else if ( sqbaBlockOnNet.length() > nBlockLen )
|
||||
{
|
||||
/*
|
||||
* 粘包
|
||||
* 还没有处理完毕,数据已经接收到,异步信号处理出现这种异常
|
||||
* 疑问:如果异步调用这个函数绘出现什么问题?正常情况,同步获取数据,异步处理;检测异步获取并且处理会有什么状况
|
||||
*/
|
||||
pline2() << "stick package" << sqbaBlockOnNet.length() << nBlockLen;
|
||||
QByteArray netData;
|
||||
netData.resize ( nBlockLen );
|
||||
sqbaBlockOnNet >> netData;
|
||||
dispatcher ( netData );
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* 正常分发
|
||||
*/
|
||||
dispatcher ( sqbaBlockOnNet );
|
||||
break;
|
||||
} while ( 1 );
|
||||
|
||||
sqbaBlockOnNet.clear();
|
||||
}
|
63
src/highgrade/qqtprotocolmanager.h
Normal file
63
src/highgrade/qqtprotocolmanager.h
Normal file
@ -0,0 +1,63 @@
|
||||
#ifndef QQTPROTOCOLMANAGER_H
|
||||
#define QQTPROTOCOLMANAGER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <qqt-local.h>
|
||||
#include "qqtmessage.h"
|
||||
#include "qqtcore.h"
|
||||
|
||||
/**
|
||||
* @brief The QQtProtocolManager class
|
||||
* very good ideology and impliment
|
||||
*/
|
||||
class QQTSHARED_EXPORT QQtProtocolManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QQtProtocolManager ( QObject* parent = 0 );
|
||||
virtual ~QQtProtocolManager();
|
||||
|
||||
/*
|
||||
* 建议:用户在继承类里的函数里直接调用[emit] write(...)
|
||||
*/
|
||||
Q_SIGNALS:
|
||||
qint64 write ( const QByteArray& );
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief 协议处理器
|
||||
* 这个处理器是给QQtTcpSocket用的,不是给客户用的。
|
||||
* @param Qt通讯口readAll()读到的bytes
|
||||
* @return
|
||||
*/
|
||||
void translator ( const QByteArray& bytes );
|
||||
|
||||
/*
|
||||
* 以下函数,用户必须继承下去,重写,need override
|
||||
*/
|
||||
protected:
|
||||
/**
|
||||
* @brief 最小包长
|
||||
* @return
|
||||
*/
|
||||
inline virtual quint16 minlength() { return 0; }
|
||||
/**
|
||||
* @brief 最大包长
|
||||
* @return
|
||||
*/
|
||||
inline virtual quint16 maxlength() { return 0xFFFF; }
|
||||
/**
|
||||
* @brief 语法解析器 从流中解析报文长度
|
||||
* @param 接收到的数据段
|
||||
* @return 按照协议解析到的数据长度 可用,继续接收,丢弃,粘包。
|
||||
*/
|
||||
inline virtual quint16 splitter ( const QByteArray& ) { return 0; }
|
||||
/**
|
||||
* @brief 语义解析器
|
||||
* @param 数据包
|
||||
* @return 0 no dispatched(others) 1 dispatched(own)
|
||||
*/
|
||||
inline virtual bool dispatcher ( const QByteArray& ) { return 0; }
|
||||
};
|
||||
|
||||
#endif // QQTPROTOCOLMANAGER_H
|
70
src/highgrade/qqtserverprotocol.cpp
Normal file
70
src/highgrade/qqtserverprotocol.cpp
Normal file
@ -0,0 +1,70 @@
|
||||
#include "qqtserverprotocol.h"
|
||||
|
||||
QQtServerProtocol::QQtServerProtocol ( QObject* parent ) : QObject ( parent )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QQtServerProtocol::~QQtServerProtocol()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#define pline2() pline() << metaObject()->className()
|
||||
|
||||
void QQtServerProtocol::translator ( const QByteArray& bytes )
|
||||
{
|
||||
// queued conn and queued package;
|
||||
// direct conn and direct package;
|
||||
|
||||
static QByteArray sqbaBlockOnNet;
|
||||
sqbaBlockOnNet += bytes;
|
||||
//qint64 aaa = bytesAvailable();
|
||||
//pline() << aaa;
|
||||
|
||||
do
|
||||
{
|
||||
quint16 nBlockLen = this->splitter ( sqbaBlockOnNet );
|
||||
|
||||
pline2() << sqbaBlockOnNet.size() << "..." << nBlockLen;
|
||||
|
||||
if ( sqbaBlockOnNet.length() < nBlockLen || nBlockLen < minlength() )
|
||||
{
|
||||
/*
|
||||
* 收到数据不足或者解析包长小于最小包长
|
||||
*/
|
||||
return;
|
||||
}
|
||||
else if ( nBlockLen > maxlength() )
|
||||
{
|
||||
/*
|
||||
* 数据包长超过了最大长度
|
||||
*/
|
||||
sqbaBlockOnNet.clear();
|
||||
pline2() << "forbidden package" << sqbaBlockOnNet.length() << nBlockLen;
|
||||
return;
|
||||
}
|
||||
else if ( sqbaBlockOnNet.length() > nBlockLen )
|
||||
{
|
||||
/*
|
||||
* 粘包
|
||||
* 还没有处理完毕,数据已经接收到,异步信号处理出现这种异常
|
||||
* 疑问:如果异步调用这个函数绘出现什么问题?正常情况,同步获取数据,异步处理;检测异步获取并且处理会有什么状况
|
||||
*/
|
||||
pline2() << "stick package" << sqbaBlockOnNet.length() << nBlockLen;
|
||||
QByteArray netData;
|
||||
netData.resize ( nBlockLen );
|
||||
sqbaBlockOnNet >> netData;
|
||||
dispatcher ( netData );
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* 正常分发
|
||||
*/
|
||||
dispatcher ( sqbaBlockOnNet );
|
||||
break;
|
||||
} while ( 1 );
|
||||
|
||||
sqbaBlockOnNet.clear();
|
||||
}
|
63
src/highgrade/qqtserverprotocol.h
Normal file
63
src/highgrade/qqtserverprotocol.h
Normal file
@ -0,0 +1,63 @@
|
||||
#ifndef QQTSERVERPROTOCOL_H
|
||||
#define QQTSERVERPROTOCOL_H
|
||||
|
||||
#include <QObject>
|
||||
#include <qqt-local.h>
|
||||
#include "qqtmessage.h"
|
||||
#include "qqtcore.h"
|
||||
|
||||
/**
|
||||
* @brief The QQtServerProtocol class
|
||||
* very good ideology and impliment
|
||||
*/
|
||||
class QQTSHARED_EXPORT QQtServerProtocol : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QQtServerProtocol ( QObject* parent = 0 );
|
||||
virtual ~QQtServerProtocol();
|
||||
|
||||
/*
|
||||
* 建议:用户在继承类里的函数里直接调用[emit] write(...)
|
||||
*/
|
||||
Q_SIGNALS:
|
||||
qint64 write ( const QByteArray& );
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief 协议处理器
|
||||
* 这个处理器是给QQtTcpSocket用的,不是给客户用的。
|
||||
* @param Qt通讯口readAll()读到的bytes
|
||||
* @return
|
||||
*/
|
||||
void translator ( const QByteArray& bytes );
|
||||
|
||||
/*
|
||||
* 以下函数,用户必须继承下去,重写,need override
|
||||
*/
|
||||
protected:
|
||||
/**
|
||||
* @brief 最小包长
|
||||
* @return
|
||||
*/
|
||||
inline virtual quint16 minlength() { return 0; }
|
||||
/**
|
||||
* @brief 最大包长
|
||||
* @return
|
||||
*/
|
||||
inline virtual quint16 maxlength() { return 0xFFFF; }
|
||||
/**
|
||||
* @brief 语法解析器 从流中解析报文长度
|
||||
* @param 接收到的数据段
|
||||
* @return 按照协议解析到的数据长度 可用,继续接收,丢弃,粘包。
|
||||
*/
|
||||
inline virtual quint16 splitter ( const QByteArray& ) { return 0; }
|
||||
/**
|
||||
* @brief 语义解析器
|
||||
* @param 数据包
|
||||
* @return 0 no dispatched(others) 1 dispatched(own)
|
||||
*/
|
||||
inline virtual bool dispatcher ( const QByteArray& ) { return 0; }
|
||||
};
|
||||
|
||||
#endif // QQTSERVERPROTOCOL_H
|
@ -1,27 +1,27 @@
|
||||
#include "qqtsockettcpserver.h"
|
||||
#include "qqttcpserver.h"
|
||||
#include "qqtnetwork.h"
|
||||
|
||||
|
||||
QQtSocketTcpServer::QQtSocketTcpServer ( QObject* parent ) :
|
||||
QQtTcpServer::QQtTcpServer ( QObject* parent ) :
|
||||
QTcpServer ( parent )
|
||||
{
|
||||
}
|
||||
|
||||
QQtSocketTcpServer::~QQtSocketTcpServer()
|
||||
QQtTcpServer::~QQtTcpServer()
|
||||
{
|
||||
if ( isListening() )
|
||||
close();
|
||||
}
|
||||
|
||||
void QQtSocketTcpServer::incomingConnection ( qintptr handle )
|
||||
void QQtTcpServer::incomingConnection ( qintptr handle )
|
||||
{
|
||||
QQtSocketTcpClient* clientSocket = new QQtSocketTcpClient ( this );
|
||||
QQtTcpClient* clientSocket = new QQtTcpClient ( this );
|
||||
clientSocket->setSocketDescriptor ( handle );
|
||||
connect ( clientSocket, SIGNAL ( disconnected() ), clientSocket, SLOT ( deleteLater() ) );
|
||||
clientSocket->installProtocol ( m_protocol );
|
||||
}
|
||||
|
||||
void QQtSocketTcpServer::installProtocol ( QQtProtocol* stack )
|
||||
void QQtTcpServer::installProtocol ( QQtProtocol* stack )
|
||||
{
|
||||
if ( m_protocol )
|
||||
return;
|
||||
@ -29,7 +29,7 @@ void QQtSocketTcpServer::installProtocol ( QQtProtocol* stack )
|
||||
m_protocol = stack;
|
||||
}
|
||||
|
||||
void QQtSocketTcpServer::uninstallProtocol ( QQtProtocol* stack )
|
||||
void QQtTcpServer::uninstallProtocol ( QQtProtocol* stack )
|
||||
{
|
||||
Q_UNUSED ( stack )
|
||||
|
||||
@ -39,7 +39,7 @@ void QQtSocketTcpServer::uninstallProtocol ( QQtProtocol* stack )
|
||||
m_protocol = NULL;
|
||||
}
|
||||
|
||||
QQtProtocol* QQtSocketTcpServer::installedProtocol()
|
||||
QQtProtocol* QQtTcpServer::installedProtocol()
|
||||
{
|
||||
return m_protocol;
|
||||
}
|
@ -3,16 +3,16 @@
|
||||
|
||||
#include <QTcpServer>
|
||||
#include "qqtprotocol.h"
|
||||
#include "qqtsockettcpclient.h"
|
||||
#include "qqttcpclient.h"
|
||||
#include "qqt-local.h"
|
||||
#include "qqtcore.h"
|
||||
|
||||
class QQTSHARED_EXPORT QQtSocketTcpServer : public QTcpServer
|
||||
class QQTSHARED_EXPORT QQtTcpServer : public QTcpServer
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QQtSocketTcpServer ( QObject* parent = 0 );
|
||||
~QQtSocketTcpServer();
|
||||
explicit QQtTcpServer ( QObject* parent = 0 );
|
||||
~QQtTcpServer();
|
||||
|
||||
void installProtocol ( QQtProtocol* stack );
|
||||
void uninstallProtocol ( QQtProtocol* stack );
|
@ -1,6 +1,6 @@
|
||||
#include "qqtsocketudpclient.h"
|
||||
#include "qqtudpserver.h"
|
||||
|
||||
QQtSocketUdpClient::QQtSocketUdpClient ( QObject* parent ) : QUdpSocket ( parent )
|
||||
QQtUdpServer::QQtUdpServer ( QObject* parent ) : QUdpSocket ( parent )
|
||||
{
|
||||
connect ( this, SIGNAL ( stateChanged ( QAbstractSocket::SocketState ) ), this,
|
||||
SLOT ( socketStateChanged ( QAbstractSocket::SocketState ) ) );
|
||||
@ -23,7 +23,7 @@ QQtSocketUdpClient::QQtSocketUdpClient ( QObject* parent ) : QUdpSocket ( parent
|
||||
m_protocol = NULL;
|
||||
}
|
||||
|
||||
void QQtSocketUdpClient::installProtocol ( QQtUdpProtocol* stack )
|
||||
void QQtUdpServer::installProtocol ( QQtUdpProtocol* stack )
|
||||
{
|
||||
if ( m_protocol )
|
||||
return;
|
||||
@ -33,7 +33,7 @@ void QQtSocketUdpClient::installProtocol ( QQtUdpProtocol* stack )
|
||||
this, SLOT ( slotWriteDatagram ( QByteArray, QHostAddress, quint16 ) ) );
|
||||
}
|
||||
|
||||
void QQtSocketUdpClient::uninstallProtocol ( QQtUdpProtocol* stack )
|
||||
void QQtUdpServer::uninstallProtocol ( QQtUdpProtocol* stack )
|
||||
{
|
||||
Q_UNUSED ( stack )
|
||||
|
||||
@ -45,22 +45,22 @@ void QQtSocketUdpClient::uninstallProtocol ( QQtUdpProtocol* stack )
|
||||
m_protocol = NULL;
|
||||
}
|
||||
|
||||
QQtUdpProtocol* QQtSocketUdpClient::installedProtocol()
|
||||
QQtUdpProtocol* QQtUdpServer::installedProtocol()
|
||||
{
|
||||
return m_protocol;
|
||||
}
|
||||
|
||||
void QQtSocketUdpClient::domainHostFound()
|
||||
void QQtUdpServer::domainHostFound()
|
||||
{
|
||||
pline();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QQtSocketUdpClient::socketStateChanged
|
||||
* @brief QQtUdpClient::socketStateChanged
|
||||
* @param eSocketState
|
||||
* 状态函数
|
||||
*/
|
||||
void QQtSocketUdpClient::socketStateChanged ( QAbstractSocket::SocketState eSocketState )
|
||||
void QQtUdpServer::socketStateChanged ( QAbstractSocket::SocketState eSocketState )
|
||||
{
|
||||
pline() << eSocketState;
|
||||
|
||||
@ -85,11 +85,11 @@ void QQtSocketUdpClient::socketStateChanged ( QAbstractSocket::SocketState eSock
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QQtSocketUdpClient::socketErrorOccured
|
||||
* @brief QQtUdpClient::socketErrorOccured
|
||||
* @param e
|
||||
* 状态函数
|
||||
*/
|
||||
void QQtSocketUdpClient::socketErrorOccured ( QAbstractSocket::SocketError e )
|
||||
void QQtUdpServer::socketErrorOccured ( QAbstractSocket::SocketError e )
|
||||
{
|
||||
/*
|
||||
* 在错误状态下重新连接其他热点,直到确定连接类型,写入配置文件
|
||||
@ -109,10 +109,10 @@ void QQtSocketUdpClient::socketErrorOccured ( QAbstractSocket::SocketError e )
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QQtSocketUdpClient::socketConnected
|
||||
* @brief QQtUdpClient::socketConnected
|
||||
* 功能接口
|
||||
*/
|
||||
void QQtSocketUdpClient::socketConnected()
|
||||
void QQtUdpServer::socketConnected()
|
||||
{
|
||||
pline() << peerName() << peerAddress().toString() << peerPort();
|
||||
/*
|
||||
@ -122,26 +122,26 @@ void QQtSocketUdpClient::socketConnected()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QQtSocketUdpClient::socketDisconnect
|
||||
* @brief QQtUdpClient::socketDisconnect
|
||||
* 功能接口
|
||||
*/
|
||||
void QQtSocketUdpClient::socketDisconnect()
|
||||
void QQtUdpServer::socketDisconnect()
|
||||
{
|
||||
pline();
|
||||
}
|
||||
|
||||
void QQtSocketUdpClient::updateProgress ( qint64 bytes )
|
||||
void QQtUdpServer::updateProgress ( qint64 bytes )
|
||||
{
|
||||
Q_UNUSED ( bytes )
|
||||
//pline() << bytes;
|
||||
}
|
||||
|
||||
qint64 QQtSocketUdpClient::slotWriteDatagram ( const QByteArray& datagram, const QHostAddress& host, quint16 port )
|
||||
qint64 QQtUdpServer::slotWriteDatagram ( const QByteArray& datagram, const QHostAddress& host, quint16 port )
|
||||
{
|
||||
return writeDatagram ( datagram, host, port );
|
||||
}
|
||||
|
||||
void QQtSocketUdpClient::readyReadData()
|
||||
void QQtUdpServer::readyReadData()
|
||||
{
|
||||
/*为什么用while?*/ //Qt4 没有那么高级的一次性读取的接口?有
|
||||
while ( hasPendingDatagrams() )
|
65
src/highgrade/qqtudpserver.h
Normal file
65
src/highgrade/qqtudpserver.h
Normal file
@ -0,0 +1,65 @@
|
||||
#ifndef QQTUDPSERVER_H
|
||||
#define QQTUDPSERVER_H
|
||||
|
||||
#include <QUdpSocket>
|
||||
#include "qqtudpprotocol.h"
|
||||
#include "qqtudpclient.h"
|
||||
#include "qqt-local.h"
|
||||
#include "qqtcore.h"
|
||||
|
||||
/*
|
||||
* Udp通信服务器
|
||||
*
|
||||
* Udp通信服务器和客户端操作区别:服务器需要绑定本地端口。
|
||||
* 区别很小。
|
||||
* 可是在服务器端,和TCP一样需要处理多个客户端通信,在这里处理。
|
||||
* 假如不处理,一个服务器会同时和多个客户端通信。
|
||||
*
|
||||
* 默认情况下,就可以接收发送数据了。在协议里处理接收、发送。
|
||||
* 只有绑定本地IP、端口才能进行接收
|
||||
*/
|
||||
class QQtUdpServer : public QUdpSocket
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QQtUdpServer ( QObject* parent = nullptr );
|
||||
virtual ~QQtUdpServer() {}
|
||||
|
||||
void installProtocol ( QQtUdpProtocol* stack );
|
||||
void uninstallProtocol ( QQtUdpProtocol* stack );
|
||||
QQtUdpProtocol* installedProtocol();
|
||||
|
||||
QList<QQtUdpClient*> getClientList() const {
|
||||
return m_client_list;
|
||||
}
|
||||
|
||||
signals:
|
||||
void signalConnecting();
|
||||
void signalConnectSucc();
|
||||
void signalConnectFail();//
|
||||
void signalDisConnectSucc();//maybe
|
||||
void signalDisConnectFail();//
|
||||
void signalUpdateProgress ( qint64 value );
|
||||
public slots:
|
||||
|
||||
protected slots:
|
||||
void readyReadData();
|
||||
private slots:
|
||||
void domainHostFound();
|
||||
void socketStateChanged ( QAbstractSocket::SocketState );
|
||||
void socketErrorOccured ( QAbstractSocket::SocketError );
|
||||
void socketConnected();
|
||||
void socketDisconnect();
|
||||
void updateProgress ( qint64 bytes );
|
||||
//如果有一个同名的槽,参数不同,并且被用宏控制起来,Qt编译不过。
|
||||
//Qt的元对象系统,解析信号和槽函数,不支持宏。
|
||||
//QtUdpSocket,writeDatagram不是个槽。
|
||||
qint64 slotWriteDatagram ( const QByteArray& datagram,
|
||||
const QHostAddress& host, quint16 port );
|
||||
|
||||
private:
|
||||
QQtUdpProtocol* m_protocol;
|
||||
QList<QQtUdpClient*> m_client_list;
|
||||
};
|
||||
|
||||
#endif // QQTUDPSERVER_H
|
1
src/highgrade/qqtudpserverprotocol.cpp
Normal file
1
src/highgrade/qqtudpserverprotocol.cpp
Normal file
@ -0,0 +1 @@
|
||||
#include "qqtudpserverprotocol.h"
|
77
src/highgrade/qqtudpserverprotocol.h
Normal file
77
src/highgrade/qqtudpserverprotocol.h
Normal file
@ -0,0 +1,77 @@
|
||||
#ifndef QQTUDPSERVELPROTOCOL_H
|
||||
#define QQTUDPSERVELPROTOCOL_H
|
||||
|
||||
#include <QObject>
|
||||
#include <qqt-local.h>
|
||||
#include "qqtmessage.h"
|
||||
#include "qqtcore.h"
|
||||
|
||||
#define QT_VERSION_DATAGRAM QT_VERSION_CHECK(5,8,0)
|
||||
|
||||
#if QT_VERSION > QT_VERSION_DATAGRAM
|
||||
#include <QNetworkDatagram>
|
||||
#endif
|
||||
|
||||
/*
|
||||
*/
|
||||
class QQTSHARED_EXPORT QQtUdpServerProtocol : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QQtUdpServerProtocol ( QObject* parent = nullptr ) : QObject ( parent ) {
|
||||
|
||||
}
|
||||
virtual ~QQtUdpServerProtocol() {}
|
||||
|
||||
#if QT_VERSION > QT_VERSION_DATAGRAM
|
||||
qint64 writeDatagram ( const QNetworkDatagram& datagram ) {
|
||||
QByteArray dg = datagram.data();
|
||||
QHostAddress addr = datagram.destinationAddress();
|
||||
int port = datagram.destinationPort();
|
||||
emit writeDatagram ( dg, addr, ( quint16 ) port );
|
||||
}
|
||||
#endif
|
||||
|
||||
signals:
|
||||
qint64 writeDatagram ( const QByteArray& datagram,
|
||||
const QHostAddress& host, quint16 port );
|
||||
|
||||
public slots:
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief 语义解析器
|
||||
* @brief 用户必须继承下去,重写,need override
|
||||
* @param 数据包
|
||||
* @return 0 no dispatched(others) 1 dispatched(own)
|
||||
*/
|
||||
inline virtual bool dispatcher ( const QByteArray& datagram,
|
||||
const QHostAddress& host, quint16 port ) {
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* 这两个dispatcher,任选其一重写。
|
||||
*/
|
||||
#if QT_VERSION > QT_VERSION_DATAGRAM
|
||||
inline virtual bool dispatcher ( const QNetworkDatagram& ) { return 0; }
|
||||
#endif
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief 协议处理器
|
||||
* @brief 这个处理器是给QQtUdpSocket用的,不需要用户管理。
|
||||
* @param Qt通讯口readAll()读到的bytes
|
||||
* @return
|
||||
*/
|
||||
void translator ( const QByteArray& datagram,
|
||||
const QHostAddress& host, quint16 port ) {
|
||||
dispatcher ( datagram, host, port );
|
||||
}
|
||||
#if QT_VERSION > QT_VERSION_DATAGRAM
|
||||
void translator ( const QNetworkDatagram& datagram ) {
|
||||
dispatcher ( datagram );
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // QQTUDPSERVELPROTOCOL_H
|
@ -1,18 +1,18 @@
|
||||
#include "qqtsocketbluetoothclient.h"
|
||||
#include "qqtbluetoothclient.h"
|
||||
#include <qqtcore.h>
|
||||
|
||||
QQtSocketBluetoothClient::QQtSocketBluetoothClient ( QBluetoothServiceInfo::Protocol socketType, QObject* parent ) :
|
||||
QQtBluetoothClient::QQtBluetoothClient ( QBluetoothServiceInfo::Protocol socketType, QObject* parent ) :
|
||||
QBluetoothSocket ( socketType, parent )
|
||||
{
|
||||
initSocket();
|
||||
}
|
||||
|
||||
QQtSocketBluetoothClient::QQtSocketBluetoothClient ( QObject* parent ) : QBluetoothSocket ( parent )
|
||||
QQtBluetoothClient::QQtBluetoothClient ( QObject* parent ) : QBluetoothSocket ( parent )
|
||||
{
|
||||
initSocket();
|
||||
}
|
||||
|
||||
void QQtSocketBluetoothClient::initSocket()
|
||||
void QQtBluetoothClient::initSocket()
|
||||
{
|
||||
connect ( this, SIGNAL ( stateChanged ( QBluetoothSocket::SocketState ) ),
|
||||
this, SLOT ( socketStateChanged ( QBluetoothSocket::SocketState ) ) );
|
||||
@ -39,7 +39,7 @@ void QQtSocketBluetoothClient::initSocket()
|
||||
m_protocol = nullptr;
|
||||
}
|
||||
|
||||
void QQtSocketBluetoothClient::installProtocol ( QQtProtocol* stack )
|
||||
void QQtBluetoothClient::installProtocol ( QQtProtocol* stack )
|
||||
{
|
||||
if ( m_protocol )
|
||||
return;
|
||||
@ -49,7 +49,7 @@ void QQtSocketBluetoothClient::installProtocol ( QQtProtocol* stack )
|
||||
this, SLOT ( write ( const QByteArray& ) ) );
|
||||
}
|
||||
|
||||
void QQtSocketBluetoothClient::uninstallProtocol ( QQtProtocol* stack )
|
||||
void QQtBluetoothClient::uninstallProtocol ( QQtProtocol* stack )
|
||||
{
|
||||
Q_UNUSED ( stack )
|
||||
|
||||
@ -61,12 +61,12 @@ void QQtSocketBluetoothClient::uninstallProtocol ( QQtProtocol* stack )
|
||||
m_protocol = NULL;
|
||||
}
|
||||
|
||||
QQtProtocol* QQtSocketBluetoothClient::installedProtocol()
|
||||
QQtProtocol* QQtBluetoothClient::installedProtocol()
|
||||
{
|
||||
return m_protocol;
|
||||
}
|
||||
|
||||
void QQtSocketBluetoothClient::sendConnectMessage()
|
||||
void QQtBluetoothClient::sendConnectMessage()
|
||||
{
|
||||
pline() << isOpen() << state();
|
||||
|
||||
@ -90,7 +90,7 @@ void QQtSocketBluetoothClient::sendConnectMessage()
|
||||
}
|
||||
|
||||
|
||||
int QQtSocketBluetoothClient::sendDisConnectFromHost()
|
||||
int QQtBluetoothClient::sendDisConnectFromHost()
|
||||
{
|
||||
pline() << isOpen() << state();
|
||||
|
||||
@ -110,40 +110,40 @@ int QQtSocketBluetoothClient::sendDisConnectFromHost()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QQtSocketBluetoothClient::socketStateChanged
|
||||
* @brief QQtBluetoothClient::socketStateChanged
|
||||
* @param eSocketState
|
||||
* 状态函数
|
||||
*/
|
||||
void QQtSocketBluetoothClient::socketStateChanged ( QBluetoothSocket::SocketState eSocketState )
|
||||
void QQtBluetoothClient::socketStateChanged ( QBluetoothSocket::SocketState eSocketState )
|
||||
{
|
||||
pline() << eSocketState;
|
||||
|
||||
switch ( eSocketState )
|
||||
{
|
||||
case ServiceLookupState:
|
||||
case ConnectingState:
|
||||
break;
|
||||
case ServiceLookupState:
|
||||
case ConnectingState:
|
||||
break;
|
||||
|
||||
case ConnectedState:
|
||||
break;
|
||||
case ConnectedState:
|
||||
break;
|
||||
|
||||
case ClosingState:
|
||||
break;
|
||||
case ClosingState:
|
||||
break;
|
||||
|
||||
case UnconnectedState:
|
||||
break;
|
||||
case UnconnectedState:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QQtSocketBluetoothClient::socketErrorOccured
|
||||
* @brief QQtBluetoothClient::socketErrorOccured
|
||||
* @param e
|
||||
* 状态函数
|
||||
*/
|
||||
void QQtSocketBluetoothClient::socketErrorOccured ( QBluetoothSocket::SocketError e )
|
||||
void QQtBluetoothClient::socketErrorOccured ( QBluetoothSocket::SocketError e )
|
||||
{
|
||||
/*
|
||||
* 在错误状态下重新连接其他热点,直到确定连接类型,写入配置文件
|
||||
@ -152,18 +152,18 @@ void QQtSocketBluetoothClient::socketErrorOccured ( QBluetoothSocket::SocketErro
|
||||
|
||||
switch ( e )
|
||||
{
|
||||
case HostNotFoundError:
|
||||
default:
|
||||
emit signalConnectFail();
|
||||
break;
|
||||
case HostNotFoundError:
|
||||
default:
|
||||
emit signalConnectFail();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QQtSocketBluetoothClient::socketConnected
|
||||
* @brief QQtBluetoothClient::socketConnected
|
||||
* 功能接口
|
||||
*/
|
||||
void QQtSocketBluetoothClient::socketConnected()
|
||||
void QQtBluetoothClient::socketConnected()
|
||||
{
|
||||
pline() << peerName() << peerAddress().toString() << peerPort();
|
||||
/*
|
||||
@ -173,21 +173,21 @@ void QQtSocketBluetoothClient::socketConnected()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QQtSocketBluetoothClient::socketDisconnect
|
||||
* @brief QQtBluetoothClient::socketDisconnect
|
||||
* 功能接口
|
||||
*/
|
||||
void QQtSocketBluetoothClient::socketDisconnect()
|
||||
void QQtBluetoothClient::socketDisconnect()
|
||||
{
|
||||
pline();
|
||||
}
|
||||
|
||||
void QQtSocketBluetoothClient::updateProgress ( qint64 bytes )
|
||||
void QQtBluetoothClient::updateProgress ( qint64 bytes )
|
||||
{
|
||||
Q_UNUSED ( bytes )
|
||||
//pline() << bytes;
|
||||
}
|
||||
|
||||
void QQtSocketBluetoothClient::connectToSingelHost()
|
||||
void QQtBluetoothClient::connectToSingelHost()
|
||||
{
|
||||
if ( !m_uuid.isNull() )
|
||||
{
|
||||
@ -208,7 +208,7 @@ void QQtSocketBluetoothClient::connectToSingelHost()
|
||||
|
||||
|
||||
|
||||
void QQtSocketBluetoothClient::readyReadData()
|
||||
void QQtBluetoothClient::readyReadData()
|
||||
{
|
||||
QByteArray bytes;
|
||||
bytes = readAll();
|
@ -5,13 +5,13 @@
|
||||
#include "qqtprotocol.h"
|
||||
#include "qqt-local.h"
|
||||
|
||||
class QQTSHARED_EXPORT QQtSocketBluetoothClient : public QBluetoothSocket
|
||||
class QQTSHARED_EXPORT QQtBluetoothClient : public QBluetoothSocket
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QQtSocketBluetoothClient ( QBluetoothServiceInfo::Protocol socketType = QBluetoothServiceInfo::RfcommProtocol,
|
||||
explicit QQtBluetoothClient ( QBluetoothServiceInfo::Protocol socketType = QBluetoothServiceInfo::RfcommProtocol,
|
||||
QObject* parent = nullptr );
|
||||
explicit QQtSocketBluetoothClient ( QObject* parent = nullptr );
|
||||
explicit QQtBluetoothClient ( QObject* parent = nullptr );
|
||||
|
||||
/**
|
||||
* @brief setServiceInfo
|
@ -1,4 +1,4 @@
|
||||
#include "qqtsockettcpclient.h"
|
||||
#include "qqttcpclient.h"
|
||||
|
||||
#include <QTcpSocket>
|
||||
#include <QHostInfo>
|
||||
@ -6,7 +6,7 @@
|
||||
#include "qqtnetwork.h"
|
||||
#include "qqtcore.h"
|
||||
|
||||
QQtSocketTcpClient::QQtSocketTcpClient ( QObject* parent ) :
|
||||
QQtTcpClient::QQtTcpClient ( QObject* parent ) :
|
||||
QTcpSocket ( parent )
|
||||
{
|
||||
connect ( this, SIGNAL ( stateChanged ( QAbstractSocket::SocketState ) ), this,
|
||||
@ -43,11 +43,11 @@ QQtSocketTcpClient::QQtSocketTcpClient ( QObject* parent ) :
|
||||
m_protocol = NULL;
|
||||
}
|
||||
|
||||
QQtSocketTcpClient::~QQtSocketTcpClient()
|
||||
QQtTcpClient::~QQtTcpClient()
|
||||
{
|
||||
}
|
||||
|
||||
void QQtSocketTcpClient::installProtocol ( QQtProtocol* stack )
|
||||
void QQtTcpClient::installProtocol ( QQtProtocol* stack )
|
||||
{
|
||||
if ( m_protocol )
|
||||
return;
|
||||
@ -57,7 +57,7 @@ void QQtSocketTcpClient::installProtocol ( QQtProtocol* stack )
|
||||
this, SLOT ( write ( const QByteArray& ) ) );
|
||||
}
|
||||
|
||||
void QQtSocketTcpClient::uninstallProtocol ( QQtProtocol* stack )
|
||||
void QQtTcpClient::uninstallProtocol ( QQtProtocol* stack )
|
||||
{
|
||||
Q_UNUSED ( stack )
|
||||
|
||||
@ -69,12 +69,12 @@ void QQtSocketTcpClient::uninstallProtocol ( QQtProtocol* stack )
|
||||
m_protocol = NULL;
|
||||
}
|
||||
|
||||
QQtProtocol* QQtSocketTcpClient::installedProtocol()
|
||||
QQtProtocol* QQtTcpClient::installedProtocol()
|
||||
{
|
||||
return m_protocol;
|
||||
}
|
||||
|
||||
void QQtSocketTcpClient::SendConnectMessage()
|
||||
void QQtTcpClient::SendConnectMessage()
|
||||
{
|
||||
pline() << isValid() << isOpen() << state();
|
||||
|
||||
@ -98,7 +98,7 @@ void QQtSocketTcpClient::SendConnectMessage()
|
||||
}
|
||||
|
||||
|
||||
int QQtSocketTcpClient::SendDisConnectFromHost()
|
||||
int QQtTcpClient::SendDisConnectFromHost()
|
||||
{
|
||||
pline() << isValid() << isOpen() << state();
|
||||
|
||||
@ -118,17 +118,17 @@ int QQtSocketTcpClient::SendDisConnectFromHost()
|
||||
return true;
|
||||
}
|
||||
|
||||
void QQtSocketTcpClient::domainHostFound()
|
||||
void QQtTcpClient::domainHostFound()
|
||||
{
|
||||
pline();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QQtSocketTcpClient::socketStateChanged
|
||||
* @brief QQtTcpClient::socketStateChanged
|
||||
* @param eSocketState
|
||||
* 状态函数
|
||||
*/
|
||||
void QQtSocketTcpClient::socketStateChanged ( QAbstractSocket::SocketState eSocketState )
|
||||
void QQtTcpClient::socketStateChanged ( QAbstractSocket::SocketState eSocketState )
|
||||
{
|
||||
pline() << eSocketState;
|
||||
|
||||
@ -154,11 +154,11 @@ void QQtSocketTcpClient::socketStateChanged ( QAbstractSocket::SocketState eSock
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QQtSocketTcpClient::socketErrorOccured
|
||||
* @brief QQtTcpClient::socketErrorOccured
|
||||
* @param e
|
||||
* 状态函数
|
||||
*/
|
||||
void QQtSocketTcpClient::socketErrorOccured ( QAbstractSocket::SocketError e )
|
||||
void QQtTcpClient::socketErrorOccured ( QAbstractSocket::SocketError e )
|
||||
{
|
||||
/*
|
||||
* 在错误状态下重新连接其他热点,直到确定连接类型,写入配置文件
|
||||
@ -178,10 +178,10 @@ void QQtSocketTcpClient::socketErrorOccured ( QAbstractSocket::SocketError e )
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QQtSocketTcpClient::socketConnected
|
||||
* @brief QQtTcpClient::socketConnected
|
||||
* 功能接口
|
||||
*/
|
||||
void QQtSocketTcpClient::socketConnected()
|
||||
void QQtTcpClient::socketConnected()
|
||||
{
|
||||
pline() << peerName() << peerAddress().toString() << peerPort();
|
||||
/*
|
||||
@ -191,21 +191,21 @@ void QQtSocketTcpClient::socketConnected()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QQtSocketTcpClient::socketDisconnect
|
||||
* @brief QQtTcpClient::socketDisconnect
|
||||
* 功能接口
|
||||
*/
|
||||
void QQtSocketTcpClient::socketDisconnect()
|
||||
void QQtTcpClient::socketDisconnect()
|
||||
{
|
||||
pline();
|
||||
}
|
||||
|
||||
void QQtSocketTcpClient::updateProgress ( qint64 bytes )
|
||||
void QQtTcpClient::updateProgress ( qint64 bytes )
|
||||
{
|
||||
Q_UNUSED ( bytes )
|
||||
//pline() << bytes;
|
||||
}
|
||||
|
||||
void QQtSocketTcpClient::connectToSingelHost()
|
||||
void QQtTcpClient::connectToSingelHost()
|
||||
{
|
||||
int contype = eConType % m_serverIP.size();
|
||||
QString ip = m_serverIP.at ( contype );
|
||||
@ -215,7 +215,7 @@ void QQtSocketTcpClient::connectToSingelHost()
|
||||
}
|
||||
|
||||
|
||||
void QQtSocketTcpClient::readyReadData()
|
||||
void QQtTcpClient::readyReadData()
|
||||
{
|
||||
QByteArray bytes;
|
||||
bytes = readAll();
|
@ -1,6 +1,6 @@
|
||||
/**************************************************
|
||||
* QQtSocketTcpClient
|
||||
* 在一个工程当中仅仅存在一个实例,通过调用QQtSocketTcpClient实现。
|
||||
* QQtTcpClient
|
||||
* 在一个工程当中仅仅存在一个实例,通过调用QQtTcpClient实现。
|
||||
**************************************************/
|
||||
#ifndef QQT_CLIENT_H
|
||||
#define QQT_CLIENT_H
|
||||
@ -25,12 +25,12 @@
|
||||
* 发送,接收,splitter,dispatcher
|
||||
* 关闭。
|
||||
*/
|
||||
class QQTSHARED_EXPORT QQtSocketTcpClient : public QTcpSocket
|
||||
class QQTSHARED_EXPORT QQtTcpClient : public QTcpSocket
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QQtSocketTcpClient ( QObject* parent = 0 );
|
||||
virtual ~QQtSocketTcpClient();
|
||||
explicit QQtTcpClient ( QObject* parent = 0 );
|
||||
virtual ~QQtTcpClient();
|
||||
|
||||
void SetServerIPAddress ( QStringList ip ) { m_serverIP = ip; }
|
||||
void SetServerPort ( quint32 p = 7079 ) { m_PORT = p; }
|
184
src/network/qqtudpclient.cpp
Normal file
184
src/network/qqtudpclient.cpp
Normal file
@ -0,0 +1,184 @@
|
||||
#include "qqtudpclient.h"
|
||||
|
||||
QQtUdpClient::QQtUdpClient ( QObject* parent ) : QUdpSocket ( parent )
|
||||
{
|
||||
connect ( this, SIGNAL ( stateChanged ( QAbstractSocket::SocketState ) ), this,
|
||||
SLOT ( socketStateChanged ( QAbstractSocket::SocketState ) ) );
|
||||
// connected
|
||||
connect ( this, SIGNAL ( connected() ), this, SLOT ( socketConnected() ) );
|
||||
// disconnected
|
||||
connect ( this, SIGNAL ( disconnected() ), this, SLOT ( socketDisconnect() ) );
|
||||
// domain
|
||||
connect ( this, SIGNAL ( hostFound() ), this, SLOT ( domainHostFound() ) );
|
||||
// error
|
||||
connect ( this, SIGNAL ( error ( QAbstractSocket::SocketError ) ), this,
|
||||
SLOT ( socketErrorOccured ( QAbstractSocket::SocketError ) ) );
|
||||
|
||||
connect ( this, SIGNAL ( readyRead() ), this, SLOT ( readyReadData() ) );
|
||||
|
||||
connect ( this, SIGNAL ( bytesWritten ( qint64 ) ), this, SLOT ( updateProgress ( qint64 ) ) );
|
||||
|
||||
connect ( this, SIGNAL ( bytesWritten ( qint64 ) ), this, SIGNAL ( signalUpdateProgress ( qint64 ) ) );
|
||||
|
||||
m_protocol = NULL;
|
||||
}
|
||||
|
||||
void QQtUdpClient::installProtocol ( QQtUdpProtocol* stack )
|
||||
{
|
||||
if ( m_protocol )
|
||||
return;
|
||||
|
||||
m_protocol = stack;
|
||||
connect ( m_protocol, SIGNAL ( writeDatagram ( QByteArray, QHostAddress, quint16 ) ),
|
||||
this, SLOT ( slotWriteDatagram ( QByteArray, QHostAddress, quint16 ) ) );
|
||||
}
|
||||
|
||||
void QQtUdpClient::uninstallProtocol ( QQtUdpProtocol* stack )
|
||||
{
|
||||
Q_UNUSED ( stack )
|
||||
|
||||
if ( !m_protocol )
|
||||
return;
|
||||
|
||||
disconnect ( m_protocol, SIGNAL ( writeDatagram ( QByteArray, QHostAddress, quint16 ) ),
|
||||
this, SLOT ( slotWriteDatagram ( QByteArray, QHostAddress, quint16 ) ) );
|
||||
m_protocol = NULL;
|
||||
}
|
||||
|
||||
QQtUdpProtocol* QQtUdpClient::installedProtocol()
|
||||
{
|
||||
return m_protocol;
|
||||
}
|
||||
|
||||
void QQtUdpClient::domainHostFound()
|
||||
{
|
||||
pline();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QQtUdpClient::socketStateChanged
|
||||
* @param eSocketState
|
||||
* 状态函数
|
||||
*/
|
||||
void QQtUdpClient::socketStateChanged ( QAbstractSocket::SocketState eSocketState )
|
||||
{
|
||||
pline() << eSocketState;
|
||||
|
||||
switch ( eSocketState )
|
||||
{
|
||||
case QAbstractSocket::HostLookupState:
|
||||
case QAbstractSocket::ConnectingState:
|
||||
break;
|
||||
|
||||
case QAbstractSocket::ConnectedState:
|
||||
break;
|
||||
|
||||
case QAbstractSocket::ClosingState:
|
||||
break;
|
||||
|
||||
case QAbstractSocket::UnconnectedState:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QQtUdpClient::socketErrorOccured
|
||||
* @param e
|
||||
* 状态函数
|
||||
*/
|
||||
void QQtUdpClient::socketErrorOccured ( QAbstractSocket::SocketError e )
|
||||
{
|
||||
/*
|
||||
* 在错误状态下重新连接其他热点,直到确定连接类型,写入配置文件
|
||||
*/
|
||||
pline() << e;
|
||||
|
||||
switch ( e )
|
||||
{
|
||||
case QAbstractSocket::RemoteHostClosedError:
|
||||
break;
|
||||
|
||||
case QAbstractSocket::HostNotFoundError:
|
||||
default:
|
||||
emit signalConnectFail();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QQtUdpClient::socketConnected
|
||||
* 功能接口
|
||||
*/
|
||||
void QQtUdpClient::socketConnected()
|
||||
{
|
||||
pline() << peerName() << peerAddress().toString() << peerPort();
|
||||
/*
|
||||
* 这个步骤,socket重建,资源重新开始
|
||||
*/
|
||||
emit signalConnectSucc();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QQtUdpClient::socketDisconnect
|
||||
* 功能接口
|
||||
*/
|
||||
void QQtUdpClient::socketDisconnect()
|
||||
{
|
||||
pline();
|
||||
}
|
||||
|
||||
void QQtUdpClient::updateProgress ( qint64 bytes )
|
||||
{
|
||||
Q_UNUSED ( bytes )
|
||||
//pline() << bytes;
|
||||
}
|
||||
|
||||
qint64 QQtUdpClient::slotWriteDatagram ( const QByteArray& datagram, const QHostAddress& host, quint16 port )
|
||||
{
|
||||
return writeDatagram ( datagram, host, port );
|
||||
}
|
||||
|
||||
void QQtUdpClient::readyReadData()
|
||||
{
|
||||
/*为什么用while?*/ //Qt4 没有那么高级的一次性读取的接口?有
|
||||
while ( hasPendingDatagrams() )
|
||||
{
|
||||
QByteArray bytes;
|
||||
qint64 maxlen = 0;
|
||||
QHostAddress host;
|
||||
quint16 port;
|
||||
|
||||
#if QT_VERSION > QT_VERSION_DATAGRAM
|
||||
/*能够一次收够一条报文?测试的能。*/
|
||||
QNetworkDatagram datagram = receiveDatagram();
|
||||
/*由于添加了兼容Qt4的代码,以上注释起来。*/
|
||||
|
||||
/*数据无意义 "" -1 在此设置*/
|
||||
datagram.setDestination ( this->localAddress(), this->localPort() );
|
||||
//pline() << "udp sender:" << datagram.senderAddress() << datagram.senderPort();
|
||||
//pline() << "udp receiver:" << datagram.destinationAddress() << datagram.destinationPort();
|
||||
m_protocol->translator ( datagram );
|
||||
|
||||
bytes = datagram.data();
|
||||
host = datagram.senderAddress();
|
||||
port = datagram.senderPort();
|
||||
m_protocol->translator ( bytes, host, port );
|
||||
#else
|
||||
qint64 size = pendingDatagramSize();
|
||||
//pline() << "udp new msg size:" << size;
|
||||
//这里的buf用完, 已经释放。
|
||||
char* data = new char[size + 1]();
|
||||
qint64 len = readDatagram ( data, size, &host, &port );
|
||||
pline() << len;
|
||||
bytes.setRawData ( data, size );
|
||||
delete[] data;
|
||||
|
||||
m_protocol->translator ( bytes, host, port );
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -7,16 +7,19 @@
|
||||
#include "qqtcore.h"
|
||||
|
||||
/*
|
||||
* Udp通信不区分服务器和客户端,都用这个就行啊。操作区别:服务器需要绑定本地端口。
|
||||
* Udp通信客户端
|
||||
*
|
||||
* 和服务器操作区别:服务器需要绑定本地端口。
|
||||
*
|
||||
* 默认情况下,就可以接收发送数据了。在协议里处理接收、发送。
|
||||
* 只有绑定本地IP、端口才能进行接收
|
||||
*/
|
||||
class QQtSocketUdpClient : public QUdpSocket
|
||||
class QQTSHARED_EXPORT QQtUdpClient : public QUdpSocket
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QQtSocketUdpClient ( QObject* parent = nullptr );
|
||||
virtual ~QQtSocketUdpClient() {}
|
||||
explicit QQtUdpClient ( QObject* parent = nullptr );
|
||||
virtual ~QQtUdpClient() {}
|
||||
|
||||
void installProtocol ( QQtUdpProtocol* stack );
|
||||
void uninstallProtocol ( QQtUdpProtocol* stack );
|
@ -25,7 +25,10 @@ public:
|
||||
|
||||
#if QT_VERSION > QT_VERSION_DATAGRAM
|
||||
qint64 writeDatagram ( const QNetworkDatagram& datagram ) {
|
||||
//emit writeDatagram();
|
||||
QByteArray dg = datagram.data();
|
||||
QHostAddress addr = datagram.destinationAddress();
|
||||
int port = datagram.destinationPort();
|
||||
emit writeDatagram ( dg, addr, ( quint16 ) port );
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -56,7 +59,7 @@ protected:
|
||||
public:
|
||||
/**
|
||||
* @brief 协议处理器
|
||||
* @brief 这个处理器是给QQtSocketUdpSocket用的,不需要用户管理。
|
||||
* @brief 这个处理器是给QQtUdpSocket用的,不需要用户管理。
|
||||
* @param Qt通讯口readAll()读到的bytes
|
||||
* @return
|
||||
*/
|
||||
|
@ -549,15 +549,6 @@ void QQtWebAccessManager::localUpdateDownloadProgress ( qint64 bytesReceived, qi
|
||||
emit updateDownloadProgress ( session, bytesReceived, bytesTotal );
|
||||
}
|
||||
|
||||
QQtWebAccessSession* QQtWebAccessSessionManager::newWebAccessSession()
|
||||
{
|
||||
QUuid uuid = QUuid::createUuid();
|
||||
QQtWebAccessSession* session = new QQtWebAccessSession ( this );
|
||||
session->setWebAccessSessionName ( uuid.toString() );
|
||||
m_listWebAccessSession.push_back ( session );
|
||||
return session;
|
||||
}
|
||||
|
||||
QNetworkReply* QQtWebAccessSessionManager::getReplyHandlerByUrl ( QString& strUrl )
|
||||
{
|
||||
QQtWebAccessSession* s0 = NULL;
|
||||
|
@ -159,7 +159,13 @@ public:
|
||||
* user set
|
||||
* @return
|
||||
*/
|
||||
QQtWebAccessSession* newWebAccessSession();
|
||||
QQtWebAccessSession* newWebAccessSession() {
|
||||
QUuid uuid = QUuid::createUuid();
|
||||
QQtWebAccessSession* session = new QQtWebAccessSession ( this );
|
||||
session->setWebAccessSessionName ( uuid.toString() );
|
||||
m_listWebAccessSession.push_back ( session );
|
||||
return session;
|
||||
}
|
||||
|
||||
int getSessionCount() const {
|
||||
return m_listWebAccessSession.count();
|
||||
|
@ -3,12 +3,14 @@
|
||||
|
||||
#include <QtWebSockets/QWebSocket>
|
||||
#include <qqtcore.h>
|
||||
#include <qqt-local.h>
|
||||
|
||||
/**
|
||||
* @brief The QQtWebClient class
|
||||
* QQtWebSocketClient通过安装QQtWebProtocol来实现和RawSocket相似的通信方式。
|
||||
* 暂时不确定QQtWebProtocol是否和QQtProtocol格式相同,所以暂时使用QQtWebProtocol继承QQtProtocol。
|
||||
*/
|
||||
class QQtWebSocketClient : public QWebSocket
|
||||
class QQTSHARED_EXPORT QQtWebSocketClient : public QWebSocket
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -124,8 +124,8 @@ contains (DEFINES, __EXQUISITE__) {
|
||||
}
|
||||
|
||||
#mathml widget
|
||||
#注释:在qqt_header.pri打开 DEFINES += __MATHSUPPORT__
|
||||
contains (DEFINES, __MATHSUPPORT__) {
|
||||
#注释:在qqt_header.pri打开 DEFINES += __MATHWIDGETSUPPORT__
|
||||
contains (DEFINES, __MATHWIDGETSUPPORT__) {
|
||||
contains(QKIT_PRIVATE, WIN32|WIN64) {
|
||||
#mathml
|
||||
contains (DEFINES, QQT_LIBRARY) {
|
||||
@ -138,7 +138,7 @@ contains (DEFINES, __EXQUISITE__) {
|
||||
HEADERS += $$PWD/exquisite/mathml/qtmmlwidget.h
|
||||
}
|
||||
|
||||
contains (DEFINES, __LOGICCAMERA__) {
|
||||
contains (DEFINES, __LOGICCAMERAMODULE__) {
|
||||
#dmmu support
|
||||
#arm mips
|
||||
#TODO: +wince +android +ios +macOS +win +linux
|
||||
|
@ -169,6 +169,9 @@ contains(DEFINES, __QQTCHARTS__) {
|
||||
##################QQtLogSystem Module###############################
|
||||
DEFINES += __QQTLOGSYSTEMSUPPORT__
|
||||
|
||||
###########################################################################
|
||||
###QQtSocketClient多组功能组件。
|
||||
############
|
||||
##################QQt Network Module##################################
|
||||
#包括SerialPort Bluetooth TcpUdp
|
||||
#包括HttpFtp 多路的HttpFtp,QQtAccessManager WebService WebSocket Gumbo
|
||||
@ -266,6 +269,7 @@ contains (DEFINES, __NETWORKSUPPORT__) {
|
||||
##################Exquisite Widgets Module###############################
|
||||
#if you use Exquisite widgets, open this annotation
|
||||
#精美模块,包含不少的精美组件,这个模块可以集中开关。
|
||||
#依赖基础控件
|
||||
DEFINES += __EXQUISITE__
|
||||
contains (DEFINES, __EXQUISITE__) {
|
||||
#if you use QR encode, open this annotation
|
||||
@ -293,16 +297,31 @@ contains (DEFINES, __EXQUISITE__) {
|
||||
}
|
||||
|
||||
##################Mathes Module###############################
|
||||
DEFINES += __MATHSUPPORT__
|
||||
DEFINES += __MATHWIDGETSUPPORT__
|
||||
|
||||
#LOGIC CAMERA PREVIEW
|
||||
#depend on dmmu
|
||||
DEFINES += __LOGICCAMERA__
|
||||
DEFINES += __LOGICCAMERAMODULE__
|
||||
|
||||
#opengl module
|
||||
DEFINES += __OPENGLWIDGETS__
|
||||
}
|
||||
|
||||
########################################################################
|
||||
###这个模块名为高级模块,初始置入QQtSocketServer一组组件。
|
||||
###如果初中级工程师能使用这个模块完成App,那么必定是高分实现力学员。
|
||||
###建议中级以上工程师尝试。2018年4月22日 星期天 11点08分
|
||||
############
|
||||
##################HighGrade Module###############################
|
||||
#if you use HighGrade module, open this annotation
|
||||
#高级模块,包含不少的高级功能组件,这个模块可以集中开关。
|
||||
DEFINES += __HIGHGRADE__
|
||||
#依赖网络模块
|
||||
!contains (DEFINES, __NETWORKSUPPORT__): DEFINES -= __HIGHGRADE__
|
||||
contains (DEFINES, __HIGHGRADE__) {
|
||||
|
||||
}
|
||||
|
||||
#################################################################
|
||||
##library
|
||||
##################################################################
|
||||
@ -388,6 +407,9 @@ defineReplace(qqt_header){
|
||||
$${path}/exquisite/qrcode/qrdecode/zxing/win32/zxing/msvc
|
||||
}
|
||||
|
||||
#highgrade module
|
||||
command += $${path}/highgrade
|
||||
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
|
@ -237,16 +237,14 @@ contains (DEFINES, __NETWORKSUPPORT__) {
|
||||
#tcpudpsocket
|
||||
contains(DEFINES, __TCPUDPSOCKET__){
|
||||
SOURCES += \
|
||||
$$PWD/network/qqtsockettcpclient.cpp \
|
||||
$$PWD/network/qqtsockettcpserver.cpp
|
||||
$$PWD/network/qqttcpclient.cpp
|
||||
HEADERS += \
|
||||
$$PWD/network/qqtsockettcpclient.h \
|
||||
$$PWD/network/qqtsockettcpserver.h
|
||||
$$PWD/network/qqttcpclient.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/network/qqtsocketudpclient.cpp
|
||||
$$PWD/network/qqtudpclient.cpp
|
||||
HEADERS += \
|
||||
$$PWD/network/qqtsocketudpclient.h
|
||||
$$PWD/network/qqtudpclient.h
|
||||
}
|
||||
|
||||
#serialport
|
||||
@ -260,11 +258,9 @@ contains (DEFINES, __NETWORKSUPPORT__) {
|
||||
contains (DEFINES, __BLUETOOTH__) {
|
||||
#bluetooth socket
|
||||
SOURCES += \
|
||||
$$PWD/network/qqtsocketbluetoothclient.cpp \
|
||||
$$PWD/network/qqtsocketbluetoothserver.cpp
|
||||
$$PWD/network/qqtbluetoothclient.cpp
|
||||
HEADERS += \
|
||||
$$PWD/network/qqtsocketbluetoothserver.h \
|
||||
$$PWD/network/qqtsocketbluetoothclient.h
|
||||
$$PWD/network/qqtbluetoothclient.h
|
||||
#bluetooth manager
|
||||
SOURCES += \
|
||||
$$PWD/network/qqtbluetoothmanager.cpp
|
||||
@ -293,12 +289,10 @@ contains (DEFINES, __NETWORKSUPPORT__) {
|
||||
|
||||
contains (DEFINES, __WEBSOCKETSUPPORT__) {
|
||||
SOURCES += \
|
||||
$$PWD/network/qqtwebsocketserver.cpp \
|
||||
$$PWD/network/qqtwebsocketclient.cpp \
|
||||
$$PWD/network/qqtwebsocketprotocol.cpp
|
||||
HEADERS += \
|
||||
$$PWD/network/qqtwebsocketclient.h \
|
||||
$$PWD/network/qqtwebsocketserver.h \
|
||||
$$PWD/network/qqtwebsocketprotocol.h
|
||||
}
|
||||
}
|
||||
@ -401,4 +395,38 @@ contains (DEFINES, __EXQUISITE__) {
|
||||
}
|
||||
}
|
||||
|
||||
contains (DEFINES, __HIGHGRADE__) {
|
||||
SOURCES += \
|
||||
$$PWD/highgrade/qqtprotocolmanager.cpp \
|
||||
$$PWD/highgrade/qqtserverprotocol.cpp \
|
||||
$$PWD/highgrade/qqtudpserverprotocol.cpp
|
||||
HEADERS += \
|
||||
$$PWD/highgrade/qqtprotocolmanager.h \
|
||||
$$PWD/highgrade/qqtserverprotocol.h \
|
||||
$$PWD/highgrade/qqtudpserverprotocol.h
|
||||
|
||||
contains(DEFINES, __TCPUDPSOCKET__){
|
||||
SOURCES += \
|
||||
$$PWD/highgrade/qqttcpserver.cpp
|
||||
HEADERS += \
|
||||
$$PWD/highgrade/qqttcpserver.h
|
||||
SOURCES += \
|
||||
$$PWD/highgrade/qqtudpserver.cpp
|
||||
HEADERS += \
|
||||
$$PWD/highgrade/qqtudpserver.h
|
||||
}
|
||||
contains(DEFINES, __BLUETOOTH) {
|
||||
SOURCES += \
|
||||
$$PWD/highgrade/qqtbluetoothserver.cpp
|
||||
HEADERS += \
|
||||
$$PWD/highgrade/qqtbluetoothserver.h
|
||||
}
|
||||
contains (DEFINES, __WEBSOCKETSUPPORT__) {
|
||||
SOURCES += \
|
||||
$$PWD/highgrade/qqtwebsocketserver.cpp
|
||||
HEADERS += \
|
||||
$$PWD/highgrade/qqtwebsocketserver.h
|
||||
}
|
||||
}
|
||||
|
||||
include ($$PWD/qqt_3rdparty.pri)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user