Compare commits
14 Commits
3ca32f4972
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 75c6b5abcc | |||
| 235eb2acb8 | |||
| bd5579b8f1 | |||
| 7f820c8f67 | |||
| 9130496887 | |||
| cca2e0f2d7 | |||
| b92a1fa558 | |||
| d4f1c78a6e | |||
| 274fb20103 | |||
| acef4db1db | |||
| 9f84e5c3df | |||
| aa009c36b0 | |||
| e4340a7215 | |||
| f7eabd1a85 |
142
CMakeLists.txt
142
CMakeLists.txt
@@ -9,17 +9,81 @@ 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()
|
||||||
if("x${BUILD_NUMBER}" STREQUAL "x")
|
if("x${BUILD_NUMBER}" STREQUAL "x")
|
||||||
set(BUILD_NUMBER 0)
|
set(BUILD_NUMBER 0)
|
||||||
endif()
|
endif()
|
||||||
set(_COMPANY SHS)
|
|
||||||
set(_DOMAIN org.SHS)
|
|
||||||
|
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_SOURCE_DIR}/qad)
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/piqt)
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}/piqt)
|
||||||
@@ -47,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)
|
||||||
@@ -142,20 +207,21 @@ 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})
|
foreach(F ${PIP_MAIN_FOLDERS})
|
||||||
list(APPEND PIP_INCLUDES "${F}")
|
list(APPEND PIP_INCLUDES "${F}")
|
||||||
endforeach(F)
|
endforeach(F)
|
||||||
add_subdirectory(cd_utils)
|
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)
|
||||||
include_directories(${qad_includes})
|
include_directories(${qad_includes})
|
||||||
add_subdirectory(piqt)
|
add_subdirectory(piqt)
|
||||||
@@ -173,6 +239,52 @@ else()
|
|||||||
list(APPEND QT_MULTILIB_LIST ${_D})
|
list(APPEND QT_MULTILIB_LIST ${_D})
|
||||||
add_subdirectory(${_D})
|
add_subdirectory(${_D})
|
||||||
endforeach(_D)
|
endforeach(_D)
|
||||||
|
|
||||||
|
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()
|
||||||
|
|||||||
111
SDKMacros.cmake
111
SDKMacros.cmake
@@ -1,49 +1,67 @@
|
|||||||
|
|
||||||
macro(sdk_install _DIR IS_APP _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(LIB)
|
if((NOT ${IS_APP}) AND (NOT "${_H_FILES}" STREQUAL ""))
|
||||||
if(WIN32)
|
if(LIB)
|
||||||
if (${IS_APP})
|
|
||||||
qt_install(TARGETS ${_TARGET} DESTINATION ${MINGW_BIN})
|
|
||||||
qt_install(TARGETS ${_TARGET} DESTINATION QtBin)
|
|
||||||
else()
|
|
||||||
if(NOT "x${_H_FILES}" STREQUAL "x")
|
|
||||||
install(FILES ${_H_FILES} DESTINATION ${MINGW_INCLUDE}/${_DIR})
|
|
||||||
endif()
|
|
||||||
qt_install(TARGETS ${_TARGET} ARCHIVE DESTINATION ${MINGW_LIB})
|
|
||||||
qt_install(TARGETS ${_TARGET} RUNTIME DESTINATION ${MINGW_BIN})
|
|
||||||
qt_install(TARGETS ${_TARGET} RUNTIME DESTINATION QtBin)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
if (${IS_APP})
|
|
||||||
qt_install(TARGETS ${_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
|
||||||
else()
|
|
||||||
if (NOT "x${_H_FILES}" STREQUAL "x")
|
|
||||||
install(FILES ${_H_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${_DIR})
|
|
||||||
endif()
|
|
||||||
qt_install(TARGETS ${_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
if(NOT "x${_QM_FILES}" STREQUAL "x")
|
|
||||||
qt_install(LANG ${_QM_FILES} DESTINATION QtLang)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
if(${IS_APP})
|
|
||||||
qt_install(TARGETS ${_TARGET} DESTINATION bin)
|
|
||||||
else()
|
|
||||||
if(NOT "x${_H_FILES}" STREQUAL "x")
|
|
||||||
install(FILES ${_H_FILES} DESTINATION include/${_DIR})
|
|
||||||
endif()
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
qt_install(TARGETS ${_TARGET} RUNTIME DESTINATION bin)
|
install(FILES ${_H_FILES} DESTINATION ${MINGW_INCLUDE}/${_DIR})
|
||||||
qt_install(TARGETS ${_TARGET} ARCHIVE DESTINATION lib)
|
|
||||||
else()
|
else()
|
||||||
qt_install(TARGETS ${_TARGET} DESTINATION lib)
|
install(FILES ${_H_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${_DIR})
|
||||||
|
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} RUNTIME DESTINATION ${MINGW_BIN})
|
||||||
|
qt_install(TARGETS ${_TARGET} RUNTIME DESTINATION QtBin)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
if (${IS_APP})
|
||||||
|
qt_install(TARGETS ${_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
|
else()
|
||||||
|
qt_install(TARGETS ${_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if(NOT "x${_QM_FILES}" STREQUAL "x")
|
||||||
|
qt_install(LANG ${_QM_FILES} DESTINATION QtLang)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
if(${IS_APP})
|
||||||
|
qt_install(TARGETS ${_TARGET} DESTINATION bin)
|
||||||
|
else()
|
||||||
|
if(WIN32)
|
||||||
|
qt_install(TARGETS ${_TARGET} RUNTIME DESTINATION bin)
|
||||||
|
qt_install(TARGETS ${_TARGET} ARCHIVE DESTINATION lib)
|
||||||
|
else()
|
||||||
|
qt_install(TARGETS ${_TARGET} DESTINATION lib)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if(NOT "x${_QM_FILES}" STREQUAL "x")
|
||||||
|
qt_install(LANG ${_QM_FILES} DESTINATION lang)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(NOT "x${_QM_FILES}" STREQUAL "x")
|
endif()
|
||||||
qt_install(LANG ${_QM_FILES} DESTINATION lang)
|
endmacro()
|
||||||
endif()
|
|
||||||
|
|
||||||
|
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()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
@@ -63,20 +81,15 @@ macro(add_directories_with_include multilib_prefix)
|
|||||||
get_filename_component(_dname "${_d}" NAME)
|
get_filename_component(_dname "${_d}" NAME)
|
||||||
list(APPEND QT_MULTILIB_LIST ${multilib_prefix}${_dname})
|
list(APPEND QT_MULTILIB_LIST ${multilib_prefix}${_dname})
|
||||||
list(APPEND ${inc_var} "${_d}")
|
list(APPEND ${inc_var} "${_d}")
|
||||||
|
list(APPEND ${inc_var} "${CMAKE_CURRENT_BINARY_DIR}/${_dname}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
foreach(_d ${DIRS})
|
include_directories(${${inc_var}})
|
||||||
include_directories(${_d})
|
|
||||||
endforeach()
|
|
||||||
foreach(_d ${DIRS})
|
foreach(_d ${DIRS})
|
||||||
add_subdirectory(${_d})
|
add_subdirectory(${_d})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
copy_to_parent(${inc_var})
|
||||||
set(${inc_var} ${${inc_var}} PARENT_SCOPE)
|
|
||||||
if (LIB)
|
|
||||||
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
@@ -89,8 +102,6 @@ macro(add_directories multilib_prefix)
|
|||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if (LIB)
|
copy_to_parent(${multilib_prefix}includes)
|
||||||
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ file(GLOB CPPS_UTILS "cdutils_*.cpp")
|
|||||||
file(GLOB HDRS_UTILS "cdutils_*.h")
|
file(GLOB HDRS_UTILS "cdutils_*.h")
|
||||||
add_library(${PROJECT_NAME} SHARED ${CPPS_UTILS} ${HDRS_UTILS})
|
add_library(${PROJECT_NAME} SHARED ${CPPS_UTILS} ${HDRS_UTILS})
|
||||||
target_link_libraries(${PROJECT_NAME} ${PIP_LIBRARY})
|
target_link_libraries(${PROJECT_NAME} ${PIP_LIBRARY})
|
||||||
|
generate_export_header(${PROJECT_NAME})
|
||||||
|
list(APPEND HDRS_UTILS "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_export.h")
|
||||||
|
|
||||||
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})
|
||||||
|
|||||||
@@ -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;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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
0
cmake_android.sh
Executable file → Normal file
0
make_libs.sh
Executable file → Normal file
0
make_libs.sh
Executable file → Normal file
2
pip
2
pip
Submodule pip updated: cc580d9385...a4b3edb3e1
@@ -1,29 +1,5 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
||||||
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_LIB_TYPE SHARED)
|
|
||||||
|
|
||||||
set(QAD_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/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(QADMacros)
|
|
||||||
|
|
||||||
macro(piqt_library NAME _MODULES _LIBS)
|
macro(piqt_library NAME _MODULES _LIBS)
|
||||||
_qt_project(${NAME} FALSE "PIQt" "${_MODULES}" "pip;${_LIBS}" ${ARGN})
|
_qt_project(${NAME} FALSE "PIQt" "${_MODULES}" "pip;${_LIBS}" ${ARGN})
|
||||||
@@ -42,9 +18,4 @@ if (UTILS)
|
|||||||
add_subdirectory(utils)
|
add_subdirectory(utils)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
copy_to_parent(piqt_includes)
|
||||||
set(piqt_includes ${piqt_includes} PARENT_SCOPE)
|
|
||||||
if (LIB)
|
|
||||||
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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,4 +0,0 @@
|
|||||||
<RCC>
|
|
||||||
<qresource prefix="/">
|
|
||||||
</qresource>
|
|
||||||
</RCC>
|
|
||||||
@@ -7,7 +7,7 @@ else()
|
|||||||
set(APP_ICON "icons/qpicalculator.png")
|
set(APP_ICON "icons/qpicalculator.png")
|
||||||
endif()
|
endif()
|
||||||
set(APP_INFO "Small calculator ang grapher")
|
set(APP_INFO "Small calculator ang grapher")
|
||||||
qad_application(${PROJECT_NAME} "Gui;Widgets" "qad_utils;qad_widgets;qad_graphic")
|
qad_application(${PROJECT_NAME} "Gui;Widgets" "qad_utils;qad_widgets;qad_graphic;pip;piqt")
|
||||||
if (Qt5_FOUND)
|
if (Qt5_FOUND)
|
||||||
import_version(${PROJ_NAME}5 ${PROJECT_NAME})
|
import_version(${PROJ_NAME}5 ${PROJECT_NAME})
|
||||||
deploy_target(${PROJECT_NAME}5 DEPLOY_DIR ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${ROOT_DIR}/release)
|
deploy_target(${PROJECT_NAME}5 DEPLOY_DIR ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${ROOT_DIR}/release)
|
||||||
|
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@@ -1,4 +1,5 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
#include "piqt.h"
|
||||||
|
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget * parent): QMainWindow(parent), Ui::MainWindow() {
|
MainWindow::MainWindow(QWidget * parent): QMainWindow(parent), Ui::MainWindow() {
|
||||||
@@ -62,7 +63,7 @@ void MainWindow::redrawGraphics() {
|
|||||||
graphic->setGraphicName(ti->text(1), i);
|
graphic->setGraphicName(ti->text(1), i);
|
||||||
pol.clear();
|
pol.clear();
|
||||||
if (ti->checkState(0) == Qt::Checked) {
|
if (ti->checkState(0) == Qt::Checked) {
|
||||||
if (evaluator.check(ti->text(1))) {
|
if (evaluator.check(Q2PIString(ti->text(1)))) {
|
||||||
cx = sx;
|
cx = sx;
|
||||||
while (cx < fx) {
|
while (cx < fx) {
|
||||||
evaluator.setVariable(vi, complexd(cx, 0.));
|
evaluator.setVariable(vi, complexd(cx, 0.));
|
||||||
@@ -140,19 +141,19 @@ void MainWindow::saving(QPIConfig & conf) {
|
|||||||
|
|
||||||
|
|
||||||
void MainWindow::on_lineInput_textChanged(QString text) {
|
void MainWindow::on_lineInput_textChanged(QString text) {
|
||||||
if (evaluator.check(text)) lineInput->setPalette(npal);
|
if (evaluator.check(Q2PIString(text))) lineInput->setPalette(npal);
|
||||||
else lineInput->setPalette(epal);
|
else lineInput->setPalette(epal);
|
||||||
labelParsed->setText(evaluator.expression());
|
labelParsed->setText(PI2QString(evaluator.expression()));
|
||||||
labelError->setText(evaluator.error());
|
labelError->setText(PI2QString(evaluator.error()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_lineInput_returnPressed() {
|
void MainWindow::on_lineInput_returnPressed() {
|
||||||
bool ret = evaluator.check(lineInput->text());
|
bool ret = evaluator.check(Q2PIString(lineInput->text()));
|
||||||
if (ret) lineInput->setPalette(npal);
|
if (ret) lineInput->setPalette(npal);
|
||||||
else lineInput->setPalette(epal);
|
else lineInput->setPalette(epal);
|
||||||
labelParsed->setText(evaluator.expression());
|
labelParsed->setText(PI2QString(evaluator.expression()));
|
||||||
labelError->setText(evaluator.error());
|
labelError->setText(PI2QString(evaluator.error()));
|
||||||
if (!ret) return;
|
if (!ret) return;
|
||||||
complexd val = evaluator.evaluate();
|
complexd val = evaluator.evaluate();
|
||||||
evaluator.setVariable(ans, val);
|
evaluator.setVariable(ans, val);
|
||||||
@@ -182,6 +183,16 @@ void MainWindow::on_lineInput_returnPressed() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_treeGraphics_itemSelectionChanged() {
|
||||||
|
buttonGraphicDel->setDisabled(treeGraphics->selectedItems().isEmpty());
|
||||||
|
if (treeGraphics->currentItem()) {
|
||||||
|
int ind = treeGraphics->indexOfTopLevelItem(treeGraphics->currentItem());
|
||||||
|
if (ind < 0 || ind >= graphic->graphicsCount()) return;
|
||||||
|
graphic->setCurrentGraphic(ind);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_treeGraphics_itemDoubleClicked(QTreeWidgetItem * item, int column) {
|
void MainWindow::on_treeGraphics_itemDoubleClicked(QTreeWidgetItem * item, int column) {
|
||||||
Qt::ItemFlags f = item->flags();
|
Qt::ItemFlags f = item->flags();
|
||||||
if (column != 1) f &= ~Qt::ItemIsEditable;
|
if (column != 1) f &= ~Qt::ItemIsEditable;
|
||||||
@@ -254,7 +265,7 @@ void MainWindow::on_tabWidget_currentChanged(int index) {
|
|||||||
vn = treeVariables->topLevelItem(i)->text(0);
|
vn = treeVariables->topLevelItem(i)->text(0);
|
||||||
vv = treeVariables->topLevelItem(i)->text(1);
|
vv = treeVariables->topLevelItem(i)->text(1);
|
||||||
eval.check(vv);
|
eval.check(vv);
|
||||||
evaluator.setVariable(vn, eval.evaluate());
|
evaluator.setVariable(Q2PIString(vn), eval.evaluate());
|
||||||
}
|
}
|
||||||
if (index == 0) on_lineInput_returnPressed();
|
if (index == 0) on_lineInput_returnPressed();
|
||||||
if (index == 2) redrawGraphics();
|
if (index == 2) redrawGraphics();
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
#include <QColorDialog>
|
#include <QColorDialog>
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
#include "qpievaluator.h"
|
#include "pievaluator.h"
|
||||||
#include "session_manager.h"
|
#include "session_manager.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ private:
|
|||||||
void updateGraphics();
|
void updateGraphics();
|
||||||
void redrawGraphics();
|
void redrawGraphics();
|
||||||
|
|
||||||
QPIEvaluator evaluator;
|
PIEvaluator evaluator;
|
||||||
QPalette npal, epal;
|
QPalette npal, epal;
|
||||||
SessionManager session;
|
SessionManager session;
|
||||||
int ans;
|
int ans;
|
||||||
@@ -39,7 +39,7 @@ private slots:
|
|||||||
void on_lineInput_returnPressed();
|
void on_lineInput_returnPressed();
|
||||||
void on_treeHistory_itemDoubleClicked(QTreeWidgetItem * item, int column) {lineInput->setText(item->text(0));}
|
void on_treeHistory_itemDoubleClicked(QTreeWidgetItem * item, int column) {lineInput->setText(item->text(0));}
|
||||||
void on_treeVariables_itemSelectionChanged() {buttonVarDel->setDisabled(treeVariables->selectedItems().isEmpty());}
|
void on_treeVariables_itemSelectionChanged() {buttonVarDel->setDisabled(treeVariables->selectedItems().isEmpty());}
|
||||||
void on_treeGraphics_itemSelectionChanged() {buttonGraphicDel->setDisabled(treeGraphics->selectedItems().isEmpty());}
|
void on_treeGraphics_itemSelectionChanged();
|
||||||
void on_treeGraphics_itemChanged(QTreeWidgetItem * , int col) { if (active_) redrawGraphics();}
|
void on_treeGraphics_itemChanged(QTreeWidgetItem * , int col) { if (active_) redrawGraphics();}
|
||||||
void on_treeGraphics_itemDoubleClicked(QTreeWidgetItem * item, int column);
|
void on_treeGraphics_itemDoubleClicked(QTreeWidgetItem * item, int column);
|
||||||
void on_buttonVarAdd_clicked();
|
void on_buttonVarAdd_clicked();
|
||||||
@@ -1,45 +1,9 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
||||||
project(qad)
|
project(qad)
|
||||||
set(_QAD_MAJOR 1)
|
|
||||||
set(_QAD_MINOR 7)
|
|
||||||
set(_QAD_REVISION 0)
|
|
||||||
set(_QAD_SUFFIX )
|
|
||||||
set(_QAD_COMPANY SHS)
|
|
||||||
set(_QAD_DOMAIN org.SHS)
|
|
||||||
|
|
||||||
if ("x${CMAKE_MODULE_PATH}" STREQUAL "x")
|
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
|
||||||
endif()
|
|
||||||
if (NOT LIBPROJECT)
|
|
||||||
set(_plugins_default_ 1)
|
|
||||||
if (DEFINED ANDROID_PLATFORM)
|
|
||||||
set(_plugins_default_ 0)
|
|
||||||
endif()
|
|
||||||
option(LIB "System install" 1)
|
|
||||||
option(DEBUG "Build with -g3" 0)
|
|
||||||
option(DESIGNER_PLUGINS "Build qt designer plugins" ${_plugins_default_})
|
|
||||||
option(STATIC_LIB OFF)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall")
|
|
||||||
if (DEBUG)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
|
|
||||||
endif ()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(QADMacros)
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
set(EXPORT_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/qad_export.h")
|
|
||||||
|
|
||||||
if(STATIC_LIB)
|
|
||||||
set(QAD_LIB_TYPE STATIC)
|
|
||||||
add_definitions(-DQAD_STATIC_DEFINE)
|
|
||||||
#message(STATUS "Building QAD static libraries")
|
|
||||||
else()
|
|
||||||
set(QAD_LIB_TYPE SHARED)
|
|
||||||
#message(STATUS "Building QAD shared libraries")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT DEFINED ANDROID_PLATFORM)
|
if (NOT DEFINED ANDROID_PLATFORM)
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
@@ -52,50 +16,19 @@ endif()
|
|||||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/qad_version.h")
|
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/qad_version.h")
|
||||||
file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/qad_version.h")
|
file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/qad_version.h")
|
||||||
endif()
|
endif()
|
||||||
set(QAD_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/qad_version.h")
|
#message(STATUS "Building QAD version ${QAD_VERSION} (${QAD_LIB_TYPE})")
|
||||||
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}")
|
|
||||||
message(STATUS "Building QAD version ${QAD_VERSION} (${QAD_LIB_TYPE})")
|
|
||||||
|
|
||||||
|
|
||||||
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()
|
|
||||||
set(CMAKE_INSTALL_PREFIX /usr/local)
|
|
||||||
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()
|
|
||||||
|
|
||||||
file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in")
|
file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in")
|
||||||
|
|
||||||
if (LIB)
|
if (LIB)
|
||||||
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
|
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
install(FILES ${EXPORT_HEADER} DESTINATION ${MINGW_INCLUDE}/qad)
|
install(FILES ${QAD_VERSION_FILE} DESTINATION ${MINGW_INCLUDE}/qad)
|
||||||
else()
|
else()
|
||||||
install(FILES ${EXPORT_HEADER} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/qad)
|
install(FILES ${QAD_VERSION_FILE} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/qad)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
install(FILES ${EXPORT_HEADER} DESTINATION include/qad)
|
install(FILES ${QAD_VERSION_FILE} DESTINATION include/qad)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(libs)
|
add_subdirectory(libs)
|
||||||
@@ -103,9 +36,5 @@ if (UTILS)
|
|||||||
add_subdirectory(utils)
|
add_subdirectory(utils)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
copy_to_parent(qad_includes)
|
||||||
set(qad_includes ${qad_includes} PARENT_SCOPE)
|
|
||||||
if (LIB)
|
|
||||||
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
|
|
||||||
macro(_qt_install _TARGET IS_APP _DIR _HDR_VAR _QM_FILES)
|
macro(_qt_install _TARGET IS_APP _DIR _HDR_VAR _QM_FILES)
|
||||||
if ("${_TARGET}" STREQUAL "qad_utils")
|
|
||||||
list(APPEND ${_HDR_VAR} "${QAD_VERSION_FILE}")
|
|
||||||
endif()
|
|
||||||
sdk_install("${_DIR}" ${IS_APP} "${_TARGET}" "${${_HDR_VAR}}" "${_QM_FILES}")
|
sdk_install("${_DIR}" ${IS_APP} "${_TARGET}" "${${_HDR_VAR}}" "${_QM_FILES}")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
macro(qad_plugin NAME _MODULES _LIBS)
|
macro(_qt_plugin NAME _MODULES _LIBS)
|
||||||
if (NOT STATIC_LIB)
|
if (NOT STATIC_LIB)
|
||||||
if(DESIGNER_PLUGINS)
|
if(DESIGNER_PLUGINS)
|
||||||
set(PROJ_NAME qad_${NAME}_plugin)
|
set(PROJ_NAME ${NAME}_plugin)
|
||||||
include_directories("..")
|
include_directories("..")
|
||||||
add_definitions(-DQT_PLUGIN)
|
add_definitions(-DQT_PLUGIN)
|
||||||
add_definitions(-DQT_NO_DEBUG)
|
add_definitions(-DQT_NO_DEBUG)
|
||||||
@@ -20,12 +17,14 @@ macro(qad_plugin NAME _MODULES _LIBS)
|
|||||||
qt_sources(SRC)
|
qt_sources(SRC)
|
||||||
qt_wrap(${SRC} CPPS out_CPP QMS out_QM)
|
qt_wrap(${SRC} CPPS out_CPP QMS out_QM)
|
||||||
qt_add_library(${PROJ_NAME} SHARED out_CPP)
|
qt_add_library(${PROJ_NAME} SHARED out_CPP)
|
||||||
qt_target_link_libraries(${PROJ_NAME} ${_LIBS} qad_${NAME} ${_${NAME}_PLUGIN_LIBS})
|
qt_target_link_libraries(${PROJ_NAME} ${_LIBS} ${_${NAME}_PLUGIN_LIBS})
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
qt_install(TARGETS ${PROJ_NAME} RUNTIME DESTINATION QtPlugins/designer)
|
qt_install(TARGETS ${PROJ_NAME} RUNTIME DESTINATION QtPlugins/designer)
|
||||||
else()
|
else()
|
||||||
qt_install(TARGETS ${PROJ_NAME} DESTINATION QtPlugins/designer)
|
qt_install(TARGETS ${PROJ_NAME} DESTINATION QtPlugins/designer)
|
||||||
endif()
|
endif()
|
||||||
|
list(APPEND _qt_plugs ${NAME})
|
||||||
|
copy_to_parent("")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
@@ -38,12 +37,14 @@ macro(_qt_project NAME IS_APP DOMAIN _MODULES _LIBS)
|
|||||||
import_version(${PROJ_NAME} ${DOMAIN})
|
import_version(${PROJ_NAME} ${DOMAIN})
|
||||||
import_deploy_properties(${PROJ_NAME} ${DOMAIN})
|
import_deploy_properties(${PROJ_NAME} ${DOMAIN})
|
||||||
if (${IS_APP})
|
if (${IS_APP})
|
||||||
|
list(APPEND _qt_apps ${PROJ_NAME})
|
||||||
set_deploy_property(${PROJ_NAME}
|
set_deploy_property(${PROJ_NAME}
|
||||||
LABEL ${PROJ_NAME}
|
LABEL ${PROJ_NAME}
|
||||||
FULLNAME "${_${DOMAIN}_DOMAIN}.${PROJ_NAME}"
|
FULLNAME "${_${DOMAIN}_DOMAIN}.${PROJ_NAME}"
|
||||||
INFO "${APP_INFO}"
|
INFO "${APP_INFO}"
|
||||||
ICON "${APP_ICON}")
|
ICON "${APP_ICON}")
|
||||||
else()
|
else()
|
||||||
|
list(APPEND _qt_libs ${PROJ_NAME})
|
||||||
set_deploy_property(${PROJ_NAME} SHARED
|
set_deploy_property(${PROJ_NAME} SHARED
|
||||||
LABEL ${PROJ_NAME}
|
LABEL ${PROJ_NAME}
|
||||||
FULLNAME "${_${DOMAIN}_DOMAIN}.${PROJ_NAME}"
|
FULLNAME "${_${DOMAIN}_DOMAIN}.${PROJ_NAME}"
|
||||||
@@ -58,15 +59,17 @@ macro(_qt_project NAME IS_APP DOMAIN _MODULES _LIBS)
|
|||||||
if(NOT STATIC_LIB)
|
if(NOT STATIC_LIB)
|
||||||
qt_target_compile_definitions(${PROJ_NAME} PRIVATE ${DOMAIN}_SHARED_DEFINE)
|
qt_target_compile_definitions(${PROJ_NAME} PRIVATE ${DOMAIN}_SHARED_DEFINE)
|
||||||
endif()
|
endif()
|
||||||
|
qt_generate_export_header(${PROJ_NAME})
|
||||||
|
list(APPEND out_HDR "${CMAKE_CURRENT_BINARY_DIR}/${PROJ_NAME}_export.h")
|
||||||
endif()
|
endif()
|
||||||
qt_target_link_libraries(${PROJ_NAME} ${_LIBS})
|
qt_target_link_libraries(${PROJ_NAME} ${_LIBS})
|
||||||
list(APPEND QT_MULTILIB_LIST ${PROJ_NAME})
|
list(APPEND QT_MULTILIB_LIST ${PROJ_NAME})
|
||||||
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
#message(STATUS "Building ${PROJ_NAME}")
|
||||||
message(STATUS "Building ${PROJ_NAME}")
|
|
||||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugin")
|
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugin")
|
||||||
set(_${NAME}_PLUGIN_LIBS "${_LIBS}")
|
set(_${NAME}_PLUGIN_LIBS "${_LIBS}")
|
||||||
add_subdirectory(plugin)
|
add_subdirectory(plugin)
|
||||||
endif()
|
endif()
|
||||||
|
copy_to_parent("")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
@@ -80,3 +83,8 @@ macro(qad_application NAME _MODULES _LIBS)
|
|||||||
_qt_project(${NAME} TRUE "QAD" "${_MODULES}" "${_LIBS}")
|
_qt_project(${NAME} TRUE "QAD" "${_MODULES}" "${_LIBS}")
|
||||||
_qt_install(${NAME} TRUE "qad" "" "out_QM")
|
_qt_install(${NAME} TRUE "qad" "" "out_QM")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
macro(qad_plugin NAME _MODULES _LIBS)
|
||||||
|
_qt_plugin(qad_${NAME} "${_MODULES}" "qad_${NAME};${_LIBS}")
|
||||||
|
endmacro()
|
||||||
|
|||||||
@@ -101,6 +101,30 @@ in Qt<?>_LANG_DIR for <name>_LANG languages
|
|||||||
and install them to <dir>. PATH are additional search paths.
|
and install them to <dir>. PATH are additional search paths.
|
||||||
You should use "set_lang()" macro before this action
|
You should use "set_lang()" macro before this action
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
qt_get_target(<name> <var> [Qt4 | Qt5])
|
||||||
|
|
||||||
|
Write real <name> Qt target name to <var>
|
||||||
|
If Qt4 or Qt5 specified, search for this version,
|
||||||
|
otherwise returns greatest version
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
qt_get_targets(<name> <var>)
|
||||||
|
|
||||||
|
Write all real <name> Qt target names to <var>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
qt_generate_export_header(<name> ...)
|
||||||
|
|
||||||
|
Call generate_export_header on Qt multitarget
|
||||||
|
|
||||||
|
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
|
||||||
@@ -742,3 +766,46 @@ macro(qt_install_lang _NAME)
|
|||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
macro(qt_get_target _NAME _OUT)
|
||||||
|
set(${_OUT})
|
||||||
|
set(_ver)
|
||||||
|
foreach(_i ${ARGN})
|
||||||
|
foreach(_v ${_QT_VERSIONS_})
|
||||||
|
if ("x${_i}" STREQUAL "xQt${_v}")
|
||||||
|
set(_ver ${_v})
|
||||||
|
break()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
if (NOT "x${_ver}" STREQUAL "x")
|
||||||
|
break()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
foreach(_v ${_QT_VERSIONS_})
|
||||||
|
if (LOCAL_FOUND${_v} AND (("x${_ver}" STREQUAL "x") OR ((NOT "x${_ver}" STREQUAL "x") AND ("x${_ver}" STREQUAL "x${_v}"))))
|
||||||
|
set(${_OUT} ${_NAME}${TARGET_SUFFIX_Qt${_v}})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
macro(qt_get_targets _NAME _OUT)
|
||||||
|
set(${_OUT})
|
||||||
|
foreach(_v ${_QT_VERSIONS_})
|
||||||
|
if (LOCAL_FOUND${_v})
|
||||||
|
list(APPEND ${_OUT} ${_NAME}${TARGET_SUFFIX_Qt${_v}})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
macro(qt_generate_export_header _NAME)
|
||||||
|
qt_get_target(${_NAME} _some_target)
|
||||||
|
qt_get_target(${_NAME} _targets)
|
||||||
|
foreach(_t ${_targets})
|
||||||
|
set_target_properties(${_t} PROPERTIES DEFINE_SYMBOL ${_NAME}_EXPORTS)
|
||||||
|
endforeach()
|
||||||
|
set_target_properties(${_some_target} PROPERTIES DEFINE_SYMBOL ${_NAME}_EXPORTS)
|
||||||
|
generate_export_header(${_some_target} BASE_NAME "${_NAME}" ${ARGN})
|
||||||
|
endmacro()
|
||||||
|
|||||||
@@ -20,8 +20,9 @@
|
|||||||
#ifndef ABOUTWINDOW_H
|
#ifndef ABOUTWINDOW_H
|
||||||
#define ABOUTWINDOW_H
|
#define ABOUTWINDOW_H
|
||||||
|
|
||||||
#include "qad_export.h"
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
#include "qad_application_export.h"
|
||||||
|
|
||||||
|
|
||||||
#define ADD_ABOUT_VERSION(lib) \
|
#define ADD_ABOUT_VERSION(lib) \
|
||||||
{ \
|
{ \
|
||||||
@@ -47,7 +48,7 @@ namespace Ui {
|
|||||||
class AboutWindow;
|
class AboutWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
class QAD_EXPORT AboutWindow: public QDialog
|
class QAD_APPLICATION_EXPORT AboutWindow: public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
typedef QPair<QString, QString> SSPair;
|
typedef QPair<QString, QString> SSPair;
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
<string>OK</string>
|
<string>OK</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
<iconset resource="qad_application.qrc">
|
||||||
<normaloff>:/icons/dialog-ok-apply.png</normaloff>:/icons/dialog-ok-apply.png</iconset>
|
<normaloff>:/icons/dialog-ok-apply.png</normaloff>:/icons/dialog-ok-apply.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -131,7 +131,6 @@
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../widgets/qad_widgets.qrc"/>
|
|
||||||
<include location="qad_application.qrc"/>
|
<include location="qad_application.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
|
|||||||
@@ -27,10 +27,10 @@
|
|||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "qad_export.h"
|
#include "qad_application_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT EDockWidget: public QDockWidget
|
class QAD_APPLICATION_EXPORT EDockWidget: public QDockWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -32,9 +32,10 @@
|
|||||||
#include <QSplitter>
|
#include <QSplitter>
|
||||||
#include "session_manager.h"
|
#include "session_manager.h"
|
||||||
#include "ribbon.h"
|
#include "ribbon.h"
|
||||||
|
#include "qad_application_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT UAction: public QAction {
|
class QAD_APPLICATION_EXPORT UAction: public QAction {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
UAction(int ind,const QString & text, QObject * parent): QAction(text, parent) {
|
UAction(int ind,const QString & text, QObject * parent): QAction(text, parent) {
|
||||||
@@ -67,7 +68,7 @@ signals:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT EMainWindow: public QMainWindow
|
class QAD_APPLICATION_EXPORT EMainWindow: public QMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(int maxRecentItems READ maxRecentItems WRITE setMaxRecentItems)
|
Q_PROPERTY(int maxRecentItems READ maxRecentItems WRITE setMaxRecentItems)
|
||||||
|
|||||||
@@ -30,10 +30,10 @@
|
|||||||
#include <QLayout>
|
#include <QLayout>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include "qad_export.h"
|
#include "qad_application_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT ETabWidget: public QTabWidget
|
class QAD_APPLICATION_EXPORT ETabWidget: public QTabWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -51,7 +51,7 @@ private:
|
|||||||
void tabRemoved(int) {emit countChanged();}
|
void tabRemoved(int) {emit countChanged();}
|
||||||
void changeEvent(QEvent * e);
|
void changeEvent(QEvent * e);
|
||||||
|
|
||||||
struct TabButton {
|
struct QAD_APPLICATION_EXPORT TabButton {
|
||||||
TabButton(int r, const QIcon & i, const QString & t) {role = r; icon = i; visible = true; srcToolTip = t; toolTip = QApplication::translate("MainWindow", t.toUtf8(), 0/*, QCoreApplication::UnicodeUTF8*/);}
|
TabButton(int r, const QIcon & i, const QString & t) {role = r; icon = i; visible = true; srcToolTip = t; toolTip = QApplication::translate("MainWindow", t.toUtf8(), 0/*, QCoreApplication::UnicodeUTF8*/);}
|
||||||
int role;
|
int role;
|
||||||
bool visible;
|
bool visible;
|
||||||
|
|||||||
@@ -22,10 +22,10 @@
|
|||||||
|
|
||||||
#include <QListWidget>
|
#include <QListWidget>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "qad_export.h"
|
#include "qad_application_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT HistoryView: public QListWidget
|
class QAD_APPLICATION_EXPORT HistoryView: public QListWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(bool active READ isActive WRITE setActive)
|
Q_PROPERTY(bool active READ isActive WRITE setActive)
|
||||||
@@ -46,7 +46,7 @@ public:
|
|||||||
void registerAction(int action, const QString & text, const QImage & icon = QImage());
|
void registerAction(int action, const QString & text, const QImage & icon = QImage());
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct Action {
|
struct QAD_APPLICATION_EXPORT Action {
|
||||||
Action(int i = -1, const QString & t = QString(), const QImage & c = QImage()): id(i), text(t) {
|
Action(int i = -1, const QString & t = QString(), const QImage & c = QImage()): id(i), text(t) {
|
||||||
QPixmap px = QPixmap::fromImage(c);
|
QPixmap px = QPixmap::fromImage(c);
|
||||||
icon.addPixmap(px, QIcon::Active);
|
icon.addPixmap(px, QIcon::Active);
|
||||||
@@ -58,7 +58,7 @@ private:
|
|||||||
QString text;
|
QString text;
|
||||||
QIcon icon;
|
QIcon icon;
|
||||||
};
|
};
|
||||||
struct Entry {
|
struct QAD_APPLICATION_EXPORT Entry {
|
||||||
Entry(int a = -1, const QByteArray & c = QByteArray()): action(a), command(c) {}
|
Entry(int a = -1, const QByteArray & c = QByteArray()): action(a), command(c) {}
|
||||||
int action;
|
int action;
|
||||||
QByteArray command;
|
QByteArray command;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
# include <QRegExp>
|
# include <QRegExp>
|
||||||
typedef QRegExp QRegularExpression;
|
typedef QRegExp QRegularExpression;
|
||||||
#endif
|
#endif
|
||||||
#include "qad_export.h"
|
#include "qad_application_export.h"
|
||||||
|
|
||||||
class QTextEdit;
|
class QTextEdit;
|
||||||
class QTextBlock;
|
class QTextBlock;
|
||||||
@@ -40,7 +40,7 @@ namespace Ui {
|
|||||||
class LogView;
|
class LogView;
|
||||||
}
|
}
|
||||||
|
|
||||||
class QAD_EXPORT LogView: public QWidget
|
class QAD_APPLICATION_EXPORT LogView: public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(bool filterVisible READ isFilterVisible WRITE setFilterVisible)
|
Q_PROPERTY(bool filterVisible READ isFilterVisible WRITE setFilterVisible)
|
||||||
@@ -75,7 +75,7 @@ public:
|
|||||||
void addText(const QString & text, bool insert_newline = true);
|
void addText(const QString & text, bool insert_newline = true);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct Category {
|
struct QAD_APPLICATION_EXPORT Category {
|
||||||
Category();
|
Category();
|
||||||
void makeIcon(QSize size, QSize size_icon);
|
void makeIcon(QSize size, QSize size_icon);
|
||||||
QString label;
|
QString label;
|
||||||
|
|||||||
@@ -1,34 +1,17 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>../../icons/application-exit.png</file>
|
<file>../../icons/dialog-ok-apply.png</file>
|
||||||
<file>../../icons/dialog-close.png</file>
|
|
||||||
<file>../../icons/configure.png</file>
|
<file>../../icons/configure.png</file>
|
||||||
<file>../../icons/document-edit.png</file>
|
|
||||||
<file>../../icons/document-new.png</file>
|
|
||||||
<file>../../icons/document-save.png</file>
|
|
||||||
<file>../../icons/document-save-all.png</file>
|
|
||||||
<file>../../icons/document-save-as.png</file>
|
|
||||||
<file>../../icons/document-open.png</file>
|
|
||||||
<file>../../icons/document-open-recent.png</file>
|
|
||||||
<file>../../icons/document-close.png</file>
|
|
||||||
<file>../../icons/edit-clear.png</file>
|
<file>../../icons/edit-clear.png</file>
|
||||||
<file>../../icons/edit-clear-locationbar-rtl.png</file>
|
|
||||||
<file>../../icons/edit-find.png</file>
|
<file>../../icons/edit-find.png</file>
|
||||||
<file>../../icons/list-add.png</file>
|
|
||||||
<file>../../icons/edit-delete.png</file>
|
|
||||||
<file>../../icons/edit-copy.png</file>
|
<file>../../icons/edit-copy.png</file>
|
||||||
<file>../../icons/edit-paste.png</file>
|
|
||||||
<file>../../icons/edit-undo.png</file>
|
|
||||||
<file>../../icons/edit-redo.png</file>
|
|
||||||
<file>../../icons/border-line.png</file>
|
|
||||||
<file>../../icons/edockwidget.png</file>
|
<file>../../icons/edockwidget.png</file>
|
||||||
<file>../../icons/historyview.png</file>
|
<file>../../icons/historyview.png</file>
|
||||||
|
<file>../../icons/logview.png</file>
|
||||||
<file>../../icons/clear-history.png</file>
|
<file>../../icons/clear-history.png</file>
|
||||||
<file>../../icons/layer-visible-off.png</file>
|
<file>../../icons/layer-visible-off.png</file>
|
||||||
<file>../../icons/layer-visible-on.png</file>
|
<file>../../icons/layer-visible-on.png</file>
|
||||||
<file>../../icons/logview.png</file>
|
|
||||||
<file>../../icons/qt.png</file>
|
<file>../../icons/qt.png</file>
|
||||||
<file>../../icons/select-all.png</file>
|
<file>../../icons/select-all.png</file>
|
||||||
<file>../../icons/select-none.png</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -22,10 +22,10 @@
|
|||||||
|
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QSharedMemory>
|
#include <QSharedMemory>
|
||||||
#include "qad_export.h"
|
#include "qad_application_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT QSingleApplication: public QThread
|
class QAD_APPLICATION_EXPORT QSingleApplication: public QThread
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -31,9 +31,10 @@
|
|||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
#include <QScrollArea>
|
#include <QScrollArea>
|
||||||
#include "etabwidget.h"
|
#include "etabwidget.h"
|
||||||
|
#include "qad_application_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT Ribbon: public QToolBar
|
class QAD_APPLICATION_EXPORT Ribbon: public QToolBar
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -24,10 +24,10 @@
|
|||||||
#include <QPen>
|
#include <QPen>
|
||||||
#include <QBrush>
|
#include <QBrush>
|
||||||
#include <QFont>
|
#include <QFont>
|
||||||
#include "qad_export.h"
|
#include "qad_blockview_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT AlignedTextItem: public QGraphicsItem {
|
class QAD_BLOCKVIEW_EXPORT AlignedTextItem: public QGraphicsItem {
|
||||||
public:
|
public:
|
||||||
AlignedTextItem(QGraphicsItem * parent = 0);
|
AlignedTextItem(QGraphicsItem * parent = 0);
|
||||||
AlignedTextItem(const QString & text, QGraphicsItem * parent = 0);
|
AlignedTextItem(const QString & text, QGraphicsItem * parent = 0);
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#include <QGraphicsSceneMouseEvent>
|
#include <QGraphicsSceneMouseEvent>
|
||||||
#include <QStack>
|
#include <QStack>
|
||||||
#include "qad_types.h"
|
#include "qad_types.h"
|
||||||
|
#include "qad_blockview_export.h"
|
||||||
|
|
||||||
|
|
||||||
/// data:
|
/// data:
|
||||||
@@ -69,11 +70,11 @@ enum BlockviewItemType {
|
|||||||
bvitItemText,
|
bvitItemText,
|
||||||
};
|
};
|
||||||
|
|
||||||
QAD_EXPORT QDataStream & operator <<(QDataStream & s, const QGraphicsItem * item);
|
QAD_BLOCKVIEW_EXPORT QDataStream & operator <<(QDataStream & s, const QGraphicsItem * item);
|
||||||
QAD_EXPORT QDataStream & operator >>(QDataStream & s, QGraphicsItem *& item);
|
QAD_BLOCKVIEW_EXPORT QDataStream & operator >>(QDataStream & s, QGraphicsItem *& item);
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT BlockItemBase: public QObject
|
class QAD_BLOCKVIEW_EXPORT BlockItemBase: public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_ENUMS(Action)
|
Q_ENUMS(Action)
|
||||||
|
|||||||
@@ -21,9 +21,10 @@
|
|||||||
#define BLOCKBUSITEM_H
|
#define BLOCKBUSITEM_H
|
||||||
|
|
||||||
#include "blockitem.h"
|
#include "blockitem.h"
|
||||||
|
#include "qad_blockview_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT BlockBusItem: public QGraphicsObject, public PropertyStorage {
|
class QAD_BLOCKVIEW_EXPORT BlockBusItem: public QGraphicsObject, public PropertyStorage {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(QGraphicsItem)
|
Q_INTERFACES(QGraphicsItem)
|
||||||
Q_PROPERTY(double pointSize READ pointSize WRITE setPointSize DESIGNABLE false SCRIPTABLE false)
|
Q_PROPERTY(double pointSize READ pointSize WRITE setPointSize DESIGNABLE false SCRIPTABLE false)
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include <QTreeWidgetItem>
|
#include <QTreeWidgetItem>
|
||||||
#include <QStyledItemDelegate>
|
#include <QStyledItemDelegate>
|
||||||
#include "blockitem.h"
|
#include "blockitem.h"
|
||||||
|
#include "qad_blockview_export.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
@@ -31,7 +32,7 @@ namespace Ui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT BlockEditor : public QWidget
|
class QAD_BLOCKVIEW_EXPORT BlockEditor : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(bool editorMode READ editorMode WRITE setEditorMode)
|
Q_PROPERTY(bool editorMode READ editorMode WRITE setEditorMode)
|
||||||
@@ -84,7 +85,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT PinAlignDelegate: public QStyledItemDelegate {
|
class QAD_BLOCKVIEW_EXPORT PinAlignDelegate: public QStyledItemDelegate {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
PinAlignDelegate(QObject * parent = 0): QStyledItemDelegate(parent) {}
|
PinAlignDelegate(QObject * parent = 0): QStyledItemDelegate(parent) {}
|
||||||
@@ -95,7 +96,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT PinBusDelegate: public QStyledItemDelegate {
|
class QAD_BLOCKVIEW_EXPORT PinBusDelegate: public QStyledItemDelegate {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
PinBusDelegate(QObject * parent = 0): QStyledItemDelegate(parent) {}
|
PinBusDelegate(QObject * parent = 0): QStyledItemDelegate(parent) {}
|
||||||
|
|||||||
@@ -194,7 +194,7 @@
|
|||||||
<string>Add</string>
|
<string>Add</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_blockview.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>
|
||||||
@@ -205,7 +205,7 @@
|
|||||||
<string>Clone</string>
|
<string>Clone</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_blockview.qrc">
|
||||||
<normaloff>:/icons/edit-copy.png</normaloff>:/icons/edit-copy.png</iconset>
|
<normaloff>:/icons/edit-copy.png</normaloff>:/icons/edit-copy.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -232,7 +232,7 @@
|
|||||||
<string>Remove selected</string>
|
<string>Remove selected</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_blockview.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>
|
||||||
@@ -243,7 +243,7 @@
|
|||||||
<string>Remove all</string>
|
<string>Remove all</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_blockview.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>
|
||||||
@@ -346,7 +346,7 @@
|
|||||||
<string>Save</string>
|
<string>Save</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_blockview.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>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
@@ -376,7 +376,7 @@
|
|||||||
<string>Save as ...</string>
|
<string>Save as ...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_blockview.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>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
@@ -406,7 +406,7 @@
|
|||||||
<string>Load ...</string>
|
<string>Load ...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../application/qad_application.qrc">
|
<iconset resource="qad_blockview.qrc">
|
||||||
<normaloff>:/icons/document-open.png</normaloff>:/icons/document-open.png</iconset>
|
<normaloff>:/icons/document-open.png</normaloff>:/icons/document-open.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
@@ -433,7 +433,7 @@
|
|||||||
<string>Clear</string>
|
<string>Clear</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_blockview.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>
|
||||||
@@ -443,7 +443,7 @@
|
|||||||
</layout>
|
</layout>
|
||||||
<action name="actionRemove_items">
|
<action name="actionRemove_items">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_blockview.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>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -467,8 +467,6 @@
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../utils/qad_utils.qrc"/>
|
|
||||||
<include location="../application/qad_application.qrc"/>
|
|
||||||
<include location="qad_blockview.qrc"/>
|
<include location="qad_blockview.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
|
|||||||
@@ -20,11 +20,12 @@
|
|||||||
#ifndef BLOCKITEM_H
|
#ifndef BLOCKITEM_H
|
||||||
#define BLOCKITEM_H
|
#define BLOCKITEM_H
|
||||||
|
|
||||||
#include "blockitempin.h"
|
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
|
#include "blockitempin.h"
|
||||||
|
#include "qad_blockview_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT BlockItem: public QGraphicsObject, public PropertyStorage
|
class QAD_BLOCKVIEW_EXPORT BlockItem: public QGraphicsObject, public PropertyStorage
|
||||||
{
|
{
|
||||||
friend class BlockView;
|
friend class BlockView;
|
||||||
friend class BlockItemPin;
|
friend class BlockItemPin;
|
||||||
|
|||||||
@@ -32,13 +32,14 @@
|
|||||||
#include <qmath.h>
|
#include <qmath.h>
|
||||||
#include "blockbase.h"
|
#include "blockbase.h"
|
||||||
#include "alignedtextitem.h"
|
#include "alignedtextitem.h"
|
||||||
|
#include "qad_blockview_export.h"
|
||||||
|
|
||||||
|
|
||||||
class BlockItem;
|
class BlockItem;
|
||||||
class BlockBusItem;
|
class BlockBusItem;
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT BlockItemPin: public QGraphicsObject, public PropertyStorage
|
class QAD_BLOCKVIEW_EXPORT BlockItemPin: public QGraphicsObject, public PropertyStorage
|
||||||
{
|
{
|
||||||
friend class BlockView;
|
friend class BlockView;
|
||||||
friend class BlockItem;
|
friend class BlockItem;
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
#include <QPropertyAnimation>
|
#include <QPropertyAnimation>
|
||||||
#include "blockviewwavetrace.h"
|
#include "blockviewwavetrace.h"
|
||||||
#include "blockbusitem.h"
|
#include "blockbusitem.h"
|
||||||
|
#include "qad_blockview_export.h"
|
||||||
|
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(BlockItem*)
|
Q_DECLARE_METATYPE(BlockItem*)
|
||||||
@@ -37,7 +38,7 @@ Q_DECLARE_METATYPE(BlockItemPin*)
|
|||||||
Q_DECLARE_METATYPE(BlockBusItem*)
|
Q_DECLARE_METATYPE(BlockBusItem*)
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT BlockView: public QGraphicsView
|
class QAD_BLOCKVIEW_EXPORT BlockView: public QGraphicsView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_ENUMS(SelectionMode)
|
Q_ENUMS(SelectionMode)
|
||||||
|
|||||||
@@ -21,9 +21,10 @@
|
|||||||
#define BLOCKVIEWWAVETRACE_H
|
#define BLOCKVIEWWAVETRACE_H
|
||||||
|
|
||||||
#include "blockitem.h"
|
#include "blockitem.h"
|
||||||
|
#include "qad_blockview_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT BlockViewWavetrace {
|
class QAD_BLOCKVIEW_EXPORT BlockViewWavetrace {
|
||||||
public:
|
public:
|
||||||
BlockViewWavetrace(int width = 1, int height = 1);
|
BlockViewWavetrace(int width = 1, int height = 1);
|
||||||
|
|
||||||
@@ -52,7 +53,7 @@ public:
|
|||||||
const QVector<QPoint> & path() const;
|
const QVector<QPoint> & path() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct Cell {
|
struct QAD_BLOCKVIEW_EXPORT Cell {
|
||||||
Cell(short v = Empty): value(v), direction(0) {}
|
Cell(short v = Empty): value(v), direction(0) {}
|
||||||
short value;
|
short value;
|
||||||
short direction;
|
short direction;
|
||||||
|
|||||||
@@ -27,12 +27,13 @@
|
|||||||
#include <QPlainTextEdit>
|
#include <QPlainTextEdit>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include "blockview.h"
|
#include "blockview.h"
|
||||||
|
#include "qad_blockview_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QComboBox;
|
class QComboBox;
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT _DTSizeItem: public QGraphicsObject
|
class QAD_BLOCKVIEW_EXPORT _DTSizeItem: public QGraphicsObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -72,7 +73,7 @@ namespace Ui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT DrawTools: public QWidget
|
class QAD_BLOCKVIEW_EXPORT DrawTools: public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(bool resizeHandlesEnabled READ isResizeHandlesEnabled WRITE setResizeHandlesEnabled)
|
Q_PROPERTY(bool resizeHandlesEnabled READ isResizeHandlesEnabled WRITE setResizeHandlesEnabled)
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
<string>Edit text ...</string>
|
<string>Edit text ...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../application/qad_application.qrc">
|
<iconset resource="qad_blockview.qrc">
|
||||||
<normaloff>:/icons/document-edit.png</normaloff>:/icons/document-edit.png</iconset>
|
<normaloff>:/icons/document-edit.png</normaloff>:/icons/document-edit.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolButtonStyle">
|
<property name="toolButtonStyle">
|
||||||
@@ -591,7 +591,7 @@
|
|||||||
<string>Load image ...</string>
|
<string>Load image ...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../application/qad_application.qrc">
|
<iconset resource="qad_blockview.qrc">
|
||||||
<normaloff>:/icons/document-open.png</normaloff>:/icons/document-open.png</iconset>
|
<normaloff>:/icons/document-open.png</normaloff>:/icons/document-open.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -814,7 +814,6 @@
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../application/qad_application.qrc"/>
|
|
||||||
<include location="qad_blockview.qrc"/>
|
<include location="qad_blockview.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -1,39 +1,16 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>../../icons/draw-line.png</file>
|
|
||||||
<file>../../icons/align-hor.png</file>
|
|
||||||
<file>../../icons/align-ver.png</file>
|
|
||||||
<file>../../icons/dialog-close.png</file>
|
|
||||||
<file>../../icons/edit-clear.png</file>
|
|
||||||
<file>../../icons/edit-guides.png</file>
|
|
||||||
<file>../../icons/view-grid.png</file>
|
|
||||||
<file>../../icons/zoom-fit-best.png</file>
|
|
||||||
<file>../../icons/configure.png</file>
|
|
||||||
<file>../../icons/document-save.png</file>
|
|
||||||
<file>../../icons/edit-clear-locationbar-rtl.png</file>
|
|
||||||
<file>../../icons/edit-find.png</file>
|
|
||||||
<file>../../icons/list-add.png</file>
|
|
||||||
<file>../../icons/edit-delete.png</file>
|
|
||||||
<file>../../icons/item.png</file>
|
|
||||||
<file>../../icons/node-add.png</file>
|
|
||||||
<file>../../icons/node.png</file>
|
|
||||||
<file>../../icons/edit-copy.png</file>
|
|
||||||
<file>../../icons/edit-paste.png</file>
|
|
||||||
<file>../../icons/expand_s_x.png</file>
|
|
||||||
<file>../../icons/expand_s_y.png</file>
|
|
||||||
<file>../../icons/expand_x.png</file>
|
|
||||||
<file>../../icons/expand_y.png</file>
|
|
||||||
<file>../../icons/border-line.png</file>
|
|
||||||
<file>../../icons/legend.png</file>
|
|
||||||
<file>../../icons/blockview.png</file>
|
<file>../../icons/blockview.png</file>
|
||||||
<file>../../icons/view-fullscreen.png</file>
|
<file>../../icons/draw-line.png</file>
|
||||||
<file>../../icons/draw-ellipse.png</file>
|
<file>../../icons/draw-ellipse.png</file>
|
||||||
<file>../../icons/draw-rectangle.png</file>
|
<file>../../icons/draw-rectangle.png</file>
|
||||||
<file>../../icons/draw-text.png</file>
|
<file>../../icons/draw-text.png</file>
|
||||||
<file>../../icons/view-preview.png</file>
|
<file>../../icons/z-bottom.png</file>
|
||||||
<file>../../icons/format-fill-color.png</file>
|
<file>../../icons/z-down.png</file>
|
||||||
<file>../../icons/format-stroke-color.png</file>
|
<file>../../icons/z-top.png</file>
|
||||||
<file>../../icons/document-open.png</file>
|
<file>../../icons/z-up.png</file>
|
||||||
|
<file>../../icons/align-hor.png</file>
|
||||||
|
<file>../../icons/align-ver.png</file>
|
||||||
<file>../../icons/align-bottom-center.png</file>
|
<file>../../icons/align-bottom-center.png</file>
|
||||||
<file>../../icons/align-bottom-left.png</file>
|
<file>../../icons/align-bottom-left.png</file>
|
||||||
<file>../../icons/align-bottom-right.png</file>
|
<file>../../icons/align-bottom-right.png</file>
|
||||||
@@ -43,9 +20,15 @@
|
|||||||
<file>../../icons/align-top-center.png</file>
|
<file>../../icons/align-top-center.png</file>
|
||||||
<file>../../icons/align-top-left.png</file>
|
<file>../../icons/align-top-left.png</file>
|
||||||
<file>../../icons/align-top-right.png</file>
|
<file>../../icons/align-top-right.png</file>
|
||||||
<file>../../icons/z-bottom.png</file>
|
<file>../../icons/dialog-close.png</file>
|
||||||
<file>../../icons/z-down.png</file>
|
<file>../../icons/edit-clear.png</file>
|
||||||
<file>../../icons/z-top.png</file>
|
<file>../../icons/edit-delete.png</file>
|
||||||
<file>../../icons/z-up.png</file>
|
<file>../../icons/edit-copy.png</file>
|
||||||
|
<file>../../icons/document-save.png</file>
|
||||||
|
<file>../../icons/document-open.png</file>
|
||||||
|
<file>../../icons/document-edit.png</file>
|
||||||
|
<file>../../icons/view-preview.png</file>
|
||||||
|
<file>../../icons/format-fill-color.png</file>
|
||||||
|
<file>../../icons/format-stroke-color.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -17,9 +17,11 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
find_library(MARKDOWN_LIBRARY markdown)
|
find_library(MARKDOWN_LIBRARY markdown)
|
||||||
if (MARKDOWN_LIBRARY)
|
if (MARKDOWN_LIBRARY)
|
||||||
if(_mkd_header_found)
|
qad_library(doc "Core" "${MARKDOWN_LIBRARY}")
|
||||||
qad_library(doc "Core" "${MARKDOWN_LIBRARY}")
|
if(NOT _mkd_header_found)
|
||||||
else()
|
|
||||||
message(STATUS "Found markdown library, but *.h missing!")
|
message(STATUS "Found markdown library, but *.h missing!")
|
||||||
endif()
|
endif()
|
||||||
|
else()
|
||||||
|
add_definitions("-DNO_MARKDOWN")
|
||||||
|
qad_library(doc "Core" "")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "markdown.h"
|
#include "markdown.h"
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#ifndef NO_MARKDOWN
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include MARKDOWN_HEADER
|
#include MARKDOWN_HEADER
|
||||||
}
|
}
|
||||||
@@ -77,3 +78,10 @@ QString md2html(const QByteArray & src) {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
QString md2html(const QByteArray & src) {
|
||||||
|
return src;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -21,10 +21,10 @@
|
|||||||
#define QAD_MARKDOWN_H
|
#define QAD_MARKDOWN_H
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include "qad_export.h"
|
#include "qad_doc_export.h"
|
||||||
|
|
||||||
|
|
||||||
QAD_EXPORT QString md2html(const QByteArray & src);
|
QAD_DOC_EXPORT QString md2html(const QByteArray & src);
|
||||||
|
|
||||||
|
|
||||||
#endif // QAD_MARKDOWN_H
|
#endif // QAD_MARKDOWN_H
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include <QTapAndHoldGesture>
|
#include <QTapAndHoldGesture>
|
||||||
#include <QPanGesture>
|
#include <QPanGesture>
|
||||||
#include <QPinchGesture>
|
#include <QPinchGesture>
|
||||||
|
#include <QActionGroup>
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||||
# include <QRandomGenerator>
|
# include <QRandomGenerator>
|
||||||
#endif
|
#endif
|
||||||
@@ -37,6 +38,20 @@ Graphic::Graphic(QWidget * parent): QFrame(parent), canvas(0), line_x_min(this),
|
|||||||
#endif
|
#endif
|
||||||
ui = new Ui::Graphic();
|
ui = new Ui::Graphic();
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
QActionGroup * agroup = new QActionGroup(this);
|
||||||
|
agroup->addAction(ui->actionGuidesFree );
|
||||||
|
agroup->addAction(ui->actionGuidesTraceX);
|
||||||
|
agroup->addAction(ui->actionGuidesTraceY);
|
||||||
|
ui->actionGuidesFree ->setProperty("_value", (int)Free );
|
||||||
|
ui->actionGuidesTraceX->setProperty("_value", (int)TraceX);
|
||||||
|
ui->actionGuidesTraceY->setProperty("_value", (int)TraceY);
|
||||||
|
ui->actionGuidesFree->setChecked(true);
|
||||||
|
connect(agroup, SIGNAL(triggered(QAction*)), this, SLOT(actionGuidesTriggered(QAction*)));
|
||||||
|
ui->checkGuides->addAction(ui->actionGuidesFree );
|
||||||
|
ui->checkGuides->addAction(ui->actionGuidesTraceX);
|
||||||
|
ui->checkGuides->addAction(ui->actionGuidesTraceY);
|
||||||
|
ui->buttonAutofit->addAction(ui->actionExpandX);
|
||||||
|
ui->buttonAutofit->addAction(ui->actionExpandY);
|
||||||
line_x_min.setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
line_x_min.setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
||||||
line_x_max.setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
line_x_max.setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
||||||
((QBoxLayout * )ui->widgetLY->layout())->insertWidget(0, &line_y_min);
|
((QBoxLayout * )ui->widgetLY->layout())->insertWidget(0, &line_y_min);
|
||||||
@@ -76,6 +91,7 @@ Graphic::Graphic(QWidget * parent): QFrame(parent), canvas(0), line_x_min(this),
|
|||||||
emaxx = emaxy = DBL_MIN;
|
emaxx = emaxy = DBL_MIN;
|
||||||
grad_x = grad_y = Auto;
|
grad_x = grad_y = Auto;
|
||||||
axis_type_x = Numeric;
|
axis_type_x = Numeric;
|
||||||
|
floating_axis_type = Free;
|
||||||
min_repaint_int = 25;
|
min_repaint_int = 25;
|
||||||
inc_x = 1.;
|
inc_x = 1.;
|
||||||
buffer = 0;
|
buffer = 0;
|
||||||
@@ -374,10 +390,7 @@ void Graphic::canvasMousePressEvent(QMouseEvent * e) {
|
|||||||
emit graphicMousePressEvent(canvas2real(QPointF(e->pos())), e->button());
|
emit graphicMousePressEvent(canvas2real(QPointF(e->pos())), e->button());
|
||||||
if (!navigation) return;
|
if (!navigation) return;
|
||||||
if (gestures && !need_mouse_pan) return;
|
if (gestures && !need_mouse_pan) return;
|
||||||
#ifdef HAS_GL
|
setGuidesCursor();
|
||||||
canvas_gl->setCursor(guides ? Qt::BlankCursor : Qt::ArrowCursor);
|
|
||||||
#endif
|
|
||||||
ui->canvas_raster->setCursor(guides ? Qt::BlankCursor : Qt::ArrowCursor);
|
|
||||||
prevpos = e->pos();
|
prevpos = e->pos();
|
||||||
startpos = prevpos;
|
startpos = prevpos;
|
||||||
startpos_r = canvas2real(startpos);
|
startpos_r = canvas2real(startpos);
|
||||||
@@ -393,7 +406,7 @@ void Graphic::canvasMousePressEvent(QMouseEvent * e) {
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
prevaction = curaction;
|
prevaction = curaction;
|
||||||
curaction = gaMove;
|
setCurrentAction(gaMove);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -419,10 +432,7 @@ void Graphic::canvasMouseReleaseEvent(QMouseEvent * e) {
|
|||||||
if (gestures) return;
|
if (gestures) return;
|
||||||
need_mouse_pan = false;
|
need_mouse_pan = false;
|
||||||
if (!navigation) return;
|
if (!navigation) return;
|
||||||
#ifdef HAS_GL
|
setGuidesCursor();
|
||||||
canvas_gl->setCursor(guides ? Qt::BlankCursor : Qt::ArrowCursor);
|
|
||||||
#endif
|
|
||||||
ui->canvas_raster->setCursor(guides ? Qt::BlankCursor : Qt::ArrowCursor);
|
|
||||||
QPointF tlp, brp;
|
QPointF tlp, brp;
|
||||||
QRect sr;
|
QRect sr;
|
||||||
sr = QRect(startpos, curpos).normalized();
|
sr = QRect(startpos, curpos).normalized();
|
||||||
@@ -585,18 +595,12 @@ void Graphic::setMaxVisibleTime(double val) {
|
|||||||
|
|
||||||
|
|
||||||
void Graphic::setOnlyExpandY(bool yes) {
|
void Graphic::setOnlyExpandY(bool yes) {
|
||||||
only_expand_y = yes;
|
ui->actionExpandY->setChecked(yes);
|
||||||
ui->checkExpandY->blockSignals(true);
|
|
||||||
ui->checkExpandY->setCheckable(yes);
|
|
||||||
ui->checkExpandY->blockSignals(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Graphic::setOnlyExpandX(bool yes) {
|
void Graphic::setOnlyExpandX(bool yes) {
|
||||||
only_expand_x = yes;
|
ui->actionExpandX->setChecked(yes);
|
||||||
ui->checkExpandX->blockSignals(true);
|
|
||||||
ui->checkExpandX->setCheckable(yes);
|
|
||||||
ui->checkExpandX->blockSignals(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -647,8 +651,6 @@ void Graphic::setButtons(Graphic::Buttons b) {
|
|||||||
ui->buttonAutofit->setVisible(b.testFlag(Autofit));
|
ui->buttonAutofit->setVisible(b.testFlag(Autofit));
|
||||||
ui->checkGrid->setVisible(b.testFlag(Grid));
|
ui->checkGrid->setVisible(b.testFlag(Grid));
|
||||||
ui->checkGuides->setVisible(b.testFlag(CursorAxis));
|
ui->checkGuides->setVisible(b.testFlag(CursorAxis));
|
||||||
ui->checkExpandY->setVisible(b.testFlag(OnlyExpandY));
|
|
||||||
ui->checkExpandX->setVisible(b.testFlag(OnlyExpandX));
|
|
||||||
ui->buttonFullscreen->setVisible(b.testFlag(Fullscreen));
|
ui->buttonFullscreen->setVisible(b.testFlag(Fullscreen));
|
||||||
ui->checkBorderInputs->setVisible(b.testFlag(BorderInputs));
|
ui->checkBorderInputs->setVisible(b.testFlag(BorderInputs));
|
||||||
ui->checkLegend->setVisible(b.testFlag(Legend));
|
ui->checkLegend->setVisible(b.testFlag(Legend));
|
||||||
@@ -1149,14 +1151,58 @@ void Graphic::drawGuides() {
|
|||||||
painter->resetTransform();
|
painter->resetTransform();
|
||||||
painter->setClipping(true);
|
painter->setClipping(true);
|
||||||
painter->setClipRect(QRect(gridborder.x(), 0, wid - gridborder.x(), hei - gridborder.y()));
|
painter->setClipRect(QRect(gridborder.x(), 0, wid - gridborder.x(), hei - gridborder.y()));
|
||||||
painter->drawLine(0, curpos.y(), wid, curpos.y());
|
QPoint apos = curpos;
|
||||||
painter->drawLine(curpos.x(), 0, curpos.x(), hei);
|
QPointF rpos = canvas2real(apos);
|
||||||
QString str = pointCoords(canvas2real(curpos)) + fp_size;
|
QString str;
|
||||||
|
str = pointCoords(rpos) + fp_size;
|
||||||
|
switch (floating_axis_type) {
|
||||||
|
case TraceX:
|
||||||
|
if (curGraphic >= 0 && curGraphic < graphics.size()) {
|
||||||
|
QPolygonF & pol(pause_ ? graphics[curGraphic].polyline_pause : graphics[curGraphic].polyline);
|
||||||
|
double cursor = rpos.x(), min_dist = -1, dist = 0.;
|
||||||
|
int index = -1;
|
||||||
|
for (int i = 0; i < pol.size(); ++i) {
|
||||||
|
dist = qAbs<double>(pol[i].x() - cursor);
|
||||||
|
if (min_dist > dist || min_dist < 0) {
|
||||||
|
min_dist = dist;
|
||||||
|
index = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (index >= 0) {
|
||||||
|
rpos = pol[index];
|
||||||
|
apos = real2canvas(rpos).toPoint();
|
||||||
|
str = pointCoords(pol[index]) + fp_size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TraceY:
|
||||||
|
if (curGraphic >= 0 && curGraphic < graphics.size()) {
|
||||||
|
QPolygonF & pol(pause_ ? graphics[curGraphic].polyline_pause : graphics[curGraphic].polyline);
|
||||||
|
double cursor = rpos.y(), min_dist = -1, dist = 0.;
|
||||||
|
int index = -1;
|
||||||
|
for (int i = 0; i < pol.size(); ++i) {
|
||||||
|
dist = qAbs<double>(pol[i].y() - cursor);
|
||||||
|
if (min_dist > dist || min_dist < 0) {
|
||||||
|
min_dist = dist;
|
||||||
|
index = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (index >= 0) {
|
||||||
|
rpos = pol[index];
|
||||||
|
apos = real2canvas(rpos).toPoint();
|
||||||
|
str = pointCoords(pol[index]) + fp_size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
painter->drawLine(0, apos.y(), wid, apos.y());
|
||||||
|
painter->drawLine(apos.x(), 0, apos.x(), hei);
|
||||||
|
QPoint p = apos + QPoint(font_sz.height() / 4., -font_sz.height() / 4.);
|
||||||
QFontMetrics fm(font());
|
QFontMetrics fm(font());
|
||||||
QRect r = fm.boundingRect(str);
|
QRect r = fm.boundingRect(str);
|
||||||
QPoint p = curpos + QPoint(font_sz.height() / 4., -font_sz.height() / 4.);
|
if (r.width() + apos.x() > wid - font_sz.height() / 2.) p.setX(apos.x() - r.width() - font_sz.height() / 4.);
|
||||||
if (r.width() + curpos.x() > wid - font_sz.height() / 2.) p.setX(curpos.x() - r.width() - font_sz.height() / 4.);
|
if (apos.y() - r.height() < font_sz.height() / 8.) p.setY(apos.y() + r.height() - font_sz.height() / 8.);
|
||||||
if (curpos.y() - r.height() < font_sz.height() / 8.) p.setY(curpos.y() + r.height() - font_sz.height() / 8.);
|
|
||||||
painter->setPen(text_color);
|
painter->setPen(text_color);
|
||||||
painter->drawText(p, str);
|
painter->drawText(p, str);
|
||||||
}
|
}
|
||||||
@@ -1287,8 +1333,7 @@ void Graphic::setCurrentAction(GraphicAction action) {
|
|||||||
curaction = action;
|
curaction = action;
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case gaNone:
|
case gaNone:
|
||||||
if (guides) setCanvasCursor(Qt::BlankCursor);
|
setGuidesCursor();
|
||||||
else setCanvasCursor(Qt::ArrowCursor);
|
|
||||||
break;
|
break;
|
||||||
case gaZoomInRect:
|
case gaZoomInRect:
|
||||||
setCanvasCursor(Qt::CrossCursor);
|
setCanvasCursor(Qt::CrossCursor);
|
||||||
@@ -1314,6 +1359,14 @@ void Graphic::setCanvasCursor(QCursor cursor) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Graphic::setGuidesCursor() {
|
||||||
|
if (guides) {
|
||||||
|
setCanvasCursor(floating_axis_type == Free ? Qt::BlankCursor : Qt::CrossCursor);
|
||||||
|
} else
|
||||||
|
setCanvasCursor(Qt::ArrowCursor);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Graphic::swapToBuffer() {
|
void Graphic::swapToBuffer() {
|
||||||
QImage timg;
|
QImage timg;
|
||||||
#ifdef HAS_GL
|
#ifdef HAS_GL
|
||||||
@@ -1461,8 +1514,7 @@ void Graphic::on_buttonConfigure_clicked() {
|
|||||||
|
|
||||||
void Graphic::on_checkGuides_toggled(bool checked) {
|
void Graphic::on_checkGuides_toggled(bool checked) {
|
||||||
guides = checked;
|
guides = checked;
|
||||||
if (guides) setCanvasCursor(Qt::BlankCursor);
|
setGuidesCursor();
|
||||||
else setCanvasCursor(Qt::ArrowCursor);
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1733,13 +1785,19 @@ void Graphic::setLegendVisible(bool visible) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Graphic::on_checkExpandY_toggled(bool checked) {
|
void Graphic::on_actionExpandX_triggered(bool checked) {
|
||||||
only_expand_y = checked;
|
|
||||||
ui->checkExpandY->setIcon(checked ? icon_exp_y : icon_exp_sy);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Graphic::on_checkExpandX_toggled(bool checked) {
|
|
||||||
only_expand_x = checked;
|
only_expand_x = checked;
|
||||||
ui->checkExpandX->setIcon(checked ? icon_exp_x : icon_exp_sx);
|
ui->actionExpandX->setIcon(checked ? icon_exp_x : icon_exp_sx);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Graphic::on_actionExpandY_triggered(bool checked) {
|
||||||
|
only_expand_y = checked;
|
||||||
|
ui->actionExpandY->setIcon(checked ? icon_exp_y : icon_exp_sy);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Graphic::actionGuidesTriggered(QAction * a) {
|
||||||
|
ui->checkGuides->setChecked(true);
|
||||||
|
setFloatingAxisType((FloatingAxisType)a->property("_value").toInt());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include "graphic_conf.h"
|
#include "graphic_conf.h"
|
||||||
#include "evalspinbox.h"
|
#include "evalspinbox.h"
|
||||||
|
#include "qad_graphic_export.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
@@ -48,11 +49,11 @@ class UGLWidget;
|
|||||||
Q_DECLARE_METATYPE(QVector<QPointF>)
|
Q_DECLARE_METATYPE(QVector<QPointF>)
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT Graphic: public QFrame
|
class QAD_GRAPHIC_EXPORT Graphic: public QFrame
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_FLAGS(Buttons)
|
Q_FLAGS(Buttons)
|
||||||
Q_ENUMS(Alignment Graduation AxisType)
|
Q_ENUMS(Alignment Graduation AxisType FloatingAxisType)
|
||||||
|
|
||||||
Q_PROPERTY(QString caption READ caption WRITE setCaption)
|
Q_PROPERTY(QString caption READ caption WRITE setCaption)
|
||||||
Q_PROPERTY(QString labelX READ labelX WRITE setLabelX)
|
Q_PROPERTY(QString labelX READ labelX WRITE setLabelX)
|
||||||
@@ -112,6 +113,7 @@ class QAD_EXPORT Graphic: public QFrame
|
|||||||
Q_PROPERTY(double graduationStepX READ graduationStepX WRITE setGraduationStepX)
|
Q_PROPERTY(double graduationStepX READ graduationStepX WRITE setGraduationStepX)
|
||||||
Q_PROPERTY(double graduationStepY READ graduationStepY WRITE setGraduationStepY)
|
Q_PROPERTY(double graduationStepY READ graduationStepY WRITE setGraduationStepY)
|
||||||
Q_PROPERTY(AxisType axisType READ axisType WRITE setAxisType)
|
Q_PROPERTY(AxisType axisType READ axisType WRITE setAxisType)
|
||||||
|
Q_PROPERTY(FloatingAxisType floatingAxisType READ floatingAxisType WRITE setFloatingAxisType)
|
||||||
|
|
||||||
Q_PROPERTY(Graphic::GraphicsData graphicsData READ graphicsData WRITE setGraphicsData)
|
Q_PROPERTY(Graphic::GraphicsData graphicsData READ graphicsData WRITE setGraphicsData)
|
||||||
Q_PROPERTY(QByteArray graphicsDataRaw READ graphicsDataRaw WRITE setGraphicsDataRaw)
|
Q_PROPERTY(QByteArray graphicsDataRaw READ graphicsDataRaw WRITE setGraphicsDataRaw)
|
||||||
@@ -127,8 +129,6 @@ public:
|
|||||||
Autofit = 0x01,
|
Autofit = 0x01,
|
||||||
Grid = 0x02,
|
Grid = 0x02,
|
||||||
CursorAxis = 0x04,
|
CursorAxis = 0x04,
|
||||||
OnlyExpandY = 0x08,
|
|
||||||
OnlyExpandX = 0x10,
|
|
||||||
Fullscreen = 0x20,
|
Fullscreen = 0x20,
|
||||||
BorderInputs = 0x40,
|
BorderInputs = 0x40,
|
||||||
Legend = 0x80,
|
Legend = 0x80,
|
||||||
@@ -142,6 +142,7 @@ public:
|
|||||||
enum Alignment {Left, Right};
|
enum Alignment {Left, Right};
|
||||||
enum Graduation {Auto, Fixed};
|
enum Graduation {Auto, Fixed};
|
||||||
enum AxisType {Numeric, DateTime};
|
enum AxisType {Numeric, DateTime};
|
||||||
|
enum FloatingAxisType {Free, TraceX, TraceY};
|
||||||
Q_DECLARE_FLAGS(Buttons, Button)
|
Q_DECLARE_FLAGS(Buttons, Button)
|
||||||
|
|
||||||
QString caption() const;
|
QString caption() const;
|
||||||
@@ -199,6 +200,7 @@ public:
|
|||||||
double graduationStepX() const {return gridx;}
|
double graduationStepX() const {return gridx;}
|
||||||
double graduationStepY() const {return gridy;}
|
double graduationStepY() const {return gridy;}
|
||||||
AxisType axisType() const {return axis_type_x;}
|
AxisType axisType() const {return axis_type_x;}
|
||||||
|
FloatingAxisType floatingAxisType() const {return floating_axis_type;}
|
||||||
QVector<QPointF> graphicData(const int index = 0) const {return graphics[index].polyline;}
|
QVector<QPointF> graphicData(const int index = 0) const {return graphics[index].polyline;}
|
||||||
GraphicsData graphicsData() const;
|
GraphicsData graphicsData() const;
|
||||||
QByteArray graphicsDataRaw() const;
|
QByteArray graphicsDataRaw() const;
|
||||||
@@ -293,6 +295,7 @@ public slots:
|
|||||||
void setGraduationStepY(double sy) {gridy = sy; if (aupdate) update();}
|
void setGraduationStepY(double sy) {gridy = sy; if (aupdate) update();}
|
||||||
void setGraduationSteps(double sx, double sy) {gridx = sx; gridy = sy; if (aupdate) update();}
|
void setGraduationSteps(double sx, double sy) {gridx = sx; gridy = sy; if (aupdate) update();}
|
||||||
void setAxisType(AxisType t) {axis_type_x = t; if (aupdate) update();}
|
void setAxisType(AxisType t) {axis_type_x = t; if (aupdate) update();}
|
||||||
|
void setFloatingAxisType(FloatingAxisType t) {floating_axis_type = t; setGuidesCursor(); if (aupdate) update();}
|
||||||
|
|
||||||
void addPoint(const QPointF & p, int graphic, bool update_ = true);
|
void addPoint(const QPointF & p, int graphic, bool update_ = true);
|
||||||
void addPoint(const QPointF & p, bool update = true) {addPoint(p, curGraphic, update);}
|
void addPoint(const QPointF & p, bool update = true) {addPoint(p, curGraphic, update);}
|
||||||
@@ -345,6 +348,7 @@ protected:
|
|||||||
void updateLegend(bool es = true);
|
void updateLegend(bool es = true);
|
||||||
void updateLegendChecks();
|
void updateLegendChecks();
|
||||||
void setCanvasCursor(QCursor cursor);
|
void setCanvasCursor(QCursor cursor);
|
||||||
|
void setGuidesCursor();
|
||||||
void swapToBuffer();
|
void swapToBuffer();
|
||||||
void swapToNormal() {bufferActive = false;}
|
void swapToNormal() {bufferActive = false;}
|
||||||
void setRectToLines();
|
void setRectToLines();
|
||||||
@@ -387,6 +391,7 @@ protected:
|
|||||||
QImage icon_pause_b, icon_pause_f;
|
QImage icon_pause_b, icon_pause_f;
|
||||||
Graduation grad_x, grad_y;
|
Graduation grad_x, grad_y;
|
||||||
AxisType axis_type_x;
|
AxisType axis_type_x;
|
||||||
|
FloatingAxisType floating_axis_type;
|
||||||
double gridx, gridy, history, visible_time, inc_x, grid_numbers_x, grid_numbers_y, LN10;
|
double gridx, gridy, history, visible_time, inc_x, grid_numbers_x, grid_numbers_y, LN10;
|
||||||
double eminx, eminy, emaxx, emaxy, pause_phase, gesture_angle;
|
double eminx, eminy, emaxx, emaxy, pause_phase, gesture_angle;
|
||||||
int lastw, lasth, min_repaint_int, timer_pause, thick;
|
int lastw, lasth, min_repaint_int, timer_pause, thick;
|
||||||
@@ -416,11 +421,12 @@ protected slots:
|
|||||||
void on_buttonSave_clicked() {saveImage();}
|
void on_buttonSave_clicked() {saveImage();}
|
||||||
void on_checkGrid_toggled(bool checked) {grid = checked; update();}
|
void on_checkGrid_toggled(bool checked) {grid = checked; update();}
|
||||||
void on_checkGuides_toggled(bool checked);
|
void on_checkGuides_toggled(bool checked);
|
||||||
void on_checkExpandY_toggled(bool checked);
|
void on_actionExpandX_triggered(bool checked);
|
||||||
void on_checkExpandX_toggled(bool checked);
|
void on_actionExpandY_triggered(bool checked);
|
||||||
void on_checkBorderInputs_toggled(bool checked) {setBorderInputsVisible(checked);}
|
void on_checkBorderInputs_toggled(bool checked) {setBorderInputsVisible(checked);}
|
||||||
void on_checkLegend_toggled(bool checked) {setLegendVisible(checked);}
|
void on_checkLegend_toggled(bool checked) {setLegendVisible(checked);}
|
||||||
void on_checkPause_toggled(bool checked) {setPaused(checked);}
|
void on_checkPause_toggled(bool checked) {setPaused(checked);}
|
||||||
|
void actionGuidesTriggered(QAction * a);
|
||||||
void enterFullscreen();
|
void enterFullscreen();
|
||||||
void leaveFullscreen();
|
void leaveFullscreen();
|
||||||
|
|
||||||
@@ -435,7 +441,6 @@ signals:
|
|||||||
void cleared();
|
void cleared();
|
||||||
void visualRectChanged();
|
void visualRectChanged();
|
||||||
void graphicSettingsChanged();
|
void graphicSettingsChanged();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -448,7 +453,7 @@ inline QDataStream & operator <<(QDataStream & s, const Graphic::Graduation & v)
|
|||||||
inline QDataStream & operator >>(QDataStream & s, Graphic::Graduation & v) {s >> *((int*)(&v)); return s;}
|
inline QDataStream & operator >>(QDataStream & s, Graphic::Graduation & v) {s >> *((int*)(&v)); return s;}
|
||||||
|
|
||||||
|
|
||||||
class __GraphicRegistrator__ {
|
class QAD_GRAPHIC_EXPORT __GraphicRegistrator__ {
|
||||||
public:
|
public:
|
||||||
__GraphicRegistrator__() {
|
__GraphicRegistrator__() {
|
||||||
qRegisterMetaType<QVector<QPointF> >("QVector<QPointF>");
|
qRegisterMetaType<QVector<QPointF> >("QVector<QPointF>");
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
<string>Grid</string>
|
<string>Grid</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
<iconset resource="qad_graphic.qrc">
|
||||||
<normaloff>:/icons/view-grid.png</normaloff>:/icons/view-grid.png</iconset>
|
<normaloff>:/icons/view-grid.png</normaloff>:/icons/view-grid.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
<string>Cursor axis</string>
|
<string>Cursor axis</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
<iconset resource="qad_graphic.qrc">
|
||||||
<normaloff>:/icons/edit-guides.png</normaloff>:/icons/edit-guides.png</iconset>
|
<normaloff>:/icons/edit-guides.png</normaloff>:/icons/edit-guides.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
@@ -89,41 +89,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="checkExpandY">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Only expand Y</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
|
||||||
<normaloff>:/icons/expand_s_y.png</normaloff>:/icons/expand_s_y.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="checkExpandX">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Only expand X</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
|
||||||
<normaloff>:/icons/expand_s_x.png</normaloff>:/icons/expand_s_x.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="buttonFullscreen">
|
<widget class="QToolButton" name="buttonFullscreen">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Fullscreen</string>
|
<string>Fullscreen</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../blockview/qad_blockview.qrc">
|
<iconset resource="qad_graphic.qrc">
|
||||||
<normaloff>:/icons/view-fullscreen.png</normaloff>:/icons/view-fullscreen.png</iconset>
|
<normaloff>:/icons/view-fullscreen.png</normaloff>:/icons/view-fullscreen.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -134,7 +106,7 @@
|
|||||||
<string>Border inputs</string>
|
<string>Border inputs</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
<iconset resource="qad_graphic.qrc">
|
||||||
<normaloff>:/icons/border-line.png</normaloff>:/icons/border-line.png</iconset>
|
<normaloff>:/icons/border-line.png</normaloff>:/icons/border-line.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
@@ -151,7 +123,7 @@
|
|||||||
<string>Legend</string>
|
<string>Legend</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
<iconset resource="qad_graphic.qrc">
|
||||||
<normaloff>:/icons/legend.png</normaloff>:/icons/legend.png</iconset>
|
<normaloff>:/icons/legend.png</normaloff>:/icons/legend.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
@@ -182,7 +154,7 @@
|
|||||||
<string>Configure ...</string>
|
<string>Configure ...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
<iconset resource="qad_graphic.qrc">
|
||||||
<normaloff>:/icons/configure.png</normaloff>:/icons/configure.png</iconset>
|
<normaloff>:/icons/configure.png</normaloff>:/icons/configure.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -193,7 +165,7 @@
|
|||||||
<string>Save image ...</string>
|
<string>Save image ...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_graphic.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>
|
||||||
@@ -220,7 +192,7 @@
|
|||||||
<string>Clear</string>
|
<string>Clear</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_graphic.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>
|
||||||
@@ -231,7 +203,7 @@
|
|||||||
<string>Close</string>
|
<string>Close</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
<iconset resource="qad_graphic.qrc">
|
||||||
<normaloff>:/icons/dialog-close.png</normaloff>:/icons/dialog-close.png</iconset>
|
<normaloff>:/icons/dialog-close.png</normaloff>:/icons/dialog-close.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -425,6 +397,49 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
<action name="actionGuidesFree">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Free</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionGuidesTraceX">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Trace X</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionGuidesTraceY">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Trace Y</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionExpandX">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Only expand X</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionExpandY">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Only expand Y</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Only expand Y</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
@@ -434,9 +449,6 @@
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../utils/qad_utils.qrc"/>
|
|
||||||
<include location="../widgets/qad_widgets.qrc"/>
|
|
||||||
<include location="../blockview/qad_blockview.qrc"/>
|
|
||||||
<include location="qad_graphic.qrc"/>
|
<include location="qad_graphic.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QPen>
|
#include <QPen>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include "qad_export.h"
|
#include "qad_graphic_export.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
@@ -32,7 +32,7 @@ namespace Ui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct QAD_EXPORT GraphicType {
|
struct QAD_GRAPHIC_EXPORT GraphicType {
|
||||||
GraphicType(QString name_ = "y(x)", QColor color = Qt::red, Qt::PenStyle style = Qt::SolidLine, double width = 0., bool visible_ = true) {
|
GraphicType(QString name_ = "y(x)", QColor color = Qt::red, Qt::PenStyle style = Qt::SolidLine, double width = 0., bool visible_ = true) {
|
||||||
pen.setColor(color);
|
pen.setColor(color);
|
||||||
pen.setStyle(style);
|
pen.setStyle(style);
|
||||||
@@ -73,14 +73,14 @@ inline QDataStream & operator <<(QDataStream & s, const GraphicType & v) {s << v
|
|||||||
inline QDataStream & operator >>(QDataStream & s, GraphicType & v) {s >> v.name >> v.pen >> v.fill_color >> v.lines >> v.points >> v.fill >> v.pointWidth >> v.visible; return s;}
|
inline QDataStream & operator >>(QDataStream & s, GraphicType & v) {s >> v.name >> v.pen >> v.fill_color >> v.lines >> v.points >> v.fill >> v.pointWidth >> v.visible; return s;}
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT GraphicConf: public QDialog
|
class QAD_GRAPHIC_EXPORT GraphicConf: public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
friend class Graphic;
|
friend class Graphic;
|
||||||
public:
|
public:
|
||||||
explicit GraphicConf(QVector<GraphicType> & graphics_, QWidget * parent = 0);
|
explicit GraphicConf(QVector<GraphicType> & graphics_, QWidget * parent = 0);
|
||||||
|
|
||||||
struct GraphicItem {
|
struct QAD_GRAPHIC_EXPORT GraphicItem {
|
||||||
QString name;
|
QString name;
|
||||||
QIcon icon;
|
QIcon icon;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,28 +1,22 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
|
<file>../../icons/expand_s_x.png</file>
|
||||||
|
<file>../../icons/expand_s_y.png</file>
|
||||||
|
<file>../../icons/expand_x.png</file>
|
||||||
|
<file>../../icons/expand_y.png</file>
|
||||||
|
<file>../../icons/pause-back.png</file>
|
||||||
|
<file>../../icons/pause-front.png</file>
|
||||||
<file>../../icons/media-playback-pause.png</file>
|
<file>../../icons/media-playback-pause.png</file>
|
||||||
<file>../../icons/dialog-close.png</file>
|
<file>../../icons/dialog-close.png</file>
|
||||||
<file>../../icons/edit-clear.png</file>
|
<file>../../icons/edit-clear.png</file>
|
||||||
<file>../../icons/edit-guides.png</file>
|
<file>../../icons/edit-guides.png</file>
|
||||||
<file>../../icons/view-grid.png</file>
|
<file>../../icons/view-grid.png</file>
|
||||||
<file>../../icons/view-autofit.png</file>
|
<file>../../icons/view-autofit.png</file>
|
||||||
|
<file>../../icons/view-fullscreen.png</file>
|
||||||
<file>../../icons/configure.png</file>
|
<file>../../icons/configure.png</file>
|
||||||
<file>../../icons/document-save.png</file>
|
<file>../../icons/document-save.png</file>
|
||||||
<file>../../icons/edit-clear-locationbar-rtl.png</file>
|
|
||||||
<file>../../icons/edit-find.png</file>
|
|
||||||
<file>../../icons/list-add.png</file>
|
|
||||||
<file>../../icons/edit-delete.png</file>
|
|
||||||
<file>../../icons/edit-copy.png</file>
|
|
||||||
<file>../../icons/edit-paste.png</file>
|
|
||||||
<file>../../icons/expand_s_x.png</file>
|
|
||||||
<file>../../icons/expand_s_y.png</file>
|
|
||||||
<file>../../icons/expand_x.png</file>
|
|
||||||
<file>../../icons/expand_y.png</file>
|
|
||||||
<file>../../icons/border-line.png</file>
|
<file>../../icons/border-line.png</file>
|
||||||
<file>../../icons/legend.png</file>
|
<file>../../icons/legend.png</file>
|
||||||
<file>../../icons/graphic.png</file>
|
<file>../../icons/graphic.png</file>
|
||||||
<file>../../icons/view-fullscreen.png</file>
|
|
||||||
<file>../../icons/pause-back.png</file>
|
|
||||||
<file>../../icons/pause-front.png</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -13,9 +13,10 @@ typedef QGLWidget __GLWidget__;
|
|||||||
# define GL_MULTISAMPLE 0x809D
|
# define GL_MULTISAMPLE 0x809D
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
#include "qad_graphic_export.h"
|
||||||
|
|
||||||
|
|
||||||
class UGLWidget: public __GLWidget__
|
class QAD_GRAPHIC_EXPORT UGLWidget: public __GLWidget__
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -6,9 +6,10 @@
|
|||||||
#include <QStyle>
|
#include <QStyle>
|
||||||
#include <QStyleOption>
|
#include <QStyleOption>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
|
#include "qad_graphic_export.h"
|
||||||
|
|
||||||
|
|
||||||
class UWidget: public QWidget
|
class QAD_GRAPHIC_EXPORT UWidget: public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -1,26 +1,11 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>../../icons/edit-table-insert-row-below.png</file>
|
|
||||||
<file>../../icons/dialog-close.png</file>
|
|
||||||
<file>../../icons/edit-clear.png</file>
|
|
||||||
<file>../../icons/edit-guides.png</file>
|
|
||||||
<file>../../icons/view-grid.png</file>
|
|
||||||
<file>../../icons/zoom-fit-best.png</file>
|
|
||||||
<file>../../icons/configure.png</file>
|
|
||||||
<file>../../icons/document-save.png</file>
|
|
||||||
<file>../../icons/edit-clear-locationbar-rtl.png</file>
|
|
||||||
<file>../../icons/edit-find.png</file>
|
|
||||||
<file>../../icons/list-add.png</file>
|
|
||||||
<file>../../icons/edit-delete.png</file>
|
|
||||||
<file>../../icons/item.png</file>
|
|
||||||
<file>../../icons/node-add.png</file>
|
|
||||||
<file>../../icons/node.png</file>
|
|
||||||
<file>../../icons/edit-copy.png</file>
|
|
||||||
<file>../../icons/edit-paste.png</file>
|
|
||||||
<file>../../icons/expand_s_x.png</file>
|
|
||||||
<file>../../icons/expand_s_y.png</file>
|
|
||||||
<file>../../icons/expand_x.png</file>
|
|
||||||
<file>../../icons/expand_y.png</file>
|
|
||||||
<file>../../icons/sql_table.png</file>
|
<file>../../icons/sql_table.png</file>
|
||||||
|
<file>../../icons/configure.png</file>
|
||||||
|
<file>../../icons/edit-delete.png</file>
|
||||||
|
<file>../../icons/edit-table-insert-row-below.png</file>
|
||||||
|
<file>../../icons/edit-find.png</file>
|
||||||
|
<file>../../icons/edit-clear.png</file>
|
||||||
|
<file>../../icons/list-add.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -26,10 +26,10 @@
|
|||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
#include "qad_export.h"
|
#include "qad_sql_table_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT SQLRecordWidget: public QWidget {
|
class QAD_SQL_TABLE_EXPORT SQLRecordWidget: public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
SQLRecordWidget(QWidget * parent = 0);
|
SQLRecordWidget(QWidget * parent = 0);
|
||||||
@@ -64,7 +64,7 @@ protected:
|
|||||||
void updateWidgets();
|
void updateWidgets();
|
||||||
QVariant::Type fieldType(const QSqlField & f);
|
QVariant::Type fieldType(const QSqlField & f);
|
||||||
|
|
||||||
struct RelationSrc {
|
struct QAD_SQL_TABLE_EXPORT RelationSrc {
|
||||||
RelationSrc(const QString & v0 = QString(), const QString & v1 = QString(), const QString & v2 = QString(), const QString & v3 = QString()):
|
RelationSrc(const QString & v0 = QString(), const QString & v1 = QString(), const QString & v2 = QString(), const QString & v3 = QString()):
|
||||||
tcol(v0),
|
tcol(v0),
|
||||||
table(v1),
|
table(v1),
|
||||||
|
|||||||
@@ -45,9 +45,10 @@
|
|||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "qpiconfig.h"
|
#include "qpiconfig.h"
|
||||||
|
#include "qad_sql_table_export.h"
|
||||||
|
|
||||||
|
|
||||||
struct QAD_EXPORT ColumnProperties {
|
struct QAD_SQL_TABLE_EXPORT ColumnProperties {
|
||||||
enum DataType {Unknown, Int, Float, Chars, Text, Binary, Date, Time, DateTime};
|
enum DataType {Unknown, Int, Float, Chars, Text, Binary, Date, Time, DateTime};
|
||||||
ColumnProperties(const QString & table_, const QString & type_, const QString & name_, const QString & def_, bool auto_, bool prim_, bool option_);
|
ColumnProperties(const QString & table_, const QString & type_, const QString & name_, const QString & def_, bool auto_, bool prim_, bool option_);
|
||||||
bool isRelation() const {return (!relation_key.isEmpty() && !relation_column.isEmpty());}
|
bool isRelation() const {return (!relation_key.isEmpty() && !relation_column.isEmpty());}
|
||||||
@@ -77,7 +78,7 @@ struct QAD_EXPORT ColumnProperties {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct QAD_EXPORT TableColumns {
|
struct QAD_SQL_TABLE_EXPORT TableColumns {
|
||||||
int mapColumn(int abs_ind) const {if (abs_ind <= 0 || abs_ind >= column_indexes.size() + 1) return 0; return column_indexes[abs_ind - 1];}
|
int mapColumn(int abs_ind) const {if (abs_ind <= 0 || abs_ind >= column_indexes.size() + 1) return 0; return column_indexes[abs_ind - 1];}
|
||||||
QVector<int> column_indexes;
|
QVector<int> column_indexes;
|
||||||
QList<ColumnProperties> columns;
|
QList<ColumnProperties> columns;
|
||||||
@@ -86,7 +87,7 @@ struct QAD_EXPORT TableColumns {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT SQLQueryModel: public QSqlQueryModel {
|
class QAD_SQL_TABLE_EXPORT SQLQueryModel: public QSqlQueryModel {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit SQLQueryModel(QString & t, QString & conn, QList<ColumnProperties> & cp, QVector<int> & ci, QObject* parent = 0): QSqlQueryModel(parent), table_(t), column_props(cp), column_indexes(ci), conn_name(conn) {;}
|
explicit SQLQueryModel(QString & t, QString & conn, QList<ColumnProperties> & cp, QVector<int> & ci, QObject* parent = 0): QSqlQueryModel(parent), table_(t), column_props(cp), column_indexes(ci), conn_name(conn) {;}
|
||||||
@@ -107,7 +108,7 @@ signals:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT SQLUniEdit: public QWidget {
|
class QAD_SQL_TABLE_EXPORT SQLUniEdit: public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit SQLUniEdit(const ColumnProperties & prop, const QString & conn_name, QWidget * parent = 0);
|
explicit SQLUniEdit(const ColumnProperties & prop, const QString & conn_name, QWidget * parent = 0);
|
||||||
@@ -147,7 +148,7 @@ signals:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT SQLNewEdit: public QWidget {
|
class QAD_SQL_TABLE_EXPORT SQLNewEdit: public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
friend class SQLTableWidget;
|
friend class SQLTableWidget;
|
||||||
public:
|
public:
|
||||||
@@ -166,7 +167,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT SQLFilterEdit: public QWidget {
|
class QAD_SQL_TABLE_EXPORT SQLFilterEdit: public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
friend class SQLTableWidget;
|
friend class SQLTableWidget;
|
||||||
public:
|
public:
|
||||||
@@ -190,7 +191,7 @@ signals:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT SQLItemDelegate: public QStyledItemDelegate {
|
class QAD_SQL_TABLE_EXPORT SQLItemDelegate: public QStyledItemDelegate {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit SQLItemDelegate(QList<ColumnProperties> & cp, QVector<int> & ci, bool & ro, const QString & conn_name, QObject * parent = 0);
|
explicit SQLItemDelegate(QList<ColumnProperties> & cp, QVector<int> & ci, bool & ro, const QString & conn_name, QObject * parent = 0);
|
||||||
@@ -216,7 +217,7 @@ namespace Ui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT SQLTableWidget: public QWidget
|
class QAD_SQL_TABLE_EXPORT SQLTableWidget: public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QString tableName READ tableName WRITE setTableName)
|
Q_PROPERTY(QString tableName READ tableName WRITE setTableName)
|
||||||
|
|||||||
@@ -24,9 +24,10 @@
|
|||||||
#include <QBoxLayout>
|
#include <QBoxLayout>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "touchbutton.h"
|
#include "touchbutton.h"
|
||||||
|
#include "qad_touch_widgets_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT TouchButtFrame: public QFrame
|
class QAD_TOUCH_WIDGETS_EXPORT TouchButtFrame: public QFrame
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QColor colorYes READ colorYes WRITE setColorYes)
|
Q_PROPERTY(QColor colorYes READ colorYes WRITE setColorYes)
|
||||||
|
|||||||
@@ -25,10 +25,10 @@
|
|||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QPropertyAnimation>
|
#include <QPropertyAnimation>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "qad_export.h"
|
#include "qad_touch_widgets_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT TouchButton: public QToolButton
|
class QAD_TOUCH_WIDGETS_EXPORT TouchButton: public QToolButton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_ENUMS(State)
|
Q_ENUMS(State)
|
||||||
@@ -53,7 +53,7 @@ public:
|
|||||||
TouchButton(int id, const QString & text = QString());
|
TouchButton(int id, const QString & text = QString());
|
||||||
~TouchButton();
|
~TouchButton();
|
||||||
|
|
||||||
enum State {Gray, Yes, No};
|
enum State {Gray, Yes, No};
|
||||||
|
|
||||||
int clickID() const {return id_click;}
|
int clickID() const {return id_click;}
|
||||||
int yesID() const {return id_yes;}
|
int yesID() const {return id_yes;}
|
||||||
@@ -77,7 +77,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
void timerEvent(QTimerEvent * e);
|
void timerEvent(QTimerEvent * e);
|
||||||
void mousePressEvent(QMouseEvent * e);
|
void mousePressEvent(QMouseEvent * e);
|
||||||
void mouseReleaseEvent(QMouseEvent * e);
|
void mouseReleaseEvent(QMouseEvent * e);
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
void animateColor(const QColor & tc);
|
void animateColor(const QColor & tc);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include <QGroupBox>
|
#include <QGroupBox>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include "qad_export.h"
|
#include "qad_touch_widgets_export.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
@@ -30,7 +30,7 @@ namespace Ui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT TouchSlider: public QGroupBox
|
class QAD_TOUCH_WIDGETS_EXPORT TouchSlider: public QGroupBox
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(bool readOnly READ readOnly WRITE setReadOnly)
|
Q_PROPERTY(bool readOnly READ readOnly WRITE setReadOnly)
|
||||||
|
|||||||
@@ -24,10 +24,10 @@
|
|||||||
#include <QBuffer>
|
#include <QBuffer>
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include "qad_export.h"
|
#include "qad_utils_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT ChunkStream
|
class QAD_UTILS_EXPORT ChunkStream
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum Version {
|
enum Version {
|
||||||
|
|||||||
@@ -29,11 +29,11 @@
|
|||||||
#include "chunkstream.h"
|
#include "chunkstream.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT PropertyStorage {
|
class QAD_UTILS_EXPORT PropertyStorage {
|
||||||
public:
|
public:
|
||||||
PropertyStorage() {}
|
PropertyStorage() {}
|
||||||
|
|
||||||
struct Property {
|
struct QAD_UTILS_EXPORT Property {
|
||||||
Property(const QString & n = QString(), const QString & c = QString(), const QVariant & v = QVariant(), int f = 0):
|
Property(const QString & n = QString(), const QString & c = QString(), const QVariant & v = QVariant(), int f = 0):
|
||||||
name(n), comment(c), value(v), flags(f) {}
|
name(n), comment(c), value(v), flags(f) {}
|
||||||
bool toBool() const {return value.toBool();}
|
bool toBool() const {return value.toBool();}
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
#ifndef QAD_LOCATIONS_H
|
#ifndef QAD_LOCATIONS_H
|
||||||
#define QAD_LOCATIONS_H
|
#define QAD_LOCATIONS_H
|
||||||
|
|
||||||
#include "qad_export.h"
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include "qad_utils_export.h"
|
||||||
|
|
||||||
|
|
||||||
namespace QAD {
|
namespace QAD {
|
||||||
@@ -36,7 +36,7 @@ namespace QAD {
|
|||||||
//! Extension is selected by "loc":
|
//! Extension is selected by "loc":
|
||||||
//! * ltConfig - "conf"
|
//! * ltConfig - "conf"
|
||||||
//! * ltCache - "cache"
|
//! * ltCache - "cache"
|
||||||
QAD_EXPORT QString userPath(LocationType loc, QString name = QString());
|
QAD_UTILS_EXPORT QString userPath(LocationType loc, QString name = QString());
|
||||||
|
|
||||||
|
|
||||||
//! Returns search directories for resource "type"
|
//! Returns search directories for resource "type"
|
||||||
@@ -44,13 +44,13 @@ namespace QAD {
|
|||||||
//! * :/<type> on mobile platforms
|
//! * :/<type> on mobile platforms
|
||||||
//! * <.app>/Resources/<type> on MacOS
|
//! * <.app>/Resources/<type> on MacOS
|
||||||
//! * /usr/share/[organizationName/]<applicationName>/<type> on Linux
|
//! * /usr/share/[organizationName/]<applicationName>/<type> on Linux
|
||||||
QAD_EXPORT QStringList resourcePaths(QString type);
|
QAD_UTILS_EXPORT QStringList resourcePaths(QString type);
|
||||||
|
|
||||||
|
|
||||||
QAD_EXPORT void loadTranslations(QString lang = QString());
|
QAD_UTILS_EXPORT void loadTranslations(QString lang = QString());
|
||||||
|
|
||||||
|
|
||||||
QAD_EXPORT QStringList availableTranslations();
|
QAD_UTILS_EXPORT QStringList availableTranslations();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,9 +20,9 @@
|
|||||||
#ifndef QAD_TYPES_H
|
#ifndef QAD_TYPES_H
|
||||||
#define QAD_TYPES_H
|
#define QAD_TYPES_H
|
||||||
|
|
||||||
#include "propertystorage.h"
|
|
||||||
#include "qad_export.h"
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
#include "propertystorage.h"
|
||||||
|
#include "qad_utils_export.h"
|
||||||
|
|
||||||
//! Set QCoreApplication properties from CMake "deploy_properties"
|
//! Set QCoreApplication properties from CMake "deploy_properties"
|
||||||
//! Affect applicationName, organizationName and applicationVersion
|
//! Affect applicationName, organizationName and applicationVersion
|
||||||
@@ -36,13 +36,13 @@ class QMetaEnum;
|
|||||||
|
|
||||||
namespace QAD {
|
namespace QAD {
|
||||||
|
|
||||||
struct QAD_EXPORT Enumerator {
|
struct QAD_UTILS_EXPORT Enumerator {
|
||||||
Enumerator(int v = 0, const QString & n = QString()): value(v), name(n) {}
|
Enumerator(int v = 0, const QString & n = QString()): value(v), name(n) {}
|
||||||
int value;
|
int value;
|
||||||
QString name;
|
QString name;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct QAD_EXPORT Enum {
|
struct QAD_UTILS_EXPORT Enum {
|
||||||
Enum(const QString & n = QString()): enum_name(n) {}
|
Enum(const QString & n = QString()): enum_name(n) {}
|
||||||
Enum(const QMetaEnum & meta, int selected = 0);
|
Enum(const QMetaEnum & meta, int selected = 0);
|
||||||
int selectedValue() const;
|
int selectedValue() const;
|
||||||
@@ -62,7 +62,7 @@ namespace QAD {
|
|||||||
Enum & operator <<(const QStringList & v);
|
Enum & operator <<(const QStringList & v);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct QAD_EXPORT File {
|
struct QAD_UTILS_EXPORT File {
|
||||||
File(const QString & p = QString(), const QString & f = QString(), bool abs = false, bool save_mode = false):
|
File(const QString & p = QString(), const QString & f = QString(), bool abs = false, bool save_mode = false):
|
||||||
file(p), filter(f), is_abs(abs), is_save(save_mode) {}
|
file(p), filter(f), is_abs(abs), is_save(save_mode) {}
|
||||||
QString toString() const {return file;}
|
QString toString() const {return file;}
|
||||||
@@ -72,7 +72,7 @@ namespace QAD {
|
|||||||
bool is_save;
|
bool is_save;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct QAD_EXPORT Dir {
|
struct QAD_UTILS_EXPORT Dir {
|
||||||
Dir(const QString & d = QString(), bool abs = false):
|
Dir(const QString & d = QString(), bool abs = false):
|
||||||
dir(d), is_abs(abs) {}
|
dir(d), is_abs(abs) {}
|
||||||
QString toString() const {return dir;}
|
QString toString() const {return dir;}
|
||||||
@@ -80,7 +80,7 @@ namespace QAD {
|
|||||||
bool is_abs;
|
bool is_abs;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct QAD_EXPORT IODevice {
|
struct QAD_UTILS_EXPORT IODevice {
|
||||||
IODevice(const QString & device_prefix = QString(), const PropertyStorage & device_properties = PropertyStorage(),
|
IODevice(const QString & device_prefix = QString(), const PropertyStorage & device_properties = PropertyStorage(),
|
||||||
int open_mode = QIODevice::ReadWrite, int device_options = 0)
|
int open_mode = QIODevice::ReadWrite, int device_options = 0)
|
||||||
: prefix(device_prefix), mode(open_mode), options(device_options), props(device_properties) {}
|
: prefix(device_prefix), mode(open_mode), options(device_options), props(device_properties) {}
|
||||||
@@ -92,12 +92,12 @@ namespace QAD {
|
|||||||
PropertyStorage props;
|
PropertyStorage props;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct QAD_EXPORT MathVector {
|
struct QAD_UTILS_EXPORT MathVector {
|
||||||
MathVector(const QVector<double> & vec = QVector<double>()) {v = vec;}
|
MathVector(const QVector<double> & vec = QVector<double>()) {v = vec;}
|
||||||
QVector<double> v;
|
QVector<double> v;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct QAD_EXPORT MathMatrix {
|
struct QAD_UTILS_EXPORT MathMatrix {
|
||||||
MathMatrix(const QVector<QVector<double> > & mat = QVector<QVector<double> > ()) {m = mat;}
|
MathMatrix(const QVector<QVector<double> > & mat = QVector<QVector<double> > ()) {m = mat;}
|
||||||
QVector<QVector<double> > m; // [Row][Column]
|
QVector<QVector<double> > m; // [Row][Column]
|
||||||
};
|
};
|
||||||
@@ -140,7 +140,7 @@ inline QDataStream & operator >>(QDataStream & s, QAD::MathMatrix & v) {s >> v.m
|
|||||||
inline QDebug operator <<(QDebug s, const QAD::MathMatrix & v) {s.nospace() << "Matrix " << v.m; return s.space();}
|
inline QDebug operator <<(QDebug s, const QAD::MathMatrix & v) {s.nospace() << "Matrix " << v.m; return s.space();}
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT __QADTypesRegistrator__ {
|
class QAD_UTILS_EXPORT __QADTypesRegistrator__ {
|
||||||
public:
|
public:
|
||||||
__QADTypesRegistrator__(int);
|
__QADTypesRegistrator__(int);
|
||||||
static __QADTypesRegistrator__ * instance();
|
static __QADTypesRegistrator__ * instance();
|
||||||
@@ -167,13 +167,13 @@ inline QRectF enlargedRect(const QRectF & r, qreal dx, qreal dy, qreal v) {
|
|||||||
return QRectF(r.left() - v + dx, r.top() - v + dy, r.width() + v+v, r.height() + v+v);
|
return QRectF(r.left() - v + dx, r.top() - v + dy, r.width() + v+v, r.height() + v+v);
|
||||||
}
|
}
|
||||||
|
|
||||||
QAD_EXPORT QVariant::Type typeFromLetter(const QString & l);
|
QAD_UTILS_EXPORT QVariant::Type typeFromLetter(const QString & l);
|
||||||
QAD_EXPORT QString uniqueName(QString n, const QStringList & names);
|
QAD_UTILS_EXPORT QString uniqueName(QString n, const QStringList & names);
|
||||||
|
|
||||||
QAD_EXPORT int fontHeight(const QWidget * w = 0);
|
QAD_UTILS_EXPORT int fontHeight(const QWidget * w = 0);
|
||||||
QAD_EXPORT int lineThickness(const QWidget * w = 0);
|
QAD_UTILS_EXPORT int lineThickness(const QWidget * w = 0);
|
||||||
QAD_EXPORT QSize preferredIconSize(float x = 1.f, const QWidget * w = 0);
|
QAD_UTILS_EXPORT QSize preferredIconSize(float x = 1.f, const QWidget * w = 0);
|
||||||
QAD_EXPORT double appScale(const QWidget * w = 0);
|
QAD_UTILS_EXPORT double appScale(const QWidget * w = 0);
|
||||||
|
|
||||||
|
|
||||||
#endif // QAD_TYPES_H
|
#endif // QAD_TYPES_H
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
<RCC>
|
|
||||||
<qresource prefix="/">
|
|
||||||
<file>../../icons/edit-clear.png</file>
|
|
||||||
<file>../../icons/document-save.png</file>
|
|
||||||
<file>../../icons/edit-clear-locationbar-rtl.png</file>
|
|
||||||
<file>../../icons/edit-find.png</file>
|
|
||||||
<file>../../icons/list-add.png</file>
|
|
||||||
<file>../../icons/edit-delete.png</file>
|
|
||||||
<file>../../icons/item-add.png</file>
|
|
||||||
<file>../../icons/item.png</file>
|
|
||||||
<file>../../icons/node-add.png</file>
|
|
||||||
<file>../../icons/node.png</file>
|
|
||||||
<file>../../icons/edit-copy.png</file>
|
|
||||||
<file>../../icons/edit-paste.png</file>
|
|
||||||
<file>../../icons/document-open_16.png</file>
|
|
||||||
</qresource>
|
|
||||||
</RCC>
|
|
||||||
@@ -20,33 +20,33 @@
|
|||||||
#ifndef QPICONFIG_H
|
#ifndef QPICONFIG_H
|
||||||
#define QPICONFIG_H
|
#define QPICONFIG_H
|
||||||
|
|
||||||
#include "QFile"
|
#include <QFile>
|
||||||
#include "QVector"
|
#include <QVector>
|
||||||
#include "QStringList"
|
#include <QStringList>
|
||||||
#include "QTextStream"
|
#include <QTextStream>
|
||||||
|
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
#include <QPointF>
|
#include <QPointF>
|
||||||
#include <QRectF>
|
#include <QRectF>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include "qad_export.h"
|
#include "qad_utils_export.h"
|
||||||
|
|
||||||
|
|
||||||
inline QByteArray QString2QByteArray(const QString & string) {return string.isEmpty() ? QByteArray() : qUncompress(QByteArray::fromBase64(string.toLatin1()));}
|
inline QByteArray QString2QByteArray(const QString & string) {return string.isEmpty() ? QByteArray() : qUncompress(QByteArray::fromBase64(string.toLatin1()));}
|
||||||
QAD_EXPORT int QString2int(const QString & string);
|
QAD_UTILS_EXPORT int QString2int(const QString & string);
|
||||||
inline QColor QString2QColor(const QString & string) {return (string.left(1) == "#" ? QColor(string.right(string.length() - 1).toInt(0, 16)) : QColor(QString2int(string)));}
|
inline QColor QString2QColor(const QString & string) {return (string.left(1) == "#" ? QColor(string.right(string.length() - 1).toInt(0, 16)) : QColor(QString2int(string)));}
|
||||||
QAD_EXPORT QRect QString2QRect(const QString & string);
|
QAD_UTILS_EXPORT QRect QString2QRect(const QString & string);
|
||||||
QAD_EXPORT QRectF QString2QRectF(const QString & string);
|
QAD_UTILS_EXPORT QRectF QString2QRectF(const QString & string);
|
||||||
QAD_EXPORT QPoint QString2QPoint(const QString & string);
|
QAD_UTILS_EXPORT QPoint QString2QPoint(const QString & string);
|
||||||
QAD_EXPORT QPointF QString2QPointF(const QString & string);
|
QAD_UTILS_EXPORT QPointF QString2QPointF(const QString & string);
|
||||||
|
|
||||||
inline QString QColor2QString(const QColor & color) {QString s = color.name(); return "0x" + QString::number(color.alpha(), 16).rightJustified(2, '0') + s.right(s.length() - 1);}
|
inline QString QColor2QString(const QColor & color) {QString s = color.name(); return "0x" + QString::number(color.alpha(), 16).rightJustified(2, '0') + s.right(s.length() - 1);}
|
||||||
inline QString QPoint2QString(const QPoint & point) {return QString::number(point.x()) + ";" + QString::number(point.y());}
|
inline QString QPoint2QString(const QPoint & point) {return QString::number(point.x()) + ";" + QString::number(point.y());}
|
||||||
inline QString QPointF2QString(const QPointF & point) {return QString::number(point.x()) + ";" + QString::number(point.y());}
|
inline QString QPointF2QString(const QPointF & point) {return QString::number(point.x()) + ";" + QString::number(point.y());}
|
||||||
inline QString QByteArray2QString(const QByteArray & array) {return array.isEmpty() ? QString() : QString(qCompress(array, 9).toBase64());}
|
inline QString QByteArray2QString(const QByteArray & array) {return array.isEmpty() ? QString() : QString(qCompress(array, 9).toBase64());}
|
||||||
QAD_EXPORT QString QRect2QString(const QRect & rect);
|
QAD_UTILS_EXPORT QString QRect2QString(const QRect & rect);
|
||||||
QAD_EXPORT QString QRectF2QString(const QRectF & rect);
|
QAD_UTILS_EXPORT QString QRectF2QString(const QRectF & rect);
|
||||||
|
|
||||||
#define QPICONFIG_GET_VALUE \
|
#define QPICONFIG_GET_VALUE \
|
||||||
Entry & getValue(const QString & vname, const char * def, bool * exist = 0) {return getValue(vname, QString(def), exist);} \
|
Entry & getValue(const QString & vname, const char * def, bool * exist = 0) {return getValue(vname, QString(def), exist);} \
|
||||||
@@ -69,7 +69,7 @@ QAD_EXPORT QString QRectF2QString(const QRectF & rect);
|
|||||||
Entry & getValue(const QString & vname, const QPointF & def, bool * exist = 0) {return getValue(vname, QPointF2QString(def), exist);} \
|
Entry & getValue(const QString & vname, const QPointF & def, bool * exist = 0) {return getValue(vname, QPointF2QString(def), exist);} \
|
||||||
Entry & getValue(const QString & vname, const QByteArray & def, bool * exist = 0) {return getValue(vname, QByteArray2QString(def), exist);}
|
Entry & getValue(const QString & vname, const QByteArray & def, bool * exist = 0) {return getValue(vname, QByteArray2QString(def), exist);}
|
||||||
|
|
||||||
class QAD_EXPORT QPIConfig: public QFile
|
class QAD_UTILS_EXPORT QPIConfig: public QFile
|
||||||
{
|
{
|
||||||
friend class Entry;
|
friend class Entry;
|
||||||
friend class Branch;
|
friend class Branch;
|
||||||
@@ -90,7 +90,7 @@ public:
|
|||||||
|
|
||||||
class Entry;
|
class Entry;
|
||||||
|
|
||||||
class QAD_EXPORT Branch: public QVector<Entry * > {
|
class QAD_UTILS_EXPORT Branch: public QVector<Entry * > {
|
||||||
friend class QPIConfig;
|
friend class QPIConfig;
|
||||||
friend class Entry;
|
friend class Entry;
|
||||||
public:
|
public:
|
||||||
@@ -116,7 +116,7 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class QAD_EXPORT Entry {
|
class QAD_UTILS_EXPORT Entry {
|
||||||
friend class QPIConfig;
|
friend class QPIConfig;
|
||||||
friend class Branch;
|
friend class Branch;
|
||||||
friend class QPIConfigWidget;
|
friend class QPIConfigWidget;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <complex>
|
#include <complex>
|
||||||
#include "qad_export.h"
|
#include "qad_utils_export.h"
|
||||||
|
|
||||||
|
|
||||||
#ifndef PIP_MATH_COMPLEX
|
#ifndef PIP_MATH_COMPLEX
|
||||||
@@ -67,7 +67,7 @@ namespace QPIEvaluatorTypes {
|
|||||||
bfIm, bfRe, bfArg, bfLen, bfConj,
|
bfIm, bfRe, bfArg, bfLen, bfConj,
|
||||||
bfRad, bfDeg};
|
bfRad, bfDeg};
|
||||||
|
|
||||||
struct QAD_EXPORT Instruction {
|
struct QAD_UTILS_EXPORT Instruction {
|
||||||
Instruction() {;}
|
Instruction() {;}
|
||||||
Instruction(Operation oper, QVector<int> opers, int out_ind, int func = -1) {
|
Instruction(Operation oper, QVector<int> opers, int out_ind, int func = -1) {
|
||||||
operation = oper; operators = opers; out = out_ind; function = func;}
|
operation = oper; operators = opers; out = out_ind; function = func;}
|
||||||
@@ -75,20 +75,20 @@ namespace QPIEvaluatorTypes {
|
|||||||
QVector<int> operators;
|
QVector<int> operators;
|
||||||
int out;
|
int out;
|
||||||
int function;};
|
int function;};
|
||||||
struct QAD_EXPORT Element {
|
struct QAD_UTILS_EXPORT Element {
|
||||||
Element() {;}
|
Element() {;}
|
||||||
Element(eType new_type, int new_num, int new_var_num = -1) {set(new_type, new_num, new_var_num);}
|
Element(eType new_type, int new_num, int new_var_num = -1) {set(new_type, new_num, new_var_num);}
|
||||||
void set(eType new_type, int new_num, int new_var_num = -1) {type = new_type; num = new_num; var_num = new_var_num;}
|
void set(eType new_type, int new_num, int new_var_num = -1) {type = new_type; num = new_num; var_num = new_var_num;}
|
||||||
eType type;
|
eType type;
|
||||||
int num;
|
int num;
|
||||||
int var_num;};
|
int var_num;};
|
||||||
struct QAD_EXPORT Function {
|
struct QAD_UTILS_EXPORT Function {
|
||||||
Function() {arguments = 0; type = bfUnknown;}
|
Function() {arguments = 0; type = bfUnknown;}
|
||||||
Function(const QString & name, int args, BaseFunctions ftype) {identifier = name; arguments = args; type = ftype;}
|
Function(const QString & name, int args, BaseFunctions ftype) {identifier = name; arguments = args; type = ftype;}
|
||||||
QString identifier;
|
QString identifier;
|
||||||
BaseFunctions type;
|
BaseFunctions type;
|
||||||
int arguments;};
|
int arguments;};
|
||||||
struct QAD_EXPORT Variable {
|
struct QAD_UTILS_EXPORT Variable {
|
||||||
Variable() {value = 0.;}
|
Variable() {value = 0.;}
|
||||||
Variable(const QString & var_name, complexd val) {name = var_name; value = val;}
|
Variable(const QString & var_name, complexd val) {name = var_name; value = val;}
|
||||||
QString name;
|
QString name;
|
||||||
@@ -108,7 +108,7 @@ namespace QPIEvaluatorTypes {
|
|||||||
⋀ &
|
⋀ &
|
||||||
⋁ |
|
⋁ |
|
||||||
*/
|
*/
|
||||||
class QAD_EXPORT QPIEvaluatorContent
|
class QAD_UTILS_EXPORT QPIEvaluatorContent
|
||||||
{
|
{
|
||||||
friend class QPIEvaluator;
|
friend class QPIEvaluator;
|
||||||
public:
|
public:
|
||||||
@@ -146,7 +146,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT QPIEvaluator
|
class QAD_UTILS_EXPORT QPIEvaluator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QPIEvaluator() {correct = false ;}
|
QPIEvaluator() {correct = false ;}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QMetaEnum>
|
#include <QMetaEnum>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "qad_export.h"
|
#include "qad_widgets_export.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
@@ -31,7 +31,7 @@ namespace Ui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT CharDialog: public QDialog
|
class QAD_WIDGETS_EXPORT CharDialog: public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
<string>Choose symbol</string>
|
<string>Choose symbol</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowIcon">
|
<property name="windowIcon">
|
||||||
<iconset resource="mbricks.qrc">
|
<iconset resource="qad_widgets.qrc">
|
||||||
<normaloff>:/icons/icons/mbricks_128.png</normaloff>:/icons/icons/mbricks_128.png</iconset>
|
<normaloff>:/icons/chardialog.png</normaloff>:/icons/chardialog.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="margin">
|
<property name="margin">
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="mbricks.qrc"/>
|
<include location="qad_widgets.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
@@ -24,10 +24,10 @@
|
|||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include "qad_export.h"
|
#include "qad_widgets_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT CLineEdit: public QLineEdit
|
class QAD_WIDGETS_EXPORT CLineEdit: public QLineEdit
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QString defaultText READ defaultText WRITE setDefaultText)
|
Q_PROPERTY(QString defaultText READ defaultText WRITE setDefaultText)
|
||||||
|
|||||||
@@ -28,10 +28,10 @@
|
|||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include "qad_export.h"
|
#include "qad_widgets_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT ColorButton: public QPushButton
|
class QAD_WIDGETS_EXPORT ColorButton: public QPushButton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QColor color READ color WRITE setColor)
|
Q_PROPERTY(QColor color READ color WRITE setColor)
|
||||||
|
|||||||
@@ -25,9 +25,10 @@
|
|||||||
#include <QTreeView>
|
#include <QTreeView>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include "clineedit.h"
|
#include "clineedit.h"
|
||||||
|
#include "qad_widgets_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT EComboBox: public QComboBox
|
class QAD_WIDGETS_EXPORT EComboBox: public QComboBox
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -23,11 +23,12 @@
|
|||||||
#include <QAbstractSpinBox>
|
#include <QAbstractSpinBox>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include "qpievaluator.h"
|
#include "qpievaluator.h"
|
||||||
|
#include "qad_widgets_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QLabel;
|
class QLabel;
|
||||||
|
|
||||||
class QAD_EXPORT EvalSpinBox: public QAbstractSpinBox
|
class QAD_WIDGETS_EXPORT EvalSpinBox: public QAbstractSpinBox
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(double value READ value WRITE setValue NOTIFY valueChanged USER true)
|
Q_PROPERTY(double value READ value WRITE setValue NOTIFY valueChanged USER true)
|
||||||
|
|||||||
@@ -23,9 +23,10 @@
|
|||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include "qad_types.h"
|
#include "qad_types.h"
|
||||||
|
#include "qad_widgets_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT IconedLabel: public QFrame
|
class QAD_WIDGETS_EXPORT IconedLabel: public QFrame
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_ENUMS(Direction)
|
Q_ENUMS(Direction)
|
||||||
|
|||||||
@@ -22,10 +22,10 @@
|
|||||||
|
|
||||||
#include <QGraphicsView>
|
#include <QGraphicsView>
|
||||||
#include <QGraphicsPixmapItem>
|
#include <QGraphicsPixmapItem>
|
||||||
#include "qad_export.h"
|
#include "qad_widgets_export.h"
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT ImageView: public QGraphicsView
|
class QAD_WIDGETS_EXPORT ImageView: public QGraphicsView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap)
|
Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap)
|
||||||
|
|||||||
@@ -22,12 +22,13 @@
|
|||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include "qad_types.h"
|
#include "qad_types.h"
|
||||||
|
#include "qad_widgets_export.h"
|
||||||
|
|
||||||
|
|
||||||
class MatrixEdit;
|
class MatrixEdit;
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT MathMatrixEdit: public QWidget {
|
class QAD_WIDGETS_EXPORT MathMatrixEdit: 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)
|
||||||
@@ -51,7 +52,7 @@ signals:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class __MathMatrixEditRegistrator__ {
|
class QAD_WIDGETS_EXPORT __MathMatrixEditRegistrator__ {
|
||||||
public:
|
public:
|
||||||
__MathMatrixEditRegistrator__();
|
__MathMatrixEditRegistrator__();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -22,12 +22,13 @@
|
|||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include "qad_types.h"
|
#include "qad_types.h"
|
||||||
|
#include "qad_widgets_export.h"
|
||||||
|
|
||||||
|
|
||||||
class MatrixEdit;
|
class MatrixEdit;
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT MathVectorEdit: public QWidget {
|
class QAD_WIDGETS_EXPORT MathVectorEdit: 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)
|
||||||
@@ -51,7 +52,7 @@ signals:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class __MathVectorEditRegistrator__ {
|
class QAD_WIDGETS_EXPORT __MathVectorEditRegistrator__ {
|
||||||
public:
|
public:
|
||||||
__MathVectorEditRegistrator__();
|
__MathVectorEditRegistrator__();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define MATRIXEDIT_H
|
#define MATRIXEDIT_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include "qad_export.h"
|
#include "qad_widgets_export.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
@@ -29,7 +29,7 @@ namespace Ui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class QAD_EXPORT MatrixEdit: public QWidget {
|
class QAD_WIDGETS_EXPORT MatrixEdit: public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit MatrixEdit(QWidget * parent = 0);
|
explicit MatrixEdit(QWidget * parent = 0);
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ QString ImageViewPlugin::group() const {
|
|||||||
|
|
||||||
|
|
||||||
QIcon ImageViewPlugin::icon() const {
|
QIcon ImageViewPlugin::icon() const {
|
||||||
return QIcon(/*":/icons/spinslider.png"*/);
|
return QIcon(":/icons/view-preview.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user