Compare commits
197 Commits
63012cd7e4
...
release
| Author | SHA1 | Date | |
|---|---|---|---|
| 75b3bb46ac | |||
| 75c6b5abcc | |||
| 97c6ddeaea | |||
| 235eb2acb8 | |||
| bd5579b8f1 | |||
| 7f820c8f67 | |||
| 9130496887 | |||
| cca2e0f2d7 | |||
| b92a1fa558 | |||
| d4f1c78a6e | |||
| 274fb20103 | |||
| acef4db1db | |||
| 9f84e5c3df | |||
| aa009c36b0 | |||
| 5ae5034145 | |||
| e4340a7215 | |||
| f7eabd1a85 | |||
| 3ca32f4972 | |||
| 68512b6c08 | |||
| 5d32c02b5f | |||
| d0148bf460 | |||
| 76d9604282 | |||
| 3e1768b418 | |||
| 016753fb4d | |||
| 4b7c513f7f | |||
| 0f6bc121aa | |||
| 0ec173d9bb | |||
| cabacdd908 | |||
| f66138593c | |||
| c49454bb03 | |||
| efb5cbe484 | |||
| b71db0530f | |||
| ddc4da54be | |||
| bb645bd71b | |||
| d6cc5f0033 | |||
| 055b8a9480 | |||
| 12664842c7 | |||
| 8fbed9f427 | |||
| e43ae02e48 | |||
| a9b9061475 | |||
| c41e92a9f5 | |||
| b37318a5a5 | |||
| 6f97d849e9 | |||
| 58432fa62e | |||
| 6e4cdccc94 | |||
| aa2ea1eda6 | |||
| e59bf65294 | |||
| 11e665c419 | |||
| 2e5d64f258 | |||
| 1312f950c7 | |||
| 5382c54d6a | |||
| 56b3dcad7c | |||
| 75464792ba | |||
| 8b86f93e38 | |||
| 3e0ec72e7d | |||
| b45bfca826 | |||
| 6a9b1751ac | |||
| ede780249a | |||
| 067839f02b | |||
| da9237e74b | |||
| 905eb77091 | |||
| 2974967790 | |||
| 4a567dbba4 | |||
| 0c7619d00b | |||
| fa4634b0c7 | |||
| 0f1825bf33 | |||
| 562cb280f7 | |||
| 5ec9c22d46 | |||
| d78a1f532b | |||
| 0d9ecc9ceb | |||
| 7baa7916f7 | |||
| 7ecf33a908 | |||
| c3f921ea6a | |||
| 2251caf12c | |||
| c76608abf0 | |||
| 06c99dd105 | |||
| caf149ed28 | |||
| 13a543bfd5 | |||
| 16e52701be | |||
| 09ed9a9907 | |||
| a5d75fec09 | |||
| afd15e20f6 | |||
| 77c2296320 | |||
| 1c8d2d5c5f | |||
| f6a9e44805 | |||
| a5e5c289db | |||
| a49aeda257 | |||
| 79db8ea408 | |||
| c359ba34a6 | |||
| 760c57a843 | |||
| 61316462fa | |||
| 4e3baadd70 | |||
| 8324776fb8 | |||
| 65f3cc0698 | |||
| b72ef08892 | |||
| 8363ad29ef | |||
| ab4f2a3d40 | |||
| 754d46a250 | |||
| ba5a30a7dd | |||
| 50efa51975 | |||
| 8bb52f59fe | |||
| 3acec2297b | |||
| d39488397c | |||
| 97a0bad71d | |||
| f02c38884b | |||
| a195ec4006 | |||
| d15b6ff855 | |||
| bd6e672568 | |||
| 2c9279248d | |||
| e67c1925b1 | |||
| 7741878f3e | |||
| 61e16d4f1b | |||
| 5bd869968e | |||
| 94f1b68b6f | |||
| 86439ae05c | |||
| a64e03b28d | |||
| 9d708342ca | |||
| 265251d47d | |||
| 8962d051ea | |||
| e513e2f16a | |||
| 8ab6a4716f | |||
| ab330967f3 | |||
| 46dd2eeaad | |||
| fdee11cbc0 | |||
| 4dbca6f145 | |||
| 57c19a2e8c | |||
| 14c8a359bd | |||
| e45464f480 | |||
| 892c2e48a3 | |||
| f0340c5d48 | |||
| db37f8b963 | |||
| a7f182a7cb | |||
| b8e4e7203f | |||
| 1010eaf6db | |||
| 007e3db9ef | |||
| dbff7cec26 | |||
| 3c94cce018 | |||
| ab356664e2 | |||
| 2945c07a31 | |||
| 0ffcedb5ef | |||
| 87f49853b2 | |||
| c269dd6b9e | |||
| cb739f61b0 | |||
| 54ad05ffef | |||
| 2857dee71c | |||
| 5abe72697d | |||
| e90f5d23c4 | |||
| c1fa375145 | |||
| 69b0ee9d1a | |||
| b6e86b6160 | |||
| 1384cf3c21 | |||
| 6a84167a58 | |||
| da32c7c723 | |||
| 0418638fc9 | |||
| 8dd574fef1 | |||
| 3137dc7c03 | |||
| a627ea557e | |||
| da939e30c7 | |||
| a8625e2333 | |||
| 8406767c76 | |||
| 7395146bfb | |||
| 09511b6afd | |||
| 2d509afe89 | |||
| fda0983d0b | |||
| 880bda410a | |||
| 3d64351da6 | |||
| 52b00ac0ab | |||
| e3000e5ebc | |||
| d9cb8da8ae | |||
| 7855536959 | |||
| 9bbe763184 | |||
| 68945371f5 | |||
| 5d1706834b | |||
| e3ab26dc4c | |||
| af8c3a44ff | |||
| 4bc671584c | |||
| bed8f9e2f0 | |||
| 72e7b42813 | |||
| 961dd32c69 | |||
| b65f154f29 | |||
| cab5d7334a | |||
| 03442306b9 | |||
| c5b61c619c | |||
| ada132e992 | |||
| 54954c9ae7 | |||
| 2e59133c66 | |||
| 9db04f5aa0 | |||
| 30d1faff9a | |||
| 864940446d | |||
| 36487e636f | |||
| 47fd2bfc8a | |||
| a10ba790f5 | |||
| 446e74a51d | |||
| ef9e75d584 | |||
| 854f1dc3e9 | |||
| 965d845a64 | |||
| 682e493fa3 |
170
CMakeLists.txt
@@ -9,15 +9,84 @@ project(libs)
|
|||||||
set(PIP_CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pip/cmake")
|
set(PIP_CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pip/cmake")
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" "${PIP_CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/qad/cmake")
|
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" "${PIP_CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/qad/cmake")
|
||||||
set(LIBPROJECT 1)
|
set(LIBPROJECT 1)
|
||||||
|
set(_qt_libs )
|
||||||
|
set(_qt_apps )
|
||||||
|
set(_qt_plugs)
|
||||||
|
include(GenerateExportHeader)
|
||||||
include(SDKMacros)
|
include(SDKMacros)
|
||||||
|
include(QADMacros)
|
||||||
include(DeployMacros)
|
include(DeployMacros)
|
||||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
|
||||||
if(NOT DEFINED BUILD_NUMBER)
|
if(NOT DEFINED BUILD_NUMBER)
|
||||||
set(BUILD_NUMBER 9999)
|
set(BUILD_NUMBER 9999)
|
||||||
endif()
|
endif()
|
||||||
set(_COMPANY SHS)
|
if("x${BUILD_NUMBER}" STREQUAL "x")
|
||||||
set(_DOMAIN org.SHS)
|
set(BUILD_NUMBER 0)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
if(STATIC_LIB)
|
||||||
|
set(QAD_LIB_TYPE STATIC)
|
||||||
|
add_definitions(-DQAD_STATIC_DEFINE)
|
||||||
|
set(QAD_LIB_TYPE_MSG "Static")
|
||||||
|
else()
|
||||||
|
set(QAD_LIB_TYPE SHARED)
|
||||||
|
set(QAD_LIB_TYPE_MSG "Shared")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(_QAD_MAJOR 1)
|
||||||
|
set(_QAD_MINOR 9)
|
||||||
|
set(_QAD_REVISION 0)
|
||||||
|
set(_QAD_SUFFIX )
|
||||||
|
set(_QAD_COMPANY SHS)
|
||||||
|
set(_QAD_DOMAIN org.SHS)
|
||||||
|
set(QAD_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/qad/qad_version.h")
|
||||||
|
set_version(QAD
|
||||||
|
MAJOR "${_QAD_MAJOR}"
|
||||||
|
MINOR "${_QAD_MINOR}"
|
||||||
|
REVISION "${_QAD_REVISION}"
|
||||||
|
BUILD "${BUILD_NUMBER}"
|
||||||
|
SUFFIX "${_QAD_SUFFIX}"
|
||||||
|
OUTPUT "${QAD_VERSION_FILE}")
|
||||||
|
set_deploy_property(QAD ${QAD_LIB_TYPE}
|
||||||
|
FULLNAME "${_QAD_DOMAIN}.*"
|
||||||
|
COMPANY "${_QAD_COMPANY}")
|
||||||
|
|
||||||
|
|
||||||
|
if(STATIC_LIB)
|
||||||
|
set(PIQt_LIB_TYPE STATIC)
|
||||||
|
add_definitions(-DPIQt_STATIC_DEFINE)
|
||||||
|
set(PIQt_LIB_TYPE_MSG "Static")
|
||||||
|
else()
|
||||||
|
set(PIQt_LIB_TYPE SHARED)
|
||||||
|
set(PIQt_LIB_TYPE_MSG "Shared")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(_PIQt_MAJOR 1)
|
||||||
|
set(_PIQt_MINOR 0)
|
||||||
|
set(_PIQt_REVISION 0)
|
||||||
|
set(_PIQt_SUFFIX )
|
||||||
|
set(_PIQt_COMPANY SHS)
|
||||||
|
set(_PIQt_DOMAIN org.SHS)
|
||||||
|
if(NOT DEFINED BUILD_NUMBER)
|
||||||
|
set(BUILD_NUMBER 9999)
|
||||||
|
endif()
|
||||||
|
set(PIQt_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/piqt/piqt_version.h")
|
||||||
|
set_version(PIQt
|
||||||
|
MAJOR "${_PIQt_MAJOR}"
|
||||||
|
MINOR "${_PIQt_MINOR}"
|
||||||
|
REVISION "${_PIQt_REVISION}"
|
||||||
|
BUILD "${BUILD_NUMBER}"
|
||||||
|
SUFFIX "${_PIQt_SUFFIX}"
|
||||||
|
OUTPUT "${PIQt_VERSION_FILE}")
|
||||||
|
set_deploy_property(PIQt ${_PIQt_LIB_TYPE}
|
||||||
|
FULLNAME "${_PIQt_DOMAIN}.*"
|
||||||
|
COMPANY "${_PIQt_COMPANY}")
|
||||||
|
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/pip)
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}/pip)
|
||||||
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/qad)
|
||||||
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}/piqt)
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
find_package(MinGW REQUIRED)
|
find_package(MinGW REQUIRED)
|
||||||
else()
|
else()
|
||||||
@@ -42,21 +111,22 @@ if (DEFINED ANDROID_PLATFORM)
|
|||||||
#message("${ANDROID_NDK}/sysroot/usr/include")
|
#message("${ANDROID_NDK}/sysroot/usr/include")
|
||||||
endif()
|
endif()
|
||||||
set(INSTALL_PREFIX "")
|
set(INSTALL_PREFIX "")
|
||||||
set(_plugins_default_ 1)
|
set(_plugins_default_ ON)
|
||||||
if(CMAKE_CROSSCOMPILING)
|
if(CMAKE_CROSSCOMPILING)
|
||||||
if (DEFINED ANDROID_PLATFORM)
|
if (DEFINED ANDROID_PLATFORM)
|
||||||
set(_plugins_default_ 0)
|
set(_plugins_default_ OFF)
|
||||||
set(INSTALL_PREFIX "${CMAKE_FIND_ROOT_PATH}/")
|
set(INSTALL_PREFIX "${CMAKE_FIND_ROOT_PATH}/")
|
||||||
else()
|
else()
|
||||||
set(INSTALL_PREFIX "${CMAKE_STAGING_PREFIX}")
|
set(INSTALL_PREFIX "${CMAKE_STAGING_PREFIX}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
option(CROSSTOOLS "Crosstools minimal build" 0)
|
option(CROSSTOOLS "Crosstools minimal build" OFF)
|
||||||
option(LIB "System install" 1)
|
option(LIB "System install" ON)
|
||||||
option(QGLVIEW "Build QGLview library and utils" 0)
|
option(QGLVIEW "Build QGLview library and utils" OFF)
|
||||||
option(QGLENGINE "Build QGLENGINE library and utils" 0)
|
option(QGLENGINE "Build QGLENGINE library and utils" OFF)
|
||||||
option(UTILS "Build various utils" ${_plugins_default_})
|
option(UTILS "Build various utils" ${_plugins_default_})
|
||||||
option(DESIGNER_PLUGINS "Build qt designer plugins" ${_plugins_default_})
|
option(DESIGNER_PLUGINS "Build qt designer plugins" ${_plugins_default_})
|
||||||
|
option(STATIC_LIB OFF)
|
||||||
if (CROSSTOOLS)
|
if (CROSSTOOLS)
|
||||||
set(LIB 1)
|
set(LIB 1)
|
||||||
set(QGLVIEW 0)
|
set(QGLVIEW 0)
|
||||||
@@ -74,7 +144,6 @@ endif()
|
|||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
set(PIP_LIBRARY pip)
|
set(PIP_LIBRARY pip)
|
||||||
set(PIP_FOLDERS "." "core" "containers" "thread" "system" "io_devices" "io_utils" "console" "math" "code" "geo" "resources" "opencl" "crypt" "introspection" "concurrent" "cloud")
|
|
||||||
set(PIP_INCLUDES)
|
set(PIP_INCLUDES)
|
||||||
|
|
||||||
if(LIB)
|
if(LIB)
|
||||||
@@ -98,9 +167,6 @@ else()
|
|||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\", \"lib\" and \"include\"")
|
message(STATUS "Install ${PROJECT_NAME} to local \"bin\", \"lib\" and \"include\"")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
foreach(F ${PIP_FOLDERS})
|
|
||||||
list(APPEND PIP_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/pip/src_main/${F}")
|
|
||||||
endforeach(F)
|
|
||||||
#message(${PIP_INCLUDES})
|
#message(${PIP_INCLUDES})
|
||||||
if(CMAKE_CROSSCOMPILING OR (DEFINED ANDROID_PLATFORM))
|
if(CMAKE_CROSSCOMPILING OR (DEFINED ANDROID_PLATFORM))
|
||||||
set(PIP_CMG "pip_cmg")
|
set(PIP_CMG "pip_cmg")
|
||||||
@@ -116,6 +182,7 @@ if(WIN32)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(QAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/qad)
|
set(QAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/qad)
|
||||||
|
set(ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
if (CROSSTOOLS)
|
if (CROSSTOOLS)
|
||||||
|
|
||||||
@@ -140,18 +207,26 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if(UTILS)
|
#if(UTILS)
|
||||||
message(STATUS "Building with utils")
|
# message(STATUS "Building with utils")
|
||||||
else()
|
#else()
|
||||||
message(STATUS "Building only libraries")
|
# message(STATUS "Building only libraries")
|
||||||
endif()
|
#endif()
|
||||||
|
|
||||||
add_subdirectory(pip)
|
add_subdirectory(pip)
|
||||||
|
foreach(F ${PIP_MAIN_FOLDERS})
|
||||||
|
list(APPEND PIP_INCLUDES "${F}")
|
||||||
|
endforeach(F)
|
||||||
|
add_subdirectory(cd_utils)
|
||||||
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/cd_utils" "${CMAKE_CURRENT_BINARY_DIR}/cd_utils")
|
||||||
set(_DIRS)
|
set(_DIRS)
|
||||||
if (SomeQtFound)
|
if (SomeQtFound)
|
||||||
message(STATUS "Building Qt-derived targets for ${QtVersions}")
|
#message(STATUS "Building Qt-derived targets for ${QtVersions}")
|
||||||
add_subdirectory(qad)
|
add_subdirectory(qad)
|
||||||
set(_DIRS piqt piqt_utils qcd_utils)
|
include_directories(${qad_includes})
|
||||||
|
add_subdirectory(piqt)
|
||||||
|
include_directories(${piqt_includes})
|
||||||
|
set(_DIRS)
|
||||||
if (Qt5)
|
if (Qt5)
|
||||||
if (QGLVIEW)
|
if (QGLVIEW)
|
||||||
list(APPEND _DIRS qglview)
|
list(APPEND _DIRS qglview)
|
||||||
@@ -162,21 +237,62 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
foreach(_D ${_DIRS})
|
foreach(_D ${_DIRS})
|
||||||
list(APPEND QT_MULTILIB_LIST ${_D})
|
list(APPEND QT_MULTILIB_LIST ${_D})
|
||||||
|
add_subdirectory(${_D})
|
||||||
endforeach(_D)
|
endforeach(_D)
|
||||||
include_directories(piqt)
|
|
||||||
|
macro(align_list _list _out)
|
||||||
|
set(_max_len 0)
|
||||||
|
foreach(_m ${_list})
|
||||||
|
string(LENGTH "${_m}" _clen)
|
||||||
|
if (_clen GREATER _max_len)
|
||||||
|
set(_max_len ${_clen})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
set(${_out})
|
||||||
|
foreach(_m ${_list})
|
||||||
|
set(_am "${_m}")
|
||||||
|
while(TRUE)
|
||||||
|
string(LENGTH "${_am}" _clen)
|
||||||
|
if (_clen GREATER_EQUAL ${_max_len})
|
||||||
|
break()
|
||||||
|
endif()
|
||||||
|
string(APPEND _am " ")
|
||||||
|
endwhile()
|
||||||
|
list(APPEND ${_out} "${_am}")
|
||||||
|
endforeach()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
macro(print_list _list _name)
|
||||||
|
if (NOT "x${_list}" STREQUAL "x")
|
||||||
|
message("")
|
||||||
|
message(" ${_name}:")
|
||||||
|
#align_list("${_list}" _alist)
|
||||||
|
foreach(_m ${_list})
|
||||||
|
message(" * ${_m}")
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
message("----------QAD-----------")
|
||||||
|
message(" Build for ${QtVersions}")
|
||||||
|
message(" QAD Version: ${QAD_VERSION}")
|
||||||
|
message(" QAD Linkage: ${QAD_LIB_TYPE_MSG}")
|
||||||
|
message(" PIQt Version: ${PIQt_VERSION}")
|
||||||
|
message(" PIQt Linkage: ${PIQt_LIB_TYPE_MSG}")
|
||||||
|
print_list("${_qt_libs}" "Libraries")
|
||||||
|
print_list("${_qt_apps}" "Applications")
|
||||||
|
print_list("${_qt_plugs}" "Plugins")
|
||||||
|
message("-----------------------")
|
||||||
|
message("")
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(STATUS "None of Qt found, skip Qt-derived targets")
|
message(STATUS "None of Qt found, skip Qt-derived targets")
|
||||||
endif()
|
endif()
|
||||||
include_directories(cd_utils)
|
|
||||||
list(INSERT _DIRS 0 cd_utils)
|
|
||||||
foreach(_D ${_DIRS})
|
|
||||||
add_subdirectory(${_D})
|
|
||||||
endforeach(_D)
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
foreach(PIP_LT ${PIP_LIBS_TARGETS})
|
foreach(PIP_LT ${PIP_MODULES})
|
||||||
if (SomeQtFound)
|
if (SomeQtFound)
|
||||||
qt_install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pip/lib${PIP_LT}.dll" DESTINATION QtBin)
|
qt_install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pip/lib${PIP_LT}.dll" DESTINATION QtBin)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
49
Dockerfile
@@ -1,49 +0,0 @@
|
|||||||
ARG DOCKER_PREFIX=wapmobil/
|
|
||||||
FROM ${DOCKER_PREFIX}android
|
|
||||||
|
|
||||||
ARG LIBS_BUILD_NUMBER=9999
|
|
||||||
ARG JOBS_COUNT=4
|
|
||||||
WORKDIR /soft
|
|
||||||
#RUN svn co svn://db.shs.com.ru/libs --username peri4 --password a --no-auth-cache --non-interactive --trust-server-cert
|
|
||||||
RUN git clone -b release --depth 1 --recursive https://git.shs.tools/SHS/libs.git
|
|
||||||
|
|
||||||
WORKDIR /soft/build_libs_linux
|
|
||||||
RUN cmake -DICU=0 -DQGLENGINE=1 -DQGLVIEW=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../libs/ \
|
|
||||||
&& make install -j${JOBS_COUNT} && rm -rf * \
|
|
||||||
&& ldconfig
|
|
||||||
|
|
||||||
WORKDIR /soft/build_libs_windows
|
|
||||||
RUN cmake -DCMAKE_INSTALL_PREFIX=/soft/windows -DICU=0 -DLIB=0 -DQGLENGINE=1 -DQGLVIEW=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} -DCMAKE_TOOLCHAIN_FILE=/soft/toolchain-Windows.cmake ../libs/ \
|
|
||||||
&& make install -j${JOBS_COUNT} && rm -rf *
|
|
||||||
|
|
||||||
WORKDIR /soft/build_libs_macos
|
|
||||||
RUN cmake -DCMAKE_INSTALL_PREFIX=/soft/osx -DICU=0 -DLIB=0 -DQGLENGINE=1 -DQGLVIEW=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} -DCMAKE_TOOLCHAIN_FILE=/soft/toolchain-Darwin.cmake ../libs/ \
|
|
||||||
&& make install -j${JOBS_COUNT} && rm -rf *
|
|
||||||
|
|
||||||
ENV _ANDROID_TOOLCHAIN=/usr/lib/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake
|
|
||||||
ENV _CUR_ABI=armeabi-v7a
|
|
||||||
WORKDIR /soft/build_libs_android_${_CUR_ABI}
|
|
||||||
RUN cmake -DCMAKE_INSTALL_PREFIX=/soft/android/${_CUR_ABI} -DICU=0 -DLIB=0 -DQGLENGINE=0 -DQGLVIEW=0 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} -DCMAKE_TOOLCHAIN_FILE=${_ANDROID_TOOLCHAIN} -DQt5_DIR=/soft/android/qt/lib/cmake/Qt5 -DANDROID_PLATFORM=${NDK_PLATFORM} -DANDROID_ABI=${_CUR_ABI} ../libs/ \
|
|
||||||
&& make install -j${JOBS_COUNT} && rm -rf *
|
|
||||||
|
|
||||||
ENV _CUR_ABI=arm64-v8a
|
|
||||||
WORKDIR /soft/build_libs_android_${_CUR_ABI}
|
|
||||||
RUN cmake -DCMAKE_INSTALL_PREFIX=/soft/android/${_CUR_ABI} -DICU=0 -DLIB=0 -DQGLENGINE=0 -DQGLVIEW=0 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} -DCMAKE_TOOLCHAIN_FILE=${_ANDROID_TOOLCHAIN} -DQt5_DIR=/soft/android/qt/lib/cmake/Qt5 -DANDROID_PLATFORM=${NDK_PLATFORM} -DANDROID_ABI=${_CUR_ABI} ../libs/ \
|
|
||||||
&& make install -j${JOBS_COUNT} && rm -rf *
|
|
||||||
|
|
||||||
ENV _CUR_ABI=x86
|
|
||||||
WORKDIR /soft/build_libs_android_${_CUR_ABI}
|
|
||||||
RUN cmake -DCMAKE_INSTALL_PREFIX=/soft/android/${_CUR_ABI} -DICU=0 -DLIB=0 -DQGLENGINE=0 -DQGLVIEW=0 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} -DCMAKE_TOOLCHAIN_FILE=${_ANDROID_TOOLCHAIN} -DQt5_DIR=/soft/android/qt/lib/cmake/Qt5 -DANDROID_PLATFORM=${NDK_PLATFORM} -DANDROID_ABI=${_CUR_ABI} ../libs/ \
|
|
||||||
&& make install -j${JOBS_COUNT} && rm -rf *
|
|
||||||
|
|
||||||
ENV _CUR_ABI=x86_64
|
|
||||||
WORKDIR /soft/build_libs_android_${_CUR_ABI}
|
|
||||||
RUN cmake -DCMAKE_INSTALL_PREFIX=/soft/android/${_CUR_ABI} -DICU=0 -DLIB=0 -DQGLENGINE=0 -DQGLVIEW=0 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} -DCMAKE_TOOLCHAIN_FILE=${_ANDROID_TOOLCHAIN} -DQt5_DIR=/soft/android/qt/lib/cmake/Qt5 -DANDROID_PLATFORM=${NDK_PLATFORM} -DANDROID_ABI=${_CUR_ABI} ../libs/ \
|
|
||||||
&& make install -j${JOBS_COUNT} && rm -rf *
|
|
||||||
|
|
||||||
WORKDIR /soft/src
|
|
||||||
|
|
||||||
# examples
|
|
||||||
# docker build --no-cache -t libs .
|
|
||||||
# cd <your_project_dir>
|
|
||||||
# docker run --rm -it -v $(pwd):/soft/src libs bash
|
|
||||||
36
Jenkinsfile
vendored
@@ -5,15 +5,20 @@ def build_docker(name) {
|
|||||||
if (env.DOCKER_PREFIX) {
|
if (env.DOCKER_PREFIX) {
|
||||||
pref = "--build-arg DOCKER_PREFIX=${env.DOCKER_PREFIX}/"
|
pref = "--build-arg DOCKER_PREFIX=${env.DOCKER_PREFIX}/"
|
||||||
}
|
}
|
||||||
def args = "${pref} --build-arg LIBS_BUILD_NUMBER=${env.BUILD_NUMBER} --build-arg JOBS_COUNT=4"
|
def jobs = 4
|
||||||
|
if (env.JOBS_COUNT) {
|
||||||
|
jobs = "${env.JOBS_COUNT}"
|
||||||
|
}
|
||||||
|
def args = "${pref} --build-arg LIBS_BUILD_NUMBER=${env.BUILD_NUMBER} --build-arg JOBS_COUNT=${jobs}"
|
||||||
dir ("docker/${image}") {
|
dir ("docker/${image}") {
|
||||||
//echo "build ${image} ${args}"
|
|
||||||
sh "docker build ${args} --no-cache -t ${image} ."
|
sh "docker build ${args} --no-cache -t ${image} ."
|
||||||
}
|
}
|
||||||
return "\n - ${image}"
|
return "\n - ${image}"
|
||||||
}
|
}
|
||||||
node {
|
node {
|
||||||
|
stage("checkout") {
|
||||||
checkout scm
|
checkout scm
|
||||||
|
}
|
||||||
def _envmap = [:]
|
def _envmap = [:]
|
||||||
def _env = sh(script: "env", returnStdout: true).trim().split("\n")
|
def _env = sh(script: "env", returnStdout: true).trim().split("\n")
|
||||||
_env.each{ l ->
|
_env.each{ l ->
|
||||||
@@ -22,15 +27,36 @@ node {
|
|||||||
def _v = l.substring(_ind + 1);
|
def _v = l.substring(_ind + 1);
|
||||||
_envmap["${_n}"] = "${_v}";
|
_envmap["${_n}"] = "${_v}";
|
||||||
}
|
}
|
||||||
//println "done!"
|
|
||||||
//println "${_envmap}"
|
|
||||||
def _msg = "Built images:"
|
def _msg = "Built images:"
|
||||||
def platforms = ['debian', 'osx', 'windows', 'android', 'pi']
|
def platforms = ['debian', 'osx', 'windows', 'android', 'pi']
|
||||||
for (int i = 0; i < platforms.size(); ++i) {
|
for (int i = 0; i < platforms.size(); ++i) {
|
||||||
//echo "check BUILD_${platforms[i]} -> ${_v}"
|
|
||||||
if (_envmap["BUILD_${platforms[i]}"] == "1") {
|
if (_envmap["BUILD_${platforms[i]}"] == "1") {
|
||||||
|
stage("${platforms[i]}-libs") {
|
||||||
_msg += build_docker("${platforms[i]}")
|
_msg += build_docker("${platforms[i]}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
sh "docker system prune -f"
|
||||||
echo "${_msg}"
|
echo "${_msg}"
|
||||||
}
|
}
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'master'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage("PIP doc") {
|
||||||
|
steps {
|
||||||
|
checkout scm
|
||||||
|
sh "rm -rf share"
|
||||||
|
sh "rm -vf *.zip"
|
||||||
|
sh "mkdir -p build"
|
||||||
|
sh "cd build && cmake -DLIB=0 -DCMAKE_INSTALL_PREFIX=`pwd` ../"
|
||||||
|
sh "cd build && make doc"
|
||||||
|
sh "cd share/doc && zip -r ../../pip_doc.zip pip"
|
||||||
|
sh "cp share/doc/pip/html/pip.qch ./"
|
||||||
|
archiveArtifacts 'pip_doc.zip'
|
||||||
|
archiveArtifacts 'pip.qch'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,35 +1,107 @@
|
|||||||
|
|
||||||
macro(sdk_install _DIR _TARGET _H_FILES _QM_FILES)
|
macro(sdk_install _DIR IS_APP _TARGET _H_FILES _QM_FILES)
|
||||||
#message("QM=${_QM_FILES}")
|
#message("QM=${_QM_FILES}")
|
||||||
|
if((NOT ${IS_APP}) AND (NOT "${_H_FILES}" STREQUAL ""))
|
||||||
if(LIB)
|
if(LIB)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
if(NOT "x${_H_FILES}" STREQUAL "x")
|
|
||||||
install(FILES ${_H_FILES} DESTINATION ${MINGW_INCLUDE}/${_DIR})
|
install(FILES ${_H_FILES} DESTINATION ${MINGW_INCLUDE}/${_DIR})
|
||||||
|
else()
|
||||||
|
install(FILES ${_H_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
else()
|
||||||
|
install(FILES ${_H_FILES} DESTINATION include/${_DIR})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if (NOT "${_TARGET}" STREQUAL "")
|
||||||
|
if(LIB)
|
||||||
|
if(WIN32)
|
||||||
|
if (${IS_APP})
|
||||||
|
qt_install(TARGETS ${_TARGET} DESTINATION ${MINGW_BIN})
|
||||||
|
qt_install(TARGETS ${_TARGET} DESTINATION QtBin)
|
||||||
|
else()
|
||||||
qt_install(TARGETS ${_TARGET} ARCHIVE DESTINATION ${MINGW_LIB})
|
qt_install(TARGETS ${_TARGET} ARCHIVE DESTINATION ${MINGW_LIB})
|
||||||
qt_install(TARGETS ${_TARGET} RUNTIME DESTINATION ${MINGW_BIN})
|
qt_install(TARGETS ${_TARGET} RUNTIME DESTINATION ${MINGW_BIN})
|
||||||
qt_install(TARGETS ${_TARGET} RUNTIME DESTINATION QtBin)
|
qt_install(TARGETS ${_TARGET} RUNTIME DESTINATION QtBin)
|
||||||
else()
|
|
||||||
if (NOT "x${_H_FILES}" STREQUAL "x")
|
|
||||||
install(FILES ${_H_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${_DIR})
|
|
||||||
endif()
|
endif()
|
||||||
|
else()
|
||||||
|
if (${IS_APP})
|
||||||
|
qt_install(TARGETS ${_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
|
else()
|
||||||
qt_install(TARGETS ${_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
qt_install(TARGETS ${_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
if(NOT "x${_QM_FILES}" STREQUAL "x")
|
if(NOT "x${_QM_FILES}" STREQUAL "x")
|
||||||
qt_install(LANG ${_QM_FILES} DESTINATION QtLang)
|
qt_install(LANG ${_QM_FILES} DESTINATION QtLang)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
if(NOT "x${_H_FILES}" STREQUAL "x")
|
if(${IS_APP})
|
||||||
install(FILES ${_H_FILES} DESTINATION include/${_DIR})
|
qt_install(TARGETS ${_TARGET} DESTINATION bin)
|
||||||
endif()
|
else()
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
qt_install(TARGETS ${_TARGET} RUNTIME DESTINATION bin)
|
qt_install(TARGETS ${_TARGET} RUNTIME DESTINATION bin)
|
||||||
qt_install(TARGETS ${_TARGET} ARCHIVE DESTINATION lib)
|
qt_install(TARGETS ${_TARGET} ARCHIVE DESTINATION lib)
|
||||||
else()
|
else()
|
||||||
qt_install(TARGETS ${_TARGET} DESTINATION lib)
|
qt_install(TARGETS ${_TARGET} DESTINATION lib)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
if(NOT "x${_QM_FILES}" STREQUAL "x")
|
if(NOT "x${_QM_FILES}" STREQUAL "x")
|
||||||
qt_install(LANG ${_QM_FILES} DESTINATION lang)
|
qt_install(LANG ${_QM_FILES} DESTINATION lang)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
macro(copy_to_parent _inc_var)
|
||||||
|
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
||||||
|
set(_qt_libs ${_qt_libs} PARENT_SCOPE)
|
||||||
|
set(_qt_apps ${_qt_apps} PARENT_SCOPE)
|
||||||
|
set(_qt_plugs ${_qt_plugs} PARENT_SCOPE)
|
||||||
|
if (NOT "x${_inc_var}" STREQUAL "x")
|
||||||
|
set(${_inc_var} ${${_inc_var}} PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
if (LIB)
|
||||||
|
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
macro(add_directories_with_include multilib_prefix)
|
||||||
|
set(DIRS)
|
||||||
|
file(GLOB _dl "[^.]*")
|
||||||
|
foreach(_d ${_dl})
|
||||||
|
if(IS_DIRECTORY ${_d})
|
||||||
|
list(APPEND DIRS ${_d})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
set(inc_var ${multilib_prefix}includes)
|
||||||
|
set(${inc_var})
|
||||||
|
foreach(_d ${DIRS})
|
||||||
|
get_filename_component(_dname "${_d}" NAME)
|
||||||
|
list(APPEND QT_MULTILIB_LIST ${multilib_prefix}${_dname})
|
||||||
|
list(APPEND ${inc_var} "${_d}")
|
||||||
|
list(APPEND ${inc_var} "${CMAKE_CURRENT_BINARY_DIR}/${_dname}")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
include_directories(${${inc_var}})
|
||||||
|
foreach(_d ${DIRS})
|
||||||
|
add_subdirectory(${_d})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
copy_to_parent(${inc_var})
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
macro(add_directories multilib_prefix)
|
||||||
|
include_directories(${${multilib_prefix}includes})
|
||||||
|
file(GLOB _dl "[^.]*")
|
||||||
|
foreach(_d ${_dl})
|
||||||
|
if(IS_DIRECTORY ${_d})
|
||||||
|
add_subdirectory(${_d})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
copy_to_parent(${multilib_prefix}includes)
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY FIRST)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE FIRST)
|
|
||||||
set(CMAKE_PREFIX_PATH /soft/android/${ANDROID_ABI})
|
|
||||||
list(APPEND CMAKE_FIND_ROOT_PATH ${CMAKE_PREFIX_PATH}/lib)
|
|
||||||
include_directories(${CMAKE_PREFIX_PATH}/include)
|
|
||||||
@@ -1,67 +1,18 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
project(cd_utils)
|
project(cd_utils)
|
||||||
if (NOT LIBPROJECT)
|
find_package(MinGW REQUIRED)
|
||||||
find_package(PIP REQUIRED)
|
|
||||||
option(LIB "System install" 1)
|
|
||||||
option(DEBUG "Build with -g3" 0)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall")
|
|
||||||
if (DEBUG)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
if (MINGW)
|
|
||||||
find_package(MinGW REQUIRED)
|
|
||||||
endif()
|
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${PIP_INCLUDES})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${PIP_INCLUDES})
|
||||||
#file(GLOB HDRS_UTILS "*.h")
|
|
||||||
#file(GLOB CPPS_UTILS "*.cpp")
|
|
||||||
file(GLOB CPPS_UTILS "cdutils_*.cpp")
|
file(GLOB CPPS_UTILS "cdutils_*.cpp")
|
||||||
file(GLOB HDRS_UTILS "cdutils_*.h")
|
file(GLOB HDRS_UTILS "cdutils_*.h")
|
||||||
if (DEFINED ENV{QNX_HOST})
|
add_library(${PROJECT_NAME} SHARED ${CPPS_UTILS} ${HDRS_UTILS})
|
||||||
add_library(${PROJECT_NAME} STATIC ${CPPS_UTILS} ${HDRS_UTILS})
|
|
||||||
else()
|
|
||||||
add_library(${PROJECT_NAME} SHARED ${CPPS_UTILS} ${HDRS_UTILS})
|
|
||||||
endif()
|
|
||||||
target_link_libraries(${PROJECT_NAME} ${PIP_LIBRARY})
|
target_link_libraries(${PROJECT_NAME} ${PIP_LIBRARY})
|
||||||
|
generate_export_header(${PROJECT_NAME})
|
||||||
# # Apple crosscompiling rpath patch
|
list(APPEND HDRS_UTILS "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_export.h")
|
||||||
# if (APPLE AND CMAKE_CROSSCOMPILING AND CMAKE_MACOSX_RPATH)
|
|
||||||
# foreach(_RP ${CMAKE_INSTALL_RPATH})
|
|
||||||
# add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
|
||||||
# COMMAND "${CMAKE_INSTALL_NAME_TOOL}"
|
|
||||||
# "-add_rpath" "${_RP}"
|
|
||||||
# "$<TARGET_FILE_DIR:${PROJECT_NAME}>/$<TARGET_FILE_NAME:${PROJECT_NAME}>"
|
|
||||||
# COMMENT "Add to ${PROJECT_NAME} rpath \"${_RP}\"")
|
|
||||||
# endforeach()
|
|
||||||
# endif()
|
|
||||||
|
|
||||||
add_executable(cdutilstest "cdutilstest.cpp" "cdtest.h")
|
add_executable(cdutilstest "cdutilstest.cpp" "cdtest.h")
|
||||||
target_link_libraries(cdutilstest ${PIP_LIBRARY} ${PROJECT_NAME})
|
target_link_libraries(cdutilstest ${PIP_LIBRARY} ${PROJECT_NAME})
|
||||||
message(STATUS "Building ${PROJECT_NAME}")
|
message(STATUS "Building ${PROJECT_NAME}")
|
||||||
|
|
||||||
if(NOT LIBPROJECT)
|
|
||||||
if(LIB)
|
|
||||||
if(WIN32)
|
|
||||||
if(MINGW)
|
|
||||||
set(CMAKE_INSTALL_PREFIX ${MINGW_DIR})
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
if (DEFINED ANDROID_PLATFORM)
|
|
||||||
set(CMAKE_INSTALL_PREFIX ${ANDROID_SYSTEM_LIBRARY_PATH}/usr)
|
|
||||||
else()
|
|
||||||
if(CMAKE_CROSSCOMPILING)
|
|
||||||
set(CMAKE_INSTALL_PREFIX ${CMAKE_STAGING_PREFIX})
|
|
||||||
else()
|
|
||||||
set(CMAKE_INSTALL_PREFIX ${INSTALL_PREFIX}/usr/local)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
|
||||||
else()
|
|
||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\", \"lib\" and \"include\"")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(LIB)
|
if(LIB)
|
||||||
list(APPEND _ALL_TARGETS ${PROJECT_NAME})
|
list(APPEND _ALL_TARGETS ${PROJECT_NAME})
|
||||||
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
||||||
|
|||||||
@@ -21,12 +21,13 @@
|
|||||||
#define CDUTILS_C_H
|
#define CDUTILS_C_H
|
||||||
|
|
||||||
#include "cdutils_interface.h"
|
#include "cdutils_interface.h"
|
||||||
|
#include "cd_utils_export.h"
|
||||||
|
|
||||||
|
|
||||||
namespace CDUtils {
|
namespace CDUtils {
|
||||||
|
|
||||||
|
|
||||||
class CInterface: public Interface
|
class CD_UTILS_EXPORT CInterface: public Interface
|
||||||
{
|
{
|
||||||
PIOBJECT_SUBCLASS(CInterface, Interface)
|
PIOBJECT_SUBCLASS(CInterface, Interface)
|
||||||
public:
|
public:
|
||||||
@@ -40,6 +41,6 @@ public:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern CDUtils::CInterface C;
|
extern CD_UTILS_EXPORT CDUtils::CInterface C;
|
||||||
|
|
||||||
#endif // CDUTILS_C_H
|
#endif // CDUTILS_C_H
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include "cdutils_protocol.h"
|
#include "cdutils_protocol.h"
|
||||||
#include "piconnection.h"
|
#include "piconnection.h"
|
||||||
#include "pidatatransfer.h"
|
#include "pidatatransfer.h"
|
||||||
|
#include "cd_utils_export.h"
|
||||||
|
|
||||||
|
|
||||||
namespace CDUtils {
|
namespace CDUtils {
|
||||||
@@ -31,7 +32,7 @@ namespace CDUtils {
|
|||||||
class CDCore;
|
class CDCore;
|
||||||
|
|
||||||
|
|
||||||
class __Core_Initializer__ {
|
class CD_UTILS_EXPORT __Core_Initializer__ {
|
||||||
public:
|
public:
|
||||||
__Core_Initializer__();
|
__Core_Initializer__();
|
||||||
~__Core_Initializer__();
|
~__Core_Initializer__();
|
||||||
@@ -40,7 +41,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class CDCore: public PIObject
|
class CD_UTILS_EXPORT CDCore: public PIObject
|
||||||
{
|
{
|
||||||
PIOBJECT(CDUtils::CDCore)
|
PIOBJECT(CDUtils::CDCore)
|
||||||
friend class __Core_Initializer__;
|
friend class __Core_Initializer__;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include "cdutils_types.h"
|
#include "cdutils_types.h"
|
||||||
#include "piobject.h"
|
#include "piobject.h"
|
||||||
|
#include "cd_utils_export.h"
|
||||||
|
|
||||||
|
|
||||||
namespace CDUtils {
|
namespace CDUtils {
|
||||||
@@ -29,7 +30,7 @@ namespace CDUtils {
|
|||||||
class CDCore;
|
class CDCore;
|
||||||
|
|
||||||
|
|
||||||
class Interface: public PIObject
|
class CD_UTILS_EXPORT Interface: public PIObject
|
||||||
{
|
{
|
||||||
PIOBJECT(CDUtils::Interface)
|
PIOBJECT(CDUtils::Interface)
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -21,12 +21,13 @@
|
|||||||
#define CDUTILS_K_H
|
#define CDUTILS_K_H
|
||||||
|
|
||||||
#include "cdutils_interface.h"
|
#include "cdutils_interface.h"
|
||||||
|
#include "cd_utils_export.h"
|
||||||
|
|
||||||
|
|
||||||
namespace CDUtils {
|
namespace CDUtils {
|
||||||
|
|
||||||
|
|
||||||
class KInterface: public Interface
|
class CD_UTILS_EXPORT KInterface: public Interface
|
||||||
{
|
{
|
||||||
PIOBJECT_SUBCLASS(KInterface, Interface)
|
PIOBJECT_SUBCLASS(KInterface, Interface)
|
||||||
public:
|
public:
|
||||||
@@ -41,6 +42,6 @@ public:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern CDUtils::KInterface K;
|
extern CD_UTILS_EXPORT CDUtils::KInterface K;
|
||||||
|
|
||||||
#endif // CDUTILS_K_H
|
#endif // CDUTILS_K_H
|
||||||
|
|||||||
@@ -21,12 +21,13 @@
|
|||||||
#define CDUTILS_M_H
|
#define CDUTILS_M_H
|
||||||
|
|
||||||
#include "cdutils_interface.h"
|
#include "cdutils_interface.h"
|
||||||
|
#include "cd_utils_export.h"
|
||||||
|
|
||||||
|
|
||||||
namespace CDUtils {
|
namespace CDUtils {
|
||||||
|
|
||||||
|
|
||||||
class MInterface: public Interface
|
class CD_UTILS_EXPORT MInterface: public Interface
|
||||||
{
|
{
|
||||||
PIOBJECT_SUBCLASS(MInterface, Interface)
|
PIOBJECT_SUBCLASS(MInterface, Interface)
|
||||||
public:
|
public:
|
||||||
@@ -50,6 +51,6 @@ private:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern CDUtils::MInterface M;
|
extern CD_UTILS_EXPORT CDUtils::MInterface M;
|
||||||
|
|
||||||
#endif // CDUTILS_M_H
|
#endif // CDUTILS_M_H
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#ifndef CDUTILS_PARSER_H
|
#ifndef CDUTILS_PARSER_H
|
||||||
#define CDUTILS_PARSER_H
|
#define CDUTILS_PARSER_H
|
||||||
|
|
||||||
|
#include "cd_utils_export.h"
|
||||||
|
|
||||||
class PIIODevice;
|
class PIIODevice;
|
||||||
|
|
||||||
@@ -29,7 +30,7 @@ class CDSection;
|
|||||||
|
|
||||||
namespace CDParser {
|
namespace CDParser {
|
||||||
|
|
||||||
CDSection parse(PIIODevice * d, int cdsection_type);
|
CD_UTILS_EXPORT CDSection parse(PIIODevice * d, int cdsection_type);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
#ifndef CDUTILS_PROTOCOL_H
|
#ifndef CDUTILS_PROTOCOL_H
|
||||||
#define CDUTILS_PROTOCOL_H
|
#define CDUTILS_PROTOCOL_H
|
||||||
|
|
||||||
#include "pibytearray.h"
|
#include "pistring.h"
|
||||||
|
#include "cd_utils_export.h"
|
||||||
|
|
||||||
namespace CDUtils {
|
namespace CDUtils {
|
||||||
|
|
||||||
@@ -48,12 +49,12 @@ namespace CDUtils {
|
|||||||
|
|
||||||
# pragma pack(push,1)
|
# pragma pack(push,1)
|
||||||
|
|
||||||
struct PacketHeader {
|
struct CD_UTILS_EXPORT PacketHeader {
|
||||||
int type; // CDPacketType
|
int type; // CDPacketType
|
||||||
int session_id;
|
int session_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PacketKDirectChange {
|
struct CD_UTILS_EXPORT PacketKDirectChange {
|
||||||
PIDeque<int> path;
|
PIDeque<int> path;
|
||||||
PIString value;
|
PIString value;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -356,9 +356,9 @@ int CDSection::sectionsCount() const {
|
|||||||
|
|
||||||
PIStringList CDSection::index_names() const {
|
PIStringList CDSection::index_names() const {
|
||||||
PIStringList ret;
|
PIStringList ret;
|
||||||
PIMap<int, CDType>::const_iterator i;
|
auto i = cd.makeIterator();
|
||||||
for (i = cd.begin(); i != cd.end(); ++i)
|
while (i.next())
|
||||||
ret << i->second.name();
|
ret << i.value().name();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -387,15 +387,14 @@ CDType & CDSection::getByName(const PIString & name_) {
|
|||||||
int dv = 0;
|
int dv = 0;
|
||||||
if (isd) dv = np[i].toInt();
|
if (isd) dv = np[i].toInt();
|
||||||
ns = 0;
|
ns = 0;
|
||||||
PIMap<int, CDSection>::iterator it;
|
auto it = cs->s.makeIterator();
|
||||||
//piCout << np[i] << isd << dv;
|
while (it.next()) {
|
||||||
for (it = cs->s.begin(); it != cs->s.end(); ++it) {
|
|
||||||
bool f = false;
|
bool f = false;
|
||||||
if (isd) f = (dv == it.key());
|
if (isd) f = (dv == it.key());
|
||||||
else f = (np[i] == it.value().alias);
|
else f = (np[i] == it.value().alias);
|
||||||
//piCout << "s..." << it.key() << it.value().alias << f;
|
//piCout << "s..." << it.key() << it.value().alias << f;
|
||||||
if (f) {
|
if (f) {
|
||||||
ns = &(it.value());
|
ns = &(it.valueRef());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -403,13 +402,13 @@ CDType & CDSection::getByName(const PIString & name_) {
|
|||||||
if (!ns) return null;
|
if (!ns) return null;
|
||||||
cs = ns;
|
cs = ns;
|
||||||
}
|
}
|
||||||
PIMap<int, CDType>::iterator it;
|
|
||||||
if (np.back().isEmpty()) return null;
|
if (np.back().isEmpty()) return null;
|
||||||
bool isd = np.back()[0].isDigit() || (np.back()[0] == '-');
|
bool isd = np.back()[0].isDigit() || (np.back()[0] == '-');
|
||||||
int dv = 0;
|
int dv = 0;
|
||||||
if (isd) dv = np.back().toInt();
|
if (isd) dv = np.back().toInt();
|
||||||
//piCout << np.back() << isd << dv;
|
//piCout << np.back() << isd << dv;
|
||||||
for (it = cs->cd.begin(); it != cs->cd.end(); ++it) {
|
auto it = cs->cd.makeIterator();
|
||||||
|
while (it.next()) {
|
||||||
bool f = false;
|
bool f = false;
|
||||||
if (isd) f = (dv == it.key());
|
if (isd) f = (dv == it.key());
|
||||||
else f = (np.back() == it.value().name());
|
else f = (np.back() == it.value().name());
|
||||||
@@ -446,9 +445,9 @@ void CDSection::write(PIIODevice * d, const PIString & prefix) {
|
|||||||
d->write(l.toUTF8());
|
d->write(l.toUTF8());
|
||||||
l = "alias = " + alias + " \n";
|
l = "alias = " + alias + " \n";
|
||||||
d->write(l.toUTF8());
|
d->write(l.toUTF8());
|
||||||
PIMap<int, CDType>::iterator i;
|
auto i = cd.makeIterator();
|
||||||
for (i = cd.begin(); i != cd.end(); ++i) {
|
while (i.next()) {
|
||||||
CDType & ck(i.value());
|
const CDType & ck(i.value());
|
||||||
if (ck.cd_type() != cd_type_) continue;
|
if (ck.cd_type() != cd_type_) continue;
|
||||||
switch (cd_type_) {
|
switch (cd_type_) {
|
||||||
case CDType::cdNull: break;
|
case CDType::cdNull: break;
|
||||||
@@ -487,9 +486,9 @@ void CDSection::write(PIIODevice * d, const PIString & prefix) {
|
|||||||
if (!s.isEmpty()) {
|
if (!s.isEmpty()) {
|
||||||
if (prefix.isEmpty()) l = "s";
|
if (prefix.isEmpty()) l = "s";
|
||||||
else l = prefix + ".s";
|
else l = prefix + ".s";
|
||||||
PIMap<int, CDSection>::iterator j;
|
auto j = s.makeIterator();
|
||||||
for (j = s.begin(); j != s.end(); ++j) {
|
while (j.next()) {
|
||||||
j.value().write(d, l + "." + PIString::fromNumber(j.key()));
|
j.valueRef().write(d, l + "." + PIString::fromNumber(j.key()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (prefix.isEmpty()) {
|
if (prefix.isEmpty()) {
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#include "pistring.h"
|
#include "pistring.h"
|
||||||
#include "pimap.h"
|
#include "pimap.h"
|
||||||
#include "pivariant.h"
|
#include "pivariant.h"
|
||||||
|
#include "cd_utils_export.h"
|
||||||
|
|
||||||
class PIIODevice;
|
class PIIODevice;
|
||||||
class PIEvaluator;
|
class PIEvaluator;
|
||||||
@@ -47,7 +48,7 @@ enum MessageType {
|
|||||||
|
|
||||||
typedef PIFlags<UpdateMode> UpdateModeFlags;
|
typedef PIFlags<UpdateMode> UpdateModeFlags;
|
||||||
|
|
||||||
class CDType {
|
class CD_UTILS_EXPORT CDType {
|
||||||
friend class CDSection;
|
friend class CDSection;
|
||||||
friend class CDCore;
|
friend class CDCore;
|
||||||
friend class Interface;
|
friend class Interface;
|
||||||
@@ -112,7 +113,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class CDSection {
|
class CD_UTILS_EXPORT CDSection {
|
||||||
friend class CDCore;
|
friend class CDCore;
|
||||||
friend class Interface;
|
friend class Interface;
|
||||||
friend class XInterface;
|
friend class XInterface;
|
||||||
|
|||||||
@@ -21,12 +21,13 @@
|
|||||||
#define CDUTILS_X_H
|
#define CDUTILS_X_H
|
||||||
|
|
||||||
#include "cdutils_interface.h"
|
#include "cdutils_interface.h"
|
||||||
|
#include "cd_utils_export.h"
|
||||||
|
|
||||||
|
|
||||||
namespace CDUtils {
|
namespace CDUtils {
|
||||||
|
|
||||||
|
|
||||||
class XInterface: public Interface
|
class CD_UTILS_EXPORT XInterface: public Interface
|
||||||
{
|
{
|
||||||
PIOBJECT_SUBCLASS(XInterface, Interface)
|
PIOBJECT_SUBCLASS(XInterface, Interface)
|
||||||
public:
|
public:
|
||||||
@@ -51,6 +52,6 @@ public:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern CDUtils::XInterface X;
|
extern CD_UTILS_EXPORT CDUtils::XInterface X;
|
||||||
|
|
||||||
#endif // CDUTILS_X_H
|
#endif // CDUTILS_X_H
|
||||||
|
|||||||
0
cmake_android.sh
Executable file → Normal file
@@ -3,9 +3,14 @@ FROM ${DOCKER_PREFIX}android
|
|||||||
|
|
||||||
ARG LIBS_BUILD_NUMBER=9999
|
ARG LIBS_BUILD_NUMBER=9999
|
||||||
ARG JOBS_COUNT=4
|
ARG JOBS_COUNT=4
|
||||||
|
ENV PATH=/opt/cmake/bin:$PATH
|
||||||
|
ENV ANDROID_HOME=/usr/lib/android-sdk
|
||||||
|
ENV ANDROID_NDK_HOME=${ANDROID_HOME}/ndk-bundle
|
||||||
|
ENV ANDROID_TOOLCHAIN=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake
|
||||||
|
ENV NDK_PLATFORM="android-21"
|
||||||
|
|
||||||
WORKDIR /soft
|
WORKDIR /soft
|
||||||
RUN git clone -b release --depth 1 --recursive https://git.shs.tools/SHS/libs.git
|
RUN git clone -b release --single-branch --depth 1 --recursive https://git.shs.tools/SHS/libs.git
|
||||||
|
|
||||||
WORKDIR /soft/libs_build_host
|
WORKDIR /soft/libs_build_host
|
||||||
RUN cmake -DICU=0 -DCROSSTOOLS=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../libs \
|
RUN cmake -DICU=0 -DCROSSTOOLS=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../libs \
|
||||||
|
|||||||
@@ -3,9 +3,10 @@ FROM ${DOCKER_PREFIX}debian
|
|||||||
|
|
||||||
ARG LIBS_BUILD_NUMBER=9999
|
ARG LIBS_BUILD_NUMBER=9999
|
||||||
ARG JOBS_COUNT=4
|
ARG JOBS_COUNT=4
|
||||||
|
ENV PATH=/opt/cmake/bin:$PATH
|
||||||
|
|
||||||
WORKDIR /soft
|
WORKDIR /soft
|
||||||
RUN git clone -b release --depth 1 --recursive https://git.shs.tools/SHS/libs.git
|
RUN git clone -b release --single-branch --depth 1 --recursive https://git.shs.tools/SHS/libs.git
|
||||||
|
|
||||||
WORKDIR /soft/libs_build_debian
|
WORKDIR /soft/libs_build_debian
|
||||||
RUN cmake -DICU=0 -DLIB=1 -DQGLENGINE=1 -DQGLVIEW=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../libs \
|
RUN cmake -DICU=0 -DLIB=1 -DQGLENGINE=1 -DQGLVIEW=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../libs \
|
||||||
|
|||||||
@@ -3,9 +3,10 @@ FROM ${DOCKER_PREFIX}osx
|
|||||||
|
|
||||||
ARG LIBS_BUILD_NUMBER=9999
|
ARG LIBS_BUILD_NUMBER=9999
|
||||||
ARG JOBS_COUNT=4
|
ARG JOBS_COUNT=4
|
||||||
|
ENV PATH=/soft/osxcross/target/bin:/opt/cmake/bin:$PATH
|
||||||
|
|
||||||
WORKDIR /soft
|
WORKDIR /soft
|
||||||
RUN git clone -b release --depth 1 --recursive https://git.shs.tools/SHS/libs.git
|
RUN git clone -b release --single-branch --depth 1 --recursive https://git.shs.tools/SHS/libs.git
|
||||||
|
|
||||||
WORKDIR /soft/libs_build_host
|
WORKDIR /soft/libs_build_host
|
||||||
RUN cmake -DICU=0 -DCROSSTOOLS=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../libs \
|
RUN cmake -DICU=0 -DCROSSTOOLS=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../libs \
|
||||||
|
|||||||
@@ -3,9 +3,10 @@ FROM ${DOCKER_PREFIX}pi
|
|||||||
|
|
||||||
ARG LIBS_BUILD_NUMBER=9999
|
ARG LIBS_BUILD_NUMBER=9999
|
||||||
ARG JOBS_COUNT=4
|
ARG JOBS_COUNT=4
|
||||||
|
ENV PATH=/opt/cmake/bin:$PATH
|
||||||
|
|
||||||
WORKDIR /soft
|
WORKDIR /soft
|
||||||
RUN git clone -b release --depth 1 --recursive https://git.shs.tools/SHS/libs.git
|
RUN git clone -b release --single-branch --depth 1 --recursive https://git.shs.tools/SHS/libs.git
|
||||||
|
|
||||||
WORKDIR /soft/libs_build_host
|
WORKDIR /soft/libs_build_host
|
||||||
RUN cmake -DICU=0 -DCROSSTOOLS=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../libs \
|
RUN cmake -DICU=0 -DCROSSTOOLS=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../libs \
|
||||||
|
|||||||
@@ -3,9 +3,10 @@ FROM ${DOCKER_PREFIX}windows
|
|||||||
|
|
||||||
ARG LIBS_BUILD_NUMBER=9999
|
ARG LIBS_BUILD_NUMBER=9999
|
||||||
ARG JOBS_COUNT=4
|
ARG JOBS_COUNT=4
|
||||||
|
ENV PATH=/opt/cmake/bin:$PATH
|
||||||
|
|
||||||
WORKDIR /soft
|
WORKDIR /soft
|
||||||
RUN git clone -b release --depth 1 --recursive https://git.shs.tools/SHS/libs.git
|
RUN git clone -b release --single-branch --depth 1 --recursive https://git.shs.tools/SHS/libs.git
|
||||||
|
|
||||||
WORKDIR /soft/libs_build_host
|
WORKDIR /soft/libs_build_host
|
||||||
RUN cmake -DICU=0 -DCROSSTOOLS=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../libs \
|
RUN cmake -DICU=0 -DCROSSTOOLS=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../libs \
|
||||||
|
|||||||
0
make_libs.sh
Executable file → Normal file
2
pip
@@ -1,49 +1,21 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
project(piqt)
|
cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
||||||
if(NOT LIBPROJECT)
|
|
||||||
find_package(PIP REQUIRED)
|
macro(piqt_library NAME _MODULES _LIBS)
|
||||||
option(LIB "System install" 0)
|
_qt_project(${NAME} FALSE "PIQt" "${_MODULES}" "pip;${_LIBS}" ${ARGN})
|
||||||
option(DEBUG "Build with -g3" 0)
|
_qt_install(${NAME} FALSE "pip" "out_HDR" "out_QM")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall")
|
endmacro()
|
||||||
if(DEBUG)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
|
macro(piqt_application NAME _MODULES _LIBS)
|
||||||
endif()
|
_qt_project(${NAME} TRUE "PIQt" "${_MODULES}" "pip;${_LIBS}" ${ARGN})
|
||||||
endif()
|
_qt_install(${NAME} TRUE "pip" "" "out_QM")
|
||||||
find_package(QAD REQUIRED)
|
endmacro()
|
||||||
list(APPEND QT_MULTILIB_LIST ${PROJECT_NAME})
|
|
||||||
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
|
||||||
include_directories(${PIP_INCLUDES} ${QAD_INCLUDES})
|
include_directories(${PIP_INCLUDES})
|
||||||
file(GLOB SRC "*.h" "*.cpp" "*.ui" "*.qrc" "lang/*.ts")
|
add_subdirectory(libs)
|
||||||
find_qt(${QtVersions} Core Gui Positioning)
|
if (UTILS)
|
||||||
qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
|
add_subdirectory(utils)
|
||||||
qt_add_library(${PROJECT_NAME} SHARED out_CPP)
|
|
||||||
qt_target_link_libraries(${PROJECT_NAME} pip qad_utils qad_widgets)
|
|
||||||
message(STATUS "Building ${PROJECT_NAME}")
|
|
||||||
if(LIBPROJECT)
|
|
||||||
sdk_install("pip" "${PROJECT_NAME}" "${out_HDR}" "${out_QM}")
|
|
||||||
else()
|
|
||||||
if(LIB)
|
|
||||||
if(WIN32)
|
|
||||||
install(FILES ${out_HDR} DESTINATION ${MINGW_INCLUDE}/pip)
|
|
||||||
if(NOT "x${out_QM}" STREQUAL "x")
|
|
||||||
qt_install(FILES ${out_QM} DESTINATION QtLang)
|
|
||||||
endif()
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${MINGW_LIB})
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${MINGW_BIN})
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION QtBin)
|
|
||||||
else()
|
|
||||||
install(FILES ${out_HDR} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/pip)
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
|
||||||
endif()
|
|
||||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
|
||||||
else()
|
|
||||||
if(WIN32)
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib)
|
|
||||||
else()
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} DESTINATION lib)
|
|
||||||
endif()
|
|
||||||
install(FILES ${out_HDR} DESTINATION include/pip)
|
|
||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\", \"lib\" and \"include\"")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
copy_to_parent(piqt_includes)
|
||||||
|
|||||||
1
piqt/libs/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
add_directories_with_include("piqt_")
|
||||||
1
piqt/libs/core/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
piqt_library(piqt "Gui;Positioning" "qad_utils;qad_widgets")
|
||||||
@@ -106,7 +106,7 @@ const QAD::IODevice PI2QADIODevice(const PIVariantTypes::IODevice & v) {
|
|||||||
|
|
||||||
|
|
||||||
const QAD::File PI2QADFile(const PIVariantTypes::File & v) {
|
const QAD::File PI2QADFile(const PIVariantTypes::File & v) {
|
||||||
return QAD::File(PI2QString(v.file), PI2QString(v.filter), v.is_abs);
|
return QAD::File(PI2QString(v.file), PI2QString(v.filter), v.is_abs, v.is_save);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ const QAD::Dir PI2QADDir(const PIVariantTypes::Dir & v) {
|
|||||||
|
|
||||||
|
|
||||||
const PIVariantTypes::File QAD2PIFile(const QAD::File & v) {
|
const PIVariantTypes::File QAD2PIFile(const QAD::File & v) {
|
||||||
return PIVariantTypes::File(Q2PIString(v.file), Q2PIString(v.filter), v.is_abs);
|
return PIVariantTypes::File(Q2PIString(v.file), Q2PIString(v.filter), v.is_abs, v.is_save);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -29,13 +29,14 @@
|
|||||||
#if QT_VERSION >= 0x050200
|
#if QT_VERSION >= 0x050200
|
||||||
# include "pigeoposition.h"
|
# include "pigeoposition.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "piqt_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QGeoCoordinate;
|
class QGeoCoordinate;
|
||||||
|
|
||||||
|
|
||||||
const QVariant PI2QVariant(const PIVariant & v);
|
PIQT_EXPORT const QVariant PI2QVariant(const PIVariant & v);
|
||||||
const PIVariant Q2PIVariant(const QVariant & v);
|
PIQT_EXPORT const PIVariant Q2PIVariant(const QVariant & v);
|
||||||
|
|
||||||
//inline const QString PI2QString(const PIString & v) {return QString::fromLocal8Bit(v.data());}
|
//inline const QString PI2QString(const PIString & v) {return QString::fromLocal8Bit(v.data());}
|
||||||
inline const QString PI2QString(const PIString & v) {return QString::fromUtf8(v.dataUTF8());}
|
inline const QString PI2QString(const PIString & v) {return QString::fromUtf8(v.dataUTF8());}
|
||||||
@@ -124,20 +125,20 @@ inline PropertyStorage PI2QPropertyStorage(const PIPropertyStorage & props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QAD::Enum PI2QADEnum(const PIVariantTypes::Enum & el);
|
PIQT_EXPORT const QAD::Enum PI2QADEnum(const PIVariantTypes::Enum & el);
|
||||||
const QAD::File PI2QADFile(const PIVariantTypes::File & v);
|
PIQT_EXPORT const QAD::File PI2QADFile(const PIVariantTypes::File & v);
|
||||||
const QAD::Dir PI2QADDir(const PIVariantTypes::Dir & v);
|
PIQT_EXPORT const QAD::Dir PI2QADDir(const PIVariantTypes::Dir & v);
|
||||||
const QAD::IODevice PI2QADIODevice(const PIVariantTypes::IODevice & v);
|
PIQT_EXPORT const QAD::IODevice PI2QADIODevice(const PIVariantTypes::IODevice & v);
|
||||||
const PIVariantTypes::Enum QAD2PIEnum(const QAD::Enum & el);
|
PIQT_EXPORT const PIVariantTypes::Enum QAD2PIEnum(const QAD::Enum & el);
|
||||||
const PIVariantTypes::File QAD2PIFile(const QAD::File & v);
|
PIQT_EXPORT const PIVariantTypes::File QAD2PIFile(const QAD::File & v);
|
||||||
const PIVariantTypes::Dir QAD2PIDir(const QAD::Dir & v);
|
PIQT_EXPORT const PIVariantTypes::Dir QAD2PIDir(const QAD::Dir & v);
|
||||||
const PIVariantTypes::IODevice QAD2PIIODevice(const QAD::IODevice & v);
|
PIQT_EXPORT const PIVariantTypes::IODevice QAD2PIIODevice(const QAD::IODevice & v);
|
||||||
|
|
||||||
//inline const PIVariant QString2PIVariant(const QString & v) {return PIVariant::readFromString(QString2PIString(v));}
|
//inline const PIVariant QString2PIVariant(const QString & v) {return PIVariant::readFromString(QString2PIString(v));}
|
||||||
|
|
||||||
#if QT_VERSION >= 0x050200
|
#if QT_VERSION >= 0x050200
|
||||||
const QGeoCoordinate PI2QGeoPosition(const PIGeoPosition & v);
|
PIQT_EXPORT const QGeoCoordinate PI2QGeoPosition(const PIGeoPosition & v);
|
||||||
const PIGeoPosition Q2PIGeoPosition(const QGeoCoordinate & v);
|
PIQT_EXPORT const PIGeoPosition Q2PIGeoPosition(const QGeoCoordinate & v);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <typename From>
|
template <typename From>
|
||||||
@@ -25,8 +25,10 @@
|
|||||||
#include "piconnection.h"
|
#include "piconnection.h"
|
||||||
#include "qpiconfig.h"
|
#include "qpiconfig.h"
|
||||||
#include "piqt.h"
|
#include "piqt.h"
|
||||||
|
#include "piqt_export.h"
|
||||||
|
|
||||||
class QPIConnection: public QObject, public PIConnection {
|
|
||||||
|
class PIQT_EXPORT QPIConnection: public QObject, public PIConnection {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
PIOBJECT_SUBCLASS(QPIConnection, PIConnection)
|
PIOBJECT_SUBCLASS(QPIConnection, PIConnection)
|
||||||
public:
|
public:
|
||||||
1
piqt/libs/qcd/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
piqt_library(qcd_utils "Gui" "pip;qad_utils;qad_widgets;qad_graphic;cd_utils;piqt")
|
||||||
@@ -25,12 +25,13 @@
|
|||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include "piobject.h"
|
#include "piobject.h"
|
||||||
#include "cdutils_types.h"
|
#include "cdutils_types.h"
|
||||||
|
#include "qcd_utils_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QCDCore;
|
class QCDCore;
|
||||||
|
|
||||||
|
|
||||||
class __QCore_Initializer__ {
|
class QCD_UTILS_EXPORT __QCore_Initializer__ {
|
||||||
public:
|
public:
|
||||||
__QCore_Initializer__();
|
__QCore_Initializer__();
|
||||||
~__QCore_Initializer__();
|
~__QCore_Initializer__();
|
||||||
@@ -39,7 +40,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class QCDCore: public QObject, public PIObject
|
class QCD_UTILS_EXPORT QCDCore: public QObject, public PIObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
PIOBJECT(QCDCore)
|
PIOBJECT(QCDCore)
|
||||||
@@ -23,6 +23,7 @@
|
|||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <evalspinbox.h>
|
#include <evalspinbox.h>
|
||||||
#include <pistring.h>
|
#include <pistring.h>
|
||||||
|
#include "qcd_utils_export.h"
|
||||||
|
|
||||||
namespace CDUtils {
|
namespace CDUtils {
|
||||||
class CDType;
|
class CDType;
|
||||||
@@ -37,7 +38,7 @@ class Graphic;
|
|||||||
class Graphic;
|
class Graphic;
|
||||||
|
|
||||||
|
|
||||||
class CDGraphicWidget: public QWidget {
|
class QCD_UTILS_EXPORT CDGraphicWidget: public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
friend class CDGraphics;
|
friend class CDGraphics;
|
||||||
friend class GDockWidget;
|
friend class GDockWidget;
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="Graphic" name="graphic">
|
<widget class="Graphic" name="graphic">
|
||||||
<property name="buttons">
|
<property name="buttons">
|
||||||
<set>Graphic::Autofit|Graphic::BorderInputs|Graphic::Clear|Graphic::Configure|Graphic::CursorAxis|Graphic::Fullscreen|Graphic::Legend|Graphic::OnlyExpandY|Graphic::Pause|Graphic::Save</set>
|
<set>Graphic::Autofit|Graphic::BorderInputs|Graphic::Clear|Graphic::Configure|Graphic::CursorAxis|Graphic::Fullscreen|Graphic::Legend|Graphic::Pause|Graphic::Save</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="borderInputsVisible">
|
<property name="borderInputsVisible">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@@ -22,12 +22,13 @@
|
|||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <cdutils_types.h>
|
#include <cdutils_types.h>
|
||||||
|
#include "qcd_utils_export.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class QCDModeDialog;
|
class QCDModeDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
class QCDModeDialog: public QDialog
|
class QCD_UTILS_EXPORT QCDModeDialog: public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -309,10 +309,10 @@ int CDItemModel::columnCount(const QModelIndex &parent) const {
|
|||||||
|
|
||||||
|
|
||||||
Qt::ItemFlags CDItemModel::flags(const QModelIndex & index) const {
|
Qt::ItemFlags CDItemModel::flags(const QModelIndex & index) const {
|
||||||
if (!index.isValid()) return 0;
|
if (!index.isValid()) return Qt::ItemFlags();
|
||||||
Qt::ItemFlags f = Qt::ItemIsEnabled | Qt::ItemIsSelectable;
|
Qt::ItemFlags f = Qt::ItemIsEnabled | Qt::ItemIsSelectable;
|
||||||
CDItem * item = getItem(index);
|
CDItem * item = getItem(index);
|
||||||
if (!item) return 0;
|
if (!item) return Qt::ItemFlags();
|
||||||
if (item->type_ == CDItem::ItemCDType) {
|
if (item->type_ == CDItem::ItemCDType) {
|
||||||
CDType & t(interface->section(item->buildPath())[item->index_]);
|
CDType & t(interface->section(item->buildPath())[item->index_]);
|
||||||
if (t.cd_type() == CDType::cdK) {
|
if (t.cd_type() == CDType::cdK) {
|
||||||
@@ -394,15 +394,15 @@ void CDItemModel::rebuildModel() {
|
|||||||
|
|
||||||
void CDItemModel::buildItem(CDItem * it, CDSection & r) {
|
void CDItemModel::buildItem(CDItem * it, CDSection & r) {
|
||||||
//piCout << "build item" << r.name << r.alias;
|
//piCout << "build item" << r.name << r.alias;
|
||||||
PIMap<int, CDType>::iterator i;
|
auto i = r.cd.makeIterator();
|
||||||
for (i = r.cd.begin(); i != r.cd.end(); ++i) {
|
while (i.next()) {
|
||||||
it->childs << new CDItem(interface, i.key(), CDItem::ItemCDType, it);
|
it->childs << new CDItem(interface, i.key(), CDItem::ItemCDType, it);
|
||||||
}
|
}
|
||||||
it->item_count = it->childs.size();
|
it->item_count = it->childs.size();
|
||||||
PIMap<int, CDSection>::iterator j;
|
auto j = r.s.makeIterator();
|
||||||
for (j = r.s.begin(); j != r.s.end(); ++j) {
|
while (j.next()) {
|
||||||
it->childs << new CDItem(interface, j.key(), CDItem::ItemCDSection, it);
|
it->childs << new CDItem(interface, j.key(), CDItem::ItemCDSection, it);
|
||||||
buildItem(it->childs.back(), j.value());
|
buildItem(it->childs.back(), j.valueRef());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
#include <QItemDelegate>
|
#include <QItemDelegate>
|
||||||
#include <QStyledItemDelegate>
|
#include <QStyledItemDelegate>
|
||||||
#include "pistring.h"
|
#include "pistring.h"
|
||||||
|
#include "qcd_utils_export.h"
|
||||||
|
|
||||||
namespace CDUtils {
|
namespace CDUtils {
|
||||||
class CDType;
|
class CDType;
|
||||||
@@ -50,7 +51,7 @@ namespace QAD {
|
|||||||
class CDItemModel;
|
class CDItemModel;
|
||||||
|
|
||||||
|
|
||||||
class CDItem {
|
class QCD_UTILS_EXPORT CDItem {
|
||||||
friend class CDItemModel;
|
friend class CDItemModel;
|
||||||
friend class CDView;
|
friend class CDView;
|
||||||
public:
|
public:
|
||||||
@@ -78,7 +79,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class CDDelegate : public QStyledItemDelegate
|
class QCD_UTILS_EXPORT CDDelegate : public QStyledItemDelegate
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -94,7 +95,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class CDItemModel : public QAbstractItemModel {
|
class QCD_UTILS_EXPORT CDItemModel : public QAbstractItemModel {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
friend class CDView;
|
friend class CDView;
|
||||||
public:
|
public:
|
||||||
@@ -20,8 +20,9 @@
|
|||||||
#ifndef QCD_VIEW_H
|
#ifndef QCD_VIEW_H
|
||||||
#define QCD_VIEW_H
|
#define QCD_VIEW_H
|
||||||
|
|
||||||
#include "piobject.h"
|
|
||||||
#include <QTreeView>
|
#include <QTreeView>
|
||||||
|
#include "piobject.h"
|
||||||
|
#include "qcd_utils_export.h"
|
||||||
|
|
||||||
namespace CDUtils {
|
namespace CDUtils {
|
||||||
class CDType;
|
class CDType;
|
||||||
@@ -31,7 +32,7 @@ namespace CDUtils {
|
|||||||
class CDItemModel;
|
class CDItemModel;
|
||||||
class QSortFilterProxyModel;
|
class QSortFilterProxyModel;
|
||||||
|
|
||||||
class CDView: public QTreeView, public PIObject
|
class QCD_UTILS_EXPORT CDView: public QTreeView, public PIObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
PIOBJECT(CDView)
|
PIOBJECT(CDView)
|
||||||
9
piqt/libs/widgets/CMakeLists.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
include(PIPMacros)
|
||||||
|
pip_code_model(CCM "${ROOT_DIR}/pip/libs/main/io_devices/piiodevice.h" "${ROOT_DIR}/pip/libs/main/io_utils/pipacketextractor.h" OPTIONS "-DPIP_EXPORT" "-Es")
|
||||||
|
piqt_library(piqt_utils "Gui" "qad_utils;qad_widgets;qad_blockview;piqt" ${CCM})
|
||||||
|
|
||||||
|
foreach(_v ${_QT_VERSIONS_})
|
||||||
|
if (LOCAL_FOUND${_v})
|
||||||
|
add_dependencies(piqt_utils${_v} pip_cmg)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
@@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include "piconnection.h"
|
#include "piconnection.h"
|
||||||
|
#include "piqt_utils_export.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class ConnectionEdit;
|
class ConnectionEdit;
|
||||||
@@ -31,7 +33,7 @@ class FilterItem;
|
|||||||
class DeviceItem;
|
class DeviceItem;
|
||||||
class SenderItem;
|
class SenderItem;
|
||||||
|
|
||||||
class ConnectionEdit: public QDialog {
|
class PIQT_UTILS_EXPORT ConnectionEdit: public QDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit ConnectionEdit(QWidget * parent = 0);
|
explicit ConnectionEdit(QWidget * parent = 0);
|
||||||
@@ -22,14 +22,20 @@
|
|||||||
<widget class="QWidget" name="layoutWidget">
|
<widget class="QWidget" name="layoutWidget">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QWidget" name="widget" native="true">
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||||
<item>
|
<item>
|
||||||
@@ -268,7 +274,7 @@
|
|||||||
<string>Add</string>
|
<string>Add</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset resource="../../../qad/libs/application/qad_application.qrc">
|
||||||
<normaloff>:/icons/list-add.png</normaloff>:/icons/list-add.png</iconset>
|
<normaloff>:/icons/list-add.png</normaloff>:/icons/list-add.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -282,8 +288,8 @@
|
|||||||
<string>Modify</string>
|
<string>Modify</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="piconnedit/piconnedit.qrc">
|
<iconset resource="../../../qad/libs/application/qad_application.qrc">
|
||||||
<normaloff>:/icons/document-save-.png</normaloff>:/icons/document-save-.png</iconset>
|
<normaloff>:/icons/document-save.png</normaloff>:/icons/document-save.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -330,7 +336,16 @@
|
|||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@@ -371,7 +386,16 @@
|
|||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@@ -400,7 +424,16 @@
|
|||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@@ -451,7 +484,16 @@
|
|||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@@ -500,7 +542,16 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="widgetDT" native="true">
|
<widget class="QWidget" name="widgetDT" native="true">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@@ -535,7 +586,16 @@
|
|||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
</layout>
|
</layout>
|
||||||
@@ -622,7 +682,7 @@
|
|||||||
<string>Add</string>
|
<string>Add</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset resource="../../../qad/libs/application/qad_application.qrc">
|
||||||
<normaloff>:/icons/list-add.png</normaloff>:/icons/list-add.png</iconset>
|
<normaloff>:/icons/list-add.png</normaloff>:/icons/list-add.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -636,7 +696,7 @@
|
|||||||
<string>Modify</string>
|
<string>Modify</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="piconnedit/piconnedit.qrc">
|
<iconset>
|
||||||
<normaloff>:/icons/document-save-.png</normaloff>:/icons/document-save-.png</iconset>
|
<normaloff>:/icons/document-save-.png</normaloff>:/icons/document-save-.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -727,7 +787,7 @@
|
|||||||
<string>Add</string>
|
<string>Add</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset resource="../../../qad/libs/application/qad_application.qrc">
|
||||||
<normaloff>:/icons/list-add.png</normaloff>:/icons/list-add.png</iconset>
|
<normaloff>:/icons/list-add.png</normaloff>:/icons/list-add.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -741,7 +801,7 @@
|
|||||||
<string>Modify</string>
|
<string>Modify</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="piconnedit/piconnedit.qrc">
|
<iconset>
|
||||||
<normaloff>:/icons/document-save-.png</normaloff>:/icons/document-save-.png</iconset>
|
<normaloff>:/icons/document-save-.png</normaloff>:/icons/document-save-.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -764,7 +824,7 @@
|
|||||||
<string>Remove</string>
|
<string>Remove</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset resource="../../../qad/libs/application/qad_application.qrc">
|
||||||
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -775,8 +835,8 @@
|
|||||||
<string>Clear</string>
|
<string>Clear</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="piconnedit/piconnedit.qrc">
|
<iconset resource="../../../qad/libs/application/qad_application.qrc">
|
||||||
<normaloff>:/icons/edit-clear-.png</normaloff>:/icons/edit-clear-.png</iconset>
|
<normaloff>:/icons/edit-clear.png</normaloff>:/icons/edit-clear.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -840,7 +900,7 @@
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="piconnedit/piconnedit.qrc"/>
|
<include location="../../../qad/libs/application/qad_application.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
@@ -875,22 +935,6 @@
|
|||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>lineName</sender>
|
|
||||||
<signal>editingFinished()</signal>
|
|
||||||
<receiver>ConnectionEdit</receiver>
|
|
||||||
<slot>recreateConnection()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>644</x>
|
|
||||||
<y>29</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>662</x>
|
|
||||||
<y>-5</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
</connections>
|
||||||
<slots>
|
<slots>
|
||||||
<slot>recreateConnection()</slot>
|
<slot>recreateConnection()</slot>
|
||||||
@@ -74,7 +74,7 @@ void FilterItem::rename() {
|
|||||||
piForeachC (PICodeInfo::EnumeratorInfo & i, ei->members)
|
piForeachC (PICodeInfo::EnumeratorInfo & i, ei->members)
|
||||||
if (i.value == mode()) {
|
if (i.value == mode()) {
|
||||||
ms = PI2QString(i.name);
|
ms = PI2QString(i.name);
|
||||||
piBreak;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text_mode->setText(ms);
|
text_mode->setText(ms);
|
||||||
@@ -22,13 +22,14 @@
|
|||||||
|
|
||||||
#include "blockview.h"
|
#include "blockview.h"
|
||||||
#include "piconnection.h"
|
#include "piconnection.h"
|
||||||
|
#include "piqt_utils_export.h"
|
||||||
|
|
||||||
const int __CV_Device = 1;
|
const int __CV_Device = 1;
|
||||||
const int __CV_Filter = 2;
|
const int __CV_Filter = 2;
|
||||||
const int __CV_Sender = 3;
|
const int __CV_Sender = 3;
|
||||||
|
|
||||||
|
|
||||||
class DeviceItem: public BlockItem {
|
class PIQT_UTILS_EXPORT DeviceItem: public BlockItem {
|
||||||
public:
|
public:
|
||||||
DeviceItem();
|
DeviceItem();
|
||||||
|
|
||||||
@@ -54,7 +55,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class FilterItem: public BlockItem {
|
class PIQT_UTILS_EXPORT FilterItem: public BlockItem {
|
||||||
public:
|
public:
|
||||||
FilterItem();
|
FilterItem();
|
||||||
|
|
||||||
@@ -84,7 +85,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class SenderItem: public BlockItem {
|
class PIQT_UTILS_EXPORT SenderItem: public BlockItem {
|
||||||
public:
|
public:
|
||||||
SenderItem();
|
SenderItem();
|
||||||
|
|
||||||
@@ -104,7 +105,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class ConnectionView: public BlockView {
|
class PIQT_UTILS_EXPORT ConnectionView: public BlockView {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit ConnectionView(QWidget * parent = 0);
|
explicit ConnectionView(QWidget * parent = 0);
|
||||||
@@ -23,10 +23,11 @@
|
|||||||
#include <QSyntaxHighlighter>
|
#include <QSyntaxHighlighter>
|
||||||
#include <QTextCursor>
|
#include <QTextCursor>
|
||||||
#include <QTextCharFormat>
|
#include <QTextCharFormat>
|
||||||
|
#include "piqt_utils_export.h"
|
||||||
|
|
||||||
class QTextDocument;
|
class QTextDocument;
|
||||||
|
|
||||||
class ConfigHighlighter : public QSyntaxHighlighter
|
class PIQT_UTILS_EXPORT ConfigHighlighter : public QSyntaxHighlighter
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -37,7 +38,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
void highlightBlock(const QString &text);
|
void highlightBlock(const QString &text);
|
||||||
|
|
||||||
struct HighlightingRule {
|
struct PIQT_UTILS_EXPORT HighlightingRule {
|
||||||
QRegExp pattern;
|
QRegExp pattern;
|
||||||
QTextCharFormat format;
|
QTextCharFormat format;
|
||||||
};
|
};
|
||||||
@@ -22,13 +22,14 @@
|
|||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include "qad_types.h"
|
#include "qad_types.h"
|
||||||
|
#include "piqt_utils_export.h"
|
||||||
|
|
||||||
class QLineEdit;
|
class QLineEdit;
|
||||||
class QToolButton;
|
class QToolButton;
|
||||||
class IODeviceEditDialog;
|
class IODeviceEditDialog;
|
||||||
|
|
||||||
|
|
||||||
class IODeviceEdit: public QWidget {
|
class PIQT_UTILS_EXPORT IODeviceEdit: public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged)
|
Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged)
|
||||||
Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly)
|
Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly)
|
||||||
@@ -60,12 +61,14 @@ signals:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class __IODeviceEditRegistrator__ {
|
class PIQT_UTILS_EXPORT __IODeviceEditRegistrator__ {
|
||||||
public:
|
public:
|
||||||
__IODeviceEditRegistrator__();
|
__IODeviceEditRegistrator__();
|
||||||
};
|
};
|
||||||
|
|
||||||
static __IODeviceEditRegistrator__ __iodeviceeditregistrator__;
|
static __IODeviceEditRegistrator__ __iodeviceeditregistrator__;
|
||||||
|
|
||||||
void QAD_IODevice_toString(const QVariant & v, QString & r);
|
PIQT_UTILS_EXPORT void QAD_IODevice_toString(const QVariant & v, QString & r);
|
||||||
|
|
||||||
|
|
||||||
#endif // PIQT_IODEVICE_EDIT_H
|
#endif // PIQT_IODEVICE_EDIT_H
|
||||||
@@ -23,12 +23,13 @@
|
|||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include "qad_types.h"
|
#include "qad_types.h"
|
||||||
#include "propertystorage.h"
|
#include "propertystorage.h"
|
||||||
|
#include "piqt_utils_export.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class IODeviceEditDialog;
|
class IODeviceEditDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
class IODeviceEditDialog: public QDialog {
|
class PIQT_UTILS_EXPORT IODeviceEditDialog: public QDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit IODeviceEditDialog(QWidget * parent = 0);
|
explicit IODeviceEditDialog(QWidget * parent = 0);
|
||||||
1
piqt/utils/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
add_directories("piqt_")
|
||||||
14
piqt/utils/cd_pult/CMakeLists.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
project(cd_pult)
|
||||||
|
if(APPLE)
|
||||||
|
set(APP_ICON "")
|
||||||
|
elseif(WIN32)
|
||||||
|
set(APP_ICON "")
|
||||||
|
else()
|
||||||
|
set(APP_ICON "")
|
||||||
|
endif()
|
||||||
|
set(APP_INFO "CD Pult")
|
||||||
|
piqt_application(${PROJECT_NAME} "Gui;Widgets" "qad_utils;qad_widgets;qad_graphic;qad_application;qcd_utils;piqt_utils")
|
||||||
|
if (Qt5_FOUND)
|
||||||
|
import_version(${PROJ_NAME}5 ${PROJECT_NAME})
|
||||||
|
deploy_target(${PROJECT_NAME}5 DEPLOY_DIR ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${ROOT_DIR}/release)
|
||||||
|
endif()
|
||||||
16
piqt/utils/cd_pult/cdpult.qrc
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<RCC>
|
||||||
|
<qresource prefix="/">
|
||||||
|
<file>../../../qad/icons/dialog-information.png</file>
|
||||||
|
<file>../../../qad/icons/dialog-cancel.png</file>
|
||||||
|
<file>../../../qad/icons/dialog-ok-apply.png</file>
|
||||||
|
<file>../../../qad/icons/document-revert.png</file>
|
||||||
|
<file>../../../qad/icons/view-refresh.png</file>
|
||||||
|
<file>../../../qad/icons/format-stroke-color.png</file>
|
||||||
|
<file>icons/db-export.png</file>
|
||||||
|
<file>icons/db-import.png</file>
|
||||||
|
<file>icons/timer.png</file>
|
||||||
|
<file>icons/flame.png</file>
|
||||||
|
<file>icons/Apps-accessories-calculator-icon.png</file>
|
||||||
|
<file>icons/accessories-text-editor.png</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
||||||
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
@@ -199,7 +199,7 @@ public:
|
|||||||
PIHash<Key, T> & clear() {pih_content.clear(); return *this;}
|
PIHash<Key, T> & clear() {pih_content.clear(); return *this;}
|
||||||
|
|
||||||
void swap(PIHash<Key, T> & other) {
|
void swap(PIHash<Key, T> & other) {
|
||||||
piSwapBinary<PIVector<PIVector<HashEntry> > >(pih_content, other.pih_content);
|
pih_content.swap(other.pih_content);
|
||||||
}
|
}
|
||||||
|
|
||||||
PIHash<Key, T> & insert(const Key & key, const T & value) {
|
PIHash<Key, T> & insert(const Key & key, const T & value) {
|
||||||
@@ -302,6 +302,7 @@ protected:
|
|||||||
uint qHash(const PIString & v, uint seed = 0) {return piHash(v);}
|
uint qHash(const PIString & v, uint seed = 0) {return piHash(v);}
|
||||||
|
|
||||||
|
|
||||||
|
#include "logview.h"
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
#if QT_VERSION >= 0x050000
|
#if QT_VERSION >= 0x050000
|
||||||
@@ -342,6 +343,28 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
return 0;*/
|
return 0;*/
|
||||||
//################################
|
//################################
|
||||||
|
//1245hghgfhfdgshrgnhdsgfhjshdszdgsdgnjedghrbnlcvleabjmbassfdggfhbnsjkgnfdvfdsdfojbwasv213443gr2t4sfth
|
||||||
|
/*LogView lw;
|
||||||
|
lw.setLogFont(QFont("dejavu sans mono", 9));
|
||||||
|
lw.registerCategory("Warning", "Warning", QImage(":/icons/flame.png"), Qt::darkYellow);
|
||||||
|
lw.registerCategory("Error", "Error", QImage(":/icons/dialog-cancel.png"), Qt::darkRed, true);
|
||||||
|
//lw.setLinesLimit(12);
|
||||||
|
lw.show();
|
||||||
|
piForTimes(100)
|
||||||
|
lw.addText(QString("row %1").arg(_i100));
|
||||||
|
lw.addText("-- Up-to-date: C:/sdk/MinGW/x32/i686-w64-mingw32/include/qglengine/scene_tree.h");
|
||||||
|
lw.addText("-- Up-to-date: C:/sdk/MinGW/x32/i686-w64-mingw32/include/qglengine/scene_tree.h");
|
||||||
|
lw.addText("-- Up-to-date: C:/sdk/MinGW/x32/i686-w64-mingw32/include/qglengine/view_editor.h");
|
||||||
|
lw.addText("-- Up-to-date: C:/sdk/MinGW/x32/i686-w64-mingw32/include/qglengine/material_map_editor.h\n"
|
||||||
|
"-- Up-to-date: C:/sdk/MinGW/x32/i686-w64-mingw32/include/qglengine/materials_editor\n"
|
||||||
|
"-- Up-to-date: C:/sdk/MinGW/x32/i686-w64-mingw32/include/qglengine/object_editor.h");
|
||||||
|
lw.addText("[Warning] sdfkjhdfgj");
|
||||||
|
lw.addText("[Error] gbflknwed");
|
||||||
|
QLineEdit * le = new QLineEdit();
|
||||||
|
QObject::connect(le, &QLineEdit::returnPressed, [&](){lw.addText(le->text());});
|
||||||
|
le->show();
|
||||||
|
return a.exec();*/
|
||||||
|
|
||||||
CDPultWindow w;
|
CDPultWindow w;
|
||||||
w.show();
|
w.show();
|
||||||
if (a.arguments().size() > 1)
|
if (a.arguments().size() > 1)
|
||||||
10
piqt/utils/piconnedit/CMakeLists.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
project(piconnedit)
|
||||||
|
if(APPLE)
|
||||||
|
set(APP_ICON "")
|
||||||
|
elseif(WIN32)
|
||||||
|
set(APP_ICON "")
|
||||||
|
else()
|
||||||
|
set(APP_ICON "")
|
||||||
|
endif()
|
||||||
|
set(APP_INFO "PIConnection GUI editor")
|
||||||
|
piqt_application(${PROJECT_NAME} "Gui;Widgets" "qad_utils;qad_widgets;qad_blockview;piqt_utils")
|
||||||
@@ -30,5 +30,5 @@ int main(int argc, char * argv[]) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return a.exec();
|
return 0;
|
||||||
}
|
}
|
||||||
10
piqt/utils/pidumper/CMakeLists.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
project(pidumper)
|
||||||
|
if(APPLE)
|
||||||
|
set(APP_ICON "")
|
||||||
|
elseif(WIN32)
|
||||||
|
set(APP_ICON "")
|
||||||
|
else()
|
||||||
|
set(APP_ICON "")
|
||||||
|
endif()
|
||||||
|
set(APP_INFO "PIConnection GUI editor")
|
||||||
|
piqt_application(${PROJECT_NAME} "Gui;Widgets" "qad_utils;qad_widgets;piqt_utils")
|
||||||
13
piqt/utils/piintrospector/CMakeLists.txt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
project(piintrospector)
|
||||||
|
if(APPLE)
|
||||||
|
set(APP_ICON "")
|
||||||
|
elseif(WIN32)
|
||||||
|
set(APP_ICON "")
|
||||||
|
else()
|
||||||
|
set(APP_ICON "")
|
||||||
|
endif()
|
||||||
|
set(APP_INFO "PIConnection GUI editor")
|
||||||
|
include(PIPMacros)
|
||||||
|
set(PII_ROOT "${ROOT_DIR}/pip/libs/main/introspection")
|
||||||
|
pip_code_model(CCM "${PII_ROOT}/piintrospection_server_p.h" "${PII_ROOT}/piintrospection_threads_p.h" OPTIONS "-DPIP_EXPORT" "-Es")
|
||||||
|
piqt_application(${PROJECT_NAME} "Gui;Widgets" "qad_utils;qad_widgets;qad_application;piqt_utils" ${CCM})
|
||||||