1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00
This commit is contained in:
tianduanrui 2018-05-31 11:06:43 +08:00
parent e87eb9f5f3
commit 3b511ef966
6 changed files with 74 additions and 25 deletions

View File

@ -109,7 +109,8 @@ greaterThan(QT_VERSION, 4.6.0):SUBDIRS += test/voicetest
mac:lessThan(QT_MAJOR_VERSION , 5):SUBDIRS -= test/voicetest mac:lessThan(QT_MAJOR_VERSION , 5):SUBDIRS -= test/voicetest
#网络创建工具 #网络创建工具
#SUBDIRS += demo/QQtClientCreator #
SUBDIRS += demo/QQtClientCreator
#SUBDIRS += demo/QQtServerCreator #SUBDIRS += demo/QQtServerCreator
#这边是个组合项,客户端和服务器一起的必看 #这边是个组合项,客户端和服务器一起的必看
#SUBDIRS += examples/qqtclientexample #SUBDIRS += examples/qqtclientexample

View File

@ -73,7 +73,9 @@ defineTest(add_dependent_library) {
##need QSYS ##need QSYS
################################################################# #################################################################
#这个编译build pane比较简洁 #这个编译build pane比较简洁
CONFIG += silent #CONFIG += silent
#CONFIG += debug_and_release
#CONFIG += build_all
contains(TEMPLATE, app) { contains(TEMPLATE, app) {
#add base manager对App的处理很少App通过函数基本上能解决所有的事情 #add base manager对App的处理很少App通过函数基本上能解决所有的事情
@ -104,7 +106,7 @@ contains(TEMPLATE, app) {
CONFIG += dll CONFIG += dll
DEFINES += LIB_LIBRARY DEFINES += LIB_LIBRARY
#mingw编译为静态有原因动态库可以编译成功但是无法链接成功。 #mingw编译为静态有原因动态库可以编译成功但是无法链接成功。
#message(Build $${TARGET} LIB_LIBRARY is defined. build) message(Build $${TARGET} LIB_LIBRARY is defined. build)
} else { } else {
#create dynamic lib (important, only occured at builder pro) #create dynamic lib (important, only occured at builder pro)
CONFIG += dll CONFIG += dll

View File

@ -206,7 +206,7 @@ defineReplace(get_add_sdk_work_flow){
command += $$get_add_mac_sdk_fix_building_framework() $$CMD_SEP command += $$get_add_mac_sdk_fix_building_framework() $$CMD_SEP
#command += echo $$libname fix framework success. $$CMD_SEP #command += echo $$libname fix framework success. $$CMD_SEP
} }
command += $$RM_DIR $${LIB_SDK_PWD} $$CMD_SEP #command += $$RM_DIR $${LIB_SDK_PWD} $$CMD_SEP
command += $$MK_DIR $${LIB_SDK_PWD} $$CMD_SEP command += $$MK_DIR $${LIB_SDK_PWD} $$CMD_SEP
command += $$CD $${LIB_SDK_PWD} $$CMD_SEP command += $$CD $${LIB_SDK_PWD} $$CMD_SEP
command += $$get_add_sdk_dir_struct() $$CMD_SEP command += $$get_add_sdk_dir_struct() $$CMD_SEP
@ -437,3 +437,59 @@ defineTest(add_sdk_to_Qt){
message(QQt sdk install here:$${LIB_SDK_PWD}) message(QQt sdk install here:$${LIB_SDK_PWD})
return (1) return (1)
} }
defineTest(del_sdk){
#isEmpty(1):error(del_sdk(libname, libsrcdir, libdstdir) need at last one argument)
contains(QSYS_PRIVATE, macOS) {
#equals(APP_MAJOR_VERSION, 0):message(add_sdk(libname, libsrcdir, libdstdir) macos app major version is "0," have you setted it?)
}
libname = $$1
isEmpty(1):libname = $$TARGET
libname_lower = $$lower($${libname})
#LIB std dir is not same to app std dir
LIB_STD_DIR = $${libname}/$${QSYS_STD_DIR}
#create platform sdk need this
#源代码目录
LIB_SRC_PWD=$$2
isEmpty(2):LIB_SRC_PWD=$${PWD}
#编译目标位置
LIB_DST_DIR=$$DESTDIR
!isEmpty(3):LIB_DST_DIR = $$3
#need use qqt subdir proj
LIB_BUILD_PWD=$${APP_BUILD_ROOT}/$${LIB_STD_DIR}
!isEmpty(LIB_DST_DIR):LIB_BUILD_PWD=$${LIB_BUILD_PWD}/$${LIB_DST_DIR}
#sdk path
LIB_SDK_PWD = $${LIB_SDK_ROOT}/$${LIB_STD_DIR}
#message(QQt sdk install here:$${LIB_SDK_PWD})
#这里不仅仅目标为windows的时候才会转换
#开发Host为Windows的时候都要转换。
#contains(QSYS_PRIVATE, Win32|Windows||Win64) {
equals(QMAKE_HOST.os, Windows) {
APP_BUILD_ROOT~=s,/,\\,g
LIB_SDK_ROOT~=s,/,\\,g
APP_DEPLOY_ROOT~=s,/,\\,g
QSYS_STD_DIR~=s,/,\\,g
LIB_STD_DIR~=s,/,\\,g
LIB_DST_DIR~=s,/,\\,g
LIB_BUILD_PWD~=s,/,\\,g
LIB_SDK_PWD~=s,/,\\,g
}
command += $$RM_DIR $${LIB_SDK_PWD}
#message($$command)
!isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK += $$CMD_SEP
QMAKE_POST_LINK += $$command
export(QMAKE_POST_LINK)
return (1)
}

View File

@ -1,8 +1,5 @@
#include "mainwindow.h" #include "mainwindow.h"
#include "ui_mainwindow.h" #include "ui_mainwindow.h"
#include <qqttcpclient.h> #include <qqttcpclient.h>
MainWindow::MainWindow ( QWidget* parent ) : MainWindow::MainWindow ( QWidget* parent ) :
@ -10,20 +7,15 @@ MainWindow::MainWindow ( QWidget* parent ) :
ui ( new Ui::MainWindow ) ui ( new Ui::MainWindow )
{ {
ui->setupUi ( this ); ui->setupUi ( this );
return;
//setupRealtimeDataDemo ( ui->qwtPlot );
QQtTcpClient t; QQtTcpClient t;
setupRealtimeDataDemo ( ui->qwtPlot );
} }
MainWindow::~MainWindow() MainWindow::~MainWindow()
{ {
delete ui; delete ui;
} }
void MainWindow::setupRealtimeDataDemo ( QwtPlot* qwtplot ) void MainWindow::setupRealtimeDataDemo ( QwtPlot* qwtplot )
{ {
@ -111,8 +103,8 @@ void MainWindow::updatedataSlot()
} }
curve->setSamples ( xdata, ydata ); curve->setSamples ( xdata, ydata );
//curve->attach ( ui->qwtPlot ); curve->attach ( ui->qwtPlot );
//ui->qwtPlot->replot(); ui->qwtPlot->replot();
static double lastFpsKey; static double lastFpsKey;
static int frameCount; static int frameCount;

View File

@ -14,16 +14,11 @@
<string>MainWindow</string> <string>MainWindow</string>
</property> </property>
<widget class="QWidget" name="centralWidget"> <widget class="QWidget" name="centralWidget">
<widget class="QwtPlot" name="qwtPlot" native="true"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="geometry"> <item>
<rect> <widget class="QwtPlot" name="qwtPlot" native="true"/>
<x>40</x> </item>
<y>30</y> </layout>
<width>311</width>
<height>201</height>
</rect>
</property>
</widget>
</widget> </widget>
<widget class="QMenuBar" name="menuBar"> <widget class="QMenuBar" name="menuBar">
<property name="geometry"> <property name="geometry">

View File

@ -179,6 +179,9 @@ App和Lib的目标一直从Build位置持续发布到Deploy位置和SDK位
####多链接技术创造的生产线 ####多链接技术创造的生产线
Multi-link会一直处于App/Lib生产线的控制器地位。 Multi-link会一直处于App/Lib生产线的控制器地位。
Multi-link允许用户自行添加任何依赖项我把一些常用的依赖项添加用pri放在了app-lib里
而这些依赖项的SDK我保存在了百度网盘以方便用户取用用户只需要下载下来解压到自己的LIB_SDK_ROOT里。
网盘地址:....
我计划在LibQQt 3.0的时机将Multi-link合并到master分支进行正式发布。 我计划在LibQQt 3.0的时机将Multi-link合并到master分支进行正式发布。
![Multi-link技术的能力](screenshot/13.png "这是Multi-link技术的能力") ![Multi-link技术的能力](screenshot/13.png "这是Multi-link技术的能力")